Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcvs2svn2002-06-11 21:37:35 +0000
committercvs2svn2002-06-11 21:37:35 +0000
commit8325a20321adcb512973c9ef8fac66cd2b475b21 (patch)
tree5c043afefbda2f584e9d009e9dc7485a7cd64b7b
parentc6b4b2e5c5781b7182a4840ec8d4abb95c4951e7 (diff)
downloadeclipse.platform.team-8325a20321adcb512973c9ef8fac66cd2b475b21.tar.gz
eclipse.platform.team-8325a20321adcb512973c9ef8fac66cd2b475b21.tar.xz
eclipse.platform.team-8325a20321adcb512973c9ef8fac66cd2b475b21.zip
This commit was manufactured by cvs2svn to create branch 'bug20715'.
Sprout from master 2002-06-11 21:37:33 UTC james <james> '18609: Making un-added more obvious' 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/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/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/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/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/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/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/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/INavigatable.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ISavable.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/IStructureCreatorDescriptor.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/Splitter.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/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/PatchCompareInput.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/PatchedResource.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/internal/previewAncestor.txt bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/previewLeft.txt bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/previewRight.txt 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/doc/hglegal.htm bundles/org.eclipse.compare/doc/ngibmcpy.gif bundles/org.eclipse.compare/doc/org_eclipse_compare.html bundles/org.eclipse.compare/doc/org_eclipse_compare_contentMergeViewers.html bundles/org.eclipse.compare/doc/org_eclipse_compare_contentViewers.html bundles/org.eclipse.compare/doc/org_eclipse_compare_structureCreators.html bundles/org.eclipse.compare/doc/org_eclipse_compare_structureMergeViewers.html bundles/org.eclipse.compare/icons/full/clcl16/ancestorpane_co.gif bundles/org.eclipse.compare/icons/full/clcl16/copy_l_co.gif bundles/org.eclipse.compare/icons/full/clcl16/copy_r_co.gif bundles/org.eclipse.compare/icons/full/clcl16/copycont_l_co.gif bundles/org.eclipse.compare/icons/full/clcl16/copycont_r_co.gif bundles/org.eclipse.compare/icons/full/clcl16/next_nav.gif bundles/org.eclipse.compare/icons/full/clcl16/prev_nav.gif bundles/org.eclipse.compare/icons/full/clcl16/smartmode_co.gif bundles/org.eclipse.compare/icons/full/clcl16/syncpane_co.gif bundles/org.eclipse.compare/icons/full/clcl16/twowaycompare_co.gif bundles/org.eclipse.compare/icons/full/ctool16/conflict_edit.gif bundles/org.eclipse.compare/icons/full/ctool16/ignorews_edit.gif bundles/org.eclipse.compare/icons/full/cview16/compare_view.gif 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/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/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/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/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/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/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/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/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/INavigatable.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/IStructureCreatorDescriptor.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/Splitter.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/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/PatchCompareInput.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/PatchedResource.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/internal/previewAncestor.txt bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/previewLeft.txt bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/previewRight.txt 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/doc/hglegal.htm bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/ngibmcpy.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/org_eclipse_compare.html bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/org_eclipse_compare_contentMergeViewers.html bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/org_eclipse_compare_contentViewers.html bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/org_eclipse_compare_structureCreators.html bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/org_eclipse_compare_structureMergeViewers.html bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/ancestorpane_co.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/copy_l_co.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/copy_r_co.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/copycont_l_co.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/copycont_r_co.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/next_nav.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/prev_nav.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/smartmode_co.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/syncpane_co.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/twowaycompare_co.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ctool16/conflict_edit.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ctool16/ignorews_edit.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/cview16/compare_view.gif 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/plugin.properties bundles/org.eclipse.compare/plugins/org.eclipse.compare/plugin.xml bundles/org.eclipse.compare/plugins/org.eclipse.compare/scripts/exportplugin.xml bundles/org.eclipse.compare/scripts/exportplugin.xml bundles/org.eclipse.team.core/.classpath bundles/org.eclipse.team.core/.cvsignore bundles/org.eclipse.team.core/.options bundles/org.eclipse.team.core/.project bundles/org.eclipse.team.core/README bundles/org.eclipse.team.core/about.html bundles/org.eclipse.team.core/build.properties bundles/org.eclipse.team.core/buildnotes_team.html bundles/org.eclipse.team.core/doc/hglegal.htm bundles/org.eclipse.team.core/doc/ngibmcpy.gif bundles/org.eclipse.team.core/doc/org_eclipse_team_core.html bundles/org.eclipse.team.core/doc/org_eclipse_team_core_fileTypes.html bundles/org.eclipse.team.core/doc/org_eclipse_team_core_ignore.html bundles/org.eclipse.team.core/doc/org_eclipse_team_core_projectSets.html bundles/org.eclipse.team.core/plugin.properties bundles/org.eclipse.team.core/plugin.xml bundles/org.eclipse.team.core/src/org/eclipse/team/core/IFileTypeInfo.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/IIgnoreInfo.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/IProjectSetSerializer.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProvider.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/Team.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/TeamException.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/ILocalSyncElement.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/IRemoteResource.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/IRemoteSyncElement.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/LocalSyncElement.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/RemoteSyncElement.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/IRemoteTargetResource.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/ISiteFactory.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/ISiteListener.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/ITargetRunnable.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/Site.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/TargetManager.java bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/TargetProvider.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Assert.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultFileModificationValidator.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultMoveDeleteHook.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/FileModificationValidatorManager.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/InfiniteSubProgressMonitor.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/MoveDeleteManager.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/NullSubProgressMonitor.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Policy.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/StringMatcher.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamPlugin.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/messages.properties bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/simpleAccess/SimpleAccessOperations.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/CRLFtoLFInputStream.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/LFtoCRLFInputStream.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/PollingInputStream.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/PollingOutputStream.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/ProgressMonitorInputStream.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/SizeConstrainedInputStream.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/TimeoutInputStream.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/TimeoutOutputStream.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/BaseIdentifierNotInitializedException.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/ITeamStatusConstants.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/LocationMapping.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/RemoteTargetSyncElement.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/ResourceState.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/SynchronizedTargetProvider.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/UrlUtil.java bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/messages.properties 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/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/CVSException.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProvider.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/CVSStatus.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/DateUtil.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/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/ICVSProvider.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/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/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/Command.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/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/NewEntryHandler.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/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/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/Update.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/DiffListener.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/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/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/CVSLocalSyncElement.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSRemoteSyncElement.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/EclipsePhantomSynchronizer.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/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/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/syncinfo/FolderSyncInfo.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/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/AddDeleteMoveListener.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/CVSDateFormatter.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/EmptyTokenizer.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/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/ProjectDescriptionContentHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ProjectDescriptionManager.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ProjectDescriptionWriter.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/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/.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/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.ui/.classpath bundles/org.eclipse.team.cvs.ui/.cvsignore 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/help_contexts.xml bundles/org.eclipse.team.cvs.ui/icons/full/clcl16/clear_co.gif bundles/org.eclipse.team.cvs.ui/icons/full/clcl16/filter_history.gif bundles/org.eclipse.team.cvs.ui/icons/full/clcl16/newstream_wiz.gif bundles/org.eclipse.team.cvs.ui/icons/full/clcl16/refresh.gif bundles/org.eclipse.team.cvs.ui/icons/full/ctool16/checkout.gif bundles/org.eclipse.team.cvs.ui/icons/full/ctool16/contents.gif bundles/org.eclipse.team.cvs.ui/icons/full/cview16/console_view.gif bundles/org.eclipse.team.cvs.ui/icons/full/cview16/cvs_persp.gif bundles/org.eclipse.team.cvs.ui/icons/full/cview16/history_view.gif bundles/org.eclipse.team.cvs.ui/icons/full/cview16/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/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/merged_ov.gif bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/question_ov.gif bundles/org.eclipse.team.cvs.ui/icons/full/wizards/newconnect_wiz.gif bundles/org.eclipse.team.cvs.ui/icons/full/wizards/newlocation_wiz.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/icons/full/wizban/newstream_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/AlternateUserValidationDialog.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/CVSAbstractResolutionGenerator.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSAddResolutionGenerator.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/CVSDecoration.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecorationRunnable.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecorator.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/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/CVSLocalCompareEditorInput.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/CVSProjectSetSerializer.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSRemoveResolutionGenerator.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSRepositoryPropertiesPage.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/Console.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ConsoleDocument.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ConsolePreferencesPage.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/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/HistorySorter.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/IDecorationNotifier.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/OverlayIcon.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/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/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/RepositoriesView.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RepositoryManager.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RepositorySorter.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/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/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/WorkbenchUserAuthenticator.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/AddToWorkspaceAction.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/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/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/ConfigureTagsFromRepoView.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/ContentAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CopyRepositoryNameAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/DefineBranchAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/DefineVersionAction.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/NewCVSAnonEclipseConnection.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/NewCVSRepositoryAction.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/RemoveBranchTagAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RemoveRootAction.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/ReplaceWithTagAction.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/ShowCVSPerspectiveAction.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/SyncOutgoingAction.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/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/merge/MergeEditorInput.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/OverrideUpdateMergeAction.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/merge/UpdateMergeAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/UpdateWithForcedJoinAction.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/BranchTag.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/GroupedByVersionCategory.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/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/VersionCategory.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/AddSyncAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSCatchupReleaseViewer.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSSyncCompareUnsharedInput.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSSyncSet.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CommitSyncAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/ForceCommitSyncAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/ForceUpdateSyncAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/IgnoreAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/MergeAction.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/sync/UpdateSyncAction.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/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/KSubstWizard.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/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/UpdateWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/UpdateWizardPage.java bundles/org.eclipse.team.ui/.classpath bundles/org.eclipse.team.ui/.cvsignore bundles/org.eclipse.team.ui/.project bundles/org.eclipse.team.ui/README bundles/org.eclipse.team.ui/about.html bundles/org.eclipse.team.ui/build.properties bundles/org.eclipse.team.ui/doc/hglegal.htm bundles/org.eclipse.team.ui/doc/ngibmcpy.gif bundles/org.eclipse.team.ui/doc/org_eclipse_team_ui.html bundles/org.eclipse.team.ui/doc/org_eclipse_team_ui_configurationWizards.html bundles/org.eclipse.team.ui/help_contexts.xml bundles/org.eclipse.team.ui/icons/full/clcl16/catchup_rls.gif bundles/org.eclipse.team.ui/icons/full/clcl16/catchuprelease_rls.gif bundles/org.eclipse.team.ui/icons/full/clcl16/conflict_synch.gif bundles/org.eclipse.team.ui/icons/full/clcl16/contents.gif bundles/org.eclipse.team.ui/icons/full/clcl16/ignorews_edit.gif bundles/org.eclipse.team.ui/icons/full/clcl16/incom_synch.gif bundles/org.eclipse.team.ui/icons/full/clcl16/outgo_synch.gif bundles/org.eclipse.team.ui/icons/full/clcl16/refresh.gif bundles/org.eclipse.team.ui/icons/full/clcl16/release_rls.gif bundles/org.eclipse.team.ui/icons/full/clcl16/site_element.gif bundles/org.eclipse.team.ui/icons/full/cview16/site_view.gif bundles/org.eclipse.team.ui/icons/full/cview16/synch_synch.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/checkedin_ov.gif bundles/org.eclipse.team.ui/icons/full/ovr/checkedout_ov.gif bundles/org.eclipse.team.ui/icons/full/ovr/dirty_ov.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/newconnect_wizban.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/src/org/eclipse/team/internal/ui/ConfigurationWizardElement.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ConfigurationWizardNode.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ConfigureProjectWizard.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ConfigureProjectWizardMainPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/DetailsDialog.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/DetailsDialogWithProjects.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ExportProjectSetMainPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IHelpContextIds.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPromptCondition.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IgnorePreferencePage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ImportProjectSetMainPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/NatureToPropertyAction.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/ProjectSetExportWizard.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImportWizard.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/PromptingDialog.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamPreferencePage.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/TeamWizardPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TextPreferencePage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/UIConstants.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/DeconfigureProjectAction.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/messages.properties bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/CatchupReleaseViewer.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/ChangedTeamContainer.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/ITeamNode.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/MergeResource.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/SyncCompareInput.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/SyncSet.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/SyncView.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/TeamFile.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/TypedBufferedContent.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/UnchangedTeamContainer.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/ConfigureTargetWizard.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/CreateNewFolderAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/DiscardSiteAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetAsAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetAsProjectAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetSyncAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/MappingSelectionPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/PutAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/PutSyncAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/RemoteResourceElement.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteElement.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteExplorerView.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteExplorerViewLabelProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteLazyContentProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteRootsElement.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteSelectionPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteViewSorter.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SyncAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetCatchupReleaseViewer.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetProjectAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetSyncAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetSyncCompareInput.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetWizardPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/UploadAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizard.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamImages.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java 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.properties tests/org.eclipse.team.tests.core/ftp.properties tests/org.eclipse.team.tests.core/plugin.xml tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/AllTargetTests.java 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/RemoteResourceTests.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/StreamTests.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/SyncElementTest.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TargetProviderTests.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TargetTestSetup.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TeamTest.java tests/org.eclipse.team.tests.core/test.xml tests/org.eclipse.team.tests.core/webdav.properties 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/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/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/build.properties tests/org.eclipse.team.tests.cvs.core/plugin.xml tests/org.eclipse.team.tests.cvs.core/readme.txt 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/src/org/eclipse/team/tests/ccvs/core/AllTeamAndCVSTests.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/CVSTestSetup.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/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/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/ImportTest.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/SyncElementTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CVSUITestCase.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/DummyPromptCondition.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/EclipseUITestHarnessApplication.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/EmptyPerspective.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/FakeSelectionProvider.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/ICriteria.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/LoggingTestCase.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/LoggingTestResult.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/LoggingTestRunner.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/PerformanceTimer.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SequenceGenerator.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/Util.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/Waiter.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/AllTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkTestSetup.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/CommandTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/SyncTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/WorkflowTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/ArgumentParser.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/CaseEntry.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/DelimitedValuesWriter.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/GroupEntry.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/ILogEntryVisitor.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/LogEntry.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/LogEntryContainer.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/LogFormatterUIMain.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/MergeRunsVisitor.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintCSVDiffVisitor.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintCSVSummaryVisitor.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintDiffMain.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintDiffVisitor.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintSummaryMain.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintTextDiffVisitor.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintTextSummaryVisitor.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/Result.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/RootEntry.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/TaskEntry.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/Util.java tests/org.eclipse.team.tests.cvs.core/test.xml
-rw-r--r--bundles/org.eclipse.compare/.classpath11
-rw-r--r--bundles/org.eclipse.compare/.cvsignore1
-rw-r--r--bundles/org.eclipse.compare/.project23
-rw-r--r--bundles/org.eclipse.compare/about.html42
-rw-r--r--bundles/org.eclipse.compare/build.properties8
-rw-r--r--bundles/org.eclipse.compare/buildnotes_compare.html1056
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/BufferedContent.java122
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java425
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java792
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareUI.java203
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerPane.java95
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java307
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java1016
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/HistoryItem.java79
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/IContentChangeListener.java24
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/IContentChangeNotifier.java33
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/IEditableContent.java68
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/IModificationDate.java25
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/IPropertyChangeNotifier.java35
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/IStreamContentAccessor.java30
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/ITypedElement.java62
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/IViewerCreator.java28
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/NavigationAction.java65
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/ResourceNode.java192
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/ZipFileStructureCreator.java272
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java937
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/DelayedProgressMonitor.java136
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/IDocumentRange.java43
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/IMergeViewerContentProvider.java149
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ITokenComparator.java51
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java3537
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewerResources.properties91
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/package.html35
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AbstractViewer.java29
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryAction.java135
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryAction.properties39
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryDialog.java449
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewer.java120
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewerCreator.java23
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewerResources.properties16
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BufferedCanvas.java85
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BufferedResourceNode.java111
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ChangePropertyAction.java47
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ColorEditor.java116
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareAction.java37
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareDialog.java110
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java168
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorContributor.java83
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.java26
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.properties52
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareNavigator.java122
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferencePage.java358
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java862
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithEditionAction.java13
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithEditionAction.properties32
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DiffImage.java72
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java185
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DocumentManager.java59
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/EditionAction.java259
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ExceptionHandler.java127
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/INavigatable.java15
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ISavable.java13
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/IStructureCreatorDescriptor.java27
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/IViewerDescriptor.java35
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/IgnoreWhiteSpaceAction.java20
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageCanvas.java136
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewer.java135
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewerCreator.java24
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewerResources.properties26
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ListContentProvider.java41
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ListDialog.java83
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeSourceViewer.java392
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeViewerAction.java37
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeViewerContentProvider.java156
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/NullViewer.java25
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/OverlayPreferenceStore.java446
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithEditionAction.java13
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithEditionAction.properties34
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithPreviousEditionAction.java14
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ResizableDialog.java136
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ResourceCompareInput.java276
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ShowPseudoConflicts.java20
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/SimpleTextViewer.java62
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/Splitter.java68
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/TabFolderLayout.java40
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/TextMergeViewerCreator.java25
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/TextViewerCreator.java26
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/TimeoutContext.java380
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/TokenComparator.java170
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java370
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ViewerDescriptor.java60
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ViewerSwitchingCancelled.java7
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/CompareWithPatchAction.java154
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Diff.java96
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Hunk.java129
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java623
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/LineReader.java126
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchCompareInput.java180
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchErrorDialog.java17
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.java26
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.properties79
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizard.java172
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchedResource.java77
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java1006
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage.java596
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/previewAncestor.txt10
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/previewLeft.txt10
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/previewRight.txt10
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/package.html50
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/DifferencesIterator.java72
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/IRangeComparator.java54
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/LinkedRangeDifference.java53
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/RangeDifference.java205
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/RangeDifferencer.java532
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/package.html37
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffContainer.java108
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffElement.java86
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffNode.java351
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java708
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewerResources.properties44
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/Differencer.java515
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DocumentRangeNode.java354
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/ICompareInput.java136
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/ICompareInputChangeListener.java32
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IDiffContainer.java58
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IDiffElement.java55
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IStructureComparator.java43
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IStructureCreator.java108
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java354
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/package.html50
-rw-r--r--bundles/org.eclipse.compare/doc/hglegal.htm14
-rw-r--r--bundles/org.eclipse.compare/doc/ngibmcpy.gifbin814 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/doc/org_eclipse_compare.html43
-rw-r--r--bundles/org.eclipse.compare/doc/org_eclipse_compare_contentMergeViewers.html55
-rw-r--r--bundles/org.eclipse.compare/doc/org_eclipse_compare_contentViewers.html56
-rw-r--r--bundles/org.eclipse.compare/doc/org_eclipse_compare_structureCreators.html53
-rw-r--r--bundles/org.eclipse.compare/doc/org_eclipse_compare_structureMergeViewers.html53
-rw-r--r--bundles/org.eclipse.compare/icons/full/clcl16/ancestorpane_co.gifbin154 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/clcl16/copy_l_co.gifbin166 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/clcl16/copy_r_co.gifbin169 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/clcl16/copycont_l_co.gifbin170 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/clcl16/copycont_r_co.gifbin174 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/clcl16/next_nav.gifbin105 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/clcl16/prev_nav.gifbin132 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/clcl16/smartmode_co.gifbin229 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/clcl16/syncpane_co.gifbin124 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/clcl16/twowaycompare_co.gifbin165 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/ctool16/conflict_edit.gifbin117 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/ctool16/ignorews_edit.gifbin119 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/cview16/compare_view.gifbin128 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/dlcl16/ancestorpane_co.gifbin129 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/dlcl16/copy_l_co.gifbin101 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/dlcl16/copy_r_co.gifbin100 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/dlcl16/copycont_l_co.gifbin101 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/dlcl16/copycont_r_co.gifbin101 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/dlcl16/next_nav.gifbin82 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/dlcl16/prev_nav.gifbin82 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/dlcl16/smartmode_co.gifbin99 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/dlcl16/syncpane_co.gifbin90 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/dlcl16/twowaycompare_co.gifbin97 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/dtool16/conflict_edit.gifbin85 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/dtool16/ignorews_edit.gifbin93 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/elcl16/ancestorpane_co.gifbin147 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/elcl16/copy_l_co.gifbin130 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/elcl16/copy_r_co.gifbin129 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/elcl16/copycont_l_co.gifbin133 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/elcl16/copycont_r_co.gifbin138 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/elcl16/next_nav.gifbin101 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/elcl16/prev_nav.gifbin102 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/elcl16/smartmode_co.gifbin133 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/elcl16/syncpane_co.gifbin121 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/elcl16/twowaycompare_co.gifbin125 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/etool16/conflict_edit.gifbin111 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/etool16/ignorews_edit.gifbin122 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/eview16/compare_view.gifbin129 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/obj16/day_obj.gifbin181 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/obj16/resource_obj.gifbin153 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/ovr16/add_ov.gifbin95 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/ovr16/chg_ov.gifbin100 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/ovr16/confadd_ov.gifbin97 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/ovr16/confchg_ov.gifbin93 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/ovr16/confdel_ov.gifbin121 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/ovr16/del_ov.gifbin120 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/ovr16/error_ov.gifbin92 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/ovr16/inadd_ov.gifbin123 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/ovr16/inchg_ov.gifbin119 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/ovr16/indel_ov.gifbin119 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/ovr16/outadd_ov.gifbin124 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/ovr16/outchg_ov.gifbin120 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/ovr16/outdel_ov.gifbin122 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/ovr16/r_inadd_ov.gifbin124 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/ovr16/r_inchg_ov.gifbin117 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/ovr16/r_indel_ov.gifbin118 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/ovr16/r_outadd_ov.gifbin124 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/ovr16/r_outchg_ov.gifbin120 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/icons/full/ovr16/r_outdel_ov.gifbin120 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugin.properties130
-rw-r--r--bundles/org.eclipse.compare/plugin.xml195
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/.classpath11
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/.cvsignore1
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/.project23
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/about.html42
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/build.properties8
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html1056
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/BufferedContent.java122
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java425
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java792
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareUI.java203
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerPane.java95
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java307
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java1016
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/HistoryItem.java79
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IContentChangeListener.java24
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IContentChangeNotifier.java33
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IEditableContent.java68
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IModificationDate.java25
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IPropertyChangeNotifier.java35
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IStreamContentAccessor.java30
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/ITypedElement.java62
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IViewerCreator.java28
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/NavigationAction.java65
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/ResourceNode.java192
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/ZipFileStructureCreator.java272
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java937
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/DelayedProgressMonitor.java136
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/IDocumentRange.java43
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/IMergeViewerContentProvider.java149
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ITokenComparator.java51
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java3537
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewerResources.properties91
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/package.html35
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/AbstractViewer.java29
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryAction.java135
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryAction.properties39
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryDialog.java449
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewer.java120
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewerCreator.java23
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewerResources.properties16
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/BufferedCanvas.java85
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/BufferedResourceNode.java111
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ChangePropertyAction.java47
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ColorEditor.java116
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareAction.java37
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareDialog.java110
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java168
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorContributor.java83
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.java26
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.properties52
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareNavigator.java122
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferencePage.java358
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java862
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithEditionAction.java13
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithEditionAction.properties32
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/DiffImage.java72
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java185
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/DocumentManager.java59
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/EditionAction.java259
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ExceptionHandler.java127
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/INavigatable.java15
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ISavable.java13
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/IStructureCreatorDescriptor.java27
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/IViewerDescriptor.java35
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/IgnoreWhiteSpaceAction.java20
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageCanvas.java136
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewer.java135
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewerCreator.java24
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewerResources.properties26
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ListContentProvider.java41
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ListDialog.java83
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeSourceViewer.java392
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeViewerAction.java37
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeViewerContentProvider.java156
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/NullViewer.java25
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/OverlayPreferenceStore.java446
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithEditionAction.java13
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithEditionAction.properties34
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithPreviousEditionAction.java14
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ResizableDialog.java136
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ResourceCompareInput.java276
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ShowPseudoConflicts.java20
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/SimpleTextViewer.java62
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/Splitter.java68
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/TabFolderLayout.java40
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/TextMergeViewerCreator.java25
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/TextViewerCreator.java26
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/TimeoutContext.java380
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/TokenComparator.java170
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java370
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ViewerDescriptor.java60
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ViewerSwitchingCancelled.java7
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Attic/LineReader.java126
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/CompareWithPatchAction.java154
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Diff.java96
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Hunk.java129
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java623
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/LineReader.java126
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchCompareInput.java180
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchErrorDialog.java17
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.java26
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.properties79
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizard.java172
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchedResource.java77
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java1006
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage.java596
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/previewAncestor.txt10
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/previewLeft.txt10
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/previewRight.txt10
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/package.html50
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/DifferencesIterator.java72
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/IRangeComparator.java54
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/LinkedRangeDifference.java53
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/RangeDifference.java205
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/RangeDifferencer.java532
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/package.html37
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffContainer.java108
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffElement.java86
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffNode.java351
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java708
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewerResources.properties44
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/Differencer.java515
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DocumentRangeNode.java354
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/ICompareInput.java136
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/ICompareInputChangeListener.java32
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IDiffContainer.java58
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IDiffElement.java55
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IStructureComparator.java43
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IStructureCreator.java108
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java354
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/package.html50
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/hglegal.htm14
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/ngibmcpy.gifbin814 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/org_eclipse_compare.html43
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/org_eclipse_compare_contentMergeViewers.html55
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/org_eclipse_compare_contentViewers.html56
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/org_eclipse_compare_structureCreators.html53
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/org_eclipse_compare_structureMergeViewers.html53
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/ancestorpane_co.gifbin154 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/copy_l_co.gifbin166 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/copy_r_co.gifbin169 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/copycont_l_co.gifbin170 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/copycont_r_co.gifbin174 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/next_nav.gifbin105 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/prev_nav.gifbin132 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/smartmode_co.gifbin229 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/syncpane_co.gifbin124 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/twowaycompare_co.gifbin165 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ctool16/conflict_edit.gifbin117 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ctool16/ignorews_edit.gifbin119 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/cview16/compare_view.gifbin128 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/ancestorpane_co.gifbin129 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/copy_l_co.gifbin101 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/copy_r_co.gifbin100 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/copycont_l_co.gifbin101 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/copycont_r_co.gifbin101 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/next_nav.gifbin82 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/prev_nav.gifbin82 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/smartmode_co.gifbin99 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/syncpane_co.gifbin90 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/twowaycompare_co.gifbin97 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dtool16/conflict_edit.gifbin85 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dtool16/ignorews_edit.gifbin93 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/ancestorpane_co.gifbin147 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/copy_l_co.gifbin130 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/copy_r_co.gifbin129 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/copycont_l_co.gifbin133 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/copycont_r_co.gifbin138 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/next_nav.gifbin101 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/prev_nav.gifbin102 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/smartmode_co.gifbin133 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/syncpane_co.gifbin121 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/twowaycompare_co.gifbin125 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/etool16/conflict_edit.gifbin111 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/etool16/ignorews_edit.gifbin122 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/eview16/compare_view.gifbin129 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/obj16/day_obj.gifbin181 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/obj16/resource_obj.gifbin153 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/add_ov.gifbin95 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/chg_ov.gifbin100 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/confadd_ov.gifbin97 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/confchg_ov.gifbin93 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/confdel_ov.gifbin121 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/del_ov.gifbin120 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/error_ov.gifbin92 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/inadd_ov.gifbin123 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/inchg_ov.gifbin119 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/indel_ov.gifbin119 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/outadd_ov.gifbin124 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/outchg_ov.gifbin120 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/outdel_ov.gifbin122 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_inadd_ov.gifbin124 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_inchg_ov.gifbin117 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_indel_ov.gifbin118 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_outadd_ov.gifbin124 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_outchg_ov.gifbin120 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_outdel_ov.gifbin120 -> 0 bytes
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/plugin.properties130
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/plugin.xml195
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/scripts/exportplugin.xml31
-rw-r--r--bundles/org.eclipse.compare/scripts/exportplugin.xml31
-rw-r--r--bundles/org.eclipse.team.core/.classpath9
-rw-r--r--bundles/org.eclipse.team.core/.cvsignore1
-rw-r--r--bundles/org.eclipse.team.core/.options4
-rw-r--r--bundles/org.eclipse.team.core/.project21
-rw-r--r--bundles/org.eclipse.team.core/README13
-rw-r--r--bundles/org.eclipse.team.core/about.html42
-rw-r--r--bundles/org.eclipse.team.core/build.properties4
-rw-r--r--bundles/org.eclipse.team.core/buildnotes_team.html522
-rw-r--r--bundles/org.eclipse.team.core/doc/hglegal.htm14
-rw-r--r--bundles/org.eclipse.team.core/doc/ngibmcpy.gifbin814 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.core/doc/org_eclipse_team_core.html26
-rw-r--r--bundles/org.eclipse.team.core/doc/org_eclipse_team_core_fileTypes.html45
-rw-r--r--bundles/org.eclipse.team.core/doc/org_eclipse_team_core_ignore.html43
-rw-r--r--bundles/org.eclipse.team.core/doc/org_eclipse_team_core_projectSets.html45
-rw-r--r--bundles/org.eclipse.team.core/plugin.properties7
-rw-r--r--bundles/org.eclipse.team.core/plugin.xml56
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/IFileTypeInfo.java39
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/IIgnoreInfo.java40
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/IProjectSetSerializer.java61
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProvider.java488
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/Team.java572
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/TeamException.java82
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/ILocalSyncElement.java186
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/IRemoteResource.java59
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/IRemoteSyncElement.java37
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/LocalSyncElement.java104
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/RemoteSyncElement.java425
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/IRemoteTargetResource.java106
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/ISiteFactory.java42
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/ISiteListener.java16
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/ITargetRunnable.java18
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/Site.java117
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/TargetManager.java275
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/TargetProvider.java198
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Assert.java101
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultFileModificationValidator.java60
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultMoveDeleteHook.java95
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/FileModificationValidatorManager.java101
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/InfiniteSubProgressMonitor.java83
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/MoveDeleteManager.java110
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/NullSubProgressMonitor.java65
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Policy.java107
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/StringMatcher.java389
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamPlugin.java115
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/messages.properties72
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/simpleAccess/SimpleAccessOperations.java269
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/CRLFtoLFInputStream.java155
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/LFtoCRLFInputStream.java146
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/PollingInputStream.java163
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/PollingOutputStream.java162
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/ProgressMonitorInputStream.java140
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/SizeConstrainedInputStream.java138
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/TimeoutInputStream.java277
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/TimeoutOutputStream.java280
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/BaseIdentifierNotInitializedException.java31
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/ITeamStatusConstants.java79
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/LocationMapping.java99
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/RemoteTargetSyncElement.java204
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/ResourceState.java802
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/SynchronizedTargetProvider.java236
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/UrlUtil.java81
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/messages.properties11
-rw-r--r--bundles/org.eclipse.team.cvs.core/.classpath10
-rw-r--r--bundles/org.eclipse.team.cvs.core/.cvsignore1
-rw-r--r--bundles/org.eclipse.team.cvs.core/.options12
-rw-r--r--bundles/org.eclipse.team.cvs.core/.project22
-rw-r--r--bundles/org.eclipse.team.cvs.core/about.html93
-rw-r--r--bundles/org.eclipse.team.cvs.core/build.properties4
-rw-r--r--bundles/org.eclipse.team.cvs.core/buildnotes_cvs.html665
-rw-r--r--bundles/org.eclipse.team.cvs.core/doc/hglegal.htm14
-rw-r--r--bundles/org.eclipse.team.cvs.core/doc/ngibmcpy.gifbin818 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.core/doc/org_eclipse_team_cvs_core.html15
-rw-r--r--bundles/org.eclipse.team.cvs.core/plugin.properties4
-rw-r--r--bundles/org.eclipse.team.cvs.core/plugin.xml88
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSException.java86
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProvider.java632
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java519
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSStatus.java66
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTag.java83
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProvider.java1146
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/DateUtil.java82
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFile.java90
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFolder.java154
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSListener.java15
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSProvider.java155
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteFile.java44
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteFolder.java51
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteResource.java61
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRepositoryLocation.java102
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSResource.java138
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSResourceVisitor.java17
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRunnable.java36
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IConnectionMethod.java31
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ILogEntry.java60
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IResourceStateChangeListener.java65
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IServerConnection.java1
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IUserAuthenticator.java32
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IUserInfo.java34
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/Policy.java122
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractMessageCommand.java31
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractStructureVisitor.java223
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Add.java89
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AddStructureVisitor.java65
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Admin.java16
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CheckedInHandler.java60
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Checkout.java180
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Command.java727
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Commit.java73
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CopyHandler.java55
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Diff.java58
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/DiffStructureVisitor.java66
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ExpandModules.java31
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/FileStructureVisitor.java110
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Import.java64
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ImportStructureVisitor.java133
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Log.java27
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/MTHandler.java98
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModTimeHandler.java43
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModifiedFileSender.java35
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModuleExpansionHandler.java29
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NewEntryHandler.java45
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/PruneFolderVisitor.java75
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RTag.java121
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemoteCommand.java39
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Remove.java31
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemoveEntryHandler.java50
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemovedHandler.java58
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Request.java228
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ResponseHandler.java114
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java1075
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/StaticHandler.java59
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Status.java15
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/StickyHandler.java66
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Tag.java92
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TagFileSender.java50
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Update.java154
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/UpdatedHandler.java122
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ValidRequests.java26
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ValidRequestsHandler.java37
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Version.java90
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/AdminKSubstListener.java95
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/DiffListener.java44
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ICommandOutputListener.java54
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IConsoleListener.java40
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IStatusListener.java28
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IUpdateMessageListener.java52
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogEntry.java93
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogListener.java154
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ModuleDefinitionsListener.java70
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ModuleExpansion.java120
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/StatusListener.java83
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/TagListener.java50
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/UpdateListener.java179
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSAuthenticationException.java40
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSCommunicationException.java46
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java819
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSServerException.java72
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/Connection.java202
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnection.java151
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnectionMethod.java26
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnection.java273
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnectionMethod.java1
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/UserInfo.java58
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/messages.properties264
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSEntryLineTag.java58
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSLocalSyncElement.java103
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSRemoteSyncElement.java413
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSWorkspaceRoot.java202
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java221
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFolder.java303
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipsePhantomSynchronizer.java450
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseResource.java260
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java834
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java530
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java747
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTree.java61
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTreeBuilder.java734
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteModule.java318
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteResource.java161
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/FolderSyncInfo.java182
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/MutableResourceSyncInfo.java131
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ReentrantLock.java71
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java502
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/AddDeleteMoveListener.java447
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/Assert.java98
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/AssertionFailedException.java28
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/CVSDateFormatter.java89
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/EmptyTokenizer.java132
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/FileNameMatcher.java69
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook.java281
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/PrepareForReplaceVisitor.java111
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ProjectDescriptionContentHandler.java160
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ProjectDescriptionManager.java268
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ProjectDescriptionWriter.java104
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ReplaceWithBaseVisitor.java128
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/StringMatcher.java389
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileChangeListener.java202
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileWriter.java376
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/Util.java89
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/.classpath9
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/.cvsignore1
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/.project21
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/about.html104
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/build.properties4
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/plugin.properties2
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/plugin.xml29
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Blowfish.java1214
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Cipher.java19
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Client.java679
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/ClientPacket.java47
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Misc.java462
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Packet.java14
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Policy.java50
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHMethod.java26
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHPlugin.java1
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHServerConnection.java80
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/ServerPacket.java158
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/messages.properties24
-rw-r--r--bundles/org.eclipse.team.cvs.ui/.classpath17
-rw-r--r--bundles/org.eclipse.team.cvs.ui/.cvsignore2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/.project29
-rw-r--r--bundles/org.eclipse.team.cvs.ui/about.html42
-rw-r--r--bundles/org.eclipse.team.cvs.ui/build.properties4
-rw-r--r--bundles/org.eclipse.team.cvs.ui/help_contexts.xml419
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/clcl16/clear_co.gifbin162 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/clcl16/filter_history.gifbin159 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/clcl16/newstream_wiz.gifbin217 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/clcl16/refresh.gifbin182 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/ctool16/checkout.gifbin232 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/ctool16/contents.gifbin173 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/cview16/console_view.gifbin171 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/cview16/cvs_persp.gifbin235 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/cview16/history_view.gifbin231 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/cview16/repo_rep.gifbin173 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph1.gifbin170 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph2.gifbin159 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph3.gifbin145 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph4.gifbin114 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph5.gifbin99 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph6.gifbin132 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph7.gifbin182 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph8.gifbin160 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/obj16/branches_rep.gifbin123 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/obj16/module_rep.gifbin142 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/obj16/prjversions_rep.gifbin238 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/obj16/repository_rep.gifbin173 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/obj16/tag.gifbin108 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/obj16/versions_rep.gifbin242 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/confauto_ov.gifbin124 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/merged_ov.gifbin84 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/question_ov.gifbin87 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/wizards/newconnect_wiz.gifbin244 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/wizards/newlocation_wiz.gifbin240 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/wizban/createpatch_wizban.gifbin3064 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/wizban/keywordsub_wizban.gifbin2900 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/wizban/mergestream_wizban.gifbin2435 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/wizban/newconnect_wizban.gifbin2541 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/wizban/newlocation_wizban.gifbin2723 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/icons/full/wizban/newstream_wizban.gifbin2416 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.cvs.ui/plugin.properties145
-rw-r--r--bundles/org.eclipse.team.cvs.ui/plugin.xml703
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AlternateUserValidationDialog.java245
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AvoidableMessageDialog.java63
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/BranchPromptDialog.java285
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSAbstractResolutionGenerator.java121
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSAddResolutionGenerator.java136
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareEditorInput.java382
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareRevisionsInput.java471
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoration.java99
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecorationRunnable.java336
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecorator.java526
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorConfiguration.java77
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorPreferencesPage.java403
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSFilePropertiesPage.java141
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSFolderPropertiesPage.java133
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLocalCompareEditorInput.java78
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPerspective.java1
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPreferencesPage.java458
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectPropertiesPage.java369
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectSetSerializer.java197
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSRemoveResolutionGenerator.java177
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSRepositoryPropertiesPage.java325
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java423
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/Console.java429
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ConsoleDocument.java126
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ConsolePreferencesPage.java185
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ExtMethodPreferencePage.java151
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryDropAdapter.java60
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryFilter.java74
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryFilterAction.java55
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryFilterDialog.java260
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistorySorter.java105
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryView.java735
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java109
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IDecorationNotifier.java26
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IHelpContextIds.java107
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IRepositoryListener.java20
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IgnoreResourcesDialog.java258
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/OverlayIcon.java80
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/OverlayIconCache.java49
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/Policy.java98
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ReleaseCommentDialog.java97
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteFileEditorInput.java178
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteFileStorage.java71
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RepositoriesView.java317
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RepositoryManager.java769
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RepositorySorter.java44
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResizableWizardDialog.java21
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResourceEditionNode.java152
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResourcePropertiesPage.java103
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/SimpleContentProvider.java41
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagAsVersionDialog.java222
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagConfigurationDialog.java742
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagSelectionDialog.java299
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TextViewerAction.java35
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TimeoutProgressMonitorDialog.java88
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/UserValidationDialog.java186
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/VersionCollator.java60
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkbenchUserAuthenticator.java154
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/AddAction.java81
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/AddToWorkspaceAction.java108
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/BranchAction.java203
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CVSAction.java410
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutAction.java127
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutAsAction.java201
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CommitAction.java71
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareRemoteResourcesAction.java88
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRemoteAction.java101
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRevisionAction.java100
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithTagAction.java64
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ConfigureTagsFromRepoView.java123
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ConfigureTagsFromRepoViewOnFolder.java87
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ContentAction.java88
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CopyRepositoryNameAction.java59
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/DefineBranchAction.java108
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/DefineVersionAction.java109
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/GenerateDiffFileAction.java67
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/IgnoreAction.java58
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/MergeAction.java41
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/MoveRemoteTagAction.java80
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/NewCVSAnonEclipseConnection.java40
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/NewCVSRepositoryAction.java34
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/NewRepositoryAction.java54
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenLogEntryAction.java109
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenRemoteFileAction.java131
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RemoveBranchTagAction.java80
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RemoveRootAction.java129
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRemoteAction.java91
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithTagAction.java136
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SetKeywordSubstitutionAction.java60
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowCVSPerspectiveAction.java36
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowHistoryAction.java99
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowResourceInHistoryAction.java72
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SyncAction.java56
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SyncOutgoingAction.java19
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/TagAction.java181
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/TagInRepositoryAction.java133
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UnmanageAction.java204
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UpdateAction.java87
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeEditorInput.java94
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizard.java56
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardEndPage.java119
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardStartPage.java148
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/OverrideUpdateMergeAction.java39
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/ProjectElement.java110
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/TagElement.java43
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/TagRootElement.java106
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/UpdateMergeAction.java161
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/UpdateWithForcedJoinAction.java90
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties737
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/AllRootsElement.java35
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/BranchCategory.java97
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/BranchTag.java88
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSAdapterFactory.java72
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSFileElement.java67
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSFolderElement.java89
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSModelElement.java48
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRemoteFilePropertySource.java161
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRemoteFolderPropertySource.java95
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRepositoryLocationPropertySource.java120
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRepositoryRootElement.java42
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSResourceElement.java33
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRootFolderElement.java49
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/GroupedByVersionCategory.java110
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteContentProvider.java49
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteFileElement.java41
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteFolderElement.java61
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteModule.java129
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteResourceElement.java25
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteVersionModule.java97
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/VersionCategory.java118
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/AddSyncAction.java160
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSCatchupReleaseViewer.java567
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSSyncCompareUnsharedInput.java50
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSSyncSet.java182
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CommitSyncAction.java48
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/ForceCommitSyncAction.java364
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/ForceUpdateSyncAction.java53
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/IgnoreAction.java131
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/MergeAction.java362
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/ToolTipMessageDialog.java25
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/UpdateSyncAction.java407
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSWizardPage.java238
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardAutoconnectPage.java148
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardMainPage.java485
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileOperation.java111
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java567
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizard.java401
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardDirtyFilesPage.java87
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardSelectionPage.java149
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardSharedFilesPage.java87
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardSummaryPage.java283
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ModuleSelectionPage.java89
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/NewLocationWizard.java127
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RepositorySelectionPage.java139
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizard.java442
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardFinishPage.java36
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/UpdateWizard.java97
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/UpdateWizardPage.java153
-rw-r--r--bundles/org.eclipse.team.ui/.classpath13
-rw-r--r--bundles/org.eclipse.team.ui/.cvsignore1
-rw-r--r--bundles/org.eclipse.team.ui/.project25
-rw-r--r--bundles/org.eclipse.team.ui/README13
-rw-r--r--bundles/org.eclipse.team.ui/about.html42
-rw-r--r--bundles/org.eclipse.team.ui/build.properties4
-rw-r--r--bundles/org.eclipse.team.ui/doc/hglegal.htm14
-rw-r--r--bundles/org.eclipse.team.ui/doc/ngibmcpy.gifbin814 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/doc/org_eclipse_team_ui.html24
-rw-r--r--bundles/org.eclipse.team.ui/doc/org_eclipse_team_ui_configurationWizards.html61
-rw-r--r--bundles/org.eclipse.team.ui/help_contexts.xml81
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/clcl16/catchup_rls.gifbin145 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/clcl16/catchuprelease_rls.gifbin184 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/clcl16/conflict_synch.gifbin117 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/clcl16/contents.gifbin229 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/clcl16/ignorews_edit.gifbin119 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/clcl16/incom_synch.gifbin117 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/clcl16/outgo_synch.gifbin120 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/clcl16/refresh.gifbin182 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/clcl16/release_rls.gifbin149 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/clcl16/site_element.gifbin147 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/cview16/site_view.gifbin226 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/cview16/synch_synch.gifbin176 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/obj/export_projectset.gifbin231 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/obj/import_projectset.gifbin230 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/obj/share_project.gifbin164 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/ovr/checkedin_ov.gifbin80 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/ovr/checkedout_ov.gifbin106 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/ovr/dirty_ov.gifbin90 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/wizban/export_projectset_wizban.gifbin2873 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/wizban/import_projectset_wizban.gifbin3010 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/wizban/newconnect_wizban.gifbin2615 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/icons/full/wizban/share_wizban.gifbin2451 -> 0 bytes
-rw-r--r--bundles/org.eclipse.team.ui/plugin.properties37
-rw-r--r--bundles/org.eclipse.team.ui/plugin.xml240
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ConfigurationWizardElement.java137
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ConfigurationWizardNode.java65
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ConfigureProjectWizard.java213
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ConfigureProjectWizardMainPage.java165
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/DetailsDialog.java257
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/DetailsDialogWithProjects.java120
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ExportProjectSetMainPage.java194
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IHelpContextIds.java36
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPromptCondition.java31
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IgnorePreferencePage.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ImportProjectSetMainPage.java129
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/NatureToPropertyAction.java51
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Policy.java133
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetContentHandler.java87
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetExportWizard.java175
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImportWizard.java122
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/PromptingDialog.java111
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamPreferencePage.java119
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java237
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamWizardPage.java107
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TextPreferencePage.java1
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/UIConstants.java44
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ConfigureProjectAction.java53
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/DeconfigureProjectAction.java46
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java330
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties232
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/CatchupReleaseViewer.java657
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/ChangedTeamContainer.java74
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/ITeamNode.java44
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/MergeResource.java160
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/SyncCompareInput.java468
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/SyncSet.java282
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/SyncView.java399
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/TeamFile.java369
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/TypedBufferedContent.java71
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/UnchangedTeamContainer.java73
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/ConfigureTargetWizard.java401
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/CreateNewFolderAction.java147
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/DiscardSiteAction.java190
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetAction.java188
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetAsAction.java197
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetAsProjectAction.java161
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetSyncAction.java107
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/MappingSelectionPage.java191
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/PutAction.java81
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/PutSyncAction.java109
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/RemoteResourceElement.java184
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteElement.java100
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteExplorerView.java534
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteExplorerViewLabelProvider.java55
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteLazyContentProvider.java25
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteRootsElement.java70
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteSelectionPage.java183
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteViewSorter.java40
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SyncAction.java55
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetAction.java102
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetCatchupReleaseViewer.java61
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetProjectAction.java63
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetSyncAction.java230
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetSyncCompareInput.java100
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetWizardPage.java195
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/UploadAction.java117
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizard.java30
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java24
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamImages.java110
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java45
-rw-r--r--tests/org.eclipse.team.tests.core/.classpath16
-rw-r--r--tests/org.eclipse.team.tests.core/.cvsignore1
-rw-r--r--tests/org.eclipse.team.tests.core/.project39
-rw-r--r--tests/org.eclipse.team.tests.core/about.html42
-rw-r--r--tests/org.eclipse.team.tests.core/build.properties2
-rw-r--r--tests/org.eclipse.team.tests.core/ftp.properties8
-rw-r--r--tests/org.eclipse.team.tests.core/plugin.xml108
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/AllTargetTests.java41
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/AllTeamTests.java44
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RemoteResourceTests.java100
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderBic.java64
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderNaish.java61
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderOtherSport.java38
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderTests.java332
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/StreamTests.java87
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/SyncElementTest.java707
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TargetProviderTests.java237
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TargetTestSetup.java96
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TeamTest.java302
-rw-r--r--tests/org.eclipse.team.tests.core/test.xml46
-rw-r--r--tests/org.eclipse.team.tests.core/webdav.properties7
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/.classpath20
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/.cvsignore1
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/.project32
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/about.html42
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/benchmark/readme.txt180
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_02_26.integration.all.xml6027
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_03_19.integration.all.xml4577
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_04_24.milestone5.all.xml12053
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_04_25.integration.commandline.xml1731
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/benchmark/teamui_benchmark.bat38
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/benchmark/vcm1.0/2002_02_26.integration.all.xml10960
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/benchmark/vcmui_benchmark.bat43
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/build.properties2
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/plugin.xml110
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/readme.txt27
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/repository.properties11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkBig.zipbin2571090 -> 0 bytes
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkSmall.zipbin212938 -> 0 bytes
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkTiny.zipbin2826 -> 0 bytes
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/CVSROOT/modules65
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/common/docs/readme.html2
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/common/macros/macro11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project1/f1/file-in-p1.txt1
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project2/file-p2.txt1
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/src/file.c1
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/src/file.h1
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/sub/file-sub.txt1
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/common/common.txt1
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/linux/linux.txt1
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/pc/pc.txt1
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project8/file-p8.txt1
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllTeamAndCVSTests.java38
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllTests.java37
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSClientException.java15
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSTestSetup.java189
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CommandLineCVSClient.java81
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseCVSClient.java119
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseTest.java555
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/ICVSClient.java22
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/JUnitTestCase.java323
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/AllTestsCompatibility.java28
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/BasicTest.java490
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/CompatibleTestSetup.java52
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/ConflictTest.java89
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/ModuleTest.java88
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/SameResultEnv.java487
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/AllTestsCVSResources.java28
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/BatchedTestSetup.java25
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/EclipseFolderTest.java95
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/EclipseSynchronizerTest.java448
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/ResourceSyncInfoTest.java145
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/AllTestsProvider.java42
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/CVSProviderTest.java412
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ImportTest.java155
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ModuleTest.java292
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/RemoteResourceTest.java316
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ResourceDeltaTest.java152
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/SyncElementTest.java869
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CVSUITestCase.java452
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/DummyPromptCondition.java24
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/EclipseUITestHarnessApplication.java183
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/EmptyPerspective.java51
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/FakeSelectionProvider.java36
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/ICriteria.java17
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/LoggingTestCase.java99
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/LoggingTestResult.java258
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/LoggingTestRunner.java32
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/PerformanceTimer.java49
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SequenceGenerator.java57
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/Util.java789
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/Waiter.java30
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/AllTests.java26
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkTestSetup.java49
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/CommandTests.java231
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/SyncTests.java112
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/WorkflowTests.java157
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/ArgumentParser.java43
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/CaseEntry.java32
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/DelimitedValuesWriter.java48
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/GroupEntry.java22
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/ILogEntryVisitor.java13
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/LogEntry.java118
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/LogEntryContainer.java57
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/LogFormatterUIMain.java182
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/MergeRunsVisitor.java70
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintCSVDiffVisitor.java96
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintCSVSummaryVisitor.java76
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintDiffMain.java148
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintDiffVisitor.java84
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintSummaryMain.java116
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintTextDiffVisitor.java141
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintTextSummaryVisitor.java103
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/Result.java33
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/RootEntry.java42
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/TaskEntry.java100
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/Util.java17
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/test.xml59
1037 files changed, 0 insertions, 168460 deletions
diff --git a/bundles/org.eclipse.compare/.classpath b/bundles/org.eclipse.compare/.classpath
deleted file mode 100644
index 1e3546d6b..000000000
--- a/bundles/org.eclipse.compare/.classpath
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="compare"/>
- <classpathentry kind="src" path="/org.eclipse.core.boot"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
- <classpathentry kind="src" path="/org.eclipse.ui"/>
- <classpathentry kind="src" path="/org.eclipse.core.resources"/>
- <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
- <classpathentry kind="src" path="/org.eclipse.swt"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.compare/.cvsignore b/bundles/org.eclipse.compare/.cvsignore
deleted file mode 100644
index 092357e47..000000000
--- a/bundles/org.eclipse.compare/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/bundles/org.eclipse.compare/.project b/bundles/org.eclipse.compare/.project
deleted file mode 100644
index 88d7c296f..000000000
--- a/bundles/org.eclipse.compare/.project
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.compare</name>
- <comment></comment>
- <projects>
- <project>org.eclipse.core.boot</project>
- <project>org.eclipse.ui</project>
- <project>org.eclipse.core.runtime</project>
- <project>org.eclipse.core.resources</project>
- <project>org.eclipse.swt</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.team.cvs.core.cvsnature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.compare/about.html b/bundles/org.eclipse.compare/about.html
deleted file mode 100644
index 768324e89..000000000
--- a/bundles/org.eclipse.compare/about.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<html>
-<head>
-<title>About</title>
-<style type="text/css">
-p, table, td, th { font-family: arial, helvetica, geneva; font-size: 10pt}
-pre { font-family: "Courier New", Courier, mono; font-size: 10pt}
-h2 { font-family: arial, helvetica, geneva; font-size: 18pt; font-weight: bold ; line-height: 14px}
-code { font-family: "Courier New", Courier, mono; font-size: 10pt}
-sup { font-family: arial,helvetica,geneva; font-size: 10px}
-h3 { font-family: arial, helvetica, geneva; font-size: 14pt; font-weight: bold}
-li { font-family: arial, helvetica, geneva; font-size: 10pt}
-h1 { font-family: arial, helvetica, geneva; font-size: 28px; font-weight: bold}
-body { font-family: arial, helvetica, geneva; font-size: 10pt; clip: rect( ); margin-top: 5mm; margin-left: 3mm}
-</style>
-</head>
-<body lang="EN-US" link="blue" vlink="purple">
-<table border="0" cellspacing="5" cellpadding="2" width="100%" >
- <tr>
- <td align="LEFT" valign="TOP" colspan="2" bgcolor="#0080C0"><b><font color="#FFFFFF">About This Content</font></b></td>
- </tr>
- <tr>
- <td>
-<p>11th December, 2001</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in &quot;Content&quot;. Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-<a href="http://www.eclipse.org/legal/cpl-v05.html">Common Public License Version 0.5</a> &quot;CPL&quot;. For purposes of the CPL, &quot;Program&quot; will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL &quot;Other License&quot;, any modifications, enhancements and/or
-other code and/or documentation &quot;Modifications&quot; uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-</td></tr></table>
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.compare/build.properties b/bundles/org.eclipse.compare/build.properties
deleted file mode 100644
index 68f93ee67..000000000
--- a/bundles/org.eclipse.compare/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.compare.jar = compare/
-bin.includes = icons/,\
- plugin.xml,\
- *.jar,\
- plugin.properties,\
- notice.html,\
- about.html
-src.includes=about.html
diff --git a/bundles/org.eclipse.compare/buildnotes_compare.html b/bundles/org.eclipse.compare/buildnotes_compare.html
deleted file mode 100644
index 28405b0d4..000000000
--- a/bundles/org.eclipse.compare/buildnotes_compare.html
+++ /dev/null
@@ -1,1056 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
- <meta name="Author" content="IBM">
- <title>Eclipse Platform Release Notes - Desktop</title>
-</head>
-<body>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Compare</h1>
-Eclipse Build Input June 8th 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=18807">#18807</a>: Compare with patch fails due to missing LF<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=13730">#13730</a>: Entire zipfiles content sent prior when computing synchronization view content<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input June 7th 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=13730">#13730</a>: Entire zipfiles content sent prior when computing synchronization view content<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=14952">#14952</a>: Diff Browser Opens Too Small / Not Easily Resizable<br>
-
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input June 6th 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-New constant CompareUI.PLUGIN_ID
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=13949">#13949</a>: DBCS: bogus at text compare<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=19013">#19013</a>: backgronud color: is it honored?<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=19216">#19216</a>: Accessibility in Workbench > Compare > Text Compare<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=19371">#19371</a>: Java & Compare editor's Next/Previous toolbar buttons shouldn't be retargetable<br>
-
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input June 1st 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-Made class NavigationAction public.
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=8004">#8004</a>: Ctrl+E beeps every time<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=14800">#14800</a>: Compare View eats tabs<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=18200">#18200</a>: Both sets of arrows say "Select Next Change"<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=18206">#18206</a>: Casing, wording issue on "Last Resource reached" prompt<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=16285">#16285</a>: Add from Local History needs a description label<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=17431">#17431</a>: Accessibility issues<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=18148">#18148</a>: Using combinations of No and Next file button break wrapping<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=18151">#18151</a>: Next File button does not ding when on last file<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=16570">#16570</a>: Compare refuses to show further differences if not ignoring whitespaces<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=10790">#10790</a>: Patch does not apply if file not found locally<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=12643">#12643</a>: Expand all does not disable when there is no selection<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input May 31st 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=18116">#18116</a>: Compare view does not inherit Java editor background color<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=13190">#13190</a>: Compare with Patch does not apply Patch, if single file selected<br>
-
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input May 30th 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=17699">#17699</a>: Java Editor: Local Histroy menu entries are enabled for read-only files<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=16283">#16283</a>: Add from Local History items are unsorted<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=16288">#16288</a>: Add from Local History: list of available editions flashes<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=17664">#17664</a>: Applying a patch with deleted package fails<br>
-
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input May 29th 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=14040">#14040</a>: Platform interoperability issue w.r.t. Compare With Patch<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=17790">#17790</a>: Missing mnemonics in patch selection dialog<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=10917">#10917</a>: Patch support does not use mnemonics<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input May 28th 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=17889">#17889</a>: Should not assume type of PropertyChangeEvent values<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=17678">#17678</a>: Applying a patch does many compiles<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=17536">#17536</a>: NPE in compare<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=17121">#17121</a>: Casing of message when end of changes needs to be sentence style<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=17648">#17648</a>: Can't apply patch w/o ignoring whitespace<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=16936">#16936</a>: Compare with patch requires "Ignore Whitespace" to be turned off<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input May 18th 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=14371">#14371</a>: TextMergeViewer.sameDoc() is broken<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=14378">#14378</a>: CompareEditorInput never resets dirtyness flag (detailed)<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=14680">#14680</a>: Compare unreadable in high contrast black<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=14952">#14952</a>: Diff Browser Opens Too Small / Not Easily Resizable<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=14742">#14742</a>: Ignore whitespace preference<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=14624">#14624</a>: No visual cue when compared file wraps<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=13606">#13606</a>: Support multiple selection in Add from local history<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input May 16th 2002
-
-<h2>
-What's new in this drop</h2>
-Bumped plugin version number to 2.0.0<br>
-Adapted to new findEditor methods<br>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=8373">#8373</a>: Compare With->Patch... missing mnemonic<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=12719">#12719</a>: "Show Pseudo-Conflicts" setting is problematic<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input April 30th 2002
-
-<h2>
-What's new in this drop</h2>
-All strings NLSed.
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=14515">#14515</a>: java compare uses internal jcore scanner<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=14782">#14782</a>: Add from Local History missing mnemonic<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input April 18th 2002
-
-<h2>
-What's new in this drop</h2>
-All strings NLSed.
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=13152">#13152</a>: Internal error in "Add from Local History..." on packages<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input April 9th 2002
-
-<h2>
-What's new in this drop</h2>
-New context menu action 'Add From Local History'. Just select any resource container and
-'Add From Local History' presents all files that were deleted from the workspace but are
-still in the local history.
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-The new 'Add From Local History' suffers from #12915. It works if the files were deleted
-within the same session. However if you shut down and restart a workspace some deleted
-files are nor listed.
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=11578">#11578</a>: Patch: Missing resource on dialog<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=11579">#11579</a>: Compare with Patch should be disabled on closed projects<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=11907">#11907</a>: clicking in bird's eye view spots does nothing if panes not synched<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=11536">#11536</a>: Option to turn off structured comparison<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=10682">#10682</a>: Need better UI for recovering deletions from local history<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=11446">#11446</a>: provide "add from local history" for compilation units<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=8615">#8615</a>: Styled Text widget does not respond to system color change<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=9673">#9673</a>: editor background color - no effect on other viewers<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=11642">#11642</a>: Compare editors not using default background colors<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=10434">#10434</a>: Compare browser fails silently and does not give result<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input March 18th 2002
-
-<h2>
-What's new in this drop</h2>
-First cut of a birdseyeview for the text compare viewer.<br>
-'Compare which Each other' for Java elements.
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=3641">#3641</a>: DCR: Can't compare from outliner (1GDHJKK)<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input March 14th 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=11305">#11305</a>: Can't compare a "C" file<br>
-
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input March 12th 2002
-
-<h2>
-What's new in this drop</h2>
-Structure Compare viewers are enabled by default.<br>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=10379">#10379</a>: Compare with Local History Dialog: lower pane is missing a bordeer<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=9768">#9768</a>: (empty-menu) in compare view<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=9842">#9842</a>: Expand All action needed in structure compare view<br>
-
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input March 5th 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=9869">#9869</a>: Need more support for creating/deleting resources<br>
-
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input February 26th 2002
-
-<h2>
-What's new in this drop</h2>
-Patch: for every rejected file a task marker is added<br>
-Compare preference page shows options in a preview<br>
-New preference option for additional compare status line information
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=9540">#9540</a>: Compare with patch: it should not be possible to check items that could not be applied<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=9532">#9532</a>: Compare with patch: next disabled although clipboard specified<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=7681">#7681</a>: Structured results expands import statements<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=9572">#9572</a>: Debugging trace left in status bar<br>
-
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input February 12th 2002
-
-<h2>
-What's new in this drop</h2>
-The patch wizard no longer opens a Compare Editor but applies the
-patch directly to the workspace. This will be the default.
-In the future the old behavior of opening the Compare Editor will be
-an additional option when finishing the wizard.
-<br>
-Patch wizard has a 'Reverse' option for applying a "reversed" patch.
-This option can be used to 'undo' a patch.
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=9153">#9153</a>: NPE when closing synchronize view<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=9331">#9331</a>: NPE during compare with stream version<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=6346">#6346</a>: Problems with Patch<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=6727">#6727</a>: Patch: *.rej file must be saved in workspace<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=7358">#7358</a>: Internal Error in Compare with Patch with new files<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input February 5th 2002
-
-<h2>
-What's new in this drop</h2>
-The structure compare pane opens when a resource is selected.
-In previous version a double click was required.
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=5063">#5063</a>: Should not have to double-click to open Structure Compare<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=2602">#2602</a>: Compare FW accessibility issues (1GK79UB)<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=2707">#2707</a>: Merge viewer should ask for save before releasing (1GI9JXS)<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=2772">#2772</a>: DCR: Automatic structure compare (1GJ6EUY)<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=3829">#3829</a>: Smart rename button enabled when no smartness is available (1GEUVHN)<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=9089">#9089</a>: Local history - Selecting item in structured compare has no effect<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input January 29th 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=6271">#6271</a>: Can't tell which file is which in Compare browser<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=2519">#2519</a>: next/prev arrows active when only one difference in compare (1GFIQX3)<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=8363">#8363</a>: NPE comparing two resources in the navigator.<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=2501">#2501</a>: Empty menu in compare browser (1GFBQKE)<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=2854">#2854</a>: Compare: Save code path problematic (1GJYGAX)<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=8574">#8574</a>: Not structure compare in compare with local history<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input January 23th 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=8089">#8089</a>: Replace from local history: parse error<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input January 22th 2002
-
-<h2>
-What's new in this drop</h2>
-Fixed an inconsistency in the binary compare viewer:
-info message didn't match +/-icon in the resource compare pane.
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=3859">#3859</a>: replace from history does not work for elements with error (1GEYIZ6)<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=6177">#6177</a>: Double click action dangerous in 'Restore from Local History'<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=7821">#7821</a>: Team 2.0 CVS synchronze bug 'no-name' dirs..<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=2773">#2773</a>: Java structure compare should give better indication when no changes (1GJ6ENE)<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input January 15th 2002
-
-<h2>
-What's new in this drop</h2>
-Fixed a problem in DiffNode.getName()and the DiffTreeViewer's label provider
-where the left and right half of a DiffNode label would be reversed because
-the "leftIsLocal" property of a CompareConfiguration wasn't obeyed.
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=1893">#1893</a>: Compare Viewer doesn't scroll to last line (1GBB34N)<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=5839">#5839</a>: Usability: Initial diff is sometimes not horizontally aligned<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=5325">#5325</a>: Compare always scroll the text pane to the extreme limit<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=7048">#7048</a>: First element not selected<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=2548">#2548</a>: Project compare should open viewing selected file (1GFMRP6)<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=2938">#2938</a>: Replace from local history should show busy cursor (1GKU0P3)<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=7594">#7594</a>: Menu entry "Replace with Previous" shouldn't have a "..."<br>
-Workaround added for:<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=7320">#7320</a>: Next diff scrolls when going into current diff<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input January 8th 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-Added methods to CompareUI plugin for adding and removing aliases
-for the file extension to StructureCompareViewer mapping
-(addStructureViewerAlias, removeStructureViewerAlias).
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=6828">#6828</a>: Support with replace with previous<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=2396">#2396</a>: Save in compare editors needs progress bar (1GEYF58)<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=5271">#5271</a>: JARs compared as source in release browser<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=5121">#5121</a>: Replace with Previous (from local history)<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input December 11th 2001
-
-<h2>
-What's new in this drop</h2>
-Keyboard shortcuts for 'Goto next Difference' and 'Goto previous Difference'
-changed to Control-E and Control-Shift-E.<br>
-Better NLS support.<br>
-Updated file "about.html".
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input December 4th 2001
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=4381">#4381</a>: Replace from local histroy - workspace element included <br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input November 27th 2001
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=6298">#6298</a>: Replace with Local History: Workbench -> Workspace<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=5238">#5238</a>: Compare fails if takes more than 20 seconds<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse SDK Build 210, November 12th, 2001
-
-<h2>
-What's new in this drop</h2>
-First cut for 'rejected hunk' support.
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-new classes CompareViewerPane and CompareViewerSwitchingPane<br>
-
-<h3>
-Other highlights</h3>
-Improved Patch wizard.<br>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=5723">#5723</a>: Apply Patch dialog has no radio selection<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse SDK Build 207, November 1st, 2001
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=5334">#5334: Internal errors using patch tool</a><br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=5150">#5150: Compare with patch cannot read VCM's CVS patch file</a><br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse SDK Build 204, October 12th, 2001
-
-<h2>
-What's new in this drop</h2>
-First cut of patch support.
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse SDK Build 202, September 27th, 2001
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-1GKKUA5: ITPUI:WINNT - Severe: memory leak in sync view<br>
-1GKKGGS: ITPJUI:WIN2000 - (136) compares zips as source<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse SDK Build 201, September 21st, 2001
-
-<h2>
-What's new in this drop</h2>
-removed direction icon in TextMergeViewer for two-way compare
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-1GJURWJ: ITPUI:WIN2000 - Hebrew + Japanese: compare view defaults to binary<br>
-1GK0388: ITPJCORE:WIN2000 - replace with local history: selecting (workspace) deletes source<br>
-1GITG2V: ITPUI:WIN2000 - Comparing html files uses binary compare<br>
-1GJW2TP: ITPJUI:WIN2000 - java compare: why beep every time?<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse SDK Build 200, September 13th, 2001
-
-<h2>
-What's new in this drop</h2>
-If not specified otherwise Compare viewer font is taken from workbench text font<br>
-The shortcut for "Goto Next/Previous Difference" is Ctrl-D/Ctrl-Shift-D
-to avoid a clash with Ctrl-P of the Print command.
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-new method EditionSelectionDialog.setHideIdenticalEntries(boolean)<br>
-new method EditionSelectionDialog.setTargetIsRight(boolean)<br>
-new method EditionSelectionDialog.setAddMode(boolean)<br>
-new method CompareEditorInput.saveChanges(...)<br>
-new method TextMergeViewer.createLineComparator(IDocument document, IRegion region, boolean ignoreWhiteSpace)<br>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-1GFMLFB: ITPUI:WIN2000 - files that are out of sync with the file system appear as empty<br>
-1GG0ELM: ITPVCM:ALL - Local history displayed some of Today's items as Yesterday<br>
-1GGNKHN: ITPJUI:ALL - No progress during replace with local history<br>
-1GF2JNI: ITPUI:ALL - (minor)Compare failed title should be title case<br>
-1GHBPA1: ITPVCM:WINNT - Compare - next change arrow switches to wrong file<br>
-1GGQQH3: ITPJUI:WINNT - Compare hightlights a non-change instead of the change<br>
-1GI5DN9: ITPUI:WIN2000 - Conflicting token deletions don't show up in text compare viewer<br>
-1GI3KUR: ITPJUI:WIN2000 - Compare: double-click in versions list closes view<br>
-1GFFR4B: ITPUI:WIN98 - local history is misleading<br>
-1GBM0IL: ITPUI:WINNT - CompareEditorInput#save should throw CoreException<br>
-1GI99LE: ITPUI:ALL - Compare viewer does not show last line when horizontal scroll bar is present<br>
-1GBB34N: ITPJUI:WIN2000 - Compare Viewer doesn't scroll to last line<br>
-1GGZ8DO: ITPJUI:WIN - MergeViewer invalid selection range<br>
-1GIIBHM: ITPUI:WIN2000 - Problems when comparing zip files<br>
-1GIKKOZ: ITPUI:ALL - alt copyright text in html doc needs update<br>
-1GIURNB: ITPUI:ALL - property file of EditionSelectionDialog contains configuration options<br>
-1GIUS6L: ITPUI:ALL - TextMergeViewer uses deprecated Thread.stop()<br>
-1GI3HDZ: ITPJUI:ALL - Compare: conflicts with no ancestor does not show differences<br>
-1GEUX0D: ITPJUI:ALL - not state aware toolbar button in compare<br>
-
-<h2>
-Problem reports closed</h2>
-1GF9Y9C: ITPUI:WIN2000 - DCR: only get ancestor pane contents if pane is visible<br>
-
-</body>
-</html>
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/BufferedContent.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/BufferedContent.java
deleted file mode 100644
index d64b12270..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/BufferedContent.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import java.io.*;
-import org.eclipse.jface.util.ListenerList;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.compare.internal.Utilities;
-
-/**
- * Abstract implementation for a buffered <code>IStreamContentAccessor</code>.
- * <p>
- * Subclasses must implement the <code>createStream</code> method
- * to connect the buffered content with a streamable source (e.g., a file).
- * <p>
- * As long as the contents of <code>BufferedContent</code> is only retrieved as an input stream
- * (by means of <code>getContents</code>) and the <code>BufferedContent</code> is not modified (with
- * <code>setContent</code>) no buffering takes place.
- * Buffering starts when either method <code>getContent</code> or <code>setContent</code> is called.
- *
- * @see IContentChangeNotifier
- * @see IStreamContentAccessor
- */
-public abstract class BufferedContent implements IContentChangeNotifier, IStreamContentAccessor {
-
- byte[] fContent;
- private ListenerList fListenerList;
-
- /**
- * Creates a buffered stream content accessor.
- */
- protected BufferedContent() {
- }
-
- /* (non-Javadoc)
- * see IStreamContentAccessor.getContents
- */
- public InputStream getContents() throws CoreException {
- if (fContent != null)
- return new ByteArrayInputStream(fContent);
- return createStream();
- }
-
- /**
- * Creates and returns a stream for reading the contents.
- * <p>
- * Subclasses must implement this method.
- * </p>
- *
- * @return the stream from which the content is read
- * @exception CoreException if the contents could not be accessed
- */
- protected abstract InputStream createStream() throws CoreException;
-
- /**
- * Sets the contents. Registered content change listeners are notified.
- *
- * @param contents the new contents
- */
- public void setContent(byte[] contents) {
- fContent= contents;
- fireContentChanged();
- }
-
- /**
- * Returns the contents as an array of bytes.
- *
- * @return the contents as an array of bytes, or <code>null</code> if
- * the contents could not be accessed
- */
- public byte[] getContent() {
- if (fContent == null) {
- try {
- InputStream is= createStream();
- fContent= Utilities.readBytes(is);
- } catch(CoreException ex) {
- }
- }
- return fContent;
- }
-
- /**
- * Discards the buffered content.
- */
- public void discardBuffer() {
- fContent= null;
- }
-
- /* (non-Javadoc)
- * see IContentChangeNotifier.addChangeListener
- */
- public void addContentChangeListener(IContentChangeListener listener) {
- if (fListenerList == null)
- fListenerList= new ListenerList();
- fListenerList.add(listener);
- }
-
- /* (non-Javadoc)
- * see IContentChangeNotifier.removeChangeListener
- */
- public void removeContentChangeListener(IContentChangeListener listener) {
- if (fListenerList != null) {
- fListenerList.remove(listener);
- if (fListenerList.isEmpty())
- fListenerList= null;
- }
- }
-
- /**
- * Notifies all registered <code>IContentChangeListener</code>s of a content change.
- */
- protected void fireContentChanged() {
- if (fListenerList != null) {
- Object[] listeners= fListenerList.getListeners();
- for (int i= 0; i < listeners.length; i++)
- ((IContentChangeListener)listeners[i]).contentChanged(this);
- }
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java
deleted file mode 100644
index c2c62dbac..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java
+++ /dev/null
@@ -1,425 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import java.util.HashMap;
-
-import org.eclipse.swt.graphics.*;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.*;
-import org.eclipse.jface.preference.IPreferenceStore;
-
-import org.eclipse.compare.internal.*;
-import org.eclipse.compare.structuremergeviewer.Differencer;
-
-/**
- * A <code>CompareConfiguration</code> object
- * controls various UI aspects of compare/merge viewers like
- * title labels and images, or whether a side of a merge viewer is editable.
- * In addition to these fixed properties <code>ICompareConfiguration</code> provides
- * API for an open ended set of properties. Different viewers which share the same
- * configuration can communicate via this mechanism. E.g. if a compare editor
- * has a button for controlling whether compare viewers ignore white space,
- * the button would trigger a change of the boolean <code>IGNORE_WHITESPACE</code> property
- * and all interested viewers would receive notification.
- * <p>
- * Suitable default labels are provided (without images); both the left and right sides
- * are editable.
- * </p>
- * <p>
- * Clients may use this class as is, or subclass to add new state and behavior.
- * </p>
- */
-public class CompareConfiguration {
-
- /**
- * Name of the ignore whitespace property.
- */
- public static final String IGNORE_WHITESPACE= "IGNORE_WHITESPACE"; //$NON-NLS-1$
- /**
- * Name of the show pseudo conflicts property.
- */
- public static final String SHOW_PSEUDO_CONFLICTS= "SHOW_PSEUDO_CONFLICTS"; //$NON-NLS-1$
-
-
- private static final int WIDTH= 22;
-
- private static ImageDescriptor[] fgImages= new ImageDescriptor[16];
- private static Object fgDummy= new Object();
- private static HashMap fgMap= new HashMap(20);
- private static boolean fLeftIsLocal= true;
-
- static {
- if (fLeftIsLocal) {
- fgImages[Differencer.ADDITION]= CompareUIPlugin.getImageDescriptor("ovr16/del_ov.gif"); //$NON-NLS-1$
- fgImages[Differencer.LEFT + Differencer.ADDITION]= CompareUIPlugin.getImageDescriptor("ovr16/r_inadd_ov.gif"); //$NON-NLS-1$
- fgImages[Differencer.RIGHT + Differencer.ADDITION]= CompareUIPlugin.getImageDescriptor("ovr16/r_outadd_ov.gif"); //$NON-NLS-1$
-
- fgImages[Differencer.DELETION]= CompareUIPlugin.getImageDescriptor("ovr16/add_ov.gif"); //$NON-NLS-1$
- fgImages[Differencer.LEFT + Differencer.DELETION]= CompareUIPlugin.getImageDescriptor("ovr16/r_indel_ov.gif"); //$NON-NLS-1$
- fgImages[Differencer.RIGHT + Differencer.DELETION]= CompareUIPlugin.getImageDescriptor("ovr16/r_outdel_ov.gif"); //$NON-NLS-1$
-
- fgImages[Differencer.LEFT + Differencer.CHANGE]= CompareUIPlugin.getImageDescriptor("ovr16/r_inchg_ov.gif"); //$NON-NLS-1$
- fgImages[Differencer.RIGHT + Differencer.CHANGE]= CompareUIPlugin.getImageDescriptor("ovr16/r_outchg_ov.gif"); //$NON-NLS-1$
- } else {
- fgImages[Differencer.ADDITION]= CompareUIPlugin.getImageDescriptor("ovr16/add_ov.gif"); //$NON-NLS-1$
- fgImages[Differencer.LEFT + Differencer.ADDITION]= CompareUIPlugin.getImageDescriptor("ovr16/inadd_ov.gif"); //$NON-NLS-1$
- fgImages[Differencer.RIGHT + Differencer.ADDITION]= CompareUIPlugin.getImageDescriptor("ovr16/outadd_ov.gif"); //$NON-NLS-1$
-
- fgImages[Differencer.DELETION]= CompareUIPlugin.getImageDescriptor("ovr16/del_ov.gif"); //$NON-NLS-1$
- fgImages[Differencer.LEFT + Differencer.DELETION]= CompareUIPlugin.getImageDescriptor("ovr16/indel_ov.gif"); //$NON-NLS-1$
- fgImages[Differencer.RIGHT + Differencer.DELETION]= CompareUIPlugin.getImageDescriptor("ovr16/outdel_ov.gif"); //$NON-NLS-1$
-
- fgImages[Differencer.LEFT + Differencer.CHANGE]= CompareUIPlugin.getImageDescriptor("ovr16/inchg_ov.gif"); //$NON-NLS-1$
- fgImages[Differencer.RIGHT + Differencer.CHANGE]= CompareUIPlugin.getImageDescriptor("ovr16/outchg_ov.gif"); //$NON-NLS-1$
- }
-
- fgImages[Differencer.CONFLICTING + Differencer.ADDITION]= CompareUIPlugin.getImageDescriptor("ovr16/confadd_ov.gif"); //$NON-NLS-1$
- fgImages[Differencer.CONFLICTING + Differencer.DELETION]= CompareUIPlugin.getImageDescriptor("ovr16/confdel_ov.gif"); //$NON-NLS-1$
- fgImages[Differencer.CONFLICTING + Differencer.CHANGE]= CompareUIPlugin.getImageDescriptor("ovr16/confchg_ov.gif"); //$NON-NLS-1$
-
-// ImageDescriptor tmp= fgImages[Differencer.ADDITION];
-// fgImages[Differencer.ADDITION]= fgImages[Differencer.DELETION];
-// fgImages[Differencer.DELETION]= tmp;
- }
-
- private IPreferenceStore fPreferenceStore;
- private ListenerList fListeners= new ListenerList();
- private HashMap fProperties= new HashMap();
- private boolean fLeftEditable= true;
- private boolean fRightEditable= true;
- private String fAncestorLabel;
- private String fLeftLabel;
- private String fRightLabel;
- private Image fAncestorImage;
- private Image fRightImage;
- private Image fLeftImage;
- private Image[] fImages= new Image[16];
-
- /**
- * Creates a new configuration with editable left and right sides,
- * suitable default labels, and no images.
- */
- public CompareConfiguration(IPreferenceStore prefStore) {
-
- setProperty("LEFT_IS_LOCAL", new Boolean(fLeftIsLocal)); //$NON-NLS-1$
-
- fPreferenceStore= prefStore;
- if (fPreferenceStore != null) {
- boolean b= fPreferenceStore.getBoolean(ComparePreferencePage.INITIALLY_SHOW_ANCESTOR_PANE);
- setProperty(ComparePreferencePage.INITIALLY_SHOW_ANCESTOR_PANE, new Boolean(b));
-
- b= fPreferenceStore.getBoolean(ComparePreferencePage.IGNORE_WHITESPACE);
- setProperty(CompareConfiguration.IGNORE_WHITESPACE, new Boolean(b));
- }
- }
-
- /**
- * Creates a new configuration with editable left and right sides,
- * suitable default labels, and no images.
- */
- public CompareConfiguration() {
- this(CompareUIPlugin.getDefault().getPreferenceStore());
- }
-
- /**
- * Returns the preference store of this configuration.
- * @return the preference store of this configuration.
- */
- public IPreferenceStore getPreferenceStore() {
- return fPreferenceStore;
- }
-
- /**
- * Returns an image showing the specified change kind.
- * The different kind of changes are defined in the <code>Differencer</code>.
- * Newly created images are remembered by this class and
- * disposed when the <code>dispose</code> method is called.
- *
- * @param kind the kind of change as defined in <code>Differencer</code>.
- * @return an modification of the base image reflecting the kind of change.
- * @see org.eclipse.compare.structuremergeviewer.Differencer
- */
- public Image getImage(int kind) {
- Image image= fImages[kind & 15];
- if (image == null) {
- ImageDescriptor id= fgImages[kind & 15];
- if (id != null)
- image= id.createImage();
- fImages[kind & 15]= image;
- }
- return image;
- }
-
- /**
- * Returns an image showing the specified change kind applied to a
- * given base image. The different kind of changes are defined in the <code>Differencer</code>.
- * Typically an implementation would build a composite image
- * from the given base image and an image representing the change kind.
- * Newly created images are remembered by this class and
- * disposed when the <code>dispose</code> method is called.
- *
- * @param base the image which is modified to reflect the kind of change
- * @param kind the kind of change as defined in <code>Differencer</code>.
- * @return an modification of the base image reflecting the kind of change.
- * @see org.eclipse.compare.structuremergeviewer.Differencer
- */
- public Image getImage(Image base, int kind) {
-
- Object key= base;
- if (key == null)
- key= fgDummy;
-
- kind &= 15;
-
- Image[] a= (Image[]) fgMap.get(key);
- if (a == null) {
- a= new Image[16];
- fgMap.put(key, a);
- }
- Image b= a[kind];
- if (b == null) {
- b= new DiffImage(base, fgImages[kind], WIDTH, !fLeftIsLocal).createImage();
- CompareUI.disposeOnShutdown(b);
- a[kind]= b;
- }
- return b;
- }
-
- /**
- * Dispose of this compare configuration.
- * This method is called if the compare configuration is no longer used.
- * An implementation must dispose of all resources.
- */
- public void dispose() {
- }
-
- /**
- * Fires a <code>PropertyChangeEvent</code> to registered listeners.
- *
- * @param propertyName the name of the property that has changed
- * @param oldValue the property's old value
- * @param newValue the property's new value
- */
- private void fireChange(String propertyName, Object oldValue, Object newValue) {
- PropertyChangeEvent event= null;
- Object[] listeners= fListeners.getListeners();
- if (listeners != null) {
- for (int i= 0; i < listeners.length; i++) {
- IPropertyChangeListener l= (IPropertyChangeListener) listeners[i];
- if (event == null)
- event= new PropertyChangeEvent(this, propertyName, oldValue, newValue);
- l.propertyChange(event);
- }
- }
- }
-
- /* (non javadoc)
- * see IPropertyChangeNotifier.addListener
- */
- public void addPropertyChangeListener(IPropertyChangeListener listener) {
- fListeners.add(listener);
- }
-
- /* (non javadoc)
- * see IPropertyChangeNotifier.removeListener
- */
- public void removePropertyChangeListener(IPropertyChangeListener listener) {
- fListeners.remove(listener);
- }
-
- /**
- * Sets the property with the given name.
- * If the new value differs from the old a <code>PropertyChangeEvent</code>
- * is sent to registered listeners.
- *
- * @param propertyName the name of the property to set
- * @param value the new value of the property
- */
- public void setProperty(String key, Object newValue) {
- Object oldValue= fProperties.get(key);
- fProperties.put(key, newValue);
- if (oldValue == null || !oldValue.equals(newValue))
- fireChange(key, oldValue, newValue);
- }
-
- /**
- * Returns the property with the given name, or <code>null</code>
- * if no such property exists.
- *
- * @param propertyName the name of the property to retrieve
- * @return the property with the given name, or <code>null</code> if not found
- */
- public Object getProperty(String key) {
- return fProperties.get(key);
- }
-
- //---- ancestor
-
- /**
- * Sets the label to use for the ancestor of compare/merge viewers.
- *
- * @param label the new label for the ancestor of compare/merge viewers
- */
- public void setAncestorLabel(String label) {
- fAncestorLabel= label;
- }
-
- /**
- * Returns the label for the ancestor side of compare/merge viewers.
- * This label is typically shown in the title of the ancestor area in a compare viewer.
- *
- * @param element the input object of a compare/merge viewer or <code>null</code>
- * @return the label for the ancestor side or <code>null</code>
- */
- public String getAncestorLabel(Object element) {
- return fAncestorLabel;
- }
-
- /**
- * Sets the image to use for the ancestor of compare/merge viewers.
- * The CompareConfiguration does not automatically dispose the old image.
- *
- * @param image the new image for the ancestor of compare/merge viewers
- */
- public void setAncestorImage(Image image) {
- fAncestorImage= image;
- }
-
- /**
- * Returns the image for the ancestor side of compare/merge viewers.
- * This image is typically shown in the title of the ancestor area in a compare viewer.
- *
- * @param element the input object of a compare/merge viewer or <code>null</code>
- * @return the image for the ancestor side or <code>null</code>
- */
- public Image getAncestorImage(Object element) {
- return fAncestorImage;
- }
-
- //---- left side
-
- /**
- * Controls whether the left side of a merge viewer is editable.
- *
- * @param editable if the value is <code>true</code> left side is editable
- */
- public void setLeftEditable(boolean editable) {
- fLeftEditable= editable;
- }
-
- /**
- * Returns whether the left hand side of a merge viewer is editable.
- *
- * @return <code>true</code> if the left hand side is editable
- */
- public boolean isLeftEditable() {
- return fLeftEditable;
- }
-
- /**
- * Sets the label to use for the left side of compare/merge viewers.
- *
- * @param label the new label for the left side of compare/merge viewers
- */
- public void setLeftLabel(String label) {
- fLeftLabel= label;
- }
-
- /**
- * Returns the label for the left hand side of compare/merge viewers.
- * This label is typically shown in the title of the left side of a compare viewer.
- *
- * @param element the input object of a compare/merge viewer or <code>null</code>
- * @return the label for the left hand side or <code>null</code>
- */
- public String getLeftLabel(Object element) {
- return fLeftLabel;
- }
-
- /**
- * Sets the image to use for the left side of compare/merge viewers.
- * The compare configuration does not automatically dispose the old image.
- *
- * @param image the new image for the left side of compare/merge viewers
- */
- public void setLeftImage(Image image) {
- fLeftImage= image;
- }
-
- /**
- * Returns the image for the left hand side of compare/merge viewers.
- * This image is typically shown in the title of the left side of a compare viewer.
- *
- * @param element the input object of a compare/merge viewer or <code>null</code>
- * @return the image for the left hand side or <code>null</code>
- */
- public Image getLeftImage(Object element) {
- return fLeftImage;
- }
-
- //---- right side
-
- /**
- * Controls whether the right side of a merge viewer is editable.
- *
- * @param editable if the value is <code>true</code> right side is editable
- */
- public void setRightEditable(boolean editable) {
- fRightEditable= editable;
- }
-
- /**
- * Returns whether the right hand side of a merge viewer is editable.
- *
- * @return <code>true</code> if the right hand side is editable
- */
- public boolean isRightEditable() {
- return fRightEditable;
- }
-
- /**
- * Sets the label to use for the right side of compare/merge viewers.
- *
- * @param label the new label for the right side of compare/merge viewers
- */
- public void setRightLabel(String label) {
- fRightLabel= label;
- }
-
- /**
- * Returns the label for the right hand side of compare/merge viewers.
- * This label is typically shown in the title of the right side of a compare viewer.
- *
- * @param element the input object of a compare/merge viewer or <code>null</code>
- * @return the label for the right hand side or <code>null</code>
- */
- public String getRightLabel(Object element) {
- return fRightLabel;
- }
-
- /**
- * Sets the image to use for the right side of compare/merge viewers.
- * The compare configuration does not automatically dispose the old image.
- *
- * @param image the new image for the right side of compare/merge viewers
- */
- public void setRightImage(Image image) {
- fRightImage= image;
- }
-
- /**
- * Returns the image for the right hand side of compare/merge viewers.
- * This image is typically shown in the title of the right side of a compare viewer.
- *
- * @param element the input object of a compare/merge viewer or <code>null</code>
- * @return the image for the right hand side or <code>null</code>
- */
- public Image getRightImage(Object element) {
- return fRightImage;
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java
deleted file mode 100644
index fdbe766f7..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java
+++ /dev/null
@@ -1,792 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import java.lang.reflect.InvocationTargetException;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.ResourceBundle;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.ui.IPersistableElement;
-import org.eclipse.ui.IEditorInput;
-
-import org.eclipse.jface.util.*;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-import org.eclipse.compare.contentmergeviewer.ContentMergeViewer;
-import org.eclipse.compare.internal.*;
-import org.eclipse.compare.structuremergeviewer.*;
-
-
-/**
- * A compare operation which can present its results in a special editor.
- * Running the compare operation and presentating the results in a compare editor
- * are combined in one interface because it allows a client to keep the implementation
- * all in one place while separating it from the innards of a specific UI implementation of compare/merge.
- * <p>
- * A <code>CompareEditorInput</code> defines methods for the following sequence steps:
- * <UL>
- * <LI>running a lengthy compare operation under progress monitor control,
- * <LI>creating a UI for displaying the model and initializing the some widgets with the compare result,
- * <LI>tracking the dirty state of the model in case of merge,
- * <LI>saving the model.
- * </UL>
- * The Compare plug-in's <code>openCompareEditor</code> method takes an <code>ICompareEditorInput</code>
- * and starts sequencing through the above steps. If the compare result is not empty a new compare editor
- * is opened and takes over the sequence until eventually closed.
- * <p>
- * The <code>prepareInput</code> method should contain the
- * code of the compare operation. It is executed under control of a progress monitor
- * and can be canceled. If the result of the compare is not empty, that is if there are differences
- * that needs to be presented, the <code>ICompareEditorInput</code> should hold onto them and return them with
- * the <code>getCompareResult</code> method.
- * If the value returned from <code>getCompareResult</code> is not <code>null</code>
- * a compare editor is opened on the <code>ICompareEditorInput</code> with title and title image initialized by the
- * corresponding methods of the <code>ICompareEditorInput</code>.
- * <p>
- * Creation of the editor's SWT controls is delegated to the <code>createContents</code> method.
- * Here the SWT controls must be created and initialized with the result of the compare operation.
- * <p>
- * If merging is allowed, the modification state of the compared constituents must be tracked and the dirty
- * state returned from method <code>isSaveNeeded</code>. The value <code>true</code> triggers a subsequent call
- * to <code>save</code> where the modified resources can be saved.
- * <p>
- * The most important part of this implementation is the setup of the compare/merge UI.
- * The UI uses a simple browser metaphor to present compare results.
- * The top half of the layout shows the structural compare results (e.g. added, deleted, and changed files),
- * the bottom half the content compare results (e.g. textual differences between two files).
- * A selection in the top pane is fed to the bottom pane. If a content viewer is registered
- * for the type of the selected object, this viewer is installed in the pane.
- * In addition if a structure viewer is registered for the selection type the top pane
- * is split horizontally to make room for another pane and the structure viewer is installed
- * in it. When comparing Java files this second structure viewer would show the structural
- * differences within a Java file, e.g. added, deleted or changed methods and fields.
- * <p>
- * Subclasses provide custom setups, e.g. for a Catchup/Release operation
- * by passing a subclass of <code>CompareConfiguration</code> and by implementing the <code>prepareInput</code> method.
- * If a subclass cannot use the <code>DiffTreeViewer</code> which is installed by default in the
- * top left pane, method <code>createDiffViewer</code> can be overridden.
- *
- * @see CompareUI
- * @see CompareEditorInput
- */
-public abstract class CompareEditorInput implements IEditorInput, IPropertyChangeNotifier, IRunnableWithProgress {
-
- private static final boolean DEBUG= false;
-
- /**
- * The name of the "dirty" property.
- */
- public static final String DIRTY_STATE= "DIRTY_STATE"; //$NON-NLS-1$
-
- private static final String COMPARE_EDITOR_IMAGE_NAME= "cview16/compare_view.gif"; //$NON-NLS-1$
- private static Image fgTitleImage;
-
- private Splitter fComposite;
- private CompareConfiguration fCompareConfiguration;
- private CompareViewerSwitchingPane fStructureInputPane;
- private CompareViewerSwitchingPane fStructurePane1;
- private CompareViewerSwitchingPane fStructurePane2;
- private CompareViewerSwitchingPane fContentInputPane;
- private CompareViewerSwitchingPane fFocusPane;
- private String fMessage;
- private ISelection fSelection2;
- private Object fInput;
- private String fTitle;
- private ListenerList fListenerList= new ListenerList();
- private CompareNavigator fNavigator;
- private boolean fDirty= false;
- private ArrayList fDirtyViewers= new ArrayList();
- private IPropertyChangeListener fDirtyStateListener;
-
- private IgnoreWhiteSpaceAction fIgnoreWhitespace;
- private ShowPseudoConflicts fShowPseudoConflicts;
-
- boolean fStructureCompareOnSingleClick= true;
-
- /**
- * Creates a <code>CompareEditorInput</code> which is initialized with the given
- * compare configuration.
- * The compare configuration is passed to subsequently created viewers.
- *
- * @param configuration the compare configuration
- */
- public CompareEditorInput(CompareConfiguration configuration) {
- fCompareConfiguration= configuration;
- Assert.isNotNull(configuration);
-
- ResourceBundle bundle= CompareUIPlugin.getResourceBundle();
- fIgnoreWhitespace= new IgnoreWhiteSpaceAction(bundle, configuration);
- fShowPseudoConflicts= new ShowPseudoConflicts(bundle, configuration);
-
- fDirtyStateListener= new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent e) {
- String propertyName= e.getProperty();
- if (CompareEditorInput.DIRTY_STATE.equals(propertyName)) {
- boolean changed= false;
- Object newValue= e.getNewValue();
- if (newValue instanceof Boolean)
- changed= ((Boolean)newValue).booleanValue();
- setDirty(e.getSource(), changed);
- }
- }
- };
-
- IPreferenceStore ps= configuration.getPreferenceStore();
- if (ps != null)
- fStructureCompareOnSingleClick= ps.getBoolean(ComparePreferencePage.OPEN_STRUCTURE_COMPARE);
- }
-
- private boolean structureCompareOnSingleClick() {
- return fStructureCompareOnSingleClick;
- }
-
- /* (non Javadoc)
- * see IAdaptable.getAdapter
- */
- public Object getAdapter(Class adapter) {
- if (CompareNavigator.class.equals(adapter)) {
- if (fNavigator == null)
- fNavigator= new CompareNavigator(
- new CompareViewerSwitchingPane[] {
- fStructureInputPane,
- fStructurePane1,
- fStructurePane2,
- fContentInputPane
- }
- );
- return fNavigator;
- }
- return null;
- }
-
- /* (non Javadoc)
- * see IEditorInput.getImageDescriptor
- */
- public ImageDescriptor getImageDescriptor() {
- return null;
- }
-
- /* (non Javadoc)
- * see IEditorInput.getToolTipText
- */
- public String getToolTipText() {
- return fTitle;
- }
-
- /* (non Javadoc)
- * see IEditorInput.getName
- */
- public String getName() {
- return fTitle;
- }
-
- /**
- * Returns <code>null</code> since this editor cannot be persisted.
- *
- * @return <code>null</code> because this editor cannot be persisted
- */
- public IPersistableElement getPersistable() {
- return null;
- }
-
- /**
- * Returns <code>false</code> to indicate that this input
- * should not appear in the "File Most Recently Used" menu.
- *
- * @return <code>false</code>
- */
- public boolean exists() {
- return false;
- }
-
- /*
- * FIXME!
- */
- protected void setMessage(String message) {
- fMessage= message;
- }
-
- /*
- * FIXME!
- */
- public String getMessage() {
- return fMessage;
- }
-
- /**
- * Returns the title which will be used in the compare editor's title bar.
- * It can be set with <code>setTitle</code>.
- *
- * @return the title
- */
- public String getTitle() {
- return fTitle;
- }
-
- /**
- * Sets the title which will be used when presenting the compare result.
- * This method must be called before the editor is opened.
- *
- * @param title the title to use for the CompareEditor
- */
- public void setTitle(String title) {
- fTitle= title;
- }
-
- /**
- * Returns the title image which will be used in the compare editor's title bar.
- * Returns the title image which will be used when presenting the compare result.
- * This implementation returns a generic compare icon.
- * Subclasses can override.
- *
- * @return the title image, or <code>null</code> if none
- */
- public Image getTitleImage() {
- if (fgTitleImage == null) {
- fgTitleImage= CompareUIPlugin.getImageDescriptor(COMPARE_EDITOR_IMAGE_NAME).createImage();
- CompareUI.disposeOnShutdown(fgTitleImage);
- }
- return fgTitleImage;
- }
-
- /**
- * Returns the configuration object for the viewers within the compare editor.
- * Returns the configuration which was passed to the constructor.
- *
- * @return the compare configuration
- */
- public CompareConfiguration getCompareConfiguration() {
- return fCompareConfiguration;
- }
-
- /**
- * Adds standard actions to the given <code>ToolBarManager</code>.
- * <p>
- * Subclasses may override to add their own actions.
- * </p>
- *
- * @param toolBarManager the <code>ToolBarManager</code> to which to contribute
- */
- public void contributeToToolBar(ToolBarManager toolBarManager) {
-
- toolBarManager.add(new Separator());
- toolBarManager.add(fIgnoreWhitespace);
- toolBarManager.add(fShowPseudoConflicts);
- }
-
- /**
- * Runs the compare operation and stores the compare result.
- *
- * @param monitor the progress monitor to use to display progress and receive
- * requests for cancelation
- * @exception InvocationTargetException if the <code>prepareInput</code> method must propagate a checked exception,
- * it should wrap it inside an <code>InvocationTargetException</code>; runtime exceptions are automatically
- * wrapped in an <code>InvocationTargetException</code> by the calling context
- * @exception InterruptedException if the operation detects a request to cancel,
- * using <code>IProgressMonitor.isCanceled()</code>, it should exit by throwing
- * <code>InterruptedException</code>
- */
- public void run(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- fInput= prepareInput(monitor);
- }
-
- /**
- * Runs the compare operation and returns the compare result.
- * If <code>null</code> is returned no differences were found and no compare editor needs to be opened.
- * Progress should be reported to the given progress monitor.
- * A request to cancel the operation should be honored and acknowledged
- * by throwing <code>InterruptedException</code>.
- *
- * @param monitor the progress monitor to use to display progress and receive
- * requests for cancelation
- * @return the result of the compare operation, or <code>null</code> if there are no differences
- * @exception InvocationTargetException if the <code>prepareInput</code> method must propagate a checked exception,
- * it should wrap it inside an <code>InvocationTargetException</code>; runtime exceptions are automatically
- * wrapped in an <code>InvocationTargetException</code> by the calling context
- * @exception InterruptedException if the operation detects a request to cancel,
- * using <code>IProgressMonitor.isCanceled()</code>, it should exit by throwing
- * <code>InterruptedException</code>
- */
- protected abstract Object prepareInput(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException;
-
- /**
- * Returns the compare result computed by the most recent call to the
- * <code>run</code> method. Returns <code>null</code> if no
- * differences were found.
- *
- * @return the compare result prepared in method <code>prepareInput</code>
- * or <code>null</code> if there were no differences
- */
- public Object getCompareResult() {
- return fInput;
- }
-
- /**
- * Create the SWT controls that are used to display the result of the compare operation.
- * Creates the SWT Controls and sets up the wiring between the individual panes.
- * This implementation creates all four panes but makes only the necessary ones visible.
- * Finally it feeds the compare result into the top left structure viewer
- * and the content viewer.
- * <p>
- * Subclasses may override if they need to change the layout or wiring between panes.
- *
- * @param parent the parent control under which the control must be created
- * @return the SWT control hierarchy for the compare editor
- */
- public Control createContents(Composite parent) {
-
- fComposite= new Splitter(parent, SWT.VERTICAL);
- fComposite.setData(this);
-
- final Splitter h= new Splitter(fComposite, SWT.HORIZONTAL);
-
- fStructureInputPane= new CompareViewerSwitchingPane(h, SWT.BORDER | SWT.FLAT, true) {
- protected Viewer getViewer(Viewer oldViewer, Object input) {
- if (input instanceof DiffNode) {
- DiffNode dn= (DiffNode) input;
- if (dn.hasChildren())
- return createDiffViewer(this);
- }
- if (input instanceof ICompareInput)
- return findStructureViewer(oldViewer, (ICompareInput)input, this);
- return null;
- }
- };
- fFocusPane= fStructureInputPane;
-
- fStructurePane1= new CompareViewerSwitchingPane(h, SWT.BORDER | SWT.FLAT, true) {
- protected Viewer getViewer(Viewer oldViewer, Object input) {
- if (input instanceof ICompareInput)
- return findStructureViewer(oldViewer, (ICompareInput)input, this);
- return null;
- }
- };
- h.setVisible(fStructurePane1, false);
-
- fStructurePane2= new CompareViewerSwitchingPane(h, SWT.BORDER | SWT.FLAT, true) {
- protected Viewer getViewer(Viewer oldViewer, Object input) {
- if (input instanceof ICompareInput)
- return findStructureViewer(oldViewer, (ICompareInput)input, this);
- return null;
- }
- };
- h.setVisible(fStructurePane2, false);
-
- fContentInputPane= new CompareViewerSwitchingPane(fComposite, SWT.BORDER | SWT.FLAT) {
- protected Viewer getViewer(Viewer oldViewer, Object input) {
- if (input instanceof ICompareInput)
- return findContentViewer(oldViewer, (ICompareInput)input, this);
- return null;
- }
- };
- fComposite.setVisible(h, false);
- fComposite.setVisible(fContentInputPane, true);
-
- fComposite.setWeights(new int[] { 30, 70 });
-
- fComposite.layout();
-
- // setup the wiring for top left pane
- fStructureInputPane.addOpenListener(
- new IOpenListener() {
- public void open(OpenEvent oe) {
- feed1(oe.getSelection());
- }
- }
- );
- fStructureInputPane.addSelectionChangedListener(
- new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent e) {
- ISelection s= e.getSelection();
- if (s == null || s.isEmpty())
- feed1(s);
- }
- }
- );
- fStructureInputPane.addDoubleClickListener(
- new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- feedDefault1(event.getSelection());
- }
- }
- );
-
- // setup the wiring for second pane
- fStructurePane1.addOpenListener(
- new IOpenListener() {
- public void open(OpenEvent oe) {
- feed2(oe.getSelection());
- }
- }
- );
- fStructurePane1.addSelectionChangedListener(
- new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent e) {
- ISelection s= e.getSelection();
- if (s == null || s.isEmpty())
- feed2(s);
- }
- }
- );
-
- // setup the wiring for third pane
- fStructurePane2.addOpenListener(
- new IOpenListener() {
- public void open(OpenEvent oe) {
- feed3(oe.getSelection());
- }
- }
- );
- fStructurePane2.addSelectionChangedListener(
- new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent e) {
- ISelection s= e.getSelection();
- if (s == null || s.isEmpty())
- feed3(s);
- }
- }
- );
-
- // now deal with activation/deactivation
- Listener activationListener= new Listener() {
- int fOldOpenStrategy;
-
- public void handleEvent(Event event) {
- if (event.widget instanceof CompareViewerSwitchingPane) {
-
- switch (event.type) {
- case SWT.Activate:
- fFocusPane= (CompareViewerSwitchingPane) event.widget;
- fOldOpenStrategy= OpenStrategy.getOpenMethod();
- OpenStrategy.setOpenMethod(OpenStrategy.SINGLE_CLICK | OpenStrategy.ARROW_KEYS_OPEN);
- break;
- case SWT.Deactivate:
- OpenStrategy.setOpenMethod(fOldOpenStrategy);
- break;
- }
- }
- }
- };
- fStructureInputPane.addListener(SWT.Activate, activationListener);
- fStructurePane1.addListener(SWT.Activate, activationListener);
- fStructurePane2.addListener(SWT.Activate, activationListener);
- fContentInputPane.addListener(SWT.Activate, activationListener);
-
- fStructureInputPane.addListener(SWT.Deactivate, activationListener);
- fStructurePane1.addListener(SWT.Deactivate, activationListener);
- fStructurePane2.addListener(SWT.Deactivate, activationListener);
- fContentInputPane.addListener(SWT.Deactivate, activationListener);
-
-
- if (fInput instanceof ICompareInput) {
- fStructureInputPane.setInput((ICompareInput) fInput);
- ISelection sel= fStructureInputPane.getSelection();
- if (sel == null || sel.isEmpty())
- feed1(sel); // we only feed downstream viewers if the top left pane is empty
- }
-
- fComposite.setData("Nav", //$NON-NLS-1$
- new CompareViewerSwitchingPane[] {
- fStructureInputPane,
- fStructurePane1,
- fStructurePane2,
- fContentInputPane
- }
- );
-
- return fComposite;
- }
-
- private void feed1(final ISelection selection) {
- BusyIndicator.showWhile(fComposite.getDisplay(),
- new Runnable() {
- public void run() {
- if (selection == null || selection.isEmpty()) {
- Object input= fStructureInputPane.getInput();
- fContentInputPane.setInput(input);
- fStructurePane2.setInput(null); // clear downstream pane
- fStructurePane1.setInput(null);
- } else {
- Object input= getElement(selection);
- fContentInputPane.setInput(input);
- if (structureCompareOnSingleClick())
- fStructurePane1.setInput(input);
- fStructurePane2.setInput(null); // clear downstream pane
- if (fStructurePane1.getInput() != input)
- fStructurePane1.setInput(null);
- }
- }
- }
- );
- }
-
- private void feedDefault1(final ISelection selection) {
- BusyIndicator.showWhile(fComposite.getDisplay(),
- new Runnable() {
- public void run() {
- if (!selection.isEmpty())
- fStructurePane1.setInput(getElement(selection));
- }
- }
- );
- }
-
- private void feed2(final ISelection selection) {
- BusyIndicator.showWhile(fComposite.getDisplay(),
- new Runnable() {
- public void run() {
- if (selection.isEmpty()) {
- Object input= fStructurePane1.getInput();
- fContentInputPane.setInput(input);
- fStructurePane2.setInput(null);
- } else {
- Object input= getElement(selection);
- fContentInputPane.setInput(input);
- fStructurePane2.setInput(input);
- }
- }
- }
- );
- }
-
- private void feed3(final ISelection selection) {
- BusyIndicator.showWhile(fComposite.getDisplay(),
- new Runnable() {
- public void run() {
- if (selection.isEmpty())
- fContentInputPane.setInput(fStructurePane2.getInput());
- else
- fContentInputPane.setInput(getElement(selection));
- }
- }
- );
-
- }
-
- /**
- * Returns the first element of the given selection if the selection
- * is a <code>IStructuredSelection</code> with exactly one element. Returns
- * <code>null</code> otherwise.
- *
- * @param selection the selection
- * @return the first element of the selection, or <code>null</code>
- */
- private static Object getElement(ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ss= (IStructuredSelection) selection;
- if (ss.size() == 1)
- return ss.getFirstElement();
- }
- return null;
- }
-
- /**
- * Asks this input to take focus within its container (editor).
- * <p>
- * Clients should not call this method but they may
- * override if they implement a different layout with different visual
- * components. Clients are free to call the inherited method.
- * </p>
- */
- public void setFocus() {
- if (fFocusPane != null) {
- Viewer v= fFocusPane.getViewer();
- if (v != null) {
- Control c= v.getControl();
- if (c != null)
- c.setFocus();
- }
- } else if (fComposite != null)
- fComposite.setFocus();
- }
-
- /**
- * Factory method for creating a differences viewer for the top left pane.
- * It is called from <code>createContents</code> and returns a <code>DiffTreeViewer</code>.
- * <p>
- * Subclasses may override if they need a different viewer.
- * </p>
- *
- * @param parent the SWT parent control under which to create the viewer's SWT controls
- * @return a compare viewer for the top left pane
- */
- public Viewer createDiffViewer(Composite parent) {
- return new DiffTreeViewer(parent, fCompareConfiguration);
- }
-
- /**
- * Implements the dynamic viewer switching for structure viewers.
- * The method must return a compare viewer based on the old (or current) viewer
- * and a new input object. If the old viewer is suitable for showing the new input the old viewer
- * can be returned. Otherwise a new viewer must be created under the given parent composite or
- * <code>null</code> can be returned to indicate that no viewer could be found.
- * <p>
- * This implementation forwards the request to <code>CompareUI.findStructureViewer</code>.
- * <p>
- * Subclasses may override to implement a different strategy.
- * </p>
- *
- * @return a compare viewer which is suitable for the given input object or <code>null</code>
- */
- public Viewer findStructureViewer(Viewer oldViewer, ICompareInput input, Composite parent) {
- return CompareUIPlugin.findStructureViewer(oldViewer, input, parent, fCompareConfiguration);
- }
-
- /**
- * Implements the dynamic viewer switching for content viewers.
- * The method must return a compare viewer based on the old (or current) viewer
- * and a new input object. If the old viewer is suitable for showing the new input the old viewer
- * can be returned. Otherwise a new viewer must be created under the given parent composite or
- * <code>null</code> can be returned to indicate that no viewer could be found.
- * <p>
- * This implementation forwards the request to <code>CompareUI.findContentViewer</code>.
- * <p>
- * Subclasses may override to implement a different strategy.
- * </p>
- *
- * @return a compare viewer which is suitable for the given input object or <code>null</code>
- */
- public Viewer findContentViewer(Viewer oldViewer, ICompareInput input, Composite parent) {
-
- Viewer newViewer= CompareUIPlugin.findContentViewer(oldViewer, input, parent, fCompareConfiguration);
-
- boolean isNewViewer= newViewer != oldViewer;
- if (DEBUG) System.out.println("CompareEditorInput.findContentViewer: " + isNewViewer); //$NON-NLS-1$
-
- if (isNewViewer && newViewer instanceof IPropertyChangeNotifier) {
- final IPropertyChangeNotifier dsp= (IPropertyChangeNotifier) newViewer;
- dsp.addPropertyChangeListener(fDirtyStateListener);
-
- Control c= newViewer.getControl();
- c.addDisposeListener(
- new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- dsp.removePropertyChangeListener(fDirtyStateListener);
- }
- }
- );
- }
-
- return newViewer;
- }
-
- /**
- * Returns <code>true</code> if there are unsaved changes.
- * The value returned is the value of the <code>DIRTY_STATE</code> property of this input object.
-
- * Returns <code>true</code> if this input has unsaved changes,
- * that is if <code>setDirty(true)</code> has been called.
- * Subclasses don't have to override if the functionality provided by <doce>setDirty</code>
- * is sufficient.
- *
- * @return <code>true</code> if there are changes that need to be saved
- */
- public boolean isSaveNeeded() {
- return fDirty || fDirtyViewers.size() > 0;
- }
-
- /**
- * Sets the dirty state of this input to the given
- * value and sends out a <code>PropertyChangeEvent</code> if the new value differs from the old value.
- *
- * @param dirty the dirty state for this compare input
- */
- public void setDirty(boolean dirty) {
-
- boolean confirmSave= true;
- Object o= fCompareConfiguration.getProperty(CompareEditor.CONFIRM_SAVE_PROPERTY);
- if (o instanceof Boolean)
- confirmSave= ((Boolean)o).booleanValue();
-
- if (!confirmSave) {
- fDirty= dirty;
- if (!fDirty)
- fDirtyViewers.clear();
- }
- }
-
- private void setDirty(Object source, boolean dirty) {
- Assert.isNotNull(source);
- boolean oldDirty= fDirtyViewers.size() > 0;
- if (dirty)
- fDirtyViewers.add(source);
- else
- fDirtyViewers.remove(source);
- boolean newDirty= fDirtyViewers.size() > 0;
- if (DEBUG) System.out.println("setDirty("+source+", "+dirty+"): " + newDirty); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- if (oldDirty != newDirty)
- Utilities.firePropertyChange(fListenerList, this, DIRTY_STATE, new Boolean(oldDirty), new Boolean(newDirty));
- }
-
- /* (non Javadoc)
- * see IPropertyChangeNotifier.addListener
- */
- public void addPropertyChangeListener(IPropertyChangeListener listener) {
- fListenerList.add(listener);
- }
-
- /* (non Javadoc)
- * see IPropertyChangeNotifier.removeListener
- */
- public void removePropertyChangeListener(IPropertyChangeListener listener) {
- fListenerList.remove(listener);
- }
-
- /**
- * Save any unsaved changes.
- * Empty implementation.
- * Subclasses must override to save any changes.
- *
- * @param progressMonitor an <code>IProgressMonitor</code> that the implementation of save may use to show progress
- * @deprecated Override method saveChanges instead.
- */
- public void save(IProgressMonitor pm) {
- }
-
- /**
- * Save any unsaved changes.
- * Subclasses must override to save any changes.
- * This implementation tries to flush changes in all viewers by
- * calling <code>ISavable.save</code> on them.
- *
- * @param progressMonitor an <code>IProgressMonitor</code> that the implementation of save may use to show progress
- */
- public void saveChanges(IProgressMonitor pm) throws CoreException {
-
- // flush changes in any dirty viewer
- flushViewer(fStructureInputPane, pm);
- flushViewer(fStructurePane1, pm);
- flushViewer(fStructurePane2, pm);
- flushViewer(fContentInputPane, pm);
-
- save(pm);
- }
-
- private static void flushViewer(CompareViewerSwitchingPane pane, IProgressMonitor pm) throws CoreException {
- if (pane != null) {
- Viewer v= pane.getViewer();
- if (v instanceof ISavable)
- ((ISavable)v).save(pm);
- }
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareUI.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareUI.java
deleted file mode 100644
index d439ee4a2..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareUI.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.Viewer;
-
-import org.eclipse.core.runtime.IAdaptable;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-import org.eclipse.compare.internal.CompareUIPlugin;
-import org.eclipse.compare.internal.IStructureCreatorDescriptor;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.compare.structuremergeviewer.IStructureCreator;
-
-
-/**
- * The class <code>CompareUI</code> defines the entry point to initiate a configurable
- * compare operation on arbitrary resources. The result of the compare
- * is opened into a compare editor where the details can be browsed and
- * edited in dynamically selected structure and content viewers.
- * <p>
- * The Compare UI provides a registry for content and structure compare viewers,
- * which is initialized from extensions contributed to extension points
- * declared by this plug-in.
- */
-public final class CompareUI {
-
- /**
- * Compare Plug-in ID (value <code>"org.eclipse.compare"</code>).
- * @since 2.0
- */
- public static final String PLUGIN_ID= "org.eclipse.compare"; //$NON-NLS-1$
-
- /** Image descriptors for the 'Next' tool bar button. */
- public static final ImageDescriptor DESC_DTOOL_NEXT= CompareUIPlugin.getImageDescriptor(CompareUIPlugin.DTOOL_NEXT);
- public static final ImageDescriptor DESC_CTOOL_NEXT= CompareUIPlugin.getImageDescriptor(CompareUIPlugin.CTOOL_NEXT);
- public static final ImageDescriptor DESC_ETOOL_NEXT= CompareUIPlugin.getImageDescriptor(CompareUIPlugin.ETOOL_NEXT);
-
- /** Image descriptors for the 'Previous' tool bar button. */
- public static final ImageDescriptor DESC_DTOOL_PREV= CompareUIPlugin.getImageDescriptor(CompareUIPlugin.DTOOL_PREV);
- public static final ImageDescriptor DESC_CTOOL_PREV= CompareUIPlugin.getImageDescriptor(CompareUIPlugin.CTOOL_PREV);
- public static final ImageDescriptor DESC_ETOOL_PREV= CompareUIPlugin.getImageDescriptor(CompareUIPlugin.ETOOL_PREV);
-
- /**
- * Name of the title property of a compare viewer.
- * If a property with this name is set
- * on the top level SWT control of a viewer, it is used as a title in the pane's
- * title bar.
- */
- public static final String COMPARE_VIEWER_TITLE= "org.eclipse.compare.CompareUI.CompareViewerTitle"; //$NON-NLS-1$
-
- /* (non Javadoc)
- * non inatiatiable!
- */
- private CompareUI() {
- }
-
- public static AbstractUIPlugin getPlugin() {
- return CompareUIPlugin.getDefault();
- }
-
- /**
- * Returns this plug-in's resource bundle.
- *
- * @return the plugin's resource bundle
- */
- public static ResourceBundle getResourceBundle() {
- return CompareUIPlugin.getResourceBundle();
- }
-
- /**
- * Performs the comparison described by the given input and opens a
- * compare editor on the result.
- *
- * @param input the input on which to open the compare editor
- */
- public static void openCompareEditor(CompareEditorInput input) {
- CompareUIPlugin plugin= CompareUIPlugin.getDefault();
- if (plugin != null)
- plugin.openCompareEditor(input);
- }
-
- /**
- * Performs the comparison described by the given input and opens a
- * modal compare dialog on the result.
- *
- * @param input the input on which to open the compare dialog
- */
- public static void openCompareDialog(CompareEditorInput input) {
- CompareUIPlugin plugin= CompareUIPlugin.getDefault();
- if (plugin != null)
- plugin.openCompareDialog(input);
- }
-
- /**
- * Registers an image descriptor for the given type.
- *
- * @param type the type
- * @param descriptor the image descriptor
- */
- public static void registerImageDescriptor(String type, ImageDescriptor descriptor) {
- CompareUIPlugin.registerImageDescriptor(type, descriptor);
- }
-
- /**
- * Returns a shared image for the given type, or a generic image if none
- * has been registered for the given type.
- * <p>
- * Note: Images returned from this method will be automatically disposed
- * of when this plug-in shuts down. Callers must not dispose of these
- * images themselves.
- * </p>
- *
- * @param type the type
- * @return the image
- */
- public static Image getImage(String type) {
- return CompareUIPlugin.getImage(type);
- }
-
- /**
- * Registers the given image for being disposed when this plug-in is shutdown.
- *
- * @param image the image to register for disposal
- */
- public static void disposeOnShutdown(Image image) {
- CompareUIPlugin.disposeOnShutdown(image);
- }
-
- /**
- * Returns a shared image for the given adaptable.
- * This convenience method queries the given adaptable
- * for its <code>IWorkbenchAdapter.getImageDescriptor</code>, which it
- * uses to create an image if it does not already have one.
- * <p>
- * Note: Images returned from this method will be automatically disposed
- * of when this plug-in shuts down. Callers must not dispose of these
- * images themselves.
- * </p>
- *
- * @param adaptable the adaptable for which to find an image
- * @return an image
- */
- public static Image getImage(IAdaptable adaptable) {
- return CompareUIPlugin.getImage(adaptable);
- }
-
- /**
- * Returns a structure compare viewer based on an old viewer and an input object.
- * If the old viewer is suitable for showing the input, the old viewer
- * is returned. Otherwise, the input's type is used to find a viewer descriptor in the registry
- * which in turn is used to create a structure compare viewer under the given parent composite.
- * If no viewer descriptor can be found <code>null</code> is returned.
- *
- * @param oldViewer a new viewer is only created if this old viewer cannot show the given input
- * @param input the input object for which to find a structure viewer
- * @param parent the SWT parent composite under which the new viewer is created
- * @param configuration a configuration which is passed to a newly created viewer
- * @return the compare viewer which is suitable for the given input object or <code>null</code>
- */
- public static Viewer findStructureViewer(Viewer oldViewer, ICompareInput input, Composite parent,
- CompareConfiguration configuration) {
-
- return CompareUIPlugin.findStructureViewer(oldViewer, input, parent, configuration);
- }
-
- /**
- * Returns a content compare viewer based on an old viewer and an input object.
- * If the old viewer is suitable for showing the input the old viewer
- * is returned. Otherwise the input's type is used to find a viewer descriptor in the registry
- * which in turn is used to create a content compare viewer under the given parent composite.
- * If no viewer descriptor can be found <code>null</code> is returned.
- *
- * @param oldViewer a new viewer is only created if this old viewer cannot show the given input
- * @param input the input object for which to find a content viewer
- * @param parent the SWT parent composite under which the new viewer is created
- * @param configuration a configuration which is passed to a newly created viewer
- * @return the compare viewer which is suitable for the given input object or <code>null</code>
- */
- public static Viewer findContentViewer(Viewer oldViewer, ICompareInput input, Composite parent,
- CompareConfiguration configuration) {
-
- return CompareUIPlugin.findContentViewer(oldViewer, input, parent, configuration);
- }
-
- public static void addStructureViewerAlias(String type, String alias) {
- CompareUIPlugin.addStructureViewerAlias(type, alias);
- }
-
- public static void removeAllStructureViewerAliases(String type) {
- CompareUIPlugin.removeAllStructureViewerAliases(type);
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerPane.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerPane.java
deleted file mode 100644
index 3106b1166..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerPane.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.jface.action.ToolBarManager;
-
-import org.eclipse.compare.internal.Splitter;
-
-/**
- * A <code>CompareViewerPane</code> is a convenience class which installs a
- * <code>CLabel</code> and a <code>Toolbar</code> in a <code>ViewForm</code>.
- * <P>
- * Double clicking onto the <code>CompareViewerPane</code>'s title bar maximizes
- * the <code>CompareViewerPane</code> to the size of an enclosing <code>Splitter</code>
- * (if there is one).
- * If more <code>Splitters</code> are nested maximizing walks up and
- * maximizes to the outermost <code>Splitter</code>.
- */
-public class CompareViewerPane extends ViewForm {
-
- private ToolBarManager fToolBarManager;
-
-
- public CompareViewerPane(Composite parent, int style) {
- super(parent, style);
-
- marginWidth= 0;
- marginHeight= 0;
-
- CLabel label= new CLabel(this, SWT.NONE);
- setTopLeft(label);
-
- MouseAdapter ml= new MouseAdapter() {
- public void mouseDoubleClick(MouseEvent e) {
- Control parent= getParent();
- if (parent instanceof Splitter)
- ((Splitter)parent).setMaximizedControl(CompareViewerPane.this);
- }
- };
-
- addMouseListener(ml);
- label.addMouseListener(ml);
- }
-
- public void setText(String label) {
- CLabel cl= (CLabel) getTopLeft();
- cl.setText(label);
- }
-
- public void setImage(Image image) {
- CLabel cl= (CLabel) getTopLeft();
- cl.setImage(image);
- }
-
- /**
- * Returns a <code>ToolBarManager</code> if the given parent is a <code>CompareViewerPane</code>.
- */
- public static ToolBarManager getToolBarManager(Composite parent) {
- if (parent instanceof CompareViewerPane) {
- CompareViewerPane pane= (CompareViewerPane) parent;
- return pane.getToolBarManager();
- }
- return null;
- }
-
- /**
- * Clear tool items in <code>CompareViewerPane</code>'s control bar.
- */
- public static void clearToolBar(Composite parent) {
- ToolBarManager tbm= getToolBarManager(parent);
- if (tbm != null) {
- tbm.removeAll();
- tbm.update(true);
- }
- }
-
- //---- private stuff
-
- private ToolBarManager getToolBarManager() {
- if (fToolBarManager == null) {
- ToolBar tb= new ToolBar(this, SWT.FLAT);
- setTopCenter(tb);
- fToolBarManager= new ToolBarManager(tb);
- }
- return fToolBarManager;
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java
deleted file mode 100644
index 7baa256d9..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java
+++ /dev/null
@@ -1,307 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import java.text.MessageFormat;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.jface.util.ListenerList;
-import org.eclipse.jface.viewers.*;
-
-import org.eclipse.compare.internal.*;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-
-
-/**
- * A custom <code>CompareViewerPane</code> which supports viewer switching.
- * <p>
- * Clients must implement the viewer switching strategy by implementing
- * <code>getViewer</code>method.
- * <p>
- * If a property with the name <code>CompareUI.COMPARE_VIEWER_TITLE</code> is set
- * on the top level SWT control of a viewer, it is used as a title in the <code>CompareViewerPane</code>'s
- * title bar.
- */
-public abstract class CompareViewerSwitchingPane extends CompareViewerPane
- implements ISelectionChangedListener, ISelectionProvider, IDoubleClickListener {
-
- private Viewer fViewer;
- private Object fInput;
- private ListenerList fSelectionListeners= new ListenerList();
- private ListenerList fDoubleClickListener= new ListenerList();
- private ListenerList fOpenListener= new ListenerList();
- private boolean fControlVisibility= false;
- private String fTitle;
- private String fTitleArgument;
-
- private IOpenListener fOpenHandler= new IOpenListener() {
- public void open(OpenEvent event) {
- Object[] listeners= fOpenListener.getListeners();
- for (int i= 0; i < listeners.length; i++)
- ((IOpenListener) listeners[i]).open(event);
- }
- };
-
- /**
- * Creates a <code>CompareViewerSwitchingPane</code> as a child of the given parent and with the
- * specified SWT style bits.
- */
- public CompareViewerSwitchingPane(Composite parent, int style) {
- this(parent, style, false);
- }
-
- /**
- * Creates a <code>CompareViewerSwitchingPane</code> as a child of the given parent and with the
- * specified SWT style bits.
- */
- public CompareViewerSwitchingPane(Composite parent, int style, boolean visibility) {
- super(parent, style);
-
- fControlVisibility= visibility;
-
- setViewer(new NullViewer(this));
-
- addDisposeListener(
- new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- if (fViewer instanceof ISelectionProvider)
- ((ISelectionProvider) fViewer).removeSelectionChangedListener(CompareViewerSwitchingPane.this);
- if (fViewer instanceof StructuredViewer) {
- StructuredViewer sv= (StructuredViewer) fViewer;
- sv.removeDoubleClickListener(CompareViewerSwitchingPane.this);
- sv.removeOpenListener(fOpenHandler);
- }
- fViewer= null;
- fInput= null;
- fSelectionListeners= null;
- }
- }
- );
- }
-
- /**
- * Returns the current viewer.
- */
- public Viewer getViewer() {
- return fViewer;
- }
-
- /**
- * Sets the current viewer.
- */
- private void setViewer(Viewer newViewer) {
-
- if (newViewer == fViewer)
- return;
-
- boolean oldEmpty= isEmpty();
-
- if (fViewer != null) {
-
- if (fViewer instanceof ISelectionProvider)
- ((ISelectionProvider) fViewer).removeSelectionChangedListener(this);
-
- if (fViewer instanceof StructuredViewer) {
- StructuredViewer sv= (StructuredViewer) fViewer;
- sv.removeDoubleClickListener(this);
- sv.removeOpenListener(fOpenHandler);
- }
-
- Control content= getContent();
- setContent(null);
-
- fViewer.setInput(null);
-
- if (content != null && !content.isDisposed())
- content.dispose();
-
- } else
- oldEmpty= false;
- setContent(null);
-
- fViewer= newViewer;
-
- if (fViewer != null) {
- // we have to remember and restore the old visibility of the CustomPane
- // since setContent changes the visibility
- boolean old= getVisible();
- setContent(fViewer.getControl());
- setVisible(old); // restore old visibility
-
- boolean newEmpty= isEmpty();
-
- if (fViewer instanceof ISelectionProvider)
- ((ISelectionProvider) fViewer).addSelectionChangedListener(this);
-
- if (fViewer instanceof StructuredViewer) {
- StructuredViewer sv= (StructuredViewer) fViewer;
- sv.addDoubleClickListener(this);
- sv.addOpenListener(fOpenHandler);
- }
-
- if (oldEmpty != newEmpty) { // relayout my container
- Composite parent= getParent();
- if (parent instanceof Splitter)
- ((Splitter)parent).setVisible(this, fControlVisibility ? !newEmpty : true);
- }
-
- layout(true);
- }
- }
-
- public String getTitleArgument() {
- return fTitleArgument;
- }
-
- /**
- * Returns <code>true</code> if no viewer is installed or if the current viewer
- * is a <code>NullViewer</code>.
- */
- public boolean isEmpty() {
- return fViewer == null || fViewer instanceof NullViewer;
- }
-
- public void addSelectionChangedListener(ISelectionChangedListener l) {
- fSelectionListeners.add(l);
- }
-
- public void removeSelectionChangedListener(ISelectionChangedListener l) {
- fSelectionListeners.remove(l);
- }
-
- public void addDoubleClickListener(IDoubleClickListener l) {
- fDoubleClickListener.add(l);
- }
-
- public void removeDoubleClickListener(IDoubleClickListener l) {
- fDoubleClickListener.remove(l);
- }
-
- public void addOpenListener(IOpenListener l) {
- fOpenListener.add(l);
- }
-
- public void removeOpenListener(IOpenListener l) {
- fOpenListener.remove(l);
- }
-
- public void doubleClick(DoubleClickEvent event) {
- Object[] listeners= fDoubleClickListener.getListeners();
- for (int i= 0; i < listeners.length; i++)
- ((IDoubleClickListener) listeners[i]).doubleClick(event);
- }
-
- public ISelection getSelection() {
- if (fViewer instanceof ISelectionProvider)
- return ((ISelectionProvider) fViewer).getSelection();
- return null;
- }
-
- public void setSelection(ISelection s) {
- if (fViewer instanceof ISelectionProvider)
- ((ISelectionProvider) fViewer).setSelection(s);
- }
-
- public void selectionChanged(SelectionChangedEvent ev) {
- Object[] listeners= fSelectionListeners.getListeners();
- for (int i= 0; i < listeners.length; i++)
- ((ISelectionChangedListener) listeners[i]).selectionChanged(ev);
- }
-
- private boolean hasFocus2() {
- // do we have focus?
- Display display= getDisplay();
- if (display != null)
- for (Control focus= display.getFocusControl(); focus != null; focus= focus.getParent())
- if (focus == this)
- return true;
- return false;
- }
-
- /**
- * If the old viewer had focus, new setInput tries to set
- * focus on new viewer too.
- */
- public void setInput(Object input) {
-
- if (fInput == input)
- return;
-
- boolean hadFocus= hasFocus2();
-
-// try {
-// if (fViewer != null)
-// fViewer.setInput(null); // force save before switching viewer
-// } catch (ViewerSwitchingCancelled ex) {
-// return;
-// }
-
- fInput= input;
-
- // viewer switching
- Viewer newViewer= null;
- if (input != null)
- newViewer= getViewer(fViewer, input);
-
- if (newViewer == null) {
- if (fViewer instanceof NullViewer)
- return;
- newViewer= new NullViewer(this);
- }
-
- setViewer(newViewer);
-
- // set input
- fViewer.setInput(input);
-
- Image image= null;
- if (!(fViewer instanceof NullViewer) && input instanceof ICompareInput)
- image= ((ICompareInput)input).getImage();
- setImage(image);
-
- String title= null;
- if (fViewer != null) {
- Control c= fViewer.getControl();
- if (c != null) {
- Object data= c.getData(CompareUI.COMPARE_VIEWER_TITLE);
- if (data instanceof String)
- title= (String) data;
- if (hadFocus)
- c.setFocus();
- }
- }
-
- fTitle= title;
- updateTitle();
- }
-
- public void setTitleArgument(String argument) {
- fTitleArgument= argument;
- updateTitle();
- }
-
- private void updateTitle() {
- if (fTitle != null) {
- if (fTitleArgument != null) {
- String format= CompareMessages.getString("CompareViewerSwitchingPane.Titleformat"); //$NON-NLS-1$
- String t= MessageFormat.format(format, new String[] { fTitle, fTitleArgument } );
- setText(t);
- } else
- setText(fTitle);
- } else {
- setText(""); //$NON-NLS-1$
- }
- }
-
- public Object getInput() {
- return fInput;
- }
-
- abstract protected Viewer getViewer(Viewer oldViewer, Object input);
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java
deleted file mode 100644
index ad21c2bab..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java
+++ /dev/null
@@ -1,1016 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import java.util.HashMap;
-import java.util.ResourceBundle;
-import java.util.Date;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.HashSet;
-import java.util.Calendar;
-import java.io.InputStream;
-import java.text.*;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.Item;
-import org.eclipse.swt.widgets.Button;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.util.Assert;
-import org.eclipse.jface.dialogs.*;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFileState;
-import org.eclipse.core.runtime.CoreException;
-
-import org.eclipse.compare.internal.*;
-import org.eclipse.compare.structuremergeviewer.*;
-import org.eclipse.compare.*;
-
-/**
- * A dialog where one input element can be compared against
- * a list of historic variants (editions) of the same input element.
- * The dialog can be used to implement functions like "Compare/Replace with Version" or
- * "Compare/Replace from Local History" on workspace resources.
- * <p>
- * In addition it is possible to specify a subsection of the input element
- * (e.g. a method in a Java source file) by means of a "path".
- * In this case the dialog compares only the subsection (as specified by the path)
- * with the corresponding subsection in the list of editions.
- * Only those editions are shown where the subsection differs from the same subsection in
- * another edition thereby minimizing the number of presented variants.
- * This functionality can be used to implement "Replace from Local History"
- * for the Java language.
- * <p>
- * Subsections of an input element are determined by first finding an
- * <code>IStructureCreator</code> for the input's type.
- * Then the method <code>locate</code> is used to extract the subsection.
- * <p>
- * Each edition (variant in the list of variants) must implement the <code>IModificationDate</code> interface
- * so that the dialog can sort the editions and present them in a tree structure where every
- * node corresponds one day.
- * <p>
- * The functionality is surfaced in a single function <code>selectEdition</code>.
- * <p>
- * Clients may instantiate this class; it is not intended to be subclassed.
- * </p>
- *
- * @see IModificationDate
- * @see ITypedElement
- */
-public class EditionSelectionDialog extends ResizableDialog {
-
- /**
- * An item in an underlying edition.
- */
- private static class Pair {
-
- private ITypedElement fEdition;
- private ITypedElement fItem;
- private String fContent;
- private IStructureCreator fStructureCreator;
- private boolean fHasError= false;
-
- Pair(IStructureCreator structureCreator, ITypedElement edition, ITypedElement item) {
- fStructureCreator= structureCreator;
- fEdition= edition;
- fItem= item;
- }
-
- Pair(IStructureCreator structureCreator, ITypedElement edition) {
- this(structureCreator, edition, edition);
- }
-
- ITypedElement getEdition() {
- return fEdition;
- }
-
- ITypedElement getItem() {
- return fItem;
- }
-
- /**
- * The content is lazily loaded
- */
- private String getContent() {
- if (fContent == null) {
- if (fStructureCreator != null)
- fContent= fStructureCreator.getContents(fItem, false);
- else {
- if (fItem instanceof IStreamContentAccessor) {
- IStreamContentAccessor sca= (IStreamContentAccessor) fItem;
- try {
- InputStream is= sca.getContents();
- if (is != null)
- fContent= Utilities.readString(is);
- } catch (CoreException ex) {
- }
- }
- }
- if (fContent == null)
- fContent= ""; //$NON-NLS-1$
- }
- return fContent;
- }
-
- /**
- * Compares content of item.
- */
- public boolean equals(Object other) {
- if (other != null && other.getClass() == getClass()) {
- if (getContent().equals(((Pair)other).getContent()))
- return true;
- }
- return super.equals(other);
- }
- }
-
- // Configuration options
- private CompareConfiguration fCompareConfiguration;
- /** use a side-by-side compare viewer */
- private boolean fCompare= true;
- /** show target on right hand side */
- private boolean fTargetIsRight= false;
- /** hide entries which have identical content */
- private boolean fHideIdentical= true;
- /** add mode if true, otherwise replace mode */
- private boolean fAddMode= false;
- /** compare mode if true, otherwise replace/add mode */
- private boolean fCompareMode= false;
- /** perform structure compare on editions */
- private boolean fStructureCompare= false;
-
- /**
- * Maps from members to their corresponding editions.
- * Has only a single entry if dialog is used in "Replace" (and not "Add") mode.
- */
- private HashMap fMemberEditions;
- /** The editions of the current selected member */
- private List fCurrentEditions;
- private Thread fThread;
- private Pair fTargetPair;
- /** The selected edition in the edition viewer */
- private ITypedElement fSelectedItem;
- private String fTitleArg;
- private Image fTitleImage;
-
- // SWT controls
- private CompareViewerSwitchingPane fContentPane;
- private Button fCommitButton;
- private Table fMemberTable;
- private CompareViewerPane fMemberPane;
- private Tree fEditionTree;
- private CompareViewerPane fEditionPane;
- private Image fDateImage;
- private Image fTimeImage;
- private CompareViewerSwitchingPane fStructuredComparePane;
-
- /**
- * Creates a new modal, resizable dialog.
- * Various titles, icons, and labels are configured from the given resource bundle.
- * The following resource keys are used:
- * <pre>
- * key type description
- * title String dialog title
- * width Integer initial width of dialog
- * height Integer initial height of dialog
- * treeTitleFormat MessageFormat pane title for edition tree; arg 0 is the target
- * dateIcon String icon for node in edition tree; path relative to plugin
- * timeIcon String icon for leaf in edition tree; path relative to plugin
- * todayFormat MessageFormat format string if date is todays date; arg 0 is date
- * yesterdayFormat MessageFormat format string if date is yesterdays date; arg 0 is date
- * dayFormat MessageFormat format string if date is any other date; arg 0 is date
- * editionLabel String label for editions side of compare viewer; arg 0 is the date
- * targetLabel String label for target side of compare viewer
- * buttonLabel String label for OK button; default is IDialogConstants.OK_LABEL
- * </pre>
- *
- * @param parent if not <code>null</code> the new dialog stays on top of this parent shell
- * @param bundle <code>ResourceBundle</code> to configure the dialog
- */
- public EditionSelectionDialog(Shell parent, ResourceBundle bundle) {
- super(parent, bundle);
-
- fCompareConfiguration= new CompareConfiguration();
- fCompareConfiguration.setLeftEditable(false);
- fCompareConfiguration.setRightEditable(false);
-
- String iconName= Utilities.getString(fBundle, "dateIcon", "obj16/day_obj.gif"); //$NON-NLS-2$ //$NON-NLS-1$
- ImageDescriptor id= CompareUIPlugin.getImageDescriptor(iconName);
- if (id != null)
- fDateImage= id.createImage();
- iconName= Utilities.getString(fBundle, "timeIcon", "obj16/resource_obj.gif"); //$NON-NLS-1$ //$NON-NLS-2$
- id= CompareUIPlugin.getImageDescriptor(iconName);
- if (id != null)
- fTimeImage= id.createImage();
- }
-
- public void setEditionTitleArgument(String titleArgument) {
- fTitleArg= titleArgument;
- }
-
- public void setEditionTitleImage(Image titleImage) {
- fTitleImage= titleImage;
- }
-
- /**
- * Select the previous edition (presenting a UI).
- *
- * @param target the input object against which the editions are compared; must not be <code>null</code>
- * @param editions the list of editions (element type: <code>ITypedElement</code>s)
- * @param path If <code>null</code> dialog shows full input; if non <code>null</code> it extracts a subsection
- * @return returns the selected edition or <code>null</code> if error occurred.
- * The returned <code>ITypedElement</code> is one of the original editions
- * if <code>path</code> was <code>null</code>; otherwise
- * it is an <code>ITypedElement</code> returned from <code>IStructureCreator.locate(path, item)</code>
- */
- public ITypedElement selectPreviousEdition(final ITypedElement target, ITypedElement[] inputEditions, Object ppath) {
- Assert.isNotNull(target);
- fTargetPair= new Pair(null, target);
-
- // sort input editions
- final int count= inputEditions.length;
- final IModificationDate[] editions= new IModificationDate[count];
- for (int i= 0; i < count; i++)
- editions[i]= (IModificationDate) inputEditions[i];
- if (count > 1)
- internalSort(editions, 0, count-1);
-
- // find StructureCreator if ppath is not null
- IStructureCreator structureCreator= null;
- if (ppath != null) {
- String type= target.getType();
- IStructureCreatorDescriptor scd= CompareUIPlugin.getStructureCreator(type);
- if (scd != null)
- structureCreator= scd.createStructureCreator();
- }
-
- if (fAddMode) {
- // does not work in add mode
- return null;
- }
-
- if (structureCreator != null) {
- Pair pair= createPair(structureCreator, ppath, target);
- if (pair != null)
- fTargetPair= pair;
- else
- ppath= null; // couldn't extract item because of error
- }
-
- // from front (newest) to back (oldest)
- for (int i= 0; i < count; i++) {
-
- ITypedElement edition= (ITypedElement) editions[i];
- Pair pair= null;
-
- if (structureCreator != null && ppath != null) {
- // extract sub element from edition
- pair= createPair(structureCreator, ppath, edition);
- } else {
- pair= new Pair(null, edition);
- }
-
- if (pair != null && pair.fHasError)
- return null;
-
- if (pair != null && !fTargetPair.equals(pair)) {
- return pair.fItem;
- }
- }
-
- // nothing found
- return null;
- }
-
- /**
- * Presents this modal dialog with the functionality described in the class comment above.
- *
- * @param target the input object against which the editions are compared; must not be <code>null</code>
- * @param editions the list of editions (element type: <code>ITypedElement</code>s)
- * @param path If <code>null</code> dialog shows full input; if non <code>null</code> it extracts a subsection
- * @return returns the selected edition or <code>null</code> if dialog was cancelled.
- * The returned <code>ITypedElement</code> is one of the original editions
- * if <code>path</code> was <code>null</code>; otherwise
- * it is an <code>ITypedElement</code> returned from <code>IStructureCreator.locate(path, item)</code>
- */
- public ITypedElement selectEdition(final ITypedElement target, ITypedElement[] inputEditions, Object ppath) {
-
- Assert.isNotNull(target);
- fTargetPair= new Pair(null, target);
-
- // sort input editions
- final int count= inputEditions.length;
- final IModificationDate[] editions= new IModificationDate[count];
- for (int i= 0; i < count; i++)
- editions[i]= (IModificationDate) inputEditions[i];
- if (count > 1)
- internalSort(editions, 0, count-1);
-
- // find StructureCreator if ppath is not null
- IStructureCreator structureCreator= null;
- if (ppath != null) {
- String type= target.getType();
- IStructureCreatorDescriptor scd= CompareUIPlugin.getStructureCreator(type);
- if (scd != null)
- structureCreator= scd.createStructureCreator();
- }
-
- if (!fAddMode) {
- // replace mode
-
- if (structureCreator != null) {
- Pair pair= createPair(structureCreator, ppath, target);
- if (pair != null)
- fTargetPair= pair;
- else
- ppath= null; // couldn't extract item because of error
- }
-
- // set the left and right labels for the compare viewer
- String targetLabel= getTargetLabel(target, fTargetPair.getItem());
- if (fTargetIsRight)
- fCompareConfiguration.setRightLabel(targetLabel);
- else
- fCompareConfiguration.setLeftLabel(targetLabel);
-
- if (structureCreator != null && ppath != null) { // extract sub element
-
- final IStructureCreator sc= structureCreator;
- final Object path= ppath;
-
- // construct the comparer thread
- // and perform the background extract
- fThread= new Thread() {
- public void run() {
-
- // from front (newest) to back (oldest)
- for (int i= 0; i < count; i++) {
-
- if (fEditionTree == null || fEditionTree.isDisposed())
- break;
- ITypedElement edition= (ITypedElement) editions[i];
-
- // extract sub element from edition
- Pair pair= createPair(sc, path, edition);
- if (pair != null)
- sendPair(pair);
- }
- sendPair(null);
- }
- };
- } else {
- // create tree widget
- create();
-
- // from front (newest) to back (oldest)
- for (int i= 0; i < count; i++)
- addMemberEdition(new Pair(null, (ITypedElement) editions[i]));
- }
-
- } else {
- // add mode
- final Object container= ppath;
- Assert.isNotNull(container);
-
- if (structureCreator == null)
- return null; // error
-
- // extract all elements of container
- final HashSet current= new HashSet();
- IStructureComparator sco= structureCreator.locate(container, target);
- if (sco != null) {
- Object[] children= sco.getChildren();
- if (children != null)
- for (int i= 0; i < children.length; i++)
- current.add(children[i]);
- }
-
- final IStructureCreator sc= structureCreator;
-
- // construct the comparer thread
- // and perform the background extract
- fThread= new Thread() {
- public void run() {
-
- // from front (newest) to back (oldest)
- for (int i= 0; i < count; i++) {
-
- if (fEditionTree == null || fEditionTree.isDisposed())
- break;
- ITypedElement edition= (ITypedElement) editions[i];
-
- IStructureComparator sco2= sc.locate(container, edition);
- if (sco2 != null) {
- Object[] children= sco2.getChildren();
- if (children != null) {
- for (int i2= 0; i2 < children.length; i2++) {
- ITypedElement child= (ITypedElement) children[i2];
- if (!current.contains(child))
- sendPair(new Pair(sc, edition, child));
- }
- }
- }
- }
- sendPair(null);
- }
- };
- }
-
- open();
-
- if (getReturnCode() == OK)
- return fSelectedItem;
- return null;
- }
-
- private Pair createPair(IStructureCreator sc, Object path, ITypedElement input) {
- IStructureComparator scmp= sc.locate(path, input);
- if (scmp == null && sc.getStructure(input) == null) { // parse error
- Pair p= new Pair(sc, input);
- p.fHasError= true;
- return p;
- }
- if (scmp instanceof ITypedElement)
- return new Pair(sc, input, (ITypedElement) scmp);
- return null;
- }
-
- /**
- * Controls whether identical entries are shown or not (default).
- * This method must be called before <code>selectEdition</code>.
- *
- * @param hide if true identical entries are hidden; otherwise they are shown.
- */
- public void setHideIdenticalEntries(boolean hide) {
- fHideIdentical= hide;
- }
-
- /**
- * Controls whether workspace target is on the left (the default) or right hand side.
- *
- * @param isRight if true target is shown on right hand side.
- */
- public void setTargetIsRight(boolean isRight) {
- fTargetIsRight= isRight;
- }
-
- /**
- * Controls whether the EditionSelectionDialog is in 'add' mode
- * or 'replace' mode (the default).
- *
- * @param addMode if true dialog is in 'add' mode.
- */
- public void setAddMode(boolean addMode) {
- fAddMode= addMode;
- }
-
- /**
- * Controls whether the EditionSelectionDialog is in 'compare' mode
- * or 'add/replace' (the default) mode.
- *
- * @param addMode if true dialog is in 'add' mode.
- */
- public void setCompareMode(boolean compareMode) {
- fCompareMode= compareMode;
- fStructureCompare= fCompareMode && !fAddMode;
- }
-
- /**
- * Returns the input target that has been specified with the most recent call
- * to <code>selectEdition</code>. If a not <code>null</code> path was specified this method
- * returns a subsection of this target (<code>IStructureCreator.locate(path, target)</code>)
- * instead of the input target.
- * <p>
- * For example if the <code>target</code> is a Java compilation unit and <code>path</code> specifies
- * a method, the value returned from <code>getTarget</code> will be the method not the compilation unit.
- *
- * @return the last specified target or a subsection thereof.
- */
- public ITypedElement getTarget() {
- return fTargetPair.getItem();
- }
-
- /**
- * Returns a label for identifying the target side of a compare viewer.
- * This implementation extracts the value for the key "targetLabel" from the resource bundle
- * and passes it as the format argument to <code>MessageFormat.format</code>.
- * The single format argument for <code>MessageFormat.format</code> ("{0}" in the format string)
- * is the name of the given input element.
- * <p>
- * Subclasses may override to create their own label.
- * </p>
- *
- * @param target the target element for which a label must be returned
- * @param item if a path has been specified in <code>selectEdition</code> a sub element of the given target; otherwise the same as target
- * @return a label the target side of a compare viewer
- */
- protected String getTargetLabel(ITypedElement target, ITypedElement item) {
- String format= null;
- if (target instanceof ResourceNode)
- format= Utilities.getString(fBundle, "workspaceTargetLabel", null); //$NON-NLS-1$
- if (format == null)
- format= Utilities.getString(fBundle, "targetLabel"); //$NON-NLS-1$
- if (format == null)
- format= "x{0}"; //$NON-NLS-1$
-
- return MessageFormat.format(format, new Object[] { target.getName() });
- }
-
- /**
- * Returns a label for identifying the edition side of a compare viewer.
- * This implementation extracts the value for the key "editionLabel" from the resource bundle
- * and passes it as the format argument to <code>MessageFormat.format</code>.
- * The single format argument for <code>MessageFormat.format</code> ("{0}" in the format string)
- * is the formatted modification date of the given input element.
- * <p>
- * Subclasses may override to create their own label.
- * </p>
- *
- * @param selectedEdition the selected edition for which a label must be returned
- * @param item if a path has been specified in <code>selectEdition</code> a sub element of the given selectedEdition; otherwise the same as selectedEdition
- * @return a label the edition side of a compare viewer
- */
- protected String getEditionLabel(ITypedElement selectedEdition, ITypedElement item) {
- String format= null;
- if (selectedEdition instanceof ResourceNode)
- format= Utilities.getString(fBundle, "workspaceEditionLabel", null); //$NON-NLS-1$
- else if (selectedEdition instanceof HistoryItem)
- format= Utilities.getString(fBundle, "historyEditionLabel", null); //$NON-NLS-1$
- if (format == null)
- format= Utilities.getString(fBundle, "editionLabel"); //$NON-NLS-1$
- if (format == null)
- format= "x{0}"; //$NON-NLS-1$
-
-
- String date= ""; //$NON-NLS-1$
- if (selectedEdition instanceof IModificationDate) {
- long modDate= ((IModificationDate)selectedEdition).getModificationDate();
- date= DateFormat.getDateTimeInstance().format(new Date(modDate));
- }
-
- return MessageFormat.format(format, new Object[] { date });
- }
-
- protected String getShortEditionLabel(ITypedElement edition, ITypedElement item, Date date) {
- String format= null;
- if (edition instanceof ResourceNode)
- format= Utilities.getString(fBundle, "workspaceTreeFormat", null); //$NON-NLS-1$
- if (format == null)
- format= Utilities.getString(fBundle, "treeFormat", null); //$NON-NLS-1$
- if (format == null)
- format= "x{0}"; //$NON-NLS-1$
-
- String ds= DateFormat.getTimeInstance().format(date);
- return MessageFormat.format(format, new Object[] { ds });
- }
-
- /**
- * Returns an image for identifying the edition side of a compare viewer.
- * This implementation extracts the value for the key "editionLabel" from the resource bundle
- * and passes it as the format argument to <code>MessageFormat.format</code>.
- * The single format argument for <code>MessageFormat.format</code> ("{0}" in the format string)
- * is the formatted modification date of the given input element.
- * <p>
- * Subclasses may override to create their own label.
- * </p>
- *
- * @param selectedEdition the selected edition for which a label must be returned
- * @param item if a path has been specified in <code>selectEdition</code> a sub element of the given selectedEdition; otherwise the same as selectedEdition
- * @return a label the edition side of a compare viewer
- */
- protected Image getEditionImage(ITypedElement selectedEdition, ITypedElement item) {
- if (selectedEdition instanceof ResourceNode)
- return selectedEdition.getImage();
- if (selectedEdition instanceof HistoryItem)
- return fTimeImage;
- return null;
- }
-
- /* (non Javadoc)
- * Creates SWT control tree.
- */
- protected synchronized Control createDialogArea(Composite parent) {
-
- getShell().setText(Utilities.getString(fBundle, "title")); //$NON-NLS-1$
-
- Splitter vsplitter= new Splitter(parent, SWT.VERTICAL);
- vsplitter.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL
- | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_VERTICAL));
-
- vsplitter.addDisposeListener(
- new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- if (fDateImage != null)
- fDateImage.dispose();
- if (fTimeImage != null)
- fTimeImage.dispose();
- }
- }
- );
-
- if (fAddMode) {
- // we need two panes: the left for the elements, the right one for the editions
- Splitter hsplitter= new Splitter(vsplitter, SWT.HORIZONTAL);
-
- fMemberPane= new CompareViewerPane(hsplitter, SWT.BORDER | SWT.FLAT);
- fMemberPane.setText(Utilities.getString(fBundle, "memberPaneTitle")); //$NON-NLS-1$
- fMemberTable= new Table(fMemberPane, SWT.H_SCROLL + SWT.V_SCROLL);
- fMemberTable.addSelectionListener(
- new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleMemberSelect(e.item);
- }
- }
- );
-
- fMemberPane.setContent(fMemberTable);
-
- fEditionPane= new CompareViewerPane(hsplitter, SWT.BORDER | SWT.FLAT);
- } else {
- if (fStructureCompare) {
- // we need two panes: the left for the elements, the right one for the structured diff
- Splitter hsplitter= new Splitter(vsplitter, SWT.HORIZONTAL);
-
- fEditionPane= new CompareViewerPane(hsplitter, SWT.BORDER | SWT.FLAT);
- fStructuredComparePane= new CompareViewerSwitchingPane(hsplitter, SWT.BORDER | SWT.FLAT, true) {
- protected Viewer getViewer(Viewer oldViewer, Object input) {
- if (input instanceof ICompareInput)
- return CompareUIPlugin.findStructureViewer(oldViewer, (ICompareInput)input, this, fCompareConfiguration);
- return null;
- }
- };
- fStructuredComparePane.addSelectionChangedListener(
- new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent e) {
- feedInput2(e.getSelection());
- }
- }
- );
- } else {
- // only a single pane showing the editions
- fEditionPane= new CompareViewerPane(vsplitter, SWT.BORDER | SWT.FLAT);
- }
- if (fTitleArg == null)
- fTitleArg= fTargetPair.getItem().getName();
- String titleFormat= Utilities.getString(fBundle, "treeTitleFormat"); //$NON-NLS-1$
- String title= MessageFormat.format(titleFormat, new String[] { fTitleArg });
- fEditionPane.setText(title);
- if (fTitleImage != null)
- fEditionPane.setImage(fTitleImage);
- }
-
- fEditionTree= new Tree(fEditionPane, SWT.H_SCROLL + SWT.V_SCROLL);
- fEditionTree.addSelectionListener(
- new SelectionAdapter() {
-// public void widgetDefaultSelected(SelectionEvent e) {
-// handleDefaultSelected();
-// }
- public void widgetSelected(SelectionEvent e) {
- feedInput(e.item);
- }
- }
- );
- fEditionPane.setContent(fEditionTree);
-
- // now start the thread (and forget about it)
- if (fThread != null) {
- fThread.start();
- fThread= null;
- }
-
- fContentPane= new CompareViewerSwitchingPane(vsplitter, SWT.BORDER | SWT.FLAT) {
- protected Viewer getViewer(Viewer oldViewer, Object input) {
- return CompareUIPlugin.findContentViewer(oldViewer, input, this, fCompareConfiguration);
- }
- };
- vsplitter.setWeights(new int[] { 30, 70 });
-
- return vsplitter;
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected void createButtonsForButtonBar(Composite parent) {
- String buttonLabel= Utilities.getString(fBundle, "buttonLabel", IDialogConstants.OK_LABEL); //$NON-NLS-1$
- if (fCompareMode) {
- // only a 'Done' button
- createButton(parent, IDialogConstants.CANCEL_ID, buttonLabel, false);
- } else {
- // a 'Cancel' and a 'Add/Replace' button
- fCommitButton= createButton(parent, IDialogConstants.OK_ID, buttonLabel, true);
- fCommitButton.setEnabled(false);
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
- }
- }
-
- /**
- * Overidden to disable dismiss on double click in compare mode.
- */
- protected void okPressed() {
- if (fCompareMode)
- ; // don't dismiss dialog
- else
- super.okPressed();
- }
-
- //---- private stuff ----------------------------------------------------------------------------------------
-
- /**
- * Asynchroneously sends a Pair (or null) to the UI thread.
- */
- private void sendPair(final Pair pair) {
- if (fEditionTree != null && !fEditionTree.isDisposed()) {
- Display display= fEditionTree.getDisplay();
- display.asyncExec(
- new Runnable() {
- public void run() {
- addMemberEdition(pair);
- }
- }
- );
- }
- }
-
-// private void handleDefaultSelected() {
-// if (fSelectedItem != null)
-// okPressed();
-// }
-
- private static void internalSort(IModificationDate[] keys, int left, int right) {
-
- int original_left= left;
- int original_right= right;
-
- IModificationDate mid= keys[(left + right) / 2];
- do {
- while (keys[left].getModificationDate() > mid.getModificationDate())
- left++;
-
- while (mid.getModificationDate() > keys[right].getModificationDate())
- right--;
-
- if (left <= right) {
- IModificationDate tmp= keys[left];
- keys[left]= keys[right];
- keys[right]= tmp;
- left++;
- right--;
- }
- } while (left <= right);
-
- if (original_left < right)
- internalSort(keys, original_left, right);
-
- if (left < original_right)
- internalSort(keys, left, original_right);
- }
-
- /**
- * Adds the given Pair to the member editions.
- * If HIDE_IDENTICAL is true the new Pair is only added if its contents
- * is different from the preceeding Pair.
- * If the argument is <code>null</code> the message "No Editions found" is shown
- * in the member or edition viewer.
- */
- private void addMemberEdition(Pair pair) {
-
- if (pair == null) { // end of list of pairs
- if (fMemberTable != null) {
- if (!fMemberTable.isDisposed() && fMemberTable.getItemCount() == 0) {
- TableItem ti= new TableItem(fMemberTable, SWT.NONE);
- ti.setText(Utilities.getString(fBundle, "noAdditionalMembersMessage")); //$NON-NLS-1$
- }
- return;
- }
- if (fEditionTree != null && !fEditionTree.isDisposed() && fEditionTree.getItemCount() == 0) {
- TreeItem ti= new TreeItem(fEditionTree, SWT.NONE);
- ti.setText(Utilities.getString(fBundle, "notFoundInLocalHistoryMessage")); //$NON-NLS-1$
- }
- return;
- }
-
- if (fMemberEditions == null)
- fMemberEditions= new HashMap();
-
- ITypedElement item= pair.getItem();
- List editions= (List) fMemberEditions.get(item);
- if (editions == null) {
- editions= new ArrayList();
- fMemberEditions.put(item, editions);
- if (fMemberTable != null && !fMemberTable.isDisposed()) {
- ITypedElement te= (ITypedElement)item;
- String name= te.getName();
-
- // find position
- TableItem[] items= fMemberTable.getItems();
- int where= items.length;
- for (int i= 0; i < where; i++) {
- String n= items[i].getText();
- if (n.compareTo(name) > 0) {
- where= i;
- break;
- }
- }
-
- TableItem ti= new TableItem(fMemberTable, where, SWT.NULL);
- ti.setImage(te.getImage());
- ti.setText(name);
- ti.setData(editions);
- }
- }
- if (fHideIdentical) {
- Pair last= fTargetPair;
- int size= editions.size();
- if (size > 0)
- last= (Pair) editions.get(size-1);
- if (last != null && last.equals(pair))
- return; // don't add since the new one is equal to old
- }
- editions.add(pair);
-
- if (!fAddMode || editions == fCurrentEditions)
- addEdition(pair);
- }
-
- /**
- * Returns the number of s since Jan 1st, 1970.
- * The given date is converted to GMT and daylight saving is taken into account too.
- */
- private long dayNumber(long date) {
- int ONE_DAY_MS= 24*60*60 * 1000; // one day in milli seconds
-
- Calendar calendar= Calendar.getInstance();
- long localTimeOffset= calendar.get(Calendar.ZONE_OFFSET) + calendar.get(Calendar.DST_OFFSET);
-
- return (date + localTimeOffset) / ONE_DAY_MS;
- }
-
- /**
- * Adds the given Pair to the edition tree.
- * It takes care of creating tree nodes for different dates.
- */
- private void addEdition(Pair pair) {
- if (fEditionTree == null || fEditionTree.isDisposed())
- return;
-
- // find last day
- TreeItem[] days= fEditionTree.getItems();
- TreeItem lastDay= null;
- if (days.length > 0)
- lastDay= days[days.length-1];
-
- boolean first= lastDay == null;
-
- ITypedElement edition= pair.getEdition();
- ITypedElement item= pair.getItem();
-
- long ldate= ((IModificationDate)edition).getModificationDate();
- long day= dayNumber(ldate);
- Date date= new Date(ldate);
- if (lastDay == null || day != dayNumber(((Date)lastDay.getData()).getTime())) {
- lastDay= new TreeItem(fEditionTree, SWT.NONE);
- lastDay.setImage(fDateImage);
- String df= DateFormat.getDateInstance().format(date);
- long today= dayNumber(System.currentTimeMillis());
-
- String formatKey;
- if (day == today)
- formatKey= "todayFormat"; //$NON-NLS-1$
- else if (day == today-1)
- formatKey= "yesterdayFormat"; //$NON-NLS-1$
- else
- formatKey= "dayFormat"; //$NON-NLS-1$
- String pattern= Utilities.getString(fBundle, formatKey);
- if (pattern != null)
- df= MessageFormat.format(pattern, new String[] { df });
- lastDay.setText(df);
- lastDay.setData(date);
- }
- TreeItem ti= new TreeItem(lastDay, SWT.NONE);
- ti.setImage(getEditionImage(edition, item));
-
- String s= getShortEditionLabel(edition, item, date);
- if (pair.fHasError) {
- String pattern= Utilities.getString(fBundle, "parseErrorFormat"); //$NON-NLS-1$
- s= MessageFormat.format(pattern, new String[] { s } );
- }
- ti.setText(s);
-
- ti.setData(pair);
- if (first) {
- fEditionTree.setSelection(new TreeItem[] {ti});
- if (!fAddMode)
- fEditionTree.setFocus();
- feedInput(ti);
- }
- if (first) // expand first node
- lastDay.setExpanded(true);
- }
-
- /**
- * Feeds selection from member viewer to edition viewer.
- */
- private void handleMemberSelect(Widget w) {
- Object data= w.getData();
- if (data instanceof List) {
- List editions= (List) data;
- if (editions != fCurrentEditions) {
- fCurrentEditions= editions;
- fEditionTree.removeAll();
-
- String pattern= Utilities.getString(fBundle, "treeTitleFormat"); //$NON-NLS-1$
- String title= MessageFormat.format(pattern, new Object[] { ((Item)w).getText() });
- fEditionPane.setText(title);
-
- Iterator iter= editions.iterator();
- while (iter.hasNext()) {
- Object item= iter.next();
- if (item instanceof Pair)
- addEdition((Pair) item);
- }
- }
- }
- }
-
- private void setInput(Object input) {
- if (!fCompare && input instanceof ICompareInput) {
- ICompareInput ci= (ICompareInput) input;
- if (fTargetIsRight)
- input= ci.getLeft();
- else
- input= ci.getRight();
- }
- fContentPane.setInput(input);
- if (fStructuredComparePane != null)
- fStructuredComparePane.setInput(input);
- }
-
- /*
- * Feeds selection from edition viewer to content (and structure) viewer.
- */
- private void feedInput(Widget w) {
- Object input= w.getData();
- boolean isOK= false;
- if (input instanceof Pair) {
- Pair pair= (Pair) input;
- fSelectedItem= pair.getItem();
- isOK= !pair.fHasError;
-
- ITypedElement edition= pair.getEdition();
- String editionLabel= getEditionLabel(edition, fSelectedItem);
- Image editionImage= getEditionImage(edition, fSelectedItem);
-
- if (fAddMode) {
- setInput(fSelectedItem);
- fContentPane.setText(editionLabel);
- fContentPane.setImage(editionImage);
- } else {
- if (fTargetIsRight) {
- fCompareConfiguration.setLeftLabel(editionLabel);
- fCompareConfiguration.setLeftImage(editionImage);
- setInput(new DiffNode(fSelectedItem, fTargetPair.getItem()));
- } else {
- fCompareConfiguration.setRightLabel(editionLabel);
- fCompareConfiguration.setRightImage(editionImage);
- setInput(new DiffNode(fTargetPair.getItem(), fSelectedItem));
- }
- }
- } else {
- fSelectedItem= null;
- setInput(null);
- }
- if (fCommitButton != null)
- fCommitButton.setEnabled(isOK && fSelectedItem != null && fTargetPair.getItem() != fSelectedItem);
- }
-
- /*
- * Feeds selection from structure viewer to content viewer.
- */
- private void feedInput2(ISelection sel) {
- if (sel instanceof IStructuredSelection) {
- IStructuredSelection ss= (IStructuredSelection) sel;
- if (ss.size() == 1)
- fContentPane.setInput(ss.getFirstElement());
- }
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/HistoryItem.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/HistoryItem.java
deleted file mode 100644
index 98ddbb7e4..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/HistoryItem.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import java.io.InputStream;
-import java.io.BufferedInputStream;
-
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.core.resources.IFileState;
-import org.eclipse.core.runtime.CoreException;
-
-import org.eclipse.compare.*;
-
-/**
- * A combination <code>IFileState</code> and <code>ITypedElement</code> that can be used as
- * an input to a compare viewer or other places where an <code>IStreamContentAccessor</code>
- * is needed.
- * <p>
- * <p>
- * Clients may instantiate this class; it is not intended to be subclassed.
- * </p>
- */
-public class HistoryItem implements IStreamContentAccessor, ITypedElement, IModificationDate {
-
- private ITypedElement fBase;
- private IFileState fFileState;
-
- /**
- * Creates a <code>HistoryItem</code> object which combines the given <code>IFileState</code>
- * and <code>ITypedElement</code> into an object
- * which is suitable as input for a compare viewer or <code>ReplaceWithEditionDialog</code>.
- *
- * @param base the implementation of the <code>ITypedElement</code> interface delegates to this base <code>ITypedElement</code>
- * @param fileState the <code>IFileState</code> from which the streamable contents and the modification time is derived from
- */
- public HistoryItem(ITypedElement base, IFileState fileState) {
- fBase= base;
- fFileState= fileState;
- }
-
- /* (non-Javadoc)
- * see ITypedElement.getName
- */
- public String getName() {
- return fBase.getName();
- }
-
- /* (non-Javadoc)
- * see ITypedElement.getImage
- */
- public Image getImage() {
- return fBase.getImage();
- }
-
- /* (non-Javadoc)
- * see ITypedElement.getType
- */
- public String getType() {
- return fBase.getType();
- }
-
- /* (non-Javadoc)
- * see IModificationDate.getModificationDate
- */
- public long getModificationDate() {
- return fFileState.getModificationTime();
- }
-
- /* (non-Javadoc)
- * see IStreamContentAccessor.getContents
- */
- public InputStream getContents() throws CoreException {
- return new BufferedInputStream(fFileState.getContents());
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/IContentChangeListener.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/IContentChangeListener.java
deleted file mode 100644
index 095f52f37..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/IContentChangeListener.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-/**
- * An <code>IContentChangeListener</code> is informed about content changes of a
- * <code>IContentChangeNotifier</code>.
- * <p>
- * Clients may implement this interface.
- * </p>
- *
- * @see IContentChangeNotifier
- */
-public interface IContentChangeListener {
-
- /**
- * Called whenever the content of the given source has changed.
- *
- * @param source the source whose contents has changed
- */
- void contentChanged(IContentChangeNotifier source);
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/IContentChangeNotifier.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/IContentChangeNotifier.java
deleted file mode 100644
index bc62b5af1..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/IContentChangeNotifier.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-/**
- * Interface common to all objects that provide a means for registering
- * for content change notification.
- * <p>
- * Clients may implement this interface.
- * </p>
- *
- * @see IContentChangeListener
- */
-public interface IContentChangeNotifier {
-
- /**
- * Adds a content change listener to this notifier.
- * Has no effect if an identical listener is already registered.
- *
- * @param listener a content changed listener
- */
- void addContentChangeListener(IContentChangeListener listener);
-
- /**
- * Removes the given content changed listener from this notifier.
- * Has no effect if the listener is not registered.
- *
- * @param listener a content changed listener
- */
- void removeContentChangeListener(IContentChangeListener listener);
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/IEditableContent.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/IEditableContent.java
deleted file mode 100644
index 5e8d9d6de..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/IEditableContent.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-/**
- * Common interface for objects with editable contents.
- * Typically it is implemented by objects that also implement
- * the <code>IStreamContentAccessor</code> interface.
- * <p>
- * Clients may implement this interface.
- * <p>
- * Note that implementing <code>IEditableContent</code> does not
- * automatically mean that it is editable. An object is only editable if
- * it implements <code>IEditableContent</code> and the <code>isEditable</code> method returns <code>true</code>.
- *
- * @see IStreamContentAccessor
- */
-public interface IEditableContent {
-
- /**
- * Returns <code>true</code> if this object can be modified.
- * If it returns <code>false</code> the other methods of this API must not be called.
- *
- * @return <code>true</code> if this object can be modified
- */
- boolean isEditable();
-
- /**
- * Replaces the current content with the given new bytes.
- *
- * @param newContent this new contents replaces the old contents
- */
- void setContent(byte[] newContent);
-
- /**
- * This method is called on a parent to
- * <UL>
- * <LI>
- * add a child,
- * <LI>
- * remove a child,
- * <LI>
- * copy the contents of a child
- * </UL>
- *
- * What to do is encoded in the two arguments as follows:
- * <TABLE>
- * <TR>
- * <TD>add:</TD>
- * <TD>child == null</TD>
- * <TD>other != null</TD>
- * </TR>
- * <TR>
- * <TD>remove:</TD>
- * <TD>child != null</TD>
- * <TD>other == null</TD>
- * </TR>
- * <TR>
- * <TD>copy:</TD>
- * <TD>child != null</TD>
- * <TD>other != null</TD>
- * </TR>
- * </TABLE>
- */
- ITypedElement replace(ITypedElement child, ITypedElement other);
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/IModificationDate.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/IModificationDate.java
deleted file mode 100644
index 98f9364dd..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/IModificationDate.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-/**
- * Common interface for objects with a modification date. The modification date
- * can be used in the UI to give the user a general idea of how old an object is.
- * <p>
- * Clients may implement this interface.
- * </p>
- */
-public interface IModificationDate {
-
- /**
- * Returns the modification time of this object.
- * <p>
- * Note that this value should only be used to give the user a general idea of how
- * old the object is.
- *
- * @return the time of last modification, in milliseconds since January 1, 1970, 00:00:00 GMT
- */
- long getModificationDate();
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/IPropertyChangeNotifier.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/IPropertyChangeNotifier.java
deleted file mode 100644
index 447f227ce..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/IPropertyChangeNotifier.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import org.eclipse.jface.util.IPropertyChangeListener;
-
-/**
- * Interface common to all objects that provide a means for registering
- * for property change notification.
- * <p>
- * Clients may implement this interface.
- * </p>
- *
- * @see org.eclipse.jface.util.IPropertyChangeListener
- */
-public interface IPropertyChangeNotifier {
-
- /**
- * Adds a listener for property changes to this notifier.
- * Has no effect if an identical listener is already registered.
- *
- * @param listener a property change listener
- */
- void addPropertyChangeListener(IPropertyChangeListener listener);
-
- /**
- * Removes the given content change listener from this notifier.
- * Has no effect if the identical listener is not registered.
- *
- * @param listener a property change listener
- */
- void removePropertyChangeListener(IPropertyChangeListener listener);
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/IStreamContentAccessor.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/IStreamContentAccessor.java
deleted file mode 100644
index fee4741df..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/IStreamContentAccessor.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import java.io.InputStream;
-
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * An <code>IStreamContentAccessor</code> object represents a set of bytes which can be
- * accessed by means of a stream.
- * <p>
- * Clients may implement this interface, or use the standard implementation,
- * <code>BufferedContent</code>.
- *
- * @see BufferedContent
- */
-public interface IStreamContentAccessor {
- /**
- * Returns an open <code>InputStream</code> for this object which can be used to retrieve the object's content.
- * The client is responsible for closing the stream when finished.
- * Returns <code>null</code> if this object has no streamable contents.
- *
- * @return an input stream containing the contents of this object
- * @exception CoreException if the contents of this object could not be accessed
- */
- InputStream getContents() throws CoreException;
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/ITypedElement.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/ITypedElement.java
deleted file mode 100644
index e914a57dc..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/ITypedElement.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Interface for getting the name, image, and type for an object.
- * <p>
- * These methods are typically used to present an input object in the compare UI
- * (<code>getName</code> and <code>getImage</code>)
- * and for finding a viewer for a given input type (<code>getType</code>).
- * <p>
- * Clients may implement this interface.
- */
-public interface ITypedElement {
-
- /**
- * Type for a folder input. Folders are comparison
- * elements that have no contents, only a name and children.
- */
- public static final String FOLDER_TYPE= "FOLDER"; //$NON-NLS-1$
-
- /**
- * Type for an element whose actual type is text.
- */
- public static final String TEXT_TYPE= "txt"; //$NON-NLS-1$
-
- /**
- * Type for an element whose actual type could not
- * be determined.
- */
- public static final String UNKNOWN_TYPE= "???"; //$NON-NLS-1$
-
- /**
- * Returns the name of this object.
- * The name is used when displaying this object in the UI.
- *
- * @return the name of this object
- */
- String getName();
-
- /**
- * Returns an image for this object.
- * This image is used when displaying this object in the UI.
- *
- * @return the image of this object or <code>null</code> if this type of input has no image
- */
- Image getImage();
-
- /**
- * Returns the type of this object. For objects with a file name
- * this is typically the file extension. For folders its the constant
- * <code>FOLDER_TYPE</code>.
- * The type is used for determining a suitable viewer for this object.
- *
- * @return the type of this object
- */
- String getType();
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/IViewerCreator.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/IViewerCreator.java
deleted file mode 100644
index c6f60e72f..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/IViewerCreator.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import org.eclipse.swt.widgets.Composite;
-
-import org.eclipse.jface.viewers.Viewer;
-
-/**
- * A factory object for <code>Viewer</code>.
- * <p>
- * This interface is only required when creating a <code>Viewer</code> from a plugin.xml file.
- * Since <code>Viewer</code>s have no default constructor they cannot be
- * instantiated directly with <code>Class.forName</code>.
- */
-public interface IViewerCreator {
-
- /**
- * Creates a new viewer under the given SWT parent control.
- *
- * @param parent the SWT parent control under which to create the viewer's SWT control
- * @param config a compare configuration the newly created viewer might want to use
- * @return a new viewer
- */
- Viewer createViewer(Composite parent, CompareConfiguration config);
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/NavigationAction.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/NavigationAction.java
deleted file mode 100644
index 684c65f74..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/NavigationAction.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import java.util.ResourceBundle;
-import org.eclipse.jface.action.Action;
-
-import org.eclipse.compare.internal.CompareNavigator;
-import org.eclipse.compare.internal.CompareUIPlugin;
-import org.eclipse.compare.internal.Utilities;
-
-/**
- * A <code>NavigationAction</code> is used to navigate through the individual
- * differences of a <code>CompareEditorInput</code>.
- * <p>
- * Clients may instantiate this class; it is not intended to be subclassed.
- * </p>
- * @since 2.0
- */
-public class NavigationAction extends Action {
-
- private boolean fNext;
- private CompareEditorInput fCompareEditorInput;
-
-
- /**
- * Creates a <code>NavigationAction</code>.
- *
- * @param next if <code>true</code> action goes to the next difference; otherwise to the previous difference.
- */
- public NavigationAction(boolean next) {
- this(CompareUIPlugin.getResourceBundle(), next);
- }
-
- /**
- * Creates a <code>NavigationAction</code> that initializes its attributes
- * from the given <code>ResourceBundle</code>.
- *
- * @param bundle is used to initialize the action
- * @param next if <code>true</code> action goes to the next difference; otherwise to the previous difference.
- */
- public NavigationAction(ResourceBundle bundle, boolean next) {
- Utilities.initAction(this, bundle, next ? "action.Next." : "action.Previous."); //$NON-NLS-2$ //$NON-NLS-1$
- fNext= next;
- }
-
- public void run() {
- if (fCompareEditorInput != null) {
- Object adapter= fCompareEditorInput.getAdapter(CompareNavigator.class);
- if (adapter instanceof CompareNavigator)
- ((CompareNavigator)adapter).selectChange(fNext);
- }
- }
-
- /**
- * Sets the <code>CompareEditorInput</code> on which this action operates.
- *
- * @param input the <code>CompareEditorInput</code> on which this action operates; if <code>null</code> action does nothing
- */
- public void setCompareEditorInput(CompareEditorInput input) {
- fCompareEditorInput= input;
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/ResourceNode.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/ResourceNode.java
deleted file mode 100644
index 6c488a159..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/ResourceNode.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import java.io.*;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.jface.util.Assert;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.compare.internal.Utilities;
-import org.eclipse.compare.structuremergeviewer.IStructureComparator;
-
-/**
- * A <code>ResourceNode</code> wrappers an <code>IResources</code> so that it can be used
- * as input for the differencing engine (interfaces <code>IStructureComparator</code> and <code>ITypedElement</code>)
- * and the <code>ReplaceWithEditionDialog</code> (interfaces <code>ITypedElement</code> and <code>IModificationDate</code>).
- * <p>
- * Clients may instantiate this class; it is not intended to be subclassed.
- * </p>
- *
- * @see EditionSelectionDialog
- */
-public class ResourceNode extends BufferedContent
- implements IStructureComparator, ITypedElement, IEditableContent, IModificationDate {
-
- private IResource fResource;
- private ArrayList fChildren;
-
-
- /**
- * Creates a <code>ResourceNode</code> for the given resource.
- *
- * @param resource the resource
- */
- public ResourceNode(IResource resource) {
- fResource= resource;
- Assert.isNotNull(resource);
- }
-
- /**
- * Returns the corresponding resource for this object.
- *
- * @return the corresponding resource
- */
- public IResource getResource() {
- return fResource;
- }
-
- /* (non Javadoc)
- * see IStreamContentAccessor.getContents
- */
- public InputStream getContents() throws CoreException {
- if (fResource instanceof IStorage)
- return super.getContents();
- return null;
- }
-
- /* (non Javadoc)
- * see IModificationDate.getModificationDate
- */
- public long getModificationDate() {
- IPath path= fResource.getLocation();
- File file= path.toFile();
- return file.lastModified();
- }
-
- /* (non Javadoc)
- * see ITypedElement.getName
- */
- public String getName() {
- if (fResource != null)
- return fResource.getName();
- return null;
- }
-
- /* (non Javadoc)
- * see ITypedElement.getType
- */
- public String getType() {
- if (fResource instanceof IContainer)
- return ITypedElement.FOLDER_TYPE;
- if (fResource != null) {
- String s= fResource.getFileExtension();
- if (s != null)
- return s;
- }
- return ITypedElement.UNKNOWN_TYPE;
- }
-
- /* (non Javadoc)
- * see ITypedElement.getImage
- */
- public Image getImage() {
- return CompareUI.getImage(fResource);
- }
-
- /**
- * Returns <code>true</code> if the other object is of type <code>ITypedElement</code>
- * and their names are identical. The content is not considered.
- */
- /* (non Javadoc)
- * see IStructureComparator.equals
- */
- public boolean equals(Object other) {
- if (other instanceof ITypedElement) {
- String otherName= ((ITypedElement)other).getName();
- return getName().equals(otherName);
- }
- return super.equals(other);
- }
-
- /**
- * Returns the hash code of the name.
- */
- /* (non Javadoc)
- * see IStructureComparator.hashCode
- */
- public int hashCode() {
- return getName().hashCode();
- }
-
- /* (non Javadoc)
- * see IStructureComparator.getChildren
- */
- public Object[] getChildren() {
- if (fChildren == null) {
- fChildren= new ArrayList();
- if (fResource instanceof IContainer) {
- try {
- IResource members[]= ((IContainer)fResource).members();
- for (int i= 0; i < members.length; i++) {
- IStructureComparator child= createChild(members[i]);
- if (child != null)
- fChildren.add(child);
- }
- } catch (CoreException ex) {
- }
- }
- }
- return fChildren.toArray();
- }
-
- /**
- * This hook method is called from <code>getChildren</code> once for every
- * member of a container resource. This implementation
- * creates a new <code>ResourceNode</code> for the given child resource.
- * Clients may override this method to create a different type of
- * <code>IStructureComparator</code> or to filter children by returning <code>null</code>.
- *
- * @param child the child resource for which a <code>IStructureComparator</code> must be returned
- * @return a <code>ResourceNode</code> for the given child or <code>null</code>
- */
- protected IStructureComparator createChild(IResource child) {
- return new ResourceNode(child);
- }
-
- /**
- * Returns an open stream if the corresponding resource implements the
- * <code>IStorage</code> interface. Otherwise the value <code>null</code> is returned.
- *
- * @return a buffered input stream containing the contents of this storage
- * @exception CoreException if the contents of this storage could not be accessed
- */
- protected InputStream createStream() throws CoreException {
- if (fResource instanceof IStorage)
- return new BufferedInputStream(((IStorage)fResource).getContents());
- return null;
- }
-
- /* (non Javadoc)
- * see IEditableContent.isEditable
- */
- public boolean isEditable() {
- return true;
- }
-
- /* (non Javadoc)
- * see IEditableContent.replace
- */
- public ITypedElement replace(ITypedElement child, ITypedElement other) {
- return child;
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/ZipFileStructureCreator.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/ZipFileStructureCreator.java
deleted file mode 100644
index 902d5dc4a..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/ZipFileStructureCreator.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import java.io.*;
-import java.util.Iterator;
-import java.util.HashMap;
-import java.util.zip.*;
-
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.util.Assert;
-
-import org.eclipse.core.runtime.CoreException;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.*;
-import org.eclipse.compare.internal.Utilities;
-
-
-public class ZipFileStructureCreator implements IStructureCreator {
-
- /**
- * Common base class for ZipFolder and ZipFile
- */
- static abstract class ZipResource implements IStructureComparator, ITypedElement {
-
- private String fName;
-
- ZipResource(String name) {
- fName= name;
- }
-
- public String getName() {
- return fName;
- }
-
- public Image getImage() {
- return CompareUI.getImage(getType());
- }
-
- /**
- * Returns true if other is ITypedElement and names are equal.
- * @see IComparator#equals
- */
- public boolean equals(Object other) {
- if (other instanceof ITypedElement)
- return fName.equals(((ITypedElement) other).getName());
- return super.equals(other);
- }
-
- public int hashCode() {
- return fName.hashCode();
- }
- }
-
- static class ZipFolder extends ZipResource {
-
- private HashMap fChildren= new HashMap(10);
-
- ZipFolder(String name) {
- super(name);
- }
-
- public String getType() {
- return ITypedElement.FOLDER_TYPE;
- }
-
- public Object[] getChildren() {
- Object[] children= new Object[fChildren.size()];
- Iterator iter= fChildren.values().iterator();
- for (int i= 0; iter.hasNext(); i++)
- children[i]= iter.next();
- return children;
- }
-
- ZipFile createContainer(String path) {
- String entry= path;
- int pos= path.indexOf('/');
- if (pos < 0)
- pos= path.indexOf('\\');
- if (pos >= 0) {
- entry= path.substring(0, pos);
- path= path.substring(pos + 1);
- } else if (entry.length() > 0) {
- ZipFile ze= new ZipFile(entry);
- fChildren.put(entry, ze);
- return ze;
- } else
- return null;
-
- ZipFolder folder= null;
- if (fChildren != null) {
- Object o= fChildren.get(entry);
- if (o instanceof ZipFolder)
- folder= (ZipFolder) o;
- }
-
- if (folder == null) {
- folder= new ZipFolder(entry);
- fChildren.put(entry, folder);
- }
-
- return folder.createContainer(path);
- }
- }
-
- static class ZipFile extends ZipResource implements IStreamContentAccessor {
-
- private byte[] fContents;
-
- ZipFile(String name) {
- super(name);
- }
-
- public String getType() {
- String s= this.getName();
- int pos= s.lastIndexOf('.');
- if (pos >= 0)
- return s.substring(pos + 1);
- return ITypedElement.UNKNOWN_TYPE;
- }
-
- public Object[] getChildren() {
- return null;
- }
-
- public InputStream getContents() {
- if (fContents == null)
- fContents= new byte[0];
- return new ByteArrayInputStream(fContents);
- }
-
- byte[] getBytes() {
- return fContents;
- }
-
- void setBytes(byte[] buffer) {
- fContents= buffer;
- }
-
- void appendBytes(byte[] buffer, int length) {
- if (length > 0) {
- int oldLen= 0;
- if (fContents != null)
- oldLen= fContents.length;
- byte[] newBuf= new byte[oldLen + length];
- if (oldLen > 0)
- System.arraycopy(fContents, 0, newBuf, 0, oldLen);
- System.arraycopy(buffer, 0, newBuf, oldLen, length);
- fContents= newBuf;
- }
- }
- }
-
- private String fTitle;
-
- public ZipFileStructureCreator() {
- this(Utilities.getString("ZipStructureCreator.name")); //$NON-NLS-1$
- }
-
- public ZipFileStructureCreator(String title) {
- fTitle= title;
- }
-
- public String getName() {
- return fTitle;
- }
-
- public IStructureComparator getStructure(Object input) {
-
- InputStream is= null;
-
- if (input instanceof IStreamContentAccessor) {
- IStreamContentAccessor sca= (IStreamContentAccessor) input;
- try {
- is= sca.getContents();
- } catch (CoreException ex) {
- }
- }
-
- if (is == null)
- return null;
-
- ZipInputStream zip= new ZipInputStream(is);
- ZipFolder root= new ZipFolder(""); //$NON-NLS-1$
- try {
- for (;;) {
- ZipEntry entry= zip.getNextEntry();
- if (entry == null)
- break;
-
- ZipFile ze= root.createContainer(entry.getName());
- if (ze != null) {
- int length= (int) entry.getSize();
- if (length >= 0) {
- byte[] buffer= new byte[length];
- int offset= 0;
-
- do {
- int n= zip.read(buffer, offset, length);
- offset += n;
- length -= n;
- } while (length > 0);
-
- ze.setBytes(buffer);
- } else {
- byte[] buffer= new byte[1024];
- int n;
- do {
- n= zip.read(buffer, 0, 1024);
- ze.appendBytes(buffer, n);
- } while (n >= 0);
- }
- }
- zip.closeEntry();
- }
- } catch (IOException ex) {
- return null;
- } finally {
- try {
- zip.close();
- } catch (IOException ex) {
- }
- }
-
- if (root.fChildren.size() == 1) {
- Iterator iter= root.fChildren.values().iterator();
- return (IStructureComparator) iter.next();
- }
- return root;
- }
-
- public String getContents(Object o, boolean ignoreWhitespace) {
- if (o instanceof ZipFile) {
- byte[] bytes= ((ZipFile)o).getBytes();
- if (bytes != null)
- return new String(bytes);
- return ""; //$NON-NLS-1$
- }
- return null;
- }
-
- /**
- * Returns <code>false</code> since we cannot update a zip archive.
- */
- public boolean canSave() {
- return false;
- }
-
- /**
- * Throws <code>AssertionFailedException</code> since we cannot update a zip archive.
- */
- public void save(IStructureComparator structure, Object input) {
- Assert.isTrue(false); // Cannot update zip archive
- }
-
- public IStructureComparator locate(Object path, Object source) {
- return null;
- }
-
- public boolean canRewriteTree() {
- return false;
- }
-
- public void rewriteTree(Differencer diff, IDiffContainer root) {
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java
deleted file mode 100644
index 7878ff22a..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java
+++ /dev/null
@@ -1,937 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.contentmergeviewer;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.custom.CLabel;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.CoreException;
-
-import org.eclipse.jface.util.*;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ContentViewer;
-import org.eclipse.jface.viewers.IContentProvider;
-import org.eclipse.jface.viewers.ISelection;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.*;
-import org.eclipse.compare.contentmergeviewer.IMergeViewerContentProvider;
-import org.eclipse.compare.contentmergeviewer.TextMergeViewer;
-import org.eclipse.compare.internal.*;
-
-/**
- * An abstract compare and merge viewer with two side-by-side content areas
- * and an optional content area for the ancestor. The implementation makes no
- * assumptions about the content type.
- * <p>
- * <code>ContentMergeViewer</code>
- * <ul>
- * <li>implements the overall layout and defines hooks so that subclasses
- * can easily provide an implementation for a specific content type,
- * <li>implements the UI for making the areas resizable,
- * <li>has an action for controlling whether the ancestor area is visible or not,
- * <li>has actions for copying one side of the input to the other side,
- * <li>tracks the dirty state of the left and right sides and send out notification
- * on state changes.
- * </ul>
- * A <code>ContentMergeViewer</code> accesses its
- * model by means of a content provider which must implement the
- * <code>IMergeViewerContentProvider</code> interface.
- * </p>
- * <p>
- * Clients may wish to use the standard concrete subclass <code>TextMergeViewer</code>,
- * or define their own subclass.
- *
- * @see IMergeViewerContentProvider
- * @see TextMergeViewer
- */
-public abstract class ContentMergeViewer extends ContentViewer
- implements IPropertyChangeNotifier, ISavable {
-
- class SaveAction extends MergeViewerAction {
-
- private boolean fLeft;
-
- SaveAction(boolean left) {
- super(true, false, false);
- Utilities.initAction(this, getResourceBundle(), "action.save."); //$NON-NLS-1$
- }
-
- public void run() {
- saveContent(getInput());
- }
- };
-
- /**
- * Property names.
- */
- private static final String ANCESTOR_ENABLED= ComparePreferencePage.INITIALLY_SHOW_ANCESTOR_PANE;
-
- /* package */ static final int HORIZONTAL= 1;
- /* package */ static final int VERTICAL= 2;
-
- static final double HSPLIT= 0.5;
- static final double VSPLIT= 0.3;
-
- private class ContentMergeViewerLayout extends Layout {
-
- public Point computeSize(Composite c, int w, int h, boolean force) {
- return new Point(100, 100);
- }
-
- public void layout(Composite composite, boolean force) {
-
- // determine some derived sizes
- int headerHeight= fLeftLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).y;
- Rectangle r= composite.getClientArea();
-
- int centerWidth= getCenterWidth();
- int width1= (int)((r.width-centerWidth)*fHSplit);
- int width2= r.width-width1-centerWidth;
-
- int height1= 0;
- int height2= 0;
- if (fAncestorEnabled && fShowAncestor) {
- height1= (int)((r.height-(2*headerHeight))*fVSplit);
- height2= r.height-(2*headerHeight)-height1;
- } else {
- height1= 0;
- height2= r.height-headerHeight;
- }
-
- int y= 0;
-
- if (fAncestorEnabled && fShowAncestor) {
- fAncestorLabel.setBounds(0, y, r.width, headerHeight);
- fAncestorLabel.setVisible(true);
- y+= headerHeight;
- handleResizeAncestor(0, y, r.width, height1);
- y+= height1;
- } else {
- fAncestorLabel.setVisible(false);
- handleResizeAncestor(0, 0, 0, 0);
- }
-
- fLeftLabel.getSize(); // without this resizing would not always work
-
- if (centerWidth > 3) {
- fLeftLabel.setBounds(0, y, width1+1, headerHeight);
- fDirectionLabel.setVisible(true);
- fDirectionLabel.setBounds(width1+1, y, centerWidth-1, headerHeight);
- fRightLabel.setBounds(width1+centerWidth, y, width2, headerHeight);
- } else {
- fLeftLabel.setBounds(0, y, width1, headerHeight);
- fDirectionLabel.setVisible(false);
- fRightLabel.setBounds(width1, y, r.width-width1, headerHeight);
- }
-
- y+= headerHeight;
-
- if (fCenter != null && !fCenter.isDisposed())
- fCenter.setBounds(width1, y, centerWidth, height2);
-
- handleResizeLeftRight(0, y, width1, centerWidth, width2, height2);
- }
- }
-
- class Resizer extends MouseAdapter implements MouseMoveListener {
-
- Control fControl;
- int fX, fY;
- int fWidth1, fWidth2;
- int fHeight1, fHeight2;
- int fDirection;
- boolean fLiveResize;
-
- public Resizer(Control c, int dir) {
- fDirection= dir;
- fControl= c;
- fControl.addMouseListener(this);
- fLiveResize= !(fControl instanceof Sash);
-
- fControl.addDisposeListener(
- new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- fControl= null;
- }
- }
- );
- }
-
- public void mouseDoubleClick(MouseEvent e) {
- if ((fDirection & HORIZONTAL) != 0)
- fHSplit= HSPLIT;
- if ((fDirection & VERTICAL) != 0)
- fVSplit= VSPLIT;
- fComposite.layout(true);
- }
-
- public void mouseDown(MouseEvent e) {
- Composite parent= fControl.getParent();
-
- Point s= parent.getSize();
- Point as= fAncestorLabel.getSize();
- Point ys= fLeftLabel.getSize();
- Point ms= fRightLabel.getSize();
-
- fWidth1= ys.x;
- fWidth2= ms.x;
- fHeight1= fLeftLabel.getLocation().y-as.y;
- fHeight2= s.y-(fLeftLabel.getLocation().y+ys.y);
-
- fX= e.x;
- fY= e.y;
- fControl.addMouseMoveListener(this);
- }
-
- public void mouseUp(MouseEvent e) {
- fControl.removeMouseMoveListener(this);
- if (!fLiveResize)
- resize(e);
- }
-
- public void mouseMove(MouseEvent e) {
- if (fLiveResize)
- resize(e);
- }
-
- private void resize(MouseEvent e) {
- int dx= e.x-fX;
- int dy= e.y-fY;
-
- int centerWidth= fCenter.getSize().x;
-
- if (fWidth1 + dx > centerWidth && fWidth2 - dx > centerWidth) {
- fWidth1+= dx;
- fWidth2-= dx;
- if ((fDirection & HORIZONTAL) != 0)
- fHSplit= (double)fWidth1/(double)(fWidth1+fWidth2);
- }
- if (fHeight1 + dy > centerWidth && fHeight2 - dy > centerWidth) {
- fHeight1+= dy;
- fHeight2-= dy;
- if ((fDirection & VERTICAL) != 0)
- fVSplit= (double)fHeight1/(double)(fHeight1+fHeight2);
- }
-
- fComposite.layout(true);
- fControl.getDisplay().update();
- }
- };
-
- /** Style bits for top level composite */
- private int fStyles;
- private ResourceBundle fBundle;
- private CompareConfiguration fCompareConfiguration;
- private IPropertyChangeListener fPropertyChangeListener;
- private ICompareInputChangeListener fCompareInputChangeListener;
- private ListenerList fListenerList;
- boolean fConfirmSave= true;
-
- private double fHSplit= HSPLIT; // width ratio of left and right panes
- private double fVSplit= VSPLIT; // height ratio of ancestor and bottom panes
-
- private boolean fAncestorEnabled= true; // show ancestor in case of conflicts
- /* package */ boolean fShowAncestor= false; // if current input has conflicts
- private boolean fIsThreeWay= false;
- private ActionContributionItem fAncestorItem;
-
- private Action fCopyLeftToRightAction; // copy from left to right
- private Action fCopyRightToLeftAction; // copy from right to left
-
- MergeViewerAction fLeftSaveAction;
- MergeViewerAction fRightSaveAction;
-
- // SWT widgets
- /* package */ Composite fComposite;
- private CLabel fAncestorLabel;
- private CLabel fLeftLabel;
- private CLabel fRightLabel;
- /* package */ CLabel fDirectionLabel;
- /* package */ Control fCenter;
-
- //---- SWT resources to be disposed
- private Image fRightArrow;
- private Image fLeftArrow;
- private Image fBothArrow;
- //---- end
-
- /**
- * Creates a new content merge viewer and initializes with a resource bundle and a
- * configuration.
- *
- * @param bundle the resource bundle
- * @param cc the configuration object
- */
- protected ContentMergeViewer(int style, ResourceBundle bundle, CompareConfiguration cc) {
- fStyles= style;
- fBundle= bundle;
-
- fAncestorEnabled= Utilities.getBoolean(cc, ANCESTOR_ENABLED, fAncestorEnabled);
- fConfirmSave= Utilities.getBoolean(cc, CompareEditor.CONFIRM_SAVE_PROPERTY, fConfirmSave);
-
- setContentProvider(new MergeViewerContentProvider(cc));
-
- fCompareInputChangeListener= new ICompareInputChangeListener() {
- public void compareInputChanged(ICompareInput input) {
- ContentMergeViewer.this.internalRefresh(input);
- }
- };
-
- fCompareConfiguration= cc;
- if (fCompareConfiguration != null) {
- fPropertyChangeListener= new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- ContentMergeViewer.this.propertyChange(event);
- }
- };
- fCompareConfiguration.addPropertyChangeListener(fPropertyChangeListener);
- }
-
- fLeftSaveAction= new SaveAction(true);
- fLeftSaveAction.setEnabled(false);
- fRightSaveAction= new SaveAction(false);
- fRightSaveAction.setEnabled(false);
- }
-
- //---- hooks ---------------------
-
- /**
- * Returns the viewer's name.
- *
- * @return the viewer's name
- */
- public String getTitle() {
- return Utilities.getString(getResourceBundle(), "title"); //$NON-NLS-1$
- }
-
- /**
- * Creates the SWT controls for the ancestor, left, and right
- * content areas of this compare viewer.
- * Implementations typically hold onto the controls
- * so that they can be initialized with the input objects in method
- * <code>updateContent</code>.
- *
- * @param composite the container for the three areas
- */
- abstract protected void createControls(Composite composite);
-
- /**
- * Lays out the ancestor area of the compare viewer.
- * It is called whenever the viewer is resized or when the sashes between
- * the areas are moved to adjust the size of the areas.
- *
- * @param x the horizontal position of the ancestor area within its container
- * @param y the vertical position of the ancestor area within its container
- * @param width the width of the ancestor area
- * @param height the height of the ancestor area
- */
- abstract protected void handleResizeAncestor(int x, int y, int width, int height);
-
- /**
- * Lays out the left and right areas of the compare viewer.
- * It is called whenever the viewer is resized or when the sashes between
- * the areas are moved to adjust the size of the areas.
- *
- * @param x the horizontal position of the left area within its container
- * @param y the vertical position of the left and right area within its container
- * @param leftWidth the width of the left area
- * @param centerWidth the width of the gap between the left and right areas
- * @param rightWidth the width of the right area
- * @param height the height of the left and right areas
- */
- abstract protected void handleResizeLeftRight(int x, int y, int leftWidth, int centerWidth,
- int rightWidth, int height);
-
- /**
- * Contributes items to the given <code>ToolBarManager</code>.
- * It is called when this viewer is installed in its container and if the container
- * has a <code>ToolBarManager</code>.
- * The <code>ContentMergeViewer</code> implementation of this method does nothing.
- * Subclasses may reimplement.
- *
- * @param toolBarManager the toolbar manager to contribute to
- */
- protected void createToolItems(ToolBarManager toolBarManager) {
- }
-
- /**
- * Initializes the controls of the three content areas with the given input objects.
- *
- * @param ancestor the input for the ancestor area
- * @param left the input for the left area
- * @param right the input for the right area
- */
- abstract protected void updateContent(Object ancestor, Object left, Object right);
-
- /**
- * Copies the content of one side to the other side.
- * Called from the (internal) actions for copying the sides of the viewer's input object.
- *
- * @param leftToRight if <code>true</code>, the left side is copied to the right side;
- * if <code>false</code>, the right side is copied to the left side
- */
- abstract protected void copy(boolean leftToRight);
-
- /**
- * Returns the byte contents of the left or right side. If the viewer
- * has no editable content <code>null</code> can be returned.
- *
- * @param left if <code>true</code>, the byte contents of the left area is returned;
- * if <code>false</code>, the byte contents of the right area
- * @return the content as an array of bytes, or <code>null</code>
- */
- abstract protected byte[] getContents(boolean left);
-
- //----------------------------
-
- /**
- * Returns the resource bundle of this viewer.
- *
- * @return the resource bundle
- */
- protected ResourceBundle getResourceBundle() {
- return fBundle;
- }
-
- /**
- * Returns the compare configuration of this viewer,
- * or <code>null</code> if this viewer does not yet have a configuration.
- *
- * @return the compare configuration, or <code>null</code> if none
- */
- protected CompareConfiguration getCompareConfiguration() {
- return fCompareConfiguration;
- }
-
- /**
- * The <code>ContentMergeViewer</code> implementation of this
- * <code>ContentViewer</code> method
- * checks to ensure that the content provider is an <code>IMergeViewerContentProvider</code>.
- */
- public void setContentProvider(IContentProvider contentProvider) {
- Assert.isTrue(contentProvider instanceof IMergeViewerContentProvider);
- super.setContentProvider(contentProvider);
- }
-
- /* package */ IMergeViewerContentProvider getMergeContentProvider() {
- return (IMergeViewerContentProvider) getContentProvider();
- }
-
- /**
- * The <code>ContentMergeViewer</code> implementation of this
- * <code>Viewer</code> method returns the empty selection. Subclasses may override.
- */
- public ISelection getSelection() {
- return new ISelection() {
- public boolean isEmpty() {
- return true;
- }
- };
- }
-
- /**
- * The <code>ContentMergeViewer</code> implementation of this
- * <code>Viewer</code> method does nothing. Subclasses may reimplement.
- */
- public void setSelection(ISelection s, boolean reveal) {
- }
-
- /* package */ void propertyChange(PropertyChangeEvent event) {
-
- String key= event.getProperty();
-
- if (key.equals(ANCESTOR_ENABLED)) {
- fAncestorEnabled= Utilities.getBoolean(getCompareConfiguration(), ANCESTOR_ENABLED, fAncestorEnabled);
- fComposite.layout(true);
- return;
- }
- }
-
- void setAncestorVisibility(boolean visible, boolean enabled) {
- if (fAncestorItem != null) {
- Action action= (Action) fAncestorItem.getAction();
- if (action != null) {
- action.setChecked(visible);
- action.setEnabled(enabled);
- }
- }
- if (fCompareConfiguration != null)
- fCompareConfiguration.setProperty(ANCESTOR_ENABLED, new Boolean(visible));
- }
-
- //---- input
-
- /* package */ boolean isThreeWay() {
- return fIsThreeWay;
- }
-
- /**
- * Internal hook method called when the input to this viewer is
- * initially set or subsequently changed.
- * <p>
- * The <code>ContentMergeViewer</code> implementation of this <code>Viewer</code>
- * method retrieves the content from the three sides by calling the methods
- * <code>getAncestorContent</code>, <code>getLeftContent</code>,
- * and <code>getRightContent</code> on the content provider.
- * The values returned from these calls are passed to the hook method <code>updateContent</code>.
- * </p>
- *
- * @param input the new input of this viewer, or <code>null</code> if none
- * @param oldInput the old input element, or <code>null</code> if there
- * was previously no input
- */
- protected final void inputChanged(Object input, Object oldInput) {
-
- if (input != oldInput)
- if (oldInput instanceof ICompareInput)
- ((ICompareInput)oldInput).removeCompareInputChangeListener(fCompareInputChangeListener);
-
- boolean success= doSave(input, oldInput);
-
- if (input != oldInput)
- if (input instanceof ICompareInput)
- ((ICompareInput)input).addCompareInputChangeListener(fCompareInputChangeListener);
-
- if (success) {
- setLeftDirty(false);
- setRightDirty(false);
- }
-
- if (input != oldInput)
- internalRefresh(input);
- }
-
- protected boolean doSave(Object newInput, Object oldInput) {
-
- // before setting the new input we have to save the old
- if (fLeftSaveAction.isEnabled() || fRightSaveAction.isEnabled()) {
-
- // post alert
- if (fConfirmSave) {
- Shell shell= fComposite.getShell();
-
- MessageDialog dialog= new MessageDialog(shell,
- Utilities.getString(getResourceBundle(), "saveDialog.title"), //$NON-NLS-1$
- null, // accept the default window icon
- Utilities.getString(getResourceBundle(), "saveDialog.message"), //$NON-NLS-1$
- MessageDialog.QUESTION,
- new String[] {
- IDialogConstants.YES_LABEL,
- IDialogConstants.NO_LABEL,
-// IDialogConstants.CANCEL_LABEL
- },
- 0); // default button index
-
- switch (dialog.open()) { // open returns index of pressed button
- case 0:
- saveContent(oldInput);
- break;
- case 1:
- setLeftDirty(false);
- setRightDirty(false);
- break;
- case 2:
- throw new ViewerSwitchingCancelled();
- }
- } else
- saveContent(oldInput);
- return true;
- }
- return false;
- }
-
- public void setConfirmSave(boolean enable) {
- fConfirmSave= enable;
- }
-
- /* (non Javadoc)
- * see Viewer.refresh
- */
- public void refresh() {
- internalRefresh(getInput());
- }
-
- private void internalRefresh(Object input) {
-
- IMergeViewerContentProvider content= getMergeContentProvider();
- if (content != null) {
- Object ancestor= content.getAncestorContent(input);
- if (input instanceof ICompareInput)
- fIsThreeWay= (((ICompareInput)input).getKind() & Differencer.DIRECTION_MASK) != 0;
- else
- fIsThreeWay= ancestor != null;
-
- if (fAncestorItem != null)
- fAncestorItem.setVisible(fIsThreeWay);
-
- boolean oldFlag= fShowAncestor;
- fShowAncestor= fIsThreeWay && content.showAncestor(input);
-
- if (fAncestorEnabled && oldFlag != fShowAncestor)
- fComposite.layout(true);
-
- ToolBarManager tbm= CompareViewerSwitchingPane.getToolBarManager(fComposite.getParent());
- if (tbm != null) {
- updateToolItems();
- tbm.update(true);
- tbm.getControl().getParent().layout(true);
- }
-
- updateHeader();
-
- Object left= content.getLeftContent(input);
- Object right= content.getRightContent(input);
- updateContent(ancestor, left, right);
- }
- }
-
- //---- layout & SWT control creation
-
- /**
- * Builds the SWT controls for the three areas of a compare/merge viewer.
- * <p>
- * Calls the hooks <code>createControls</code> and <code>createToolItems</code>
- * to let subclasses build the specific content areas and to add items to
- * an enclosing toolbar.
- * <p>
- * This method must only be called in the constructor of subclasses.
- *
- * @param parent the parent control
- * @return the new control
- */
- protected final Control buildControl(Composite parent) {
-
- fComposite= new Composite(parent, fStyles) {
- public boolean setFocus() {
- return internalSetFocus();
- }
- };
- fComposite.setData(CompareUI.COMPARE_VIEWER_TITLE, getTitle());
-
- hookControl(fComposite); // hook help & dispose listener
-
- fComposite.setLayout(new ContentMergeViewerLayout());
-
- int style= SWT.SHADOW_OUT;
- fAncestorLabel= new CLabel(fComposite, style);
-
- fLeftLabel= new CLabel(fComposite, style);
- new Resizer(fLeftLabel, VERTICAL);
-
- fDirectionLabel= new CLabel(fComposite, style);
- fDirectionLabel.setAlignment(SWT.CENTER);
- new Resizer(fDirectionLabel, HORIZONTAL | VERTICAL);
-
- fRightLabel= new CLabel(fComposite, style);
- new Resizer(fRightLabel, VERTICAL);
-
- if (fCenter == null || fCenter.isDisposed())
- fCenter= createCenter(fComposite);
-
- createControls(fComposite);
-
- ToolBarManager tbm= CompareViewerSwitchingPane.getToolBarManager(parent);
- if (tbm != null) {
- tbm.removeAll();
-
- // define groups
- tbm.add(new Separator("modes")); //$NON-NLS-1$
- tbm.add(new Separator("merge")); //$NON-NLS-1$
- tbm.add(new Separator("navigation")); //$NON-NLS-1$
-
- CompareConfiguration cc= getCompareConfiguration();
-
- if (cc.isRightEditable()) {
- fCopyLeftToRightAction=
- new Action() {
- public void run() {
- copy(true);
- }
- };
- Utilities.initAction(fCopyLeftToRightAction, getResourceBundle(), "action.CopyLeftToRight."); //$NON-NLS-1$
- tbm.appendToGroup("merge", fCopyLeftToRightAction); //$NON-NLS-1$
- }
-
- if (cc.isLeftEditable()) {
- fCopyRightToLeftAction=
- new Action() {
- public void run() {
- copy(false);
- }
- };
- Utilities.initAction(fCopyRightToLeftAction, getResourceBundle(), "action.CopyRightToLeft."); //$NON-NLS-1$
- tbm.appendToGroup("merge", fCopyRightToLeftAction); //$NON-NLS-1$
- }
-
- Action a= new ChangePropertyAction(fBundle, fCompareConfiguration, "action.EnableAncestor.", ANCESTOR_ENABLED); //$NON-NLS-1$
- a.setChecked(fAncestorEnabled);
- fAncestorItem= new ActionContributionItem(a);
- fAncestorItem.setVisible(false);
- tbm.appendToGroup("modes", fAncestorItem); //$NON-NLS-1$
-
- createToolItems(tbm);
- updateToolItems();
-
- tbm.update(true);
- }
-
- return fComposite;
- }
-
- /* package */ boolean internalSetFocus() {
- return false;
- }
-
- /* package */ int getCenterWidth() {
- return 3;
- }
-
- /* package */ boolean getAncestorEnabled() {
- return fAncestorEnabled;
- }
-
- /* package */ Control createCenter(Composite parent) {
- Sash sash= new Sash(parent, SWT.VERTICAL);
- new Resizer(sash, HORIZONTAL);
- return sash;
- }
-
- /* package */ Control getCenter() {
- return fCenter;
- }
-
- /*
- * @see Viewer.getControl()
- */
- public Control getControl() {
- return fComposite;
- }
-
- /**
- * Called on the viewer disposal.
- * Unregisters from the compare configuration.
- * Clients may extend if they have to do additional cleanup.
- */
- protected void handleDispose(DisposeEvent event) {
-
- Object input= getInput();
- if (input instanceof ICompareInput)
- ((ICompareInput)input).removeCompareInputChangeListener(fCompareInputChangeListener);
-
- if (fCompareConfiguration != null && fPropertyChangeListener != null) {
- fCompareConfiguration.removePropertyChangeListener(fPropertyChangeListener);
- fPropertyChangeListener= null;
- }
-
- fAncestorLabel= null;
- fLeftLabel= null;
- fDirectionLabel= null;
- fRightLabel= null;
- fCenter= null;
-
- if (fRightArrow != null) {
- fRightArrow.dispose();
- fRightArrow= null;
- }
- if (fLeftArrow != null) {
- fLeftArrow.dispose();
- fLeftArrow= null;
- }
- if (fBothArrow != null) {
- fBothArrow.dispose();
- fBothArrow= null;
- }
-
- super.handleDispose(event);
- }
-
- /**
- * Updates the enabled state of the toolbar items.
- * <p>
- * This method is called whenever the state of the items needs updating.
- * <p>
- * Subclasses may extend this method, although this is generally not required.
- */
- protected void updateToolItems() {
-
- IMergeViewerContentProvider content= getMergeContentProvider();
-
- Object input= getInput();
-
- if (fCopyLeftToRightAction != null) {
- boolean enable= content.isRightEditable(input);
-// if (enable && input instanceof ICompareInput) {
-// ITypedElement e= ((ICompareInput) input).getLeft();
-// if (e == null)
-// enable= false;
-// }
- fCopyLeftToRightAction.setEnabled(enable);
- }
-
- if (fCopyRightToLeftAction != null) {
- boolean enable= content.isLeftEditable(input);
-// if (enable && input instanceof ICompareInput) {
-// ITypedElement e= ((ICompareInput) input).getRight();
-// if (e == null)
-// enable= false;
-// }
- fCopyRightToLeftAction.setEnabled(enable);
- }
- }
-
- /**
- * Updates the headers of the three areas
- * by querying the content provider for a name and image for
- * the three sides of the input object.
- * <p>
- * This method is called whenever the header must be updated.
- * <p>
- * Subclasses may extend this method, although this is generally not required.
- */
- protected void updateHeader() {
-
- IMergeViewerContentProvider content= getMergeContentProvider();
- Object input= getInput();
-
- if (fAncestorLabel != null) {
- fAncestorLabel.setImage(content.getAncestorImage(input));
- fAncestorLabel.setText(content.getAncestorLabel(input));
- }
- if (fLeftLabel != null) {
- fLeftLabel.setImage(content.getLeftImage(input));
- fLeftLabel.setText(content.getLeftLabel(input));
- }
- if (fRightLabel != null) {
- fRightLabel.setImage(content.getRightImage(input));
- fRightLabel.setText(content.getRightLabel(input));
- }
- }
-
- private Image loadImage(String name) {
- ImageDescriptor id= ImageDescriptor.createFromFile(ContentMergeViewer.class, name);
- if (id != null)
- return id.createImage();
- return null;
- }
-
- /**
- * Calculates the height of the header.
- */
- /* package */ int getHeaderHeight() {
- int headerHeight= fLeftLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).y;
- headerHeight= Math.max(headerHeight, fDirectionLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).y);
- return headerHeight;
- }
-
- //---- merge direction
-
- /**
- * Returns true if both sides are editable.
- */
- /* package */ boolean canToggleMergeDirection() {
- IMergeViewerContentProvider content= getMergeContentProvider();
- Object input= getInput();
- return content.isLeftEditable(input) && content.isRightEditable(input);
- }
-
- //---- dirty state & saving state
-
- /* (non Javadoc)
- * see IPropertyChangeNotifier.addPropertyChangeListener
- */
- public void addPropertyChangeListener(IPropertyChangeListener listener) {
- if (fListenerList == null)
- fListenerList= new ListenerList();
- fListenerList.add(listener);
- }
-
- /* (non Javadoc)
- * see IPropertyChangeNotifier.removePropertyChangeListener
- */
- public void removePropertyChangeListener(IPropertyChangeListener listener) {
- if (fListenerList != null) {
- fListenerList.remove(listener);
- if (fListenerList.isEmpty())
- fListenerList= null;
- }
- }
-
- /* package */ void fireDirtyState(boolean state) {
- Utilities.firePropertyChange(fListenerList, this, CompareEditorInput.DIRTY_STATE, null, new Boolean(state));
- }
-
- /**
- * Sets the dirty state of the left side of this viewer.
- * If the new value differs from the old
- * all registered listener are notified with
- * a <code>PropertyChangeEvent</code> with the
- * property name <code>CompareEditorInput.DIRTY_STATE</code>.
- *
- * @param dirty the state of the left side dirty flag
- */
- protected void setLeftDirty(boolean dirty) {
- if (fLeftSaveAction.isEnabled() != dirty) {
- fLeftSaveAction.setEnabled(dirty);
- fireDirtyState(dirty);
- }
- }
-
- /**
- * Sets the dirty state of the right side of this viewer.
- * If the new value differs from the old
- * all registered listener are notified with
- * a <code>PropertyChangeEvent</code> with the
- * property name <code>CompareEditorInput.DIRTY_STATE</code>.
- *
- * @param dirty the state of the right side dirty flag
- */
- protected void setRightDirty(boolean dirty) {
- if (fRightSaveAction.isEnabled() != dirty) {
- fRightSaveAction.setEnabled(dirty);
- fireDirtyState(dirty);
- }
- }
-
- public void save(IProgressMonitor pm) throws CoreException {
- saveContent(getInput());
- }
-
- /**
- * Save modified content back to input elements via the content provider.
- */
- /* package */ void saveContent(Object oldInput) {
-
- // write back modified contents
- IMergeViewerContentProvider content= (IMergeViewerContentProvider) getContentProvider();
-
- boolean leftEmpty= content.getLeftContent(oldInput) == null;
- boolean rightEmpty= content.getRightContent(oldInput) == null;
-
- if (fCompareConfiguration.isLeftEditable() && fLeftSaveAction.isEnabled()) {
- byte[] bytes= getContents(true);
- if (leftEmpty && bytes != null && bytes.length == 0)
- bytes= null;
- setLeftDirty(false);
- content.saveLeftContent(oldInput, bytes);
- }
-
- if (fCompareConfiguration.isRightEditable() && fRightSaveAction.isEnabled()) {
- byte[] bytes= getContents(false);
- if (rightEmpty && bytes != null && bytes.length == 0)
- bytes= null;
- setRightDirty(false);
- content.saveRightContent(oldInput, bytes);
- }
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/DelayedProgressMonitor.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/DelayedProgressMonitor.java
deleted file mode 100644
index 1f7d6d29f..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/DelayedProgressMonitor.java
+++ /dev/null
@@ -1,136 +0,0 @@
-package org.eclipse.compare.contentmergeviewer;
-
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.core.runtime.IProgressMonitor;
-import java.lang.reflect.InvocationTargetException;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.operation.ModalContext;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-
-
-class DelayedProgressMonitor implements IProgressMonitor {
-
- ProgressMonitorDialog fProgressDialog;
- IProgressMonitor fRealProgressMonitor;
- String fTaskName;
- String fSubTaskName;
- int fTotalWork;
- int fWorked;
- boolean fCancelable;
- Shell fShell;
- int fTime;
-
-
- DelayedProgressMonitor(Shell shell) {
- fShell= shell;
- }
-
- /*
- * @see IProgressMonitor#beginTask(String, int)
- */
- public void beginTask(String name, int totalWork) {
- fTaskName= name;
- fTotalWork= totalWork;
- fTime= 0;
- }
-
- /*
- * @see IProgressMonitor#done()
- */
- public void done() {
- if (fRealProgressMonitor != null)
- fRealProgressMonitor.done();
- }
-
- /*
- * @see IProgressMonitor#internalWorked(double)
- */
- public void internalWorked(double work) {
- if (fRealProgressMonitor != null) {
- fRealProgressMonitor.internalWorked(work);
- }
- }
-
- private void checkTimeout() {
- if (fRealProgressMonitor == null) {
-
- //if (fTime++ < 100)
- // return;
-
- fProgressDialog= new ProgressMonitorDialog(fShell);
- fProgressDialog.setCancelable(true);
- fProgressDialog.open();
- fRealProgressMonitor= fProgressDialog.getProgressMonitor();
- fRealProgressMonitor.beginTask(fTaskName, fTotalWork);
- if (fSubTaskName != null)
- fRealProgressMonitor.subTask(fSubTaskName);
- fRealProgressMonitor.worked(fWorked);
- }
- }
-
- /*
- * @see IProgressMonitor#isCanceled()
- */
- public boolean isCanceled() {
- checkTimeout();
- if (fRealProgressMonitor != null)
- return fRealProgressMonitor.isCanceled();
- return false;
- }
-
- /*
- * @see IProgressMonitor#setCanceled(boolean)
- */
- public void setCanceled(boolean value) {
- if (fRealProgressMonitor != null)
- fRealProgressMonitor.setCanceled(value);
- else
- fCancelable= value;
- }
-
- /*
- * @see IProgressMonitor#setTaskName(String)
- */
- public void setTaskName(String name) {
- if (fRealProgressMonitor != null)
- fRealProgressMonitor.setTaskName(name);
- else
- fTaskName= name;
- }
-
- /*
- * @see IProgressMonitor#subTask(String)
- */
- public void subTask(String name) {
- if (fRealProgressMonitor != null)
- fRealProgressMonitor.subTask(name);
- else
- fSubTaskName= name;
- }
-
- /*
- * @see IProgressMonitor#worked(int)
- */
- public void worked(int work) {
- if (fRealProgressMonitor != null)
- fRealProgressMonitor.internalWorked(work);
- else {
- fWorked+= work;
- checkTimeout();
- }
- }
-
- public static void run(Shell shell, boolean fork, boolean cancelable, IRunnableWithProgress runnable)
- throws InvocationTargetException, InterruptedException {
-
- DelayedProgressMonitor pm= new DelayedProgressMonitor(shell);
- pm.checkTimeout();
- try {
- ModalContext.run(runnable, fork, pm, shell.getDisplay());
- } finally {
- if (pm.fProgressDialog != null)
- pm.fProgressDialog.close();
- }
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/IDocumentRange.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/IDocumentRange.java
deleted file mode 100644
index a713fb44f..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/IDocumentRange.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.contentmergeviewer;
-
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.IDocument;
-
-
-/**
- * Defines a subrange in a document.
- * <p>
- * It is used by text viewers that can work on a subrange of a document. For example,
- * a text viewer for Java compilation units might use this to restrict the view
- * to a single method.
- * </p>
- * <p>
- * Clients may implement this interface.
- * </p>
- *
- * @see TextMergeViewer
- * @see org.eclipse.compare.structuremergeviewer.DocumentRangeNode
- */
-public interface IDocumentRange {
-
- public static final String RANGE_CATEGORY= "DocumentRangeCategory"; //$NON-NLS-1$
-
- /**
- * Returns the underlying document.
- *
- * @return the underlying document
- */
- IDocument getDocument();
-
- /**
- * Returns a position that specifies a subrange in the underlying document,
- * or <code>null</code> if this document range spans the whole underlying document.
- *
- * @return a position that specifies a subrange in the underlying document, or <code>null</code>
- */
- Position getRange();
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/IMergeViewerContentProvider.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/IMergeViewerContentProvider.java
deleted file mode 100644
index 2f75e9163..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/IMergeViewerContentProvider.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.contentmergeviewer;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.jface.viewers.IContentProvider;
-
-
-/**
- * A content provider that mediates between a <code>ContentMergeViewer</code>'s model
- * and the viewer itself.
- * <p>
- * Clients may implement this interface.
- * </p>
- *
- * @see ContentMergeViewer
- */
-public interface IMergeViewerContentProvider extends IContentProvider {
-
- //---- ancestor side
-
- /**
- * Returns the label for the ancestor side of a <code>ContentMergeViewer</code>.
- *
- * @param input the input object of the <code>ContentMergeViewer</code>
- * @return the label for the ancestor side of a <code>ContentMergeViewer</code>
- */
- String getAncestorLabel(Object input);
-
- /**
- * Returns an optional image for the ancestor side of a <code>ContentMergeViewer</code>.
- *
- * @param input the input object of the <code>ContentMergeViewer</code>
- * @return the image for the ancestor side of a <code>ContentMergeViewer</code>,
- * or <code>null</code> if none
- */
- Image getAncestorImage(Object input);
-
- /**
- * Returns the contents for the ancestor side of a <code>ContentMergeViewer</code>.
- * The interpretation of the returned object depends on the concrete <code>ContentMergeViewer</code>.
- *
- * @param input the input object of the <code>ContentMergeViewer</code>
- * @return the content for the ancestor side of a <code>ContentMergeViewer</code>,
- * or <code>null</code> if none
- */
- Object getAncestorContent(Object input);
-
- /**
- * Returns whether the ancestor side of the given input element should be shown.
- *
- * @return <code>true</code> if the ancestor side of the given input element should be shown
- */
- boolean showAncestor(Object input);
-
- //---- left side
-
- /**
- * Returns the label for the left side of a <code>ContentMergeViewer</code>.
- *
- * @param input the input object of the <code>ContentMergeViewer</code>
- * @return the label for the left side of a <code>ContentMergeViewer</code>
- */
- String getLeftLabel(Object input);
-
- /**
- * Returns an optional image for the left side of a <code>ContentMergeViewer</code>.
- *
- * @param input the input object of the <code>ContentMergeViewer</code>
- * @return the image for the left side of a <code>ContentMergeViewer</code>,
- * or <code>null</code> if none
- */
- Image getLeftImage(Object input);
-
- /**
- * Returns the contents for the left side of a <code>ContentMergeViewer</code>.
- * The interpretation of the returned object depends on the concrete <code>ContentMergeViewer</code>.
- *
- * @param input the input object of the <code>ContentMergeViewer</code>
- * @return the content for the left side of a <code>ContentMergeViewer</code>,
- * or <code>null</code> if none
- */
- Object getLeftContent(Object input);
-
- /**
- * Returns whether the left side is editable.
- *
- * @param input the input object of the <code>ContentMergeViewer</code>
- * @return <code>true</code> if the left side of a <code>ContentMergeViewer</code> is editable
- */
- boolean isLeftEditable(Object input);
-
- /**
- * Saves new contents for the left side of the <code>ContentMergeViewer</code>.
- *
- * @param input the input object of the <code>ContentMergeViewer</code>
- * @param bytes the new contents to save for the left side
- */
- void saveLeftContent(Object input, byte[] bytes);
-
- //---- right side
-
- /**
- * Returns the label for the right side of a <code>ContentMergeViewer</code>.
- *
- * @param input the input object of the <code>ContentMergeViewer</code>
- * @return the label for the right side of a <code>ContentMergeViewer</code>
- */
- String getRightLabel(Object input);
-
- /**
- * Returns an optional image for the right side of a <code>ContentMergeViewer</code>.
- *
- * @param input the input object of the <code>ContentMergeViewer</code>
- * @return the image for the right side of a <code>ContentMergeViewer</code>,
- * or <code>null</code> if none
- */
- Image getRightImage(Object input);
-
- /**
- * Returns the contents for the right side of a <code>ContentMergeViewer</code>.
- * The interpretation of the returned object depends on the concrete <code>ContentMergeViewer</code>.
- *
- * @param input the input object of the <code>ContentMergeViewer</code>
- * @return the content for the right side of a <code>ContentMergeViewer</code>,
- * or <code>null</code> if none
- */
- Object getRightContent(Object input);
-
- /**
- * Returns whether the right side is editable.
- *
- * @param input the input object of the <code>ContentMergeViewer</code>
- * @return <code>true</code> if the right side of a <code>ContentMergeViewer</code> is editable
- */
- boolean isRightEditable(Object input);
-
- /**
- * Saves new contents for the right side of the <code>ContentMergeViewer</code>.
- *
- * @param input the input object of the <code>ContentMergeViewer</code>
- * @param bytes the new contents to save for the right side
- */
- void saveRightContent(Object input, byte[] bytes);
-}
-
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ITokenComparator.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ITokenComparator.java
deleted file mode 100644
index 90358179d..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ITokenComparator.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.contentmergeviewer;
-
-import org.eclipse.compare.rangedifferencer.IRangeComparator;
-
-
-/**
- * For performing a so-called "token compare" on a line of text.
- * This interface extends the <code>IRangeComparator</code> interface
- * so that it can be used by the <code>TextMergeViewer</code>.
- * <p>
- * <code>TextMergeViewer</code> activates the token compare when navigating into
- * a range of differing lines. At first the lines are selected as a block.
- * When navigating into this block the token compare shows for every line
- * the differing token by selecting them.
- * <p>
- * <code>TextMergeViewer</code>'s default token comparator works on characters separated
- * by whitespace. If a different strategy is needed (for example, to use Java tokens in
- * a Java-aware merge viewer), clients may create their own token
- * comparators by implementing this interface (and overriding the
- * <code>TextMergeViewer.createTokenComparator</code> factory method).
- * </p>
- *
- * @see TextMergeViewer
- */
-public interface ITokenComparator extends IRangeComparator {
-
- /**
- * Returns the start character position of the token with the given index.
- * If the index is out of range (but not negative) the character position
- * behind the last character (the length of the input string) is returned.
- *
- * @param index index of the token for which to return the start position
- * @return the start position of the token with the given index
- * @throws java.lang.IndexOutOfBoundsException if index is negative
- */
- int getTokenStart(int index);
-
- /**
- * Returns the character length of the token with the given index.
- * If the index is out of range (but not negative) the value 0 is returned.
- *
- * @param index index of the token for which to return the start position
- * @return the character length of the token with the given index
- * @throws java.lang.IndexOutOfBoundsException if index is negative
- */
- int getTokenLength(int index);
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
deleted file mode 100644
index 56b46f456..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
+++ /dev/null
@@ -1,3537 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.contentmergeviewer;
-
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.ResourceBundle;
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.text.MessageFormat;
-
-import java.lang.reflect.InvocationTargetException;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.custom.*;
-
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.text.*;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.CoreException;
-
-import org.eclipse.ui.texteditor.IUpdate;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IWorkbenchActionConstants;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.internal.MergeSourceViewer;
-import org.eclipse.compare.internal.BufferedCanvas;
-import org.eclipse.compare.internal.Utilities;
-import org.eclipse.compare.internal.TokenComparator;
-import org.eclipse.compare.internal.ChangePropertyAction;
-import org.eclipse.compare.internal.CompareEditor;
-import org.eclipse.compare.internal.DocLineComparator;
-import org.eclipse.compare.internal.ComparePreferencePage;
-import org.eclipse.compare.internal.CompareUIPlugin;
-import org.eclipse.compare.internal.MergeViewerAction;
-import org.eclipse.compare.internal.INavigatable;
-import org.eclipse.compare.internal.CompareNavigator;
-import org.eclipse.compare.internal.TimeoutContext;
-import org.eclipse.compare.internal.DocumentManager;
-import org.eclipse.compare.internal.CompareMessages;
-import org.eclipse.compare.rangedifferencer.*;
-import org.eclipse.compare.structuremergeviewer.*;
-
-/**
- * A text merge viewer uses the <code>RangeDifferencer</code> to perform a
- * textual, line-by-line comparison of two (or three) input documents.
- * It is based on the <code>ContentMergeViewer</code> and uses <code>TextViewer</code>s
- * to implement the ancestor, left, and right content areas.
- * <p>
- * In the three-way compare case ranges of differing lines are highlighted and framed
- * with different colors to show whether the difference is an incoming, outgoing, or conflicting change.
- * The <code>TextMergeViewer</code> supports the notion of a current "differing range"
- * and provides toolbar buttons to navigate from one range to the next (or previous).
- * <p>
- * If there is a current "differing range" and the underlying document is editable
- * the <code>TextMergeViewer</code> enables actions in context menu and toolbar to
- * copy a range from one side to the other side, thereby performing a merge operation.
- * <p>
- * In addition to a line-by-line comparison the <code>TextMergeViewer</code>
- * uses a token based compare on differing lines.
- * The token compare is activated when navigating into
- * a range of differing lines. At first the lines are selected as a block.
- * When navigating into this block the token compare shows for every line
- * the differing token by selecting them.
- * <p>
- * The <code>TextMergeViewer</code>'s default token compare works on characters separated
- * by whitespace. If a different strategy is needed (for example, Java tokens in
- * a Java-aware merge viewer), clients can create their own token
- * comparators by implementing the <code>ITokenComparator</code> interface and overriding the
- * <code>TextMergeViewer.createTokenComparator</code> factory method).
- * <p>
- * Access to the <code>TextMergeViewer</code>'s model is by means of an
- * <code>IMergeViewerContentProvider</code>. Its <code>get<it>X</it></code>Content</code> methods must return
- * either an <code>IDocument</code>, an <code>IDocumentRange</code>, or an <code>IStreamContentAccessor</code>.
- * In the <code>IDocumentRange</code> case the <code>TextMergeViewer</code>
- * works on a subrange of a document. In the <code>IStreamContentAccessor</code> case
- * a document is created internally and initialized from the stream.
- * <p>
- * A <code>TextMergeViewer</code> can be used as is. However clients may subclass
- * to customize the behavior. For example a <code>MergeTextViewer</code> for Java would override
- * the <code>configureTextViewer</code> method to configure the <code>TextViewer</code> for Java source code,
- * the <code>createTokenComparator</code> method to create a Java specific tokenizer.
- *
- * @see org.eclipse.compare.rangedifferencer.RangeDifferencer
- * @see org.eclipse.jface.text.TextViewer
- * @see ITokenComparator
- * @see IDocumentRange
- * @see org.eclipse.compare.IStreamContentAccessor
- */
-public class TextMergeViewer extends ContentMergeViewer {
-
- private static final boolean DEBUG= false;
-
- private static final String[] GLOBAL_ACTIONS= {
- IWorkbenchActionConstants.UNDO,
- IWorkbenchActionConstants.REDO,
- IWorkbenchActionConstants.CUT,
- IWorkbenchActionConstants.COPY,
- IWorkbenchActionConstants.PASTE,
- IWorkbenchActionConstants.DELETE,
- IWorkbenchActionConstants.SELECT_ALL,
- IWorkbenchActionConstants.SAVE
- };
- private static final String[] TEXT_ACTIONS= {
- MergeSourceViewer.UNDO_ID,
- MergeSourceViewer.REDO_ID,
- MergeSourceViewer.CUT_ID,
- MergeSourceViewer.COPY_ID,
- MergeSourceViewer.PASTE_ID,
- MergeSourceViewer.DELETE_ID,
- MergeSourceViewer.SELECT_ALL_ID,
- MergeSourceViewer.SAVE_ID
- };
-
- private static final String SYNC_SCROLLING= "SYNC_SCROLLING"; //$NON-NLS-1$
-
- private static final String BUNDLE_NAME= "org.eclipse.compare.contentmergeviewer.TextMergeViewerResources"; //$NON-NLS-1$
-
- // constants
- /** Width of left and right vertical bar */
- private static final int MARGIN_WIDTH= 6;
- /** Width of center bar */
- private static final int CENTER_WIDTH= 34;
- /** Width of birds eye view */
- private static final int BIRDS_EYE_VIEW_WIDTH= 10;
- /** Width of birds eye view */
- private static final int BIRDS_EYE_VIEW_INSET= 1;
-
- /** line width of change borders */
- private static final int LW= 1;
- /** Provide more merge controls in CompareViewerPane toolbar */
- private static final boolean USE_MORE_CONTROLS= true;
- /** Selects between smartTokenDiff and mergingTokenDiff */
- private static final boolean USE_MERGING_TOKEN_DIFF= false;
- /** When calculating differences show Progress after this timeout (in milliseconds) */
- private static final int TIMEOUT= 2000;
-
- // determines whether a change between left and right is considered incoming or outgoing
- private boolean fLeftIsLocal;
- private boolean fShowCurrentOnly= false;
- private boolean fShowCurrentOnly2= false;
- private int fMarginWidth= MARGIN_WIDTH;
- private int fTopInset;
-
- // Colors
-
- private RGB fBackground;
- private RGB fForeground;
- private boolean fPollSystemForeground= true;
- private boolean fPollSystemBackground= true;
-
- private RGB SELECTED_INCOMING;
- private RGB INCOMING;
- private RGB INCOMING_FILL;
-
- private RGB SELECTED_CONFLICT;
- private RGB CONFLICT;
- private RGB CONFLICT_FILL;
-
- private RGB SELECTED_OUTGOING;
- private RGB OUTGOING;
- private RGB OUTGOING_FILL;
-
-
- private boolean fEndOfDocReached;
- private IDocumentListener fDocumentListener;
-
- private IPreferenceStore fPreferenceStore;
- private IPropertyChangeListener fPreferenceChangeListener;
-
- /** All diffs for calculating scrolling position (includes line ranges without changes) */
- private ArrayList fAllDiffs;
- /** Subset of above: just real differences. */
- private ArrayList fChangeDiffs;
- /** The current diff */
- private Diff fCurrentDiff;
-
- private HashMap fNewAncestorRanges= new HashMap();
- private HashMap fNewLeftRanges= new HashMap();
- private HashMap fNewRightRanges= new HashMap();
-
- private Object fAncestorInput;
- private Object fLeftInput;
- private Object fRightInput;
-
- private MergeSourceViewer fAncestor;
- private MergeSourceViewer fLeft;
- private MergeSourceViewer fRight;
-
- private int fLeftLineCount;
- private int fRightLineCount;
-
- private boolean fLeftContentsChanged;
- private boolean fRightContentsChanged;
-
- private boolean fInScrolling;
-
- private int fPts[]= new int[8]; // scratch area for polygon drawing
-
- private boolean fIgnoreAncestor= false;
- private ActionContributionItem fIgnoreAncestorItem;
- private boolean fHiglightRanges;
-
- private boolean fShowPseudoConflicts= false;
-
- private ActionContributionItem fNextItem; // goto next difference
- private ActionContributionItem fPreviousItem; // goto previous difference
- private ActionContributionItem fCopyDiffLeftToRightItem;
- private ActionContributionItem fCopyDiffRightToLeftItem;
-
- private boolean fSynchronizedScrolling= true;
- private boolean fShowMoreInfo= false;
-
- private MergeSourceViewer fFocusPart;
-
- private boolean fSubDoc= true;
- private IPositionUpdater fPositionUpdater;
- private boolean fIsMotif;
-
- // SWT widgets
- private BufferedCanvas fAncestorCanvas;
- private BufferedCanvas fLeftCanvas;
- private BufferedCanvas fRightCanvas;
- private Canvas fScrollCanvas;
- private ScrollBar fVScrollBar;
- private Canvas fBirdsEyeCanvas;
-
- // SWT resources to be disposed
- private Map fColors;
- private Font fFont;
- private Cursor fBirdsEyeCursor;
-
-
- /**
- * The position updater used to adapt the positions representing
- * the child document ranges to changes of the parent document.
- */
- class ChildPositionUpdater extends DefaultPositionUpdater {
-
- /**
- * Creates the position updated.
- */
- protected ChildPositionUpdater(String category) {
- super(category);
- }
-
- /**
- * Child document ranges cannot be deleted other then by calling
- * freeChildDocument.
- */
- protected boolean notDeleted() {
- return true;
- }
-
- /**
- * If an insertion happens at a child document's start offset, the
- * position is extended rather than shifted. Also, if something is added
- * right behind the end of the position, the position is extended rather
- * than kept stable.
- */
- protected void adaptToInsert() {
-
- if (fPosition == fLeft.getRegion() || fPosition == fRight.getRegion()) {
- int myStart= fPosition.offset;
- int myEnd= fPosition.offset + fPosition.length;
- myEnd= Math.max(myStart, myEnd);
-
- int yoursStart= fOffset;
- int yoursEnd= fOffset + fReplaceLength -1;
- yoursEnd= Math.max(yoursStart, yoursEnd);
-
- if (myEnd < yoursStart)
- return;
-
- if (myStart <= yoursStart)
- fPosition.length += fReplaceLength;
- else
- fPosition.offset += fReplaceLength;
- } else {
- super.adaptToInsert();
- }
- }
- }
-
- /**
- * A Diff represents synchronized character ranges in two or three Documents.
- * The MergeTextViewer uses Diffs to find differences in line and token ranges.
- */
- /* package */ class Diff {
- /** character range in ancestor document */
- Position fAncestorPos;
- /** character range in left document */
- Position fLeftPos;
- /** character range in right document */
- Position fRightPos;
- /** if this is a TokenDiff fParent points to the enclosing LineDiff */
- Diff fParent;
- /** if Diff has been resolved */
- boolean fResolved;
- int fDirection;
- boolean fIsToken= false;
- /** child token diffs */
- ArrayList fDiffs;
- boolean fIsWhitespace= false;
-
- /**
- * Create Diff from two ranges and an optional parent diff.
- */
- Diff(Diff parent, int dir, IDocument ancestorDoc, Position aRange, int ancestorStart, int ancestorEnd,
- IDocument leftDoc, Position lRange, int leftStart, int leftEnd,
- IDocument rightDoc, Position rRange, int rightStart, int rightEnd) {
- fParent= parent != null ? parent : this;
- fDirection= dir;
-
- fLeftPos= createPosition(leftDoc, lRange, leftStart, leftEnd);
- fRightPos= createPosition(rightDoc, rRange, rightStart, rightEnd);
- if (ancestorDoc != null)
- fAncestorPos= createPosition(ancestorDoc, aRange, ancestorStart, ancestorEnd);
- }
-
- Position getPosition(char type) {
- switch (type) {
- case 'A':
- return fAncestorPos;
- case 'L':
- return fLeftPos;
- case 'R':
- return fRightPos;
- }
- return null;
- }
-
- boolean isInRange(char type, int pos) {
- Position p= getPosition(type);
- return (pos >= p.offset) && (pos < (p.offset+p.length));
- }
-
- String changeType() {
- boolean leftEmpty= fLeftPos.length == 0;
- boolean rightEmpty= fRightPos.length == 0;
-
- if (fDirection == RangeDifference.LEFT) {
- if (!leftEmpty && rightEmpty)
- return CompareMessages.getString("TextMergeViewer.changeType.addition"); //$NON-NLS-1$
- if (leftEmpty && !rightEmpty)
- return CompareMessages.getString("TextMergeViewer.changeType.deletion"); //$NON-NLS-1$
- } else {
- if (leftEmpty && !rightEmpty)
- return CompareMessages.getString("TextMergeViewer.changeType.addition"); //$NON-NLS-1$
- if (!leftEmpty && rightEmpty)
- return CompareMessages.getString("TextMergeViewer.changeType.deletion"); //$NON-NLS-1$
- }
- return CompareMessages.getString("TextMergeViewer.changeType.change"); //$NON-NLS-1$
- }
-
- Image getImage() {
- int code= Differencer.CHANGE;
- switch (fDirection) {
- case RangeDifference.RIGHT:
- code+= Differencer.LEFT;
- break;
- case RangeDifference.LEFT:
- code+= Differencer.RIGHT;
- break;
- case RangeDifference.ANCESTOR:
- case RangeDifference.CONFLICT:
- code+= Differencer.CONFLICTING;
- break;
- }
- if (code != 0)
- return getCompareConfiguration().getImage(code);
- return null;
- }
-
- Position createPosition(IDocument doc, Position range, int start, int end) {
- try {
- int l= end-start;
- if (range != null) {
- int dl= range.length;
- if (l > dl)
- l= dl;
- } else {
- int dl= doc.getLength();
- if (start+l > dl)
- l= dl-start;
- }
-
- Position p= null;
- try {
- p= new Position(start, l);
- } catch (RuntimeException ex) {
- //System.out.println("Diff.createPosition: " + start + " " + l);
- }
-
- try {
- doc.addPosition(IDocumentRange.RANGE_CATEGORY, p);
- } catch (BadPositionCategoryException ex) {
- }
- return p;
- } catch (BadLocationException ee) {
- //System.out.println("Diff.createPosition: " + start + " " + end);
- }
- return null;
- }
-
- void add(Diff d) {
- if (fDiffs == null)
- fDiffs= new ArrayList();
- fDiffs.add(d);
- }
-
- boolean isDeleted() {
- if (fAncestorPos != null && fAncestorPos.isDeleted())
- return true;
- return fLeftPos.isDeleted() || fRightPos.isDeleted();
- }
-
- void setResolved(boolean r) {
- fResolved= r;
- if (r)
- fDiffs= null;
- }
-
- boolean isResolved() {
- if (!fResolved && fDiffs != null) {
- Iterator e= fDiffs.iterator();
- while (e.hasNext()) {
- Diff d= (Diff) e.next();
- if (!d.isResolved())
- return false;
- }
- return true;
- }
- return fResolved;
- }
-
- Position getPosition(MergeSourceViewer w) {
- if (w == fLeft)
- return fLeftPos;
- if (w == fRight)
- return fRightPos;
- if (w == fAncestor)
- return fAncestorPos;
- return null;
- }
-
- /**
- * Returns true if given character range overlaps with this Diff.
- */
- boolean contains(MergeSourceViewer w, int start, int end) {
- Position h= getPosition(w);
- if (h != null) {
- int offset= h.getOffset();
- if (start >= offset) {
- int endPos= offset+h.getLength();
- if (end < endPos)
- return true;
- if (endPos == w.getDocument().getLength())
- return true;
- }
- }
- return false;
- }
-
- int getMaxDiffHeight(boolean withAncestor) {
- Point region= new Point(0, 0);
- int h= fLeft.getLineRange(fLeftPos, region).y;
- if (withAncestor)
- h= Math.max(h, fAncestor.getLineRange(fAncestorPos, region).y);
- return Math.max(h, fRight.getLineRange(fRightPos, region).y);
- }
-
- int getAncestorHeight() {
- Point region= new Point(0, 0);
- return fAncestor.getLineRange(fAncestorPos, region).y;
- }
-
- int getLeftHeight() {
- Point region= new Point(0, 0);
- return fLeft.getLineRange(fLeftPos, region).y;
- }
-
- int getRightHeight() {
- Point region= new Point(0, 0);
- return fRight.getLineRange(fRightPos, region).y;
- }
- }
-
- //---- MergeTextViewer
-
- /**
- * Creates a text merge viewer under the given parent control.
- *
- * @param parent the parent control
- * @param configuration the configuration object
- */
- public TextMergeViewer(Composite parent, CompareConfiguration configuration) {
- this(parent, SWT.NULL, configuration);
- }
-
- /**
- * Creates a text merge viewer under the given parent control.
- *
- * @param parent the parent control
- * @param style SWT style bits for top level composite of this viewer
- * @param configuration the configuration object
- */
- public TextMergeViewer(Composite parent, int style, CompareConfiguration configuration) {
- super(style, ResourceBundle.getBundle(BUNDLE_NAME), configuration);
-
- String platform= SWT.getPlatform();
- fIsMotif= "motif".equals(platform); //$NON-NLS-1$
-
- if (fIsMotif)
- fMarginWidth= 0;
-
- fPreferenceStore= configuration.getPreferenceStore();
- if (fPreferenceStore != null) {
- fPreferenceChangeListener= new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- TextMergeViewer.this.propertyChange(event);
- }
- };
- fPreferenceStore.addPropertyChangeListener(fPreferenceChangeListener);
-
- Display display= parent.getDisplay();
- updateFont(fPreferenceStore, display);
- checkForColorUpdate(display);
-
- fLeftIsLocal= Utilities.getBoolean(configuration, "LEFT_IS_LOCAL", false); //$NON-NLS-1$
- fSynchronizedScrolling= fPreferenceStore.getBoolean(ComparePreferencePage.SYNCHRONIZE_SCROLLING);
- fShowMoreInfo= fPreferenceStore.getBoolean(ComparePreferencePage.SHOW_MORE_INFO);
- fShowPseudoConflicts= fPreferenceStore.getBoolean(ComparePreferencePage.SHOW_PSEUDO_CONFLICTS);
- }
-
- fDocumentListener= new IDocumentListener() {
-
- public void documentAboutToBeChanged(DocumentEvent e) {
- }
-
- public void documentChanged(DocumentEvent e) {
- TextMergeViewer.this.documentChanged(e);
- }
- };
-
- buildControl(parent);
-
- INavigatable nav= new INavigatable() {
- public boolean gotoDifference(boolean next) {
- return navigate(next, false, false);
- }
- };
- fComposite.setData(INavigatable.NAVIGATOR_PROPERTY, nav);
-
- fBirdsEyeCursor= new Cursor(parent.getDisplay(), SWT.CURSOR_HAND);
- }
-
- private void updateFont(IPreferenceStore ps, Display display) {
-
- Font oldFont= fFont;
-
- FontData fontData= null;
- if (ps.contains(ComparePreferencePage.TEXT_FONT)
- && !ps.isDefault(ComparePreferencePage.TEXT_FONT))
- fontData= PreferenceConverter.getFontData(ps, ComparePreferencePage.TEXT_FONT);
- else
- fontData= PreferenceConverter.getDefaultFontData(ps, ComparePreferencePage.TEXT_FONT);
- if (fontData != null) {
- fFont= new Font(display, fontData);
-
- if (fAncestor != null)
- fAncestor.setFont(fFont);
- if (fLeft != null)
- fLeft.setFont(fFont);
- if (fRight != null)
- fRight.setFont(fFont);
-
- if (oldFont != null)
- oldFont.dispose();
- }
- }
-
- private void checkForColorUpdate(Display display) {
- if (fPollSystemForeground) {
- RGB fg= display.getSystemColor(SWT.COLOR_LIST_FOREGROUND).getRGB();
- if (fForeground == null || !fg.equals(fForeground)) {
- fForeground= fg;
- updateColors(display);
- }
- }
- if (fPollSystemBackground) {
- RGB bg= display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).getRGB();
- if (fBackground == null || !bg.equals(fBackground)) {
- fBackground= bg;
- updateColors(display);
- }
- }
- }
-
- public void setBackgroundColor(RGB background) {
- fPollSystemBackground= (background == null);
- fBackground= background;
- updateColors(null);
- }
-
- private RGB getBackground(Display display) {
- if (fBackground != null)
- return fBackground;
- if (display == null)
- display= fComposite.getDisplay();
- return display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).getRGB();
- }
-
- public void setForegroundColor(RGB foreground) {
- fPollSystemForeground= (foreground == null);
- fForeground= foreground;
- updateColors(null);
- }
-
- private RGB getForeground(Display display) {
- if (fForeground != null)
- return fForeground;
- if (display == null)
- display= fComposite.getDisplay();
- return display.getSystemColor(SWT.COLOR_LIST_FOREGROUND).getRGB();
- }
-
- private void updateColors(Display display) {
-
- if (display == null)
- display= fComposite.getDisplay();
-
- Color color= null;
- if (fBackground != null)
- color= getColor(display, fBackground);
-
- if (fAncestor != null)
- fAncestor.setBackgroundColor(color);
- if (fLeft != null)
- fLeft.setBackgroundColor(color);
- if (fRight != null)
- fRight.setBackgroundColor(color);
-
- RGB bg= getBackground(display);
- SELECTED_INCOMING= new RGB(0, 0, 255);
- INCOMING= interpolate(SELECTED_INCOMING, bg, 0.6);
- INCOMING_FILL= interpolate(SELECTED_INCOMING, bg, 0.97);
-
- SELECTED_CONFLICT= new RGB(255, 0, 0);
- CONFLICT= interpolate(SELECTED_CONFLICT, bg, 0.6);
- CONFLICT_FILL= interpolate(SELECTED_CONFLICT, bg, 0.97);
-
- SELECTED_OUTGOING= getForeground(display);
- OUTGOING= interpolate(SELECTED_OUTGOING, bg, 0.6);
- OUTGOING_FILL= interpolate(SELECTED_OUTGOING, bg, 0.97);
-
- // invalidate color cache
- fColors= null;
-
- refreshBirdsEyeView();
- invalidateLines();
-
- updateAllDiffBackgrounds(display);
- }
-
- public void invalidateTextPresentation() {
- if (fAncestor != null)
- fAncestor.invalidateTextPresentation();
- if (fLeft != null)
- fLeft.invalidateTextPresentation();
- if (fRight != null)
- fRight.invalidateTextPresentation();
- }
-
- /**
- * Configures the passed text viewer.
- * This method is called after the three text viewers have been created for the
- * content areas.
- * The <code>TextMergeViewer</code> implementation of this method does nothing.
- * Subclasses may reimplement to provide a specific configuration for the text viewer.
- *
- * @param textViewer the text viewer to configure
- */
- protected void configureTextViewer(TextViewer textViewer) {
- }
-
- /**
- * Creates an <code>ITokenComparator</code> which is used to show the
- * intra line differences.
- * The <code>TextMergeViewer</code> implementation of this method returns a
- * tokenizer that breaks a line into words separated by whitespace.
- * Subclasses may reimplement to provide a specific tokenizer.
- *
- * @return a ITokenComparator which is used for a second level token compare.
- */
- protected ITokenComparator createTokenComparator(String s) {
- return new TokenComparator(s);
- }
-
- /**
- * Returns a document partitioner which is suitable for the underlying content type.
- * This method is only called if the input provided by the content provider is a
- * <code>IStreamContentAccessor</code> and an internal document must be created. This
- * document is initialized with the partitioner returned from this method.
- * <p>
- * The <code>TextMergeViewer</code> implementation of this method returns
- * <code>null</code>. Subclasses may reimplement to create a partitioner for a
- * specific content type.
- *
- * @return a document partitioner, or <code>null</code>
- */
- protected IDocumentPartitioner getDocumentPartitioner() {
- return null;
- }
-
- /**
- * Called on the viewer disposal.
- * Unregisters from the compare configuration.
- * Clients may extend if they have to do additional cleanup.
- */
- protected void handleDispose(DisposeEvent event) {
-
- Object input= getInput();
- DocumentManager.remove(getDocument2('A', input));
- DocumentManager.remove(getDocument2('L', input));
- DocumentManager.remove(getDocument2('R', input));
-
- if (DEBUG)
- DocumentManager.dump();
-
- if (fPreferenceChangeListener != null) {
- if (fPreferenceStore != null)
- fPreferenceStore.removePropertyChangeListener(fPreferenceChangeListener);
- fPreferenceChangeListener= null;
- }
-
- fLeftCanvas= null;
- fRightCanvas= null;
- fVScrollBar= null;
- fBirdsEyeCanvas= null;
-
- unsetDocument(fAncestor);
- unsetDocument(fLeft);
- unsetDocument(fRight);
-
- if (fColors != null) {
- Iterator i= fColors.values().iterator();
- while (i.hasNext()) {
- Color color= (Color) i.next();
- if (!color.isDisposed())
- color.dispose();
- }
- }
-
- if (fFont != null) {
- fFont.dispose();
- fFont= null;
- }
- if (fBirdsEyeCursor != null) {
- fBirdsEyeCursor.dispose();
- fBirdsEyeCursor= null;
- }
-
- super.handleDispose(event);
- }
-
- //-------------------------------------------------------------------------------------------------------------
- //--- internal ------------------------------------------------------------------------------------------------
- //-------------------------------------------------------------------------------------------------------------
-
- /**
- * Creates the specific SWT controls for the content areas.
- * Clients must not call or override this method.
- */
- protected void createControls(Composite composite) {
-
- // 1st row
- if (fMarginWidth > 0) {
- fAncestorCanvas= new BufferedCanvas(composite, SWT.NONE) {
- public void doPaint(GC gc) {
- paintSides(gc, fAncestor, fAncestorCanvas, false);
- }
- };
- }
-
- fAncestor= createPart(composite);
- fAncestor.setEditable(false);
-
- // 2nd row
- if (fMarginWidth > 0) {
- fLeftCanvas= new BufferedCanvas(composite, SWT.NONE) {
- public void doPaint(GC gc) {
- paintSides(gc, fLeft, fLeftCanvas, false);
- }
- };
- }
-
- fLeft= createPart(composite);
- fLeft.getTextWidget().getVerticalBar().setVisible(!fSynchronizedScrolling);
- fLeft.addAction(MergeSourceViewer.SAVE_ID, fLeftSaveAction);
-
- fRight= createPart(composite);
- fRight.getTextWidget().getVerticalBar().setVisible(!fSynchronizedScrolling);
- fRight.addAction(MergeSourceViewer.SAVE_ID, fRightSaveAction);
-
- if (fMarginWidth > 0) {
- fRightCanvas= new BufferedCanvas(composite, SWT.NONE) {
- public void doPaint(GC gc) {
- paintSides(gc, fRight, fRightCanvas, fSynchronizedScrolling);
- }
- };
- }
-
- fScrollCanvas= new Canvas(composite, SWT.V_SCROLL);
- Rectangle trim= fScrollCanvas.computeTrim(0, 0, 0, 0);
- fTopInset= trim.y;
-
- fVScrollBar= fScrollCanvas.getVerticalBar();
- fVScrollBar.setIncrement(1);
- fVScrollBar.setVisible(true);
- fVScrollBar.addListener(SWT.Selection,
- new Listener() {
- public void handleEvent(Event e) {
- int vpos= ((ScrollBar)e.widget).getSelection();
- scrollVertical(vpos, vpos, vpos, null);
- }
- }
- );
-
- fBirdsEyeCanvas= new BufferedCanvas(composite, SWT.NONE) {
- public void doPaint(GC gc) {
- paintBirdsEyeView(this, gc);
- }
- };
- fBirdsEyeCanvas.addMouseListener(
- new MouseAdapter() {
- public void mouseDown(MouseEvent e) {
- Diff diff= handlemouseInBirdsEyeView(fBirdsEyeCanvas, e.y);
- if (diff != null && diff.fDirection != Differencer.NO_CHANGE) {
- //fCurrentDiff= null;
- setCurrentDiff(diff, true);
- }
- }
- }
- );
- fBirdsEyeCanvas.addMouseMoveListener(
- new MouseMoveListener() {
-
- private Cursor fLastCursor;
-
- public void mouseMove(MouseEvent e) {
- Cursor cursor= null;
- Diff diff= handlemouseInBirdsEyeView(fBirdsEyeCanvas, e.y);
- if (diff != null && diff.fDirection != Differencer.NO_CHANGE)
- cursor= fBirdsEyeCursor;
- if (fLastCursor != cursor) {
- fBirdsEyeCanvas.setCursor(cursor);
- fLastCursor= cursor;
- }
- }
- }
- );
- }
-
- private Diff handlemouseInBirdsEyeView(Canvas canvas, int my) {
- int yy, hh;
-
- Point size= canvas.getSize();
-
- int virtualHeight= fSynchronizedScrolling ? getVirtualHeight() : getRightHeight();
- if (virtualHeight < getViewportHeight())
- return null;
-
- int y= 0;
- if (fAllDiffs != null) {
- Iterator e= fAllDiffs.iterator();
- for (int i= 0; e.hasNext(); i++) {
- Diff diff= (Diff) e.next();
- int h= fSynchronizedScrolling ? diff.getMaxDiffHeight(fShowAncestor)
- : diff.getRightHeight();
- if (useChange(diff.fDirection) && !diff.fIsWhitespace) {
-
- yy= (y*size.y)/virtualHeight;
- hh= (h*size.y)/virtualHeight;
- if (hh < 3)
- hh= 3;
-
- if (my >= yy && my < yy+hh)
- return diff;
- }
- y+= h;
- }
- }
- return null;
- }
-
- private void paintBirdsEyeView(Canvas canvas, GC gc) {
-
- Color c;
- Rectangle r= new Rectangle(0, 0, 0, 0);
- int yy, hh;
-
- Point size= canvas.getSize();
-
- int virtualHeight= fSynchronizedScrolling ? getVirtualHeight() : getRightHeight();
- if (virtualHeight < getViewportHeight())
- return;
-
- Display display= canvas.getDisplay();
- int y= 0;
- if (fAllDiffs != null) {
- Iterator e= fAllDiffs.iterator();
- for (int i= 0; e.hasNext(); i++) {
- Diff diff= (Diff) e.next();
- int h= fSynchronizedScrolling ? diff.getMaxDiffHeight(fShowAncestor)
- : diff.getRightHeight();
-
- if (useChange(diff.fDirection) && !diff.fIsWhitespace) {
- yy= (y*size.y)/virtualHeight;
- hh= (h*size.y)/virtualHeight;
- if (hh < 3)
- hh= 3;
-
- c= getColor(display, getFillColor(diff));
- if (c != null) {
- gc.setBackground(c);
- gc.fillRectangle(BIRDS_EYE_VIEW_INSET, yy, size.x-(2*BIRDS_EYE_VIEW_INSET),hh);
- }
- c= getColor(display, getStrokeColor(diff));
- if (c != null) {
- gc.setForeground(c);
- r.x= BIRDS_EYE_VIEW_INSET;
- r.y= yy;
- r.width= size.x-(2*BIRDS_EYE_VIEW_INSET)-1;
- r.height= hh;
- if (diff == fCurrentDiff ||
- (fCurrentDiff != null && diff == fCurrentDiff.fParent)) {
- gc.setLineWidth(2);
- r.x++;
- r.y++;
- r.width--;
- r.height--;
- } else {
- gc.setLineWidth(1);
- }
- gc.drawRectangle(r);
- }
- }
-
- y+= h;
- }
- }
- }
-
- private void refreshBirdsEyeView() {
- if (fBirdsEyeCanvas != null)
- fBirdsEyeCanvas.redraw();
- }
-
- /**
- * Called whenever setFocus() is called on the ContentViewer's top level SWT Composite.
- * This implementation sets the focus to the first enabled text widget.
- */
- /* package */ boolean internalSetFocus() {
- if (fFocusPart == null) {
- if (fLeft != null && fLeft.getEnabled()) {
- fFocusPart= fLeft;
- } else if (fRight != null && fRight.getEnabled()) {
- fFocusPart= fRight;
- } else if (fAncestor != null && fAncestor.getEnabled()) {
- fFocusPart= fAncestor;
- }
- }
- if (fFocusPart != null) {
- StyledText st= fFocusPart.getTextWidget();
- if (st != null)
- return st.setFocus();
- }
- return false; // could not set focus
- }
-
- /**
- * Creates the central Canvas.
- * Called from ContentMergeViewer.
- */
- /* package */ Control createCenter(Composite parent) {
- if (fSynchronizedScrolling) {
- final Canvas canvas= new BufferedCanvas(parent, SWT.NONE) {
- public void doPaint(GC gc) {
- paintCenter(this, gc);
- }
- };
- new Resizer(canvas, HORIZONTAL);
- return canvas;
- }
- return super.createCenter(parent);
- }
-
- /**
- * Returns width of central canvas.
- * Overridden from ContentMergeViewer.
- */
- /* package */ int getCenterWidth() {
- if (fSynchronizedScrolling)
- return CENTER_WIDTH;
- return super.getCenterWidth();
- }
-
- /**
- * Creates and initializes a text part.
- */
- private MergeSourceViewer createPart(Composite parent) {
-
- final MergeSourceViewer part= new MergeSourceViewer(parent, getResourceBundle());
- final StyledText te= part.getTextWidget();
-
- if (!fConfirmSave)
- part.hideSaveAction();
-
- te.addPaintListener(
- new PaintListener() {
- public void paintControl(PaintEvent e) {
- paint(e, part);
- }
- }
- );
- te.addKeyListener(
- new KeyAdapter() {
- public void keyPressed(KeyEvent e) {
- handleSelectionChanged(part);
- }
- }
- );
- te.addMouseListener(
- new MouseAdapter() {
- public void mouseDown(MouseEvent e) {
- //syncViewport(part);
- handleSelectionChanged(part);
- }
- }
- );
-
- te.addFocusListener(
- new FocusAdapter() {
- public void focusGained(FocusEvent fe) {
- fFocusPart= part;
- connectGlobalActions(fFocusPart);
- }
- public void focusLost(FocusEvent fe) {
- connectGlobalActions(null);
- }
- }
- );
-
- part.addViewportListener(
- new IViewportListener() {
- public void viewportChanged(int verticalPosition) {
- syncViewport(part);
- }
- }
- );
-
- if (fFont != null)
- te.setFont(fFont);
-
- if (fBackground != null) // not default
- te.setBackground(getColor(parent.getDisplay(), fBackground));
-
- configureTextViewer(part);
-
- return part;
- }
-
- private void connectGlobalActions(MergeSourceViewer part) {
- IActionBars actionBars= Utilities.findActionBars(fComposite);
- if (actionBars != null) {
- for (int i= 0; i < GLOBAL_ACTIONS.length; i++) {
- IAction action= null;
- if (part != null) {
- action= part.getAction(TEXT_ACTIONS[i]);
- if (action == null && TEXT_ACTIONS[i].equals(MergeSourceViewer.SAVE_ID)) {
- if (part == fLeft)
- action= fLeftSaveAction;
- else
- action= fRightSaveAction;
- }
- }
- actionBars.setGlobalActionHandler(GLOBAL_ACTIONS[i], action);
- }
- actionBars.updateActionBars();
- }
- }
-
- ITypedElement getLeg(char type, Object input) {
- if (input instanceof ICompareInput) {
- switch (type) {
- case 'A':
- return ((ICompareInput)input).getAncestor();
- case 'L':
- return ((ICompareInput)input).getLeft();
- case 'R':
- return ((ICompareInput)input).getRight();
- }
- }
- return null;
- }
-
- IDocument getDocument(char type, Object input) {
- ITypedElement te= getLeg(type, input);
- if (te instanceof IDocument)
- return (IDocument) te;
- if (te instanceof IDocumentRange)
- return ((IDocumentRange) te).getDocument();
- if (te instanceof IStreamContentAccessor)
- return DocumentManager.get(te);
- return null;
- }
-
- IDocument getDocument2(char type, Object input) {
- IDocument doc= getDocument(type, input);
- if (doc != null)
- return doc;
-
- if (input instanceof IDiffElement) {
- IDiffContainer parent= ((IDiffElement)input).getParent();
- return getDocument(type, parent);
- }
- return null;
- }
-
- /**
- * Returns true if the given inputs map to the same documents
- */
- boolean sameDoc(char type, Object newInput, Object oldInput) {
- IDocument newDoc= getDocument2(type, newInput);
- IDocument oldDoc= getDocument2(type, oldInput);
- return newDoc == oldDoc;
- }
-
- /**
- * Overridden to prevent save confirmation if new input is sub document of current input.
- */
- protected boolean doSave(Object newInput, Object oldInput) {
-
- if (oldInput != null && newInput != null) {
- // check whether underlying documents have changed.
- if (sameDoc('A', newInput, oldInput) &&
- sameDoc('L', newInput, oldInput) &&
- sameDoc('R', newInput, oldInput)) {
- if (DEBUG) System.out.println("----- Same docs !!!!"); //$NON-NLS-1$
- return false;
- }
- }
-
- if (DEBUG) System.out.println("***** New docs !!!!"); //$NON-NLS-1$
-
- IDocument aDoc= getDocument2('A', oldInput);
- DocumentManager.remove(aDoc);
- IDocument lDoc= getDocument2('L', oldInput);
- DocumentManager.remove(lDoc);
- IDocument rDoc= getDocument2('R', oldInput);
- DocumentManager.remove(rDoc);
-
- if (DEBUG)
- DocumentManager.dump();
-
- return super.doSave(newInput, oldInput);
- }
-
- private ITypedElement getParent(char type) {
- Object input= getInput();
- if (input instanceof IDiffElement) {
- IDiffContainer parent= ((IDiffElement)input).getParent();
- return getLeg(type, parent);
- }
- return null;
- }
-
- /**
- * Initializes the text viewers of the three content areas with the given input objects.
- * Subclasses may extend.
- */
- protected void updateContent(Object ancestor, Object left, Object right) {
-
- boolean emptyInput= (ancestor == null && left == null && right == null);
-
- int n= 0;
- if (left != null)
- n++;
- if (right != null)
- n++;
- fHiglightRanges= n > 1;
-
- // clear stuff
- fCurrentDiff= null;
- fChangeDiffs= null;
- fAllDiffs= null;
- fEndOfDocReached= false;
-
- fLeftContentsChanged= false;
- fRightContentsChanged= false;
-
- CompareConfiguration cc= getCompareConfiguration();
- IMergeViewerContentProvider cp= getMergeContentProvider();
-
- boolean rightEditable= cc.isRightEditable() && cp.isRightEditable(getInput());
- boolean leftEditable= cc.isLeftEditable() && cp.isLeftEditable(getInput());
-
- fRight.setEditable(rightEditable);
- fLeft.setEditable(leftEditable);
-
- // set new documents
- fLeftInput= left;
- setDocument(fLeft, 'L', left);
- fLeftLineCount= fLeft.getLineCount();
-
- fRightInput= right;
- setDocument(fRight, 'R', right);
- fRightLineCount= fRight.getLineCount();
-
- fAncestorInput= ancestor;
- setDocument(fAncestor, 'A', ancestor);
-
- doDiff();
-
- invalidateLines();
- updateVScrollBar();
- refreshBirdsEyeView();
-
- if (!emptyInput && !fComposite.isDisposed()) {
- // delay so that StyledText widget gets a chance to resize itself
- // (otherwise selectFirstDiff would not know its visible area)
- fComposite.getDisplay().asyncExec(
- new Runnable() {
- public void run() {
- selectFirstDiff();
- }
- }
- );
- }
- }
-
- private void updateDiffBackground(Diff diff) {
-
- if (! fHiglightRanges)
- return;
-
- if (diff == null || diff.fIsToken)
- return;
-
- if (fShowCurrentOnly && !isCurrentDiff(diff))
- return;
-
- Color c= getColor(null, getFillColor(diff));
- if (c == null)
- return;
-
- if (isThreeWay())
- fAncestor.setLineBackground(diff.fAncestorPos, c);
- fLeft.setLineBackground(diff.fLeftPos, c);
- fRight.setLineBackground(diff.fRightPos, c);
- }
-
- private void updateAllDiffBackgrounds(Display display) {
- if (fChangeDiffs != null) {
- boolean threeWay= isThreeWay();
- Iterator iter= fChangeDiffs.iterator();
- while (iter.hasNext()) {
- Diff diff= (Diff) iter.next();
- Color c= getColor(display, getFillColor(diff));
- if (threeWay)
- fAncestor.setLineBackground(diff.fAncestorPos, c);
- fLeft.setLineBackground(diff.fLeftPos, c);
- fRight.setLineBackground(diff.fRightPos, c);
- }
- }
- }
-
- boolean isCurrentDiff(Diff diff) {
- if (diff == null)
- return false;
- if (diff == fCurrentDiff)
- return true;
- if (fCurrentDiff != null && fCurrentDiff.fParent == diff)
- return true;
- return false;
- }
-
- /**
- * Called whenver one of the documents changes.
- * Sets the dirty state of this viewer and updates the lines.
- * Implements IDocumentListener.
- */
- private void documentChanged(DocumentEvent e) {
-
- IDocument doc= e.getDocument();
-
- if (doc == fLeft.getDocument()) {
- fLeftContentsChanged= true;
- setLeftDirty(true);
- } else if (doc == fRight.getDocument()) {
- setRightDirty(true);
- fRightContentsChanged= true;
- }
-
- updateLines(doc);
- }
-
- private static ITypedElement getLeg(ICompareInput input, char type) {
- switch (type) {
- case 'A':
- return input.getAncestor();
- case 'L':
- return input.getLeft();
- case 'R':
- return input.getRight();
- }
- return null;
- }
-
- protected int findInsertionPosition(char type, ICompareInput input) {
-
- ITypedElement other= null;
- char otherType= 0;
-
- switch (type) {
- case 'A':
- other= input.getLeft();
- otherType= 'L';
- if (other == null) {
- other= input.getRight();
- otherType= 'R';
- }
- break;
- case 'L':
- other= input.getRight();
- otherType= 'R';
- if (other == null) {
- other= input.getAncestor();
- otherType= 'A';
- }
- break;
- case 'R':
- other= input.getLeft();
- otherType= 'L';
- if (other == null) {
- other= input.getAncestor();
- otherType= 'A';
- }
- break;
- }
-
- if (other instanceof IDocumentRange) {
- IDocumentRange dr= (IDocumentRange) other;
- Position p= dr.getRange();
- Diff diff= findDiff(otherType, p.offset);
- if (diff != null) {
- switch (type) {
- case 'A':
- if (diff.fAncestorPos != null)
- return diff.fAncestorPos.offset;
- break;
- case 'L':
- if (diff.fLeftPos != null)
- return diff.fLeftPos.offset;
- break;
- case 'R':
- if (diff.fRightPos != null)
- return diff.fRightPos.offset;
- break;
- }
- }
- }
- return 0;
- }
-
- /**
- * Returns true if a new Document could be installed.
- */
- private boolean setDocument(MergeSourceViewer tp, char type, Object o) {
-
- if (tp == null)
- return false;
-
- IDocument newDoc= null;
- Position range= null;
-
- if (o instanceof IDocumentRange) {
- newDoc= ((IDocumentRange)o).getDocument();
- range= ((IDocumentRange)o).getRange();
-
- } else if (o instanceof IDocument) {
- newDoc= (IDocument) o;
-
- } else if (o instanceof IStreamContentAccessor) {
-
- newDoc= DocumentManager.get(o);
- if (newDoc == null) {
- IStreamContentAccessor sca= (IStreamContentAccessor) o;
- String s= null;
-
- try {
- s= Utilities.readString(sca.getContents());
- } catch (CoreException ex) {
- }
-
- newDoc= new Document(s != null ? s : ""); //$NON-NLS-1$
- DocumentManager.put(o, newDoc);
- IDocumentPartitioner partitioner= getDocumentPartitioner();
- if (partitioner != null) {
- newDoc.setDocumentPartitioner(partitioner);
- partitioner.connect(newDoc);
- }
- }
- } else if (o == null) { // deletion on one side
-
- ITypedElement parent= getParent(type); // we try to find an insertion position within the deletion's parent
-
- if (parent instanceof IDocumentRange) {
- newDoc= ((IDocumentRange)parent).getDocument();
- newDoc.addPositionCategory(IDocumentRange.RANGE_CATEGORY);
- Object input= getInput();
- range= getNewRange(type, input);
- if (range == null) {
- int pos= 0;
- if (input instanceof ICompareInput)
- pos= findInsertionPosition(type, (ICompareInput)input);
- range= new Position(pos, 0);
- try {
- newDoc.addPosition(IDocumentRange.RANGE_CATEGORY, range);
- } catch (BadPositionCategoryException ex) {
- if (DEBUG) System.out.println("BadPositionCategoryException: " + ex); //$NON-NLS-1$
- } catch (BadLocationException ex) {
- if (DEBUG) System.out.println("BadLocationException: " + ex); //$NON-NLS-1$
- }
- addNewRange(type, input, range);
- }
- } else if (parent instanceof IDocument) {
- newDoc= ((IDocumentRange)o).getDocument();
- }
- }
-
- boolean enabled= true;
- if (newDoc == null) {
- //System.out.println("setDocument: create new Document");
- newDoc= new Document(""); //$NON-NLS-1$
- enabled= false;
- }
-
- IDocument oldDoc= tp.getDocument();
-
- if (newDoc != oldDoc) {
-
- // got a new document
-
- unsetDocument(tp);
-
- if (newDoc != null) {
- newDoc.addPositionCategory(IDocumentRange.RANGE_CATEGORY);
- if (fPositionUpdater == null)
- fPositionUpdater= new ChildPositionUpdater(IDocumentRange.RANGE_CATEGORY);
- else
- newDoc.removePositionUpdater(fPositionUpdater);
- newDoc.addPositionUpdater(fPositionUpdater);
- }
-
- // install new document
- if (newDoc != null) {
-
- tp.setRegion(range);
- if (fSubDoc) {
- if (range != null) {
- IRegion r= normalizeDocumentRegion(newDoc, toRegion(range));
- tp.setDocument(newDoc, r.getOffset(), r.getLength());
- } else
- tp.setDocument(newDoc);
- } else
- tp.setDocument(newDoc);
-
- newDoc.addDocumentListener(fDocumentListener);
- }
-
- } else { // same document but different range
-
- tp.setRegion(range);
- if (fSubDoc) {
- if (range != null) {
- IRegion r= normalizeDocumentRegion(newDoc, toRegion(range));
- tp.setVisibleRegion(r.getOffset(), r.getLength());
- } else
- tp.resetVisibleRegion();
- } else
- tp.resetVisibleRegion();
- }
-
- tp.setEnabled(enabled);
-
- return enabled;
- }
-
- private Position getNewRange(char type, Object input) {
- switch (type) {
- case 'A':
- return (Position) fNewAncestorRanges.get(input);
- case 'L':
- return (Position) fNewLeftRanges.get(input);
- case 'R':
- return (Position) fNewRightRanges.get(input);
- }
- return null;
- }
-
- private void addNewRange(char type, Object input, Position range) {
- switch (type) {
- case 'A':
- fNewAncestorRanges.put(input, range);
- break;
- case 'L':
- fNewLeftRanges.put(input, range);
- break;
- case 'R':
- fNewRightRanges.put(input, range);
- break;
- }
- }
-
- private void unsetDocument(MergeSourceViewer tp) {
- IDocument oldDoc= tp.getDocument();
- if (oldDoc != null) {
- // deinstall old positions
- if (fPositionUpdater != null)
- oldDoc.removePositionUpdater(fPositionUpdater);
- try {
- oldDoc.removePositionCategory(IDocumentRange.RANGE_CATEGORY);
- } catch (BadPositionCategoryException ex) {
- }
-
- oldDoc.removeDocumentListener(fDocumentListener);
- }
- }
-
- /**
- * Returns the contents of the underlying document as an array of bytes.
- *
- * @param left if <code>true</code> the contents of the left side is returned; otherwise the right side
- * @return the contents of the left or right document or null
- */
- protected byte[] getContents(boolean left) {
- MergeSourceViewer v= left ? fLeft : fRight;
- if (v != null) {
- IDocument d= v.getDocument();
- if (d != null) {
- String contents= d.get();
- if (contents != null) {
- byte[] bytes;
- try {
- bytes= contents.getBytes(ResourcesPlugin.getEncoding());
- } catch(UnsupportedEncodingException ex) {
- // use default encoding
- bytes= contents.getBytes();
- }
- return bytes;
- }
- }
- }
- return null;
- }
-
- private IRegion normalizeDocumentRegion(IDocument doc, IRegion region) {
-
- if (region == null || doc == null)
- return region;
-
- int maxLength= doc.getLength();
-
- int start= region.getOffset();
- if (start < 0)
- start= 0;
- else if (start > maxLength)
- start= maxLength;
-
- int length= region.getLength();
- if (length < 0)
- length= 0;
- else if (start + length > maxLength)
- length= maxLength - start;
-
- return new Region(start, length);
- }
-
- protected final void handleResizeAncestor(int x, int y, int width, int height) {
- if (width > 0) {
- Rectangle trim= fLeft.getTextWidget().computeTrim(0, 0, 0, 0);
- int scrollbarHeight= trim.height;
- if (Utilities.okToUse(fAncestorCanvas))
- fAncestorCanvas.setVisible(true);
- if (fAncestor.isControlOkToUse())
- fAncestor.getTextWidget().setVisible(true);
-
- if (fAncestorCanvas != null) {
- fAncestorCanvas.setBounds(x, y, fMarginWidth, height-scrollbarHeight);
- x+= fMarginWidth;
- width-= fMarginWidth;
- }
- fAncestor.getTextWidget().setBounds(x, y, width, height);
- } else {
- if (Utilities.okToUse(fAncestorCanvas))
- fAncestorCanvas.setVisible(false);
- if (fAncestor.isControlOkToUse()) {
- StyledText t= fAncestor.getTextWidget();
- t.setVisible(false);
- t.setBounds(0, 0, 0, 0);
- if (fFocusPart == fAncestor) {
- fFocusPart= fLeft;
- fFocusPart.getTextWidget().setFocus();
- }
- }
- }
- }
-
- /**
- * Lays out everything.
- */
- protected final void handleResizeLeftRight(int x, int y, int width1, int centerWidth, int width2, int height) {
-
- if (fBirdsEyeCanvas != null)
- width2-= BIRDS_EYE_VIEW_WIDTH;
-
- Rectangle trim= fLeft.getTextWidget().computeTrim(0, 0, 0, 0);
- int scrollbarHeight= trim.height;
- Composite composite= (Composite) getControl();
-
- int leftTextWidth= width1;
- if (fLeftCanvas != null) {
- fLeftCanvas.setBounds(x, y, fMarginWidth, height-scrollbarHeight);
- x+= fMarginWidth;
- leftTextWidth-= fMarginWidth;
- }
-
- fLeft.getTextWidget().setBounds(x, y, leftTextWidth, height);
- x+= leftTextWidth;
-
- if (fCenter == null || fCenter.isDisposed())
- fCenter= createCenter(composite);
- fCenter.setBounds(x, y, centerWidth, height-scrollbarHeight);
- x+= centerWidth;
-
- if (!fSynchronizedScrolling) { // canvas is to the left of text
- if (fRightCanvas != null) {
- fRightCanvas.setBounds(x, y, fMarginWidth, height-scrollbarHeight);
- fRightCanvas.redraw();
- x+= fMarginWidth;
- }
- // we draw the canvas to the left of the text widget
- }
-
- int scrollbarWidth= 0;
- if (fSynchronizedScrolling && fScrollCanvas != null)
- scrollbarWidth= fScrollCanvas.computeTrim(0, 0, 0, 0).width;
- int rightTextWidth= width2-scrollbarWidth;
- if (fRightCanvas != null)
- rightTextWidth-= fMarginWidth;
- fRight.getTextWidget().setBounds(x, y, rightTextWidth, height);
- x+= rightTextWidth;
-
- if (fSynchronizedScrolling) {
- if (fRightCanvas != null) { // canvas is to the right of the text
- fRightCanvas.setBounds(x, y, fMarginWidth, height-scrollbarHeight);
- x+= fMarginWidth;
- }
- if (fScrollCanvas != null)
- fScrollCanvas.setBounds(x, y, scrollbarWidth, height-scrollbarHeight);
- }
-
- if (fBirdsEyeCanvas != null) {
- y+= scrollbarHeight;
- fBirdsEyeCanvas.setBounds(x+scrollbarWidth, y, BIRDS_EYE_VIEW_WIDTH, height-(3*scrollbarHeight));
- }
-
- // doesn't work since TextEditors don't have their correct size yet.
- updateVScrollBar();
- refreshBirdsEyeView();
- }
-
- /**
- * Track selection changes to update the current Diff.
- */
- private void handleSelectionChanged(MergeSourceViewer tw) {
- Point p= tw.getSelectedRange();
- Diff d= findDiff(tw, p.x, p.x+p.y);
- updateStatus(d);
- setCurrentDiff(d, false); // don't select or reveal
- }
-
- private static IRegion toRegion(Position position) {
- if (position != null)
- return new Region(position.getOffset(), position.getLength());
- return null;
- }
-
- //---- the differencing
-
- private static int maxWork(IRangeComparator a, IRangeComparator l, IRangeComparator r) {
- int ln= l.getRangeCount();
- int rn= r.getRangeCount();
- if (a != null) {
- int an= a.getRangeCount();
- return (2 * Math.max(an, ln)) + (2 * Math.max(an, rn));
- }
- return 2 * Math.max(ln, rn);
- }
-
- /**
- * Perform a two level 2- or 3-way diff.
- * The first level is based on line comparison, the second level on token comparison.
- */
- private void doDiff() {
-
- fAllDiffs= new ArrayList();
- fChangeDiffs= new ArrayList();
- fCurrentDiff= null;
-
- IDocument aDoc= null;
- IDocument lDoc= fLeft.getDocument();
- IDocument rDoc= fRight.getDocument();
- if (lDoc == null || rDoc == null)
- return;
-
- Position aRegion= null;
- Position lRegion= fLeft.getRegion();
- Position rRegion= fRight.getRegion();
-
- boolean threeWay= isThreeWay();
-
- if (threeWay && !fIgnoreAncestor) {
- aDoc= fAncestor.getDocument();
- aRegion= fAncestor.getRegion();
- }
-
- fAncestor.resetLineBackground();
- fLeft.resetLineBackground();
- fRight.resetLineBackground();
-
- boolean ignoreWhiteSpace= Utilities.getBoolean(getCompareConfiguration(), CompareConfiguration.IGNORE_WHITESPACE, false);
-
- DocLineComparator sright= new DocLineComparator(rDoc, toRegion(rRegion), ignoreWhiteSpace);
- DocLineComparator sleft= new DocLineComparator(lDoc, toRegion(lRegion), ignoreWhiteSpace);
- DocLineComparator sancestor= null;
- if (aDoc != null)
- sancestor= new DocLineComparator(aDoc, toRegion(aRegion), ignoreWhiteSpace);
-
- if (!fSubDoc && rRegion != null && lRegion != null) {
- // we have to add a diff for the ignored lines
-
- int astart= 0;
- int as= 0;
- if (aRegion != null) {
- astart= aRegion.getOffset();
- as= Math.max(0, astart-1);
- }
- int ys= Math.max(0, lRegion.getOffset()-1);
- int ms= Math.max(0, rRegion.getOffset()-1);
-
- if (as > 0 || ys > 0 || ms > 0) {
- Diff diff= new Diff(null, RangeDifference.NOCHANGE,
- aDoc, aRegion, 0, astart,
- lDoc, lRegion, 0, lRegion.getOffset(),
- rDoc, rRegion, 0, rRegion.getOffset());
- fAllDiffs.add(diff);
- }
- }
-
- final ResourceBundle bundle= getResourceBundle();
-
- final Object[] result= new Object[1];
- final DocLineComparator sa= sancestor, sl= sleft, sr= sright;
- IRunnableWithProgress runnable= new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- String progressTitle= Utilities.getString(bundle, "compareProgressTask.title"); //$NON-NLS-1$
- monitor.beginTask(progressTitle, maxWork(sa, sl, sr));
- try {
- result[0]= RangeDifferencer.findRanges(monitor, sa, sl, sr);
- } catch (OutOfMemoryError ex) {
- System.gc();
- throw new InvocationTargetException(ex);
- }
- if (monitor.isCanceled()) { // cancelled
- throw new InterruptedException();
- }
- monitor.done();
- }
- };
-
- RangeDifference[] e= null;
- try {
- TimeoutContext.run(true, TIMEOUT, getControl().getShell(), runnable);
- e= (RangeDifference[]) result[0];
- } catch (InvocationTargetException ex) {
- String title= Utilities.getString(bundle, "tooComplexError.title"); //$NON-NLS-1$
- String format= Utilities.getString(bundle, "tooComplexError.format"); //$NON-NLS-1$
- String msg= MessageFormat.format(format, new Object[] { Integer.toString(TIMEOUT/1000) } );
- MessageDialog.openError(fComposite.getShell(), title, msg);
- e= null;
- } catch (InterruptedException ex) {
- //
- }
-
- if (e == null) {
- // we create a NOCHANGE range for the whole document
- Diff diff= new Diff(null, RangeDifference.NOCHANGE,
- aDoc, aRegion, 0, aDoc != null ? aDoc.getLength() : 0,
- lDoc, lRegion, 0, lDoc.getLength(),
- rDoc, rRegion, 0, rDoc.getLength());
-
- fAllDiffs.add(diff);
- } else {
- for (int i= 0; i < e.length; i++) {
- String a= null, s= null, d= null;
- RangeDifference es= e[i];
-
- int kind= es.kind();
-
- int ancestorStart= 0;
- int ancestorEnd= 0;
- if (sancestor != null) {
- ancestorStart= sancestor.getTokenStart(es.ancestorStart());
- ancestorEnd= getTokenEnd2(sancestor, es.ancestorStart(), es.ancestorLength());
- }
-
- int leftStart= sleft.getTokenStart(es.leftStart());
- int leftEnd= getTokenEnd2(sleft, es.leftStart(), es.leftLength());
-
- int rightStart= sright.getTokenStart(es.rightStart());
- int rightEnd= getTokenEnd2(sright, es.rightStart(), es.rightLength());
-
- Diff diff= new Diff(null, kind,
- aDoc, aRegion, ancestorStart, ancestorEnd,
- lDoc, lRegion, leftStart, leftEnd,
- rDoc, rRegion, rightStart, rightEnd);
-
- fAllDiffs.add(diff); // remember all range diffs for scrolling
-
- if (ignoreWhiteSpace) {
- if (sancestor != null)
- a= extract2(aDoc, sancestor, es.ancestorStart(), es.ancestorLength());
- s= extract2(lDoc, sleft, es.leftStart(), es.leftLength());
- d= extract2(rDoc, sright, es.rightStart(), es.rightLength());
-
- if ((a == null || a.trim().length() == 0) && s.trim().length() == 0 && d.trim().length() == 0) {
- diff.fIsWhitespace= true;
- continue;
- }
- }
-
- if (useChange(kind)) {
- fChangeDiffs.add(diff); // here we remember only the real diffs
- updateDiffBackground(diff);
-
- if (s == null)
- s= extract2(lDoc, sleft, es.leftStart(), es.leftLength());
- if (d == null)
- d= extract2(rDoc, sright, es.rightStart(), es.rightLength());
-
- if (s.length() > 0 && d.length() > 0) {
- if (a == null && sancestor != null)
- a= extract2(aDoc, sancestor, es.ancestorStart(), es.ancestorLength());
- if (USE_MERGING_TOKEN_DIFF)
- mergingTokenDiff(diff, aDoc, a, rDoc, d, lDoc, s);
- else
- simpleTokenDiff(diff, aDoc, a, rDoc, d, lDoc, s);
- }
- }
- }
- }
-
- if (!fSubDoc && rRegion != null && lRegion != null) {
- // we have to add a diff for the ignored lines
-
- int aEnd= 0;
- int aLen= 0;
- if (aRegion != null && aDoc != null) {
- aEnd= aRegion.getOffset()+aRegion.getLength();
- aLen= aDoc.getLength();
- }
- Diff diff= new Diff(null, RangeDifference.NOCHANGE,
- aDoc, aRegion, aEnd, aLen,
- lDoc, lRegion, lRegion.getOffset()+lRegion.getLength(), lDoc.getLength(),
- rDoc, rRegion, rRegion.getOffset()+rRegion.getLength(), rDoc.getLength());
- fAllDiffs.add(diff);
- }
- }
-
- private Diff findDiff(char type, int pos) {
-
- IDocument aDoc= null;
- IDocument lDoc= fLeft.getDocument();
- IDocument rDoc= fRight.getDocument();
- if (lDoc == null || rDoc == null)
- return null;
-
- Position aRegion= null;
- Position lRegion= null;
- Position rRegion= null;
-
- boolean threeWay= isThreeWay();
-
- if (threeWay && !fIgnoreAncestor)
- aDoc= fAncestor.getDocument();
-
- boolean ignoreWhiteSpace= Utilities.getBoolean(getCompareConfiguration(), CompareConfiguration.IGNORE_WHITESPACE, false);
-
- DocLineComparator sright= new DocLineComparator(rDoc, toRegion(rRegion), ignoreWhiteSpace);
- DocLineComparator sleft= new DocLineComparator(lDoc, toRegion(lRegion), ignoreWhiteSpace);
- DocLineComparator sancestor= null;
- if (aDoc != null)
- sancestor= new DocLineComparator(aDoc, toRegion(aRegion), ignoreWhiteSpace);
-
- final ResourceBundle bundle= getResourceBundle();
-
- final Object[] result= new Object[1];
- final DocLineComparator sa= sancestor, sl= sleft, sr= sright;
- IRunnableWithProgress runnable= new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- String progressTitle= Utilities.getString(bundle, "compareProgressTask.title"); //$NON-NLS-1$
- monitor.beginTask(progressTitle, maxWork(sa, sl, sr));
- try {
- result[0]= RangeDifferencer.findRanges(monitor, sa, sl, sr);
- } catch (OutOfMemoryError ex) {
- System.gc();
- throw new InvocationTargetException(ex);
- }
- if (monitor.isCanceled()) { // cancelled
- throw new InterruptedException();
- }
- monitor.done();
- }
- };
-
- RangeDifference[] e= null;
- try {
- TimeoutContext.run(true, TIMEOUT, getControl().getShell(), runnable);
- e= (RangeDifference[]) result[0];
- } catch (InvocationTargetException ex) {
- String title= Utilities.getString(bundle, "tooComplexError.title"); //$NON-NLS-1$
- String format= Utilities.getString(bundle, "tooComplexError.format"); //$NON-NLS-1$
- String msg= MessageFormat.format(format, new Object[] { Integer.toString(TIMEOUT/1000) } );
- MessageDialog.openError(fComposite.getShell(), title, msg);
- e= null;
- } catch (InterruptedException ex) {
- //
- }
-
- if (e != null) {
- for (int i= 0; i < e.length; i++) {
- RangeDifference es= e[i];
-
- int kind= es.kind();
-
- int ancestorStart= 0;
- int ancestorEnd= 0;
- if (sancestor != null) {
- ancestorStart= sancestor.getTokenStart(es.ancestorStart());
- ancestorEnd= getTokenEnd2(sancestor, es.ancestorStart(), es.ancestorLength());
- }
-
- int leftStart= sleft.getTokenStart(es.leftStart());
- int leftEnd= getTokenEnd2(sleft, es.leftStart(), es.leftLength());
-
- int rightStart= sright.getTokenStart(es.rightStart());
- int rightEnd= getTokenEnd2(sright, es.rightStart(), es.rightLength());
-
- Diff diff= new Diff(null, kind,
- aDoc, aRegion, ancestorStart, ancestorEnd,
- lDoc, lRegion, leftStart, leftEnd,
- rDoc, rRegion, rightStart, rightEnd);
-
- if (diff.isInRange(type, pos))
- return diff;
- }
- }
-
- return null;
- }
-
- /**
- * Returns true if kind of change should be shown.
- */
- private boolean useChange(int kind) {
- if (kind == RangeDifference.NOCHANGE)
- return false;
- if (kind == RangeDifference.ANCESTOR)
- return fShowPseudoConflicts;
- return true;
- }
-
- private int getTokenEnd(ITokenComparator tc, int start, int count) {
- if (count <= 0)
- return tc.getTokenStart(start);
- int index= start + count - 1;
- return tc.getTokenStart(index) + tc.getTokenLength(index);
- }
-
- private static int getTokenEnd2(ITokenComparator tc, int start, int length) {
- return tc.getTokenStart(start + length);
- }
-
- /**
- * Returns the content of lines in the specified range as a String.
- * This includes the line separators.
- *
- * @param doc the document from which to extract the characters
- * @param start index of first line
- * @param length number of lines
- * @return the contents of the specified line range as a String
- */
- private String extract2(IDocument doc, ITokenComparator tc, int start, int length) {
- int count= tc.getRangeCount();
- if (length > 0 && count > 0) {
-
-//
-// int startPos= tc.getTokenStart(start);
-// int endPos= startPos;
-//
-// if (length > 1)
-// endPos= tc.getTokenStart(start + (length-1));
-// endPos+= tc.getTokenLength(start + (length-1));
-//
-
- int startPos= tc.getTokenStart(start);
- int endPos;
-
- if (length == 1) {
- endPos= startPos + tc.getTokenLength(start);
- } else {
- endPos= tc.getTokenStart(start + length);
- }
-
- try {
- return doc.get(startPos, endPos - startPos);
- } catch (BadLocationException e) {
- }
-
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Performs a token based 3-way diff on the character range specified by the given baseDiff.
- */
- private void simpleTokenDiff(final Diff baseDiff,
- IDocument ancestorDoc, String a,
- IDocument rightDoc, String d,
- IDocument leftDoc, String s) {
-
- int ancestorStart= 0;
- ITokenComparator sa= null;
- if (ancestorDoc != null) {
- ancestorStart= baseDiff.fAncestorPos.getOffset();
- sa= createTokenComparator(a);
- }
-
- int rightStart= baseDiff.fRightPos.getOffset();
- ITokenComparator sm= createTokenComparator(d);
-
- int leftStart= baseDiff.fLeftPos.getOffset();
- ITokenComparator sy= createTokenComparator(s);
-
- RangeDifference[] e= RangeDifferencer.findRanges(sa, sy, sm);
- for (int i= 0; i < e.length; i++) {
- RangeDifference es= e[i];
- int kind= es.kind();
- if (kind != RangeDifference.NOCHANGE) {
-
- int ancestorStart2= ancestorStart;
- int ancestorEnd2= ancestorStart;
- if (ancestorDoc != null) {
- ancestorStart2 += sa.getTokenStart(es.ancestorStart());
- ancestorEnd2 += getTokenEnd(sa, es.ancestorStart(), es.ancestorLength());
- }
-
- int leftStart2= leftStart + sy.getTokenStart(es.leftStart());
- int leftEnd2= leftStart + getTokenEnd(sy, es.leftStart(), es.leftLength());
-
- int rightStart2= rightStart + sm.getTokenStart(es.rightStart());
- int rightEnd2= rightStart + getTokenEnd(sm, es.rightStart(), es.rightLength());
-
- Diff diff= new Diff(baseDiff, kind,
- ancestorDoc, null, ancestorStart2, ancestorEnd2,
- leftDoc, null, leftStart2, leftEnd2,
- rightDoc, null, rightStart2, rightEnd2);
-
- // ensure that token diff is smaller than basediff
- int leftS= baseDiff.fLeftPos.offset;
- int leftE= baseDiff.fLeftPos.offset+baseDiff.fLeftPos.length;
- int rightS= baseDiff.fRightPos.offset;
- int rightE= baseDiff.fRightPos.offset+baseDiff.fRightPos.length;
- if (leftS != leftStart2 || leftE != leftEnd2 ||
- rightS != rightStart2 || rightE != rightEnd2) {
- diff.fIsToken= true;
- // add to base Diff
- baseDiff.add(diff);
- }
- }
- }
- }
-
- /**
- * Performs a "smart" token based 3-way diff on the character range specified by the given baseDiff.
- * It is "smart" because it tries to minimize the number of token diffs by merging them.
- */
- private void mergingTokenDiff(Diff baseDiff,
- IDocument ancestorDoc, String a,
- IDocument rightDoc, String d,
- IDocument leftDoc, String s) {
- ITokenComparator sa= null;
- int ancestorStart= 0;
- if (ancestorDoc != null) {
- sa= createTokenComparator(a);
- ancestorStart= baseDiff.fAncestorPos.getOffset();
- }
-
- int rightStart= baseDiff.fRightPos.getOffset();
- ITokenComparator sm= createTokenComparator(d);
-
- int leftStart= baseDiff.fLeftPos.getOffset();
- ITokenComparator sy= createTokenComparator(s);
-
- RangeDifference[] r= RangeDifferencer.findRanges(sa, sy, sm);
- for (int i= 0; i < r.length; i++) {
- RangeDifference es= r[i];
- // determine range of diffs in one line
- int start= i;
- int leftLine= -1;
- int rightLine= -1;
- try {
- leftLine= leftDoc.getLineOfOffset(leftStart+sy.getTokenStart(es.leftStart()));
- rightLine= rightDoc.getLineOfOffset(rightStart+sm.getTokenStart(es.rightStart()));
- } catch (BadLocationException e) {
- }
- i++;
- for (; i < r.length; i++) {
- es= r[i];
- try {
- if (leftLine != leftDoc.getLineOfOffset(leftStart+sy.getTokenStart(es.leftStart())))
- break;
- if (rightLine != rightDoc.getLineOfOffset(rightStart+sm.getTokenStart(es.rightStart())))
- break;
- } catch (BadLocationException e) {
- }
- }
- int end= i;
-
- // find first diff from left
- RangeDifference first= null;
- for (int ii= start; ii < end; ii++) {
- es= r[ii];
- if (useChange(es.kind())) {
- first= es;
- break;
- }
- }
-
- // find first diff from mine
- RangeDifference last= null;
- for (int ii= end-1; ii >= start; ii--) {
- es= r[ii];
- if (useChange(es.kind())) {
- last= es;
- break;
- }
- }
-
- if (first != null && last != null) {
-
- int ancestorStart2= 0;
- int ancestorEnd2= 0;
- if (ancestorDoc != null) {
- ancestorStart2= ancestorStart+sa.getTokenStart(first.ancestorStart());
- ancestorEnd2= ancestorStart+getTokenEnd(sa, last.ancestorStart(), last.ancestorLength());
- }
-
- int leftStart2= leftStart+sy.getTokenStart(first.leftStart());
- int leftEnd2= leftStart+getTokenEnd(sy, last.leftStart(), last.leftLength());
-
- int rightStart2= rightStart+sm.getTokenStart(first.rightStart());
- int rightEnd2= rightStart+getTokenEnd(sm, last.rightStart(), last.rightLength());
- Diff diff= new Diff(baseDiff, first.kind(),
- ancestorDoc, null, ancestorStart2, ancestorEnd2+1,
- leftDoc, null, leftStart2, leftEnd2+1,
- rightDoc, null, rightStart2, rightEnd2+1);
- diff.fIsToken= true;
- baseDiff.add(diff);
- }
- }
- }
-
- //---- update UI stuff
-
- private void updateControls() {
-
- boolean leftToRight= false;
- boolean rightToLeft= false;
-
- updateStatus(fCurrentDiff);
-
- if (fCurrentDiff != null) {
- IMergeViewerContentProvider cp= getMergeContentProvider();
- if (cp != null) {
- rightToLeft= cp.isLeftEditable(getInput());
- leftToRight= cp.isRightEditable(getInput());
- }
- }
-
- if (fDirectionLabel != null) {
- if (fHiglightRanges && fCurrentDiff != null && isThreeWay() && !fIgnoreAncestor) {
- fDirectionLabel.setImage(fCurrentDiff.getImage());
- } else {
- fDirectionLabel.setImage(null);
- }
- }
-
- if (fCopyDiffLeftToRightItem != null)
- ((Action)fCopyDiffLeftToRightItem.getAction()).setEnabled(leftToRight);
- if (fCopyDiffRightToLeftItem != null)
- ((Action)fCopyDiffRightToLeftItem.getAction()).setEnabled(rightToLeft);
-
- boolean enableNavigation= false;
- if (fCurrentDiff == null && fChangeDiffs != null && fChangeDiffs.size() > 0)
- enableNavigation= true;
- else if (fChangeDiffs != null && fChangeDiffs.size() > 1)
- enableNavigation= true;
- else if (fCurrentDiff != null && fCurrentDiff.fDiffs != null)
- enableNavigation= true;
- else if (fCurrentDiff != null && fCurrentDiff.fIsToken)
- enableNavigation= true;
-
- if (fNextItem != null) {
- IAction a= fNextItem.getAction();
- a.setEnabled(enableNavigation);
- }
- if (fPreviousItem != null) {
- IAction a= fPreviousItem.getAction();
- a.setEnabled(enableNavigation);
- }
- }
-
- private void updateStatus(Diff diff) {
-
- if (! fShowMoreInfo)
- return;
-
- IActionBars bars= Utilities.findActionBars(fComposite);
- if (bars == null)
- return;
- IStatusLineManager slm= bars.getStatusLineManager();
- if (slm == null)
- return;
-
- String diffDescription;
-
- if (diff == null) {
- diffDescription= CompareMessages.getString("TextMergeViewer.diffDescription.noDiff.format"); //$NON-NLS-1$
- } else {
-
- if (diff.fIsToken) // we don't show special info for token diffs
- diff= diff.fParent;
-
- String format= CompareMessages.getString("TextMergeViewer.diffDescription.diff.format"); //$NON-NLS-1$
- diffDescription= MessageFormat.format(format,
- new String[] {
- getDiffType(diff), // 0: diff type
- getDiffNumber(diff), // 1: diff number
- getDiffRange(fLeft, diff.fLeftPos), // 2: left start line
- getDiffRange(fRight, diff.fRightPos) // 3: left end line
- }
- );
- }
-
- String format= CompareMessages.getString("TextMergeViewer.statusLine.format"); //$NON-NLS-1$
- String s= MessageFormat.format(format,
- new String[] {
- getCursorPosition(fLeft), // 0: left column
- getCursorPosition(fRight), // 1: right column
- diffDescription // 2: diff description
- }
- );
-
- slm.setMessage(s);
- }
-
- private void clearStatus() {
-
- IActionBars bars= Utilities.findActionBars(fComposite);
- if (bars == null)
- return;
- IStatusLineManager slm= bars.getStatusLineManager();
- if (slm == null)
- return;
-
- slm.setMessage(null);
- }
-
- private String getDiffType(Diff diff) {
- String s= ""; //$NON-NLS-1$
- switch(diff.fDirection) {
- case RangeDifference.LEFT:
- s= CompareMessages.getString("TextMergeViewer.direction.outgoing"); //$NON-NLS-1$
- break;
- case RangeDifference.RIGHT:
- s= CompareMessages.getString("TextMergeViewer.direction.incoming"); //$NON-NLS-1$
- break;
- case RangeDifference.CONFLICT:
- s= CompareMessages.getString("TextMergeViewer.direction.conflicting"); //$NON-NLS-1$
- break;
- }
- String format= CompareMessages.getString("TextMergeViewer.diffType.format"); //$NON-NLS-1$
- return MessageFormat.format(format, new String[] { s, diff.changeType() } );
- }
-
- private String getDiffNumber(Diff diff) {
- // find the diff's number
- int diffNumber= 0;
- if (fChangeDiffs != null) {
- Iterator e= fChangeDiffs.iterator();
- while (e.hasNext()) {
- Diff d= (Diff) e.next();
- diffNumber++;
- if (d == diff)
- break;
- }
- }
- return Integer.toString(diffNumber);
- }
-
- private String getDiffRange(MergeSourceViewer v, Position pos) {
- Point p= v.getLineRange(pos, new Point(0, 0));
- int startLine= p.x+1;
- int endLine= p.x+p.y;
-
- String format;
- if (endLine < startLine)
- format= CompareMessages.getString("TextMergeViewer.beforeLine.format"); //$NON-NLS-1$
- else
- format= CompareMessages.getString("TextMergeViewer.range.format"); //$NON-NLS-1$
- return MessageFormat.format(format,
- new String[] { Integer.toString(startLine),
- Integer.toString(endLine) } );
- }
-
- /**
- * Returns a description of the cursor position.
- *
- * @return a description of the cursor position
- */
- private String getCursorPosition(MergeSourceViewer v) {
- if (v != null) {
- StyledText styledText= v.getTextWidget();
-
- IDocument document= v.getDocument();
- if (document != null) {
- int offset= v.getVisibleRegion().getOffset();
- int caret= offset + styledText.getCaretOffset();
-
- try {
-
- int line=document.getLineOfOffset(caret);
-
- int lineOffset= document.getLineOffset(line);
- int occurrences= 0;
- for (int i= lineOffset; i < caret; i++)
- if ('\t' == document.getChar(i))
- ++ occurrences;
-
- int tabWidth= styledText.getTabs();
- int column= caret - lineOffset + (tabWidth -1) * occurrences;
-
- String format= CompareMessages.getString("TextMergeViewer.cursorPosition.format"); //$NON-NLS-1$
- return MessageFormat.format(format,
- new String[] { Integer.toString(line + 1), Integer.toString(column + 1) } );
-
- } catch (BadLocationException x) {
- }
- }
- }
- return ""; //$NON-NLS-1$
- }
-
- protected void updateHeader() {
-
- super.updateHeader();
-
- updateControls();
- }
-
- /**
- * Creates the two items for copying a difference range from one side to the other
- * and adds them to the given toolbar manager.
- */
- protected void createToolItems(ToolBarManager tbm) {
-
- final String ignoreAncestorActionKey= "action.IgnoreAncestor."; //$NON-NLS-1$
- Action ignoreAncestorAction= new Action() {
- public void run() {
- setIgnoreAncestor(! fIgnoreAncestor);
- Utilities.initToggleAction(this, getResourceBundle(), ignoreAncestorActionKey, fIgnoreAncestor);
- }
- };
- ignoreAncestorAction.setChecked(fIgnoreAncestor);
- Utilities.initAction(ignoreAncestorAction, getResourceBundle(), ignoreAncestorActionKey);
- Utilities.initToggleAction(ignoreAncestorAction, getResourceBundle(), ignoreAncestorActionKey, fIgnoreAncestor);
-
- fIgnoreAncestorItem= new ActionContributionItem(ignoreAncestorAction);
- fIgnoreAncestorItem.setVisible(false);
- tbm.appendToGroup("modes", fIgnoreAncestorItem); //$NON-NLS-1$
-
- tbm.add(new Separator());
-
- Action a= new Action() {
- public void run() {
- navigate(true, true, true);
- }
- };
- Utilities.initAction(a, getResourceBundle(), "action.NextDiff."); //$NON-NLS-1$
- fNextItem= new ActionContributionItem(a);
- tbm.appendToGroup("navigation", fNextItem); //$NON-NLS-1$
-
- a= new Action() {
- public void run() {
- navigate(false, true, true);
- }
- };
- Utilities.initAction(a, getResourceBundle(), "action.PrevDiff."); //$NON-NLS-1$
- fPreviousItem= new ActionContributionItem(a);
- tbm.appendToGroup("navigation", fPreviousItem); //$NON-NLS-1$
-
-
- CompareConfiguration cc= getCompareConfiguration();
-
- if (cc.isRightEditable()) {
- a= new Action() {
- public void run() {
- copyDiffLeftToRight();
- }
- };
- Utilities.initAction(a, getResourceBundle(), "action.CopyDiffLeftToRight."); //$NON-NLS-1$
- fCopyDiffLeftToRightItem= new ActionContributionItem(a);
- tbm.appendToGroup("merge", fCopyDiffLeftToRightItem); //$NON-NLS-1$
- }
-
- if (cc.isLeftEditable()) {
- a= new Action() {
- public void run() {
- copyDiffRightToLeft();
- }
- };
- Utilities.initAction(a, getResourceBundle(), "action.CopyDiffRightToLeft."); //$NON-NLS-1$
- fCopyDiffRightToLeftItem= new ActionContributionItem(a);
- tbm.appendToGroup("merge", fCopyDiffRightToLeftItem); //$NON-NLS-1$
- }
- }
-
- /* package */ void propertyChange(PropertyChangeEvent event) {
-
- String key= event.getProperty();
-
- if (key.equals(CompareConfiguration.IGNORE_WHITESPACE)
- || key.equals(ComparePreferencePage.SHOW_PSEUDO_CONFLICTS)) {
-
- fShowPseudoConflicts= fPreferenceStore.getBoolean(ComparePreferencePage.SHOW_PSEUDO_CONFLICTS);
-
- // clear stuff
- fCurrentDiff= null;
- fChangeDiffs= null;
- fAllDiffs= null;
-
- doDiff();
-
- updateControls();
- invalidateLines();
- updateVScrollBar();
- refreshBirdsEyeView();
-
- selectFirstDiff();
-
- } else if (key.equals(ComparePreferencePage.TEXT_FONT)) {
- if (fPreferenceStore != null) {
- updateFont(fPreferenceStore, fComposite.getDisplay());
- invalidateLines();
- }
-
- } else if (key.equals(ComparePreferencePage.SYNCHRONIZE_SCROLLING)) {
-
- boolean b= fPreferenceStore.getBoolean(ComparePreferencePage.SYNCHRONIZE_SCROLLING);
- if (b != fSynchronizedScrolling)
- toggleSynchMode();
-
- } else if (key.equals(ComparePreferencePage.SHOW_MORE_INFO)) {
-
- boolean b= fPreferenceStore.getBoolean(ComparePreferencePage.SHOW_MORE_INFO);
- if (b != fShowMoreInfo) {
- fShowMoreInfo= b;
- if (fShowMoreInfo)
- updateStatus(fCurrentDiff);
- else
- clearStatus();
- }
-
- } else
- super.propertyChange(event);
- }
-
- private void setIgnoreAncestor(boolean ignore) {
- if (ignore != fIgnoreAncestor) {
- fIgnoreAncestor= ignore;
- setAncestorVisibility(false, !fIgnoreAncestor);
-
- // clear stuff
- fCurrentDiff= null;
- fChangeDiffs= null;
- fAllDiffs= null;
-
- doDiff();
-
- invalidateLines();
- updateVScrollBar();
- refreshBirdsEyeView();
-
- selectFirstDiff();
- }
- }
-
- private void selectFirstDiff() {
-
- if (fLeft == null || fRight == null) {
- return;
- }
- if (fLeft.getDocument() == null || fRight.getDocument() == null) {
- return;
- }
-
- Diff firstDiff= null;
- if (CompareNavigator.getDirection(fComposite))
- firstDiff= findNext(fRight, fChangeDiffs, -1, -1, false);
- else
- firstDiff= findPrev(fRight, fChangeDiffs, 9999999, 9999999, false);
- setCurrentDiff(firstDiff, true);
- }
-
- private void toggleSynchMode() {
- fSynchronizedScrolling= ! fSynchronizedScrolling;
-
- scrollVertical(0, 0, 0, null);
-
- // throw away central control (Sash or Canvas)
- Control center= getCenter();
- if (center != null && !center.isDisposed())
- center.dispose();
-
- fLeft.getTextWidget().getVerticalBar().setVisible(!fSynchronizedScrolling);
- fRight.getTextWidget().getVerticalBar().setVisible(!fSynchronizedScrolling);
-
- fComposite.layout(true);
- }
-
- protected void updateToolItems() {
-
- if (fIgnoreAncestorItem != null)
- fIgnoreAncestorItem.setVisible(isThreeWay());
-
- super.updateToolItems();
- }
-
- //---- painting lines
-
- /**
- *
- */
- private void updateLines(IDocument d) {
-
- boolean left= false;
- boolean right= false;
-
- // FIXME: this optimization is incorrect because
- // it doesn't take replace operations into account where
- // the old and new line count does not differ
- if (d == fLeft.getDocument()) {
- int l= fLeft.getLineCount();
- left= fLeftLineCount != l;
- fLeftLineCount= l;
- } else if (d == fRight.getDocument()) {
- int l= fRight.getLineCount();
- right= fRightLineCount != l;
- fRightLineCount= l;
- }
-
- if (left || right) {
-
- if (left) {
- if (fLeftCanvas != null)
- fLeftCanvas.redraw();
- } else {
- if (fRightCanvas != null)
- fRightCanvas.redraw();
- }
- Control center= getCenter();
- if (center != null)
- center.redraw();
-
- updateVScrollBar();
- refreshBirdsEyeView();
- }
- }
-
- private void invalidateLines() {
- if (isThreeWay()) {
- if (Utilities.okToUse(fAncestorCanvas))
- fAncestorCanvas.redraw();
- if (fAncestor != null && fAncestor.isControlOkToUse())
- fAncestor.getTextWidget().redraw();
- }
-
- if (Utilities.okToUse(fLeftCanvas))
- fLeftCanvas.redraw();
-
- if (fLeft != null && fLeft.isControlOkToUse())
- fLeft.getTextWidget().redraw();
-
- if (Utilities.okToUse(getCenter()))
- getCenter().redraw();
-
- if (fRight != null && fRight.isControlOkToUse())
- fRight.getTextWidget().redraw();
-
- if (Utilities.okToUse(fRightCanvas))
- fRightCanvas.redraw();
- }
-
- private void paintCenter(Canvas canvas, GC g) {
-
- Display display= canvas.getDisplay();
-
- checkForColorUpdate(display);
-
- if (! fSynchronizedScrolling)
- return;
-
- int lineHeight= fLeft.getTextWidget().getLineHeight();
- int visibleHeight= fRight.getViewportHeight();
-
- Point size= canvas.getSize();
- int x= 0;
- int w= size.x;
-
- g.setBackground(canvas.getBackground());
- g.fillRectangle(x+1, 0, w-2, size.y);
-
- if (!fIsMotif) {
- // draw thin line between center ruler and both texts
- g.setBackground(display.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW));
- g.fillRectangle(0, 0, 1, size.y);
- g.fillRectangle(w-1, 0, 1, size.y);
- }
-
- if (! fHiglightRanges)
- return;
-
- if (fChangeDiffs != null) {
- int lshift= fLeft.getVerticalScrollOffset();
- int rshift= fRight.getVerticalScrollOffset();
-
- Point region= new Point(0, 0);
-
- Iterator e= fChangeDiffs.iterator();
- while (e.hasNext()) {
- Diff diff= (Diff) e.next();
- if (diff.isDeleted())
- continue;
-
- if (fShowCurrentOnly2 && !isCurrentDiff(diff))
- continue;
-
- fLeft.getLineRange(diff.fLeftPos, region);
- int ly= (region.x * lineHeight) + lshift;
- int lh= region.y * lineHeight;
-
- fRight.getLineRange(diff.fRightPos, region);
- int ry= (region.x * lineHeight) + rshift;
- int rh= region.y * lineHeight;
-
- if (Math.max(ly+lh, ry+rh) < 0)
- continue;
- if (Math.min(ly, ry) >= visibleHeight)
- break;
-
- fPts[0]= x; fPts[1]= ly; fPts[2]= w; fPts[3]= ry;
- fPts[6]= x; fPts[7]= ly+lh; fPts[4]= w; fPts[5]= ry+rh;
-
- g.setBackground(getColor(display, getFillColor(diff)));
- g.fillPolygon(fPts);
-
- g.setLineWidth(LW);
- g.setForeground(getColor(display, getStrokeColor(diff)));
- g.drawLine(fPts[0], fPts[1], fPts[2], fPts[3]);
- g.drawLine(fPts[6], fPts[7], fPts[4], fPts[5]);
- }
- }
- }
-
- private void paintSides(GC g, MergeSourceViewer tp, Canvas canvas, boolean right) {
-
- Display display= canvas.getDisplay();
-
- int lineHeight= tp.getTextWidget().getLineHeight();
- int visibleHeight= tp.getViewportHeight();
-
- Point size= canvas.getSize();
- int x= 0;
- int w= fMarginWidth;
- int w2= w/2;
-
- g.setBackground(canvas.getBackground());
- g.fillRectangle(x, 0, w, size.y);
-
- if (!fIsMotif) {
- // draw thin line between ruler and text
- g.setBackground(display.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW));
- if (right)
- g.fillRectangle(0, 0, 1, size.y);
- else
- g.fillRectangle(size.x-1, 0, 1, size.y);
- }
-
- if (! fHiglightRanges)
- return;
-
- if (fChangeDiffs != null) {
- int shift= tp.getVerticalScrollOffset() + (2-LW);
-
- Point region= new Point(0, 0);
- Iterator e= fChangeDiffs.iterator();
- while (e.hasNext()) {
- Diff diff= (Diff) e.next();
- if (diff.isDeleted())
- continue;
-
- if (fShowCurrentOnly2 && !isCurrentDiff(diff))
- continue;
-
- tp.getLineRange(diff.getPosition(tp), region);
- int y= (region.x * lineHeight) + shift;
- int h= region.y * lineHeight;
-
- if (y+h < 0)
- continue;
- if (y >= visibleHeight)
- break;
-
- g.setBackground(getColor(display, getFillColor(diff)));
- if (right)
- g.fillRectangle(x, y, w2, h);
- else
- g.fillRectangle(x+w2, y, w2, h);
-
- g.setBackground(getColor(display, getStrokeColor(diff)));
- if (right) {
- g.fillRectangle(x, y-1, w2+1, LW);
- g.fillRectangle(x+w2, y, LW, h);
- g.fillRectangle(x, y+h-1, w2, LW);
- } else {
- g.fillRectangle(x+w2, y-1, w2, LW);
- g.fillRectangle(x+w2, y, LW, h);
- g.fillRectangle(x+w2, y+h-1, w2, LW);
- }
- }
- }
- }
-
- private void paint(PaintEvent event, MergeSourceViewer tp) {
-
- if (! fHiglightRanges)
- return;
- if (fChangeDiffs == null)
- return;
-
- Control canvas= (Control) event.widget;
- GC g= event.gc;
-
- Display display= canvas.getDisplay();
-
- int lineHeight= tp.getTextWidget().getLineHeight();
- int w= canvas.getSize().x;
- int shift= tp.getVerticalScrollOffset() + (2-LW);
- int maxh= event.y+event.height; // visibleHeight
-
- //if (fIsMotif)
- shift+= fTopInset;
-
- Point range= new Point(0, 0);
-
- Iterator e= fChangeDiffs.iterator();
- while (e.hasNext()) {
- Diff diff= (Diff) e.next();
- if (diff.isDeleted())
- continue;
-
- if (fShowCurrentOnly && !isCurrentDiff(diff))
- continue;
-
- tp.getLineRange(diff.getPosition(tp), range);
- int y= (range.x * lineHeight) + shift;
- int h= range.y * lineHeight;
-
- if (y+h < event.y)
- continue;
- if (y > maxh)
- break;
-
- g.setBackground(getColor(display, getStrokeColor(diff)));
- g.fillRectangle(0, y-1, w, LW);
- g.fillRectangle(0, y+h-1, w, LW);
- }
- }
-
- private RGB getFillColor(Diff diff) {
- boolean selected= fCurrentDiff != null && fCurrentDiff.fParent == diff;
-
- RGB selected_fill= getBackground(null);
-
- if (isThreeWay() && !fIgnoreAncestor) {
- switch (diff.fDirection) {
- case RangeDifference.RIGHT:
- if (fLeftIsLocal)
- return selected ? selected_fill : INCOMING_FILL;
- return selected ? selected_fill : OUTGOING_FILL;
- case RangeDifference.ANCESTOR:
- return selected ? selected_fill : CONFLICT_FILL;
- case RangeDifference.LEFT:
- if (fLeftIsLocal)
- return selected ? selected_fill : OUTGOING_FILL;
- return selected ? selected_fill : INCOMING_FILL;
- case RangeDifference.CONFLICT:
- return selected ? selected_fill : CONFLICT_FILL;
- }
- return null;
- }
- return selected ? selected_fill : OUTGOING_FILL;
- }
-
- private RGB getStrokeColor(Diff diff) {
- boolean selected= fCurrentDiff != null && fCurrentDiff.fParent == diff;
-
- if (isThreeWay() && !fIgnoreAncestor) {
- switch (diff.fDirection) {
- case RangeDifference.RIGHT:
- if (fLeftIsLocal)
- return selected ? SELECTED_INCOMING : INCOMING;
- return selected ? SELECTED_OUTGOING : OUTGOING;
- case RangeDifference.ANCESTOR:
- return selected ? SELECTED_CONFLICT : CONFLICT;
- case RangeDifference.LEFT:
- if (fLeftIsLocal)
- return selected ? SELECTED_OUTGOING : OUTGOING;
- return selected ? SELECTED_INCOMING : INCOMING;
- case RangeDifference.CONFLICT:
- return selected ? SELECTED_CONFLICT : CONFLICT;
- }
- return null;
- }
- return selected ? SELECTED_OUTGOING : OUTGOING;
- }
-
- private Color getColor(Display display, RGB rgb) {
- if (rgb == null)
- return null;
- if (fColors == null)
- fColors= new HashMap(20);
- Color c= (Color) fColors.get(rgb);
- if (c == null) {
- c= new Color(display, rgb);
- fColors.put(rgb, c);
- }
- return c;
- }
-
- static RGB interpolate(RGB fg, RGB bg, double scale) {
- return new RGB(
- (int)((1.0-scale) * fg.red + scale * bg.red),
- (int)((1.0-scale) * fg.green + scale * bg.green),
- (int)((1.0-scale) * fg.blue + scale * bg.blue)
- );
- }
-
- //---- Navigating and resolving Diffs
-
- /**
- * Returns true if end (or beginning) of document reached.
- */
- private boolean navigate(boolean down, boolean wrap, boolean deep) {
-
- Diff diff= null;
-
- for (;;) {
-
- if (fChangeDiffs != null) {
- MergeSourceViewer part= fFocusPart;
- if (part == null)
- part= fRight;
-
- if (part != null) {
- Point s= part.getSelectedRange();
- if (down)
- diff= findNext(part, fChangeDiffs, s.x, s.x+s.y, deep);
- else
- diff= findPrev(part, fChangeDiffs, s.x, s.x+s.y, deep);
- }
- }
-
- if (diff == null) { // at end or beginning
- if (wrap) {
- if (!fEndOfDocReached) {
- fEndOfDocReached= true;
- if (! endOfDocumentReached(down))
- return true;
- }
- fEndOfDocReached= false;
- if (fChangeDiffs != null && fChangeDiffs.size() > 0) {
- if (down)
- diff= (Diff) fChangeDiffs.get(0);
- else
- diff= (Diff) fChangeDiffs.get(fChangeDiffs.size()-1);
- }
- } else {
- fEndOfDocReached= false;
- return true;
- }
- }
-
- setCurrentDiff(diff, true);
-
- if (diff != null && diff.fDirection == RangeDifference.ANCESTOR
- && !getAncestorEnabled())
- continue;
-
- break;
- }
-
- return false;
- }
-
- private boolean endOfDocumentReached(boolean down) {
- Control c= getControl();
- if (Utilities.okToUse(c)) {
-
- c.getDisplay().beep();
-
- String key= down ? "atEnd" : "atBeginning"; //$NON-NLS-1$ //$NON-NLS-2$
- return MessageDialog.openQuestion(c.getShell(),
- CompareMessages.getString("TextMergeViewer."+key+".title"), //$NON-NLS-1$ //$NON-NLS-2$
- CompareMessages.getString("TextMergeViewer."+key+".message")); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return false;
- }
-
- /**
- * Find the Diff that overlaps with the given TextPart's text range.
- * If the range doesn't overlap with any range <code>null</code>
- * is returned.
- */
- private Diff findDiff(MergeSourceViewer tp, int rangeStart, int rangeEnd) {
- if (fChangeDiffs != null) {
- Iterator e= fChangeDiffs.iterator();
- while (e.hasNext()) {
- Diff diff= (Diff) e.next();
- if (diff.contains(tp, rangeStart, rangeEnd))
- return diff;
- }
- }
- return null;
- }
-
- private static Diff findNext(MergeSourceViewer tp, List v, int start, int end, boolean deep) {
- for (int i= 0; i < v.size(); i++) {
- Diff diff= (Diff) v.get(i);
- Position p= diff.getPosition(tp);
- if (p != null) {
- int startOffset= p.getOffset();
- if (end < startOffset) // <=
- return diff;
- if (deep && diff.fDiffs != null) {
- Diff d= null;
- int endOffset= startOffset + p.getLength();
- if (start == startOffset && (end == endOffset || end == endOffset-1)) {
- d= findNext(tp, diff.fDiffs, start-1, start-1, deep);
- } else if (end < endOffset) {
- d= findNext(tp, diff.fDiffs, start, end, deep);
- }
- if (d != null)
- return d;
- }
- }
- }
- return null;
- }
-
- private static Diff findPrev(MergeSourceViewer tp, List v, int start, int end, boolean deep) {
- for (int i= v.size()-1; i >= 0; i--) {
- Diff diff= (Diff) v.get(i);
- Position p= diff.getPosition(tp);
- if (p != null) {
- int startOffset= p.getOffset();
- int endOffset= startOffset + p.getLength();
- if (start > endOffset)
- return diff;
- if (deep && diff.fDiffs != null) {
- Diff d= null;
- if (start == startOffset && end == endOffset) {
- d= findPrev(tp, diff.fDiffs, end, end, deep);
- } else if (start >= startOffset) {
- d= findPrev(tp, diff.fDiffs, start, end, deep);
- }
- if (d != null)
- return d;
- }
- }
- }
- return null;
- }
-
- /*
- * Set the currently active Diff and update the toolbars controls and lines.
- * If <code>revealAndSelect</code> is <code>true</code> the Diff is revealed and
- * selected in both TextParts.
- */
- private void setCurrentDiff(Diff d, boolean revealAndSelect) {
-
-// if (d == fCurrentDiff)
-// return;
-
- fEndOfDocReached= false;
-
- Diff oldDiff= fCurrentDiff;
-
- if (d != null && revealAndSelect) {
-
- // before we set fCurrentDiff we change the selection
- // so that the paint code uses the old background colors
- // otherwise selection isn't drawn correctly
- if (isThreeWay() && !fIgnoreAncestor)
- fAncestor.setSelection(d.fAncestorPos);
- fLeft.setSelection(d.fLeftPos);
- fRight.setSelection(d.fRightPos);
-
- // now switch diffs
- fCurrentDiff= d;
- revealDiff(d, d.fIsToken);
- } else {
- fCurrentDiff= d;
- }
-
- Diff d1= oldDiff != null ? oldDiff.fParent : null;
- Diff d2= fCurrentDiff != null ? fCurrentDiff.fParent : null;
- if (d1 != d2) {
- updateDiffBackground(d1);
- updateDiffBackground(d2);
- }
-
- updateControls();
- invalidateLines();
- refreshBirdsEyeView();
- }
-
- /**
- * Smart determines whether
- */
- private void revealDiff(Diff d, boolean smart) {
-
- boolean ancestorIsVisible= false;
- boolean leftIsVisible= false;
- boolean rightIsVisible= false;
-
- if (smart) {
- Point region= new Point(0, 0);
- // find the starting line of the diff in all text widgets
- int ls= fLeft.getLineRange(d.fLeftPos, region).x;
- int rs= fRight.getLineRange(d.fRightPos, region).x;
-
- if (isThreeWay() && !fIgnoreAncestor) {
- int as= fAncestor.getLineRange(d.fAncestorPos, region).x;
- if (as >= fAncestor.getTopIndex() && as <= fAncestor.getBottomIndex())
- ancestorIsVisible= true;
- }
-
- if (ls >= fLeft.getTopIndex() && ls <= fLeft.getBottomIndex())
- leftIsVisible= true;
-
- if (rs >= fRight.getTopIndex() && rs <= fRight.getBottomIndex())
- rightIsVisible= true;
- }
-
- // vertical scrolling
- if (!leftIsVisible || !rightIsVisible) {
- int avpos= 0, lvpos= 0, rvpos= 0;
-
- MergeSourceViewer allButThis= null;
- if (leftIsVisible) {
- avpos= lvpos= rvpos= realToVirtualPosition(fLeft, fLeft.getTopIndex());
- allButThis= fLeft;
- } else if (rightIsVisible) {
- avpos= lvpos= rvpos= realToVirtualPosition(fRight, fRight.getTopIndex());
- allButThis= fRight;
- } else if (ancestorIsVisible) {
- avpos= lvpos= rvpos= realToVirtualPosition(fAncestor, fAncestor.getTopIndex());
- allButThis= fAncestor;
- } else {
- if (fAllDiffs != null) {
- int vpos= 0;
- Iterator e= fAllDiffs.iterator();
- for (int i= 0; e.hasNext(); i++) {
- Diff diff= (Diff) e.next();
- if (diff == d)
- break;
- if (fSynchronizedScrolling) {
- vpos+= diff.getMaxDiffHeight(fShowAncestor);
- } else {
- avpos+= diff.getAncestorHeight();
- lvpos+= diff.getLeftHeight();
- rvpos+= diff.getRightHeight();
- }
- }
- if (fSynchronizedScrolling)
- avpos= lvpos= rvpos= vpos;
- }
- int delta= fRight.getViewportLines()/4;
- avpos-= delta;
- if (avpos < 0)
- avpos= 0;
- lvpos-= delta;
- if (lvpos < 0)
- lvpos= 0;
- rvpos-= delta;
- if (rvpos < 0)
- rvpos= 0;
- }
-
- scrollVertical(avpos, lvpos, rvpos, allButThis);
-
- if (fVScrollBar != null)
- fVScrollBar.setSelection(avpos);
- }
-
- // horizontal scrolling
- if (d.fIsToken) {
- // we only scroll horizontally for token diffs
- reveal(fAncestor, d.fAncestorPos);
- reveal(fLeft, d.fLeftPos);
- reveal(fRight, d.fRightPos);
- } else {
- // in all other cases we reset the horizontal offset
- hscroll(fAncestor);
- hscroll(fLeft);
- hscroll(fRight);
- }
- }
-
- private static void reveal(MergeSourceViewer v, Position p) {
- if (v != null && p != null) {
- StyledText st= v.getTextWidget();
- if (st != null) {
- Rectangle r= st.getClientArea();
- if (!r.isEmpty()) // workaround for #7320: Next diff scrolls when going into current diff
- v.revealRange(p.offset, p.length);
- }
- }
- }
-
- private static void hscroll(MergeSourceViewer v) {
- if (v != null) {
- StyledText st= v.getTextWidget();
- if (st != null)
- st.setHorizontalIndex(0);
- }
- }
-
- //--------------------------------------------------------------------------------
-
- protected void copy(boolean leftToRight) {
- if (leftToRight) {
- if (fLeft.getEnabled()) {
- // copy text
- String text= fLeft.getTextWidget().getText();
- fRight.getTextWidget().setText(text);
- fRight.setEnabled(true);
- } else {
- // delete
- fRight.getTextWidget().setText(""); //$NON-NLS-1$
- fRight.setEnabled(false);
- }
- fRightLineCount= fRight.getLineCount();
- setRightDirty(true);
- fRightContentsChanged= false;
- } else {
- if (fRight.getEnabled()) {
- // copy text
- String text= fRight.getTextWidget().getText();
- fLeft.getTextWidget().setText(text);
- fLeft.setEnabled(true);
- } else {
- // delete
- fLeft.getTextWidget().setText(""); //$NON-NLS-1$
- fLeft.setEnabled(false);
- }
- fLeftLineCount= fLeft.getLineCount();
- setLeftDirty(true);
- fLeftContentsChanged= false;
- }
- doDiff();
- invalidateLines();
- updateVScrollBar();
- selectFirstDiff();
- refreshBirdsEyeView();
- }
-
- private void copyDiffLeftToRight() {
- copy(fCurrentDiff, true, false, false);
- }
-
- private void copyDiffRightToLeft() {
- copy(fCurrentDiff, false, false, false);
- }
-
- private void copy(Diff diff, boolean leftToRight, boolean both, boolean gotoNext) {
-
- if (diff != null && !diff.isResolved()) {
-
- Position fromPos= null;
- Position toPos= null;
- IDocument fromDoc= null;
- IDocument toDoc= null;
-
- if (leftToRight) {
- fRight.setEnabled(true);
- fromPos= diff.fLeftPos;
- toPos= diff.fRightPos;
- fromDoc= fLeft.getDocument();
- toDoc= fRight.getDocument();
- } else {
- fLeft.setEnabled(true);
- fromPos= diff.fRightPos;
- toPos= diff.fLeftPos;
- fromDoc= fRight.getDocument();
- toDoc= fLeft.getDocument();
- }
-
- if (fromDoc != null) {
-
- int fromStart= fromPos.getOffset();
- int fromLen= fromPos.getLength();
-
- int toStart= toPos.getOffset();
- int toLen= toPos.getLength();
-
- try {
- String s= null;
-
- switch (diff.fDirection) {
- case RangeDifference.RIGHT:
- case RangeDifference.LEFT:
- s= fromDoc.get(fromStart, fromLen);
- break;
- case RangeDifference.ANCESTOR:
- break;
- case RangeDifference.CONFLICT:
- s= fromDoc.get(fromStart, fromLen);
- if (both)
- s+= toDoc.get(toStart, toLen);
- break;
- }
- if (s != null) {
- toDoc.replace(toStart, toLen, s);
- toPos.setOffset(toStart);
- toPos.setLength(s.length());
- }
-
- } catch (BadLocationException e) {
- }
- }
-
- diff.setResolved(true);
-
- if (gotoNext) {
- navigate(true, true, true);
- } else {
- revealDiff(diff, true);
- updateControls();
- }
- }
- }
-
- //---- scrolling
-
- /**
- * Calculates virtual height (in lines) of views by adding the maximum of corresponding diffs.
- */
- private int getVirtualHeight() {
- int h= 1;
- if (fAllDiffs != null) {
- Iterator e= fAllDiffs.iterator();
- for (int i= 0; e.hasNext(); i++) {
- Diff diff= (Diff) e.next();
- h+= diff.getMaxDiffHeight(fShowAncestor);
- }
- }
- return h;
- }
-
- /**
- * Calculates height (in lines) of right view by adding the height of the right diffs.
- */
- private int getRightHeight() {
- int h= 1;
- if (fAllDiffs != null) {
- Iterator e= fAllDiffs.iterator();
- for (int i= 0; e.hasNext(); i++) {
- Diff diff= (Diff) e.next();
- h+= diff.getRightHeight();
- }
- }
- return h;
- }
-
- /**
- * The height of the TextEditors in lines.
- */
- private int getViewportHeight() {
- StyledText te= fLeft.getTextWidget();
-
- int vh= te.getClientArea().height;
- if (vh == 0) {
- Rectangle trim= te.computeTrim(0, 0, 0, 0);
- int scrollbarHeight= trim.height;
-
- int headerHeight= getHeaderHeight();
-
- Composite composite= (Composite) getControl();
- Rectangle r= composite.getClientArea();
-
- vh= r.height-headerHeight-scrollbarHeight;
- }
-
- return vh / te.getLineHeight();
- }
-
- /**
- * Returns the virtual position for the given view position.
- */
- private int realToVirtualPosition(MergeSourceViewer w, int vpos) {
-
- if (! fSynchronizedScrolling || fAllDiffs == null)
- return vpos;
-
- int viewPos= 0; // real view position
- int virtualPos= 0; // virtual position
- Point region= new Point(0, 0);
-
- Iterator e= fAllDiffs.iterator();
- while (e.hasNext()) {
- Diff diff= (Diff) e.next();
- Position pos= diff.getPosition(w);
- w.getLineRange(pos, region);
- int realHeight= region.y;
- int virtualHeight= diff.getMaxDiffHeight(fShowAncestor);
- if (vpos <= viewPos + realHeight) { // OK, found!
- vpos-= viewPos; // make relative to this slot
- // now scale position within this slot to virtual slot
- if (realHeight <= 0)
- vpos= 0;
- else
- vpos= (vpos*virtualHeight)/realHeight;
- return virtualPos+vpos;
- }
- viewPos+= realHeight;
- virtualPos+= virtualHeight;
- }
- return virtualPos;
- }
-
- private void scrollVertical(int avpos, int lvpos, int rvpos, MergeSourceViewer allBut) {
-
- int s= 0;
-
- if (fSynchronizedScrolling) {
- s= getVirtualHeight() - rvpos;
- int height= fRight.getViewportLines()/4;
- if (s < 0)
- s= 0;
- if (s > height)
- s= height;
- }
-
- fInScrolling= true;
-
- if (isThreeWay() && allBut != fAncestor) {
- if (fSynchronizedScrolling || allBut == null) {
- int y= virtualToRealPosition(fAncestor, avpos+s)-s;
- fAncestor.vscroll(y);
- }
- }
-
- if (allBut != fLeft) {
- if (fSynchronizedScrolling || allBut == null) {
- int y= virtualToRealPosition(fLeft, lvpos+s)-s;
- fLeft.vscroll(y);
- }
- }
-
- if (allBut != fRight) {
- if (fSynchronizedScrolling || allBut == null) {
- int y= virtualToRealPosition(fRight, rvpos+s)-s;
- fRight.vscroll(y);
- }
- }
-
- fInScrolling= false;
-
- if (isThreeWay() && fAncestorCanvas != null)
- fAncestorCanvas.repaint();
-
- if (fLeftCanvas != null)
- fLeftCanvas.repaint();
-
- Control center= getCenter();
- if (center instanceof BufferedCanvas)
- ((BufferedCanvas)center).repaint();
-
- if (fRightCanvas != null)
- fRightCanvas.repaint();
- }
-
- /**
- * Updates Scrollbars with viewports.
- */
- private void syncViewport(MergeSourceViewer w) {
-
- if (fInScrolling)
- return;
-
- int ix= w.getTopIndex();
- int ix2= w.getDocumentRegionOffset();
-
- int viewPosition= realToVirtualPosition(w, ix-ix2);
-
- scrollVertical(viewPosition, viewPosition, viewPosition, w); // scroll all but the given views
-
- if (fVScrollBar != null) {
- int value= Math.max(0, Math.min(viewPosition, getVirtualHeight() - getViewportHeight()));
- fVScrollBar.setSelection(value);
- //refreshBirdEyeView();
- }
- }
-
- /**
- */
- private void updateVScrollBar() {
-
- if (Utilities.okToUse(fVScrollBar) && fSynchronizedScrolling) {
- int virtualHeight= getVirtualHeight();
- int viewPortHeight= getViewportHeight();
- int pageIncrement= viewPortHeight-1;
- int thumb= (viewPortHeight > virtualHeight) ? virtualHeight : viewPortHeight;
-
- fVScrollBar.setPageIncrement(pageIncrement);
- fVScrollBar.setMaximum(virtualHeight);
- fVScrollBar.setThumb(thumb);
- }
- }
-
- /**
- * maps given virtual position into a real view position of this view.
- */
- private int virtualToRealPosition(MergeSourceViewer part, int v) {
-
- if (! fSynchronizedScrolling || fAllDiffs == null)
- return v;
-
- int virtualPos= 0;
- int viewPos= 0;
- Point region= new Point(0, 0);
-
- Iterator e= fAllDiffs.iterator();
- while (e.hasNext()) {
- Diff diff= (Diff) e.next();
- Position pos= diff.getPosition(part);
- int viewHeight= part.getLineRange(pos, region).y;
- int virtualHeight= diff.getMaxDiffHeight(fShowAncestor);
- if (v < (virtualPos + virtualHeight)) {
- v-= virtualPos; // make relative to this slot
- if (viewHeight <= 0) {
- v= 0;
- } else {
- v= (v*viewHeight)/virtualHeight;
- }
- return viewPos+v;
- }
- virtualPos+= virtualHeight;
- viewPos+= viewHeight;
- }
- return viewPos;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewerResources.properties b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewerResources.properties
deleted file mode 100644
index 9cabb43db..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewerResources.properties
+++ /dev/null
@@ -1,91 +0,0 @@
-# =====================================
-# (c) Copyright IBM Corp. 2000, 2001.
-# All Rights Reserved.
-# =====================================
-# @(#)TextMergeViewerResources.properties
-#
-# Resource strings for TextMergeViewer.java
-
-title= Text Compare
-
-saveDialog.title= Save Resource
-saveDialog.message= Resource has been modified. Save changes?
-
-compareProgressTask.title= Computing Differences...
-
-tooComplexError.title= Error
-tooComplexError.format= Too many differences. Try to turn on the ''Ignore White Space'' option or do a structure compare first.
-
-#####################################################
-# Toolbar actions
-#####################################################
-
-action.CopyLeftToRight.label=Copy Left to Right
-action.CopyLeftToRight.tooltip=Copy All from Left to Right
-action.CopyLeftToRight.image=copy_r_co.gif
-
-action.CopyRightToLeft.label=Copy Right to Left
-action.CopyRightToLeft.tooltip=Copy All from Right to Left
-action.CopyRightToLeft.image=copy_l_co.gif
-
-action.CopyDiffLeftToRight.label=Copy Current Diff
-action.CopyDiffLeftToRight.tooltip=Copy Current Change from Left to Right
-action.CopyDiffLeftToRight.image=copycont_r_co.gif
-
-action.CopyDiffRightToLeft.label=Copy Current Diff
-action.CopyDiffRightToLeft.tooltip=Copy Current Change from Right to Left
-action.CopyDiffRightToLeft.image=copycont_l_co.gif
-
-action.NextDiff.label=Next
-action.NextDiff.tooltip=Select Next Change
-action.NextDiff.image=next_nav.gif
-
-action.PrevDiff.label=Previous
-action.PrevDiff.tooltip=Select Previous Change
-action.PrevDiff.image=prev_nav.gif
-
-action.EnableAncestor.label=Enable Ancestor Pane
-action.EnableAncestor.tooltip.unchecked=Show Ancestor Pane
-action.EnableAncestor.tooltip.checked=Hide Ancestor Pane
-action.EnableAncestor.description.unchecked=Show Ancestor Pane
-action.EnableAncestor.description.checked=Hide Ancestor Pane
-action.EnableAncestor.image=ancestorpane_co.gif
-
-action.IgnoreAncestor.label=Ignore Ancestor
-action.IgnoreAncestor.tooltip.unchecked=Two-Way Compare (Ignore Ancestor)
-action.IgnoreAncestor.tooltip.checked=Three-Way Compare
-action.IgnoreAncestor.description.unchecked=Two-Way Compare (Ignore Ancestor)
-action.IgnoreAncestor.description.checked=Three-Way Compare
-action.IgnoreAncestor.image=twowaycompare_co.gif
-
-
-#####################################################
-# Context menu actions
-#####################################################
-
-action.undo.label=Undo@Ctrl+Z
-action.undo.tooltip=Undo Last Operation
-
-action.redo.label=Redo@Ctrl+Y
-action.redo.tooltip=Redo Last Operation
-
-action.cut.label=Cut@Ctrl+X
-action.cut.tooltip=Cut Text Selection to Clipboard
-
-action.copy.label=Copy@Ctrl+C
-action.copy.tooltip=Copy Text Selection to Clipboard
-
-action.paste.label=Paste@Ctrl+V
-action.paste.tooltip=Replace Text Selection with Clipboard
-
-action.delete.label=Delete
-action.delete.tooltip=Delete Current Text Selection
-
-action.find.label=Find...@Ctrl+F
-action.find.tooltip=Find Occurrence
-
-action.selectAll.label=Select All@Ctrl+A
-action.selectAll.tooltip=Select All Changes
-
-action.save.label=Save@Ctrl+S
-action.save.tooltip=Save Changes
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/package.html b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/package.html
deleted file mode 100644
index 28d91eedb..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/package.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Support for compare and merge viewers which show the
-content side-by-side.
-<h2>
-Package Specification</h2>
-The <tt>ContentMergeViewer</tt> is an abstract compare and merge viewer
-with two side-by-side content areas and an optional content area for a
-common ancestor (for three-way compare). Because the implementation makes
-no assumptions about the content type it is a subclass responsibility to
-deal with a specific type.
-<p>A <tt>ContentMergeViewer</tt> accesses its model by means of a content
-provider which must implement the
-<br><tt>IMergeViewerContentProvider</tt> interface.
-<p>The <tt>TextMergeViewer</tt> is the standard concrete subclass of <tt>ContentMergeViewer</tt>.
-A text merge viewer uses the <tt>RangeDifferencer</tt> to perform a textual,
-line-by-line comparison of two (or three) input documents. For text lines
-that differ the <tt>TextMergeViewer</tt> uses an <tt>ITokenComparator</tt>
-to find longest sequences of matching and non-matching tokens. The <tt>TextMergeViewer</tt>'s
-default token compare works on characters separated by whitespace. If a
-different strategy is needed (for example, Java tokens in a Java-aware
-merge viewer), clients can create their own token comparators by implementing
-the <tt>ITokenComparator</tt> interface.
-<p>The <tt>TextMergeViewer</tt> not only works on whole documents but on
-subranges of documents too. In this case the viewer's input must be an
-<tt>IDocumentRange</tt> instead of an <tt>IDocument</tt>.
-</body>
-</html>
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AbstractViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AbstractViewer.java
deleted file mode 100644
index 85ffba16e..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AbstractViewer.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.Viewer;
-
-
-public abstract class AbstractViewer extends Viewer {
-
- public void setInput(Object input) {
- }
-
- public Object getInput() {
- return null;
- }
-
- public ISelection getSelection() {
- return null;
- }
-
- public void setSelection(ISelection s, boolean reveal) {
- }
-
- public void refresh() {
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryAction.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryAction.java
deleted file mode 100644
index b9429f0d2..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryAction.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.util.ResourceBundle;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.swt.widgets.Shell;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-import org.eclipse.ui.IActionDelegate;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-
-
-public class AddFromHistoryAction implements IActionDelegate {
-
- private static final String BUNDLE_NAME= "org.eclipse.compare.internal.AddFromHistoryAction"; //$NON-NLS-1$
-
- private ISelection fSelection;
-
- public AddFromHistoryAction() {
- }
-
- public void selectionChanged(IAction a, ISelection s) {
- fSelection= s;
- }
-
- public void run(IAction action) {
-
- ResourceBundle bundle= ResourceBundle.getBundle(BUNDLE_NAME);
- String title= Utilities.getString(bundle, "title"); //$NON-NLS-1$
-
- Shell parentShell= CompareUIPlugin.getShell();
- AddFromHistoryDialog dialog= null;
-
- Object[] s= Utilities.getResources(fSelection);
-
- for (int i= 0; i < s.length; i++) {
- Object o= s[i];
- if (o instanceof IContainer) {
- IContainer container= (IContainer) o;
-
- ProgressMonitorDialog pmdialog= new ProgressMonitorDialog(parentShell);
- IProgressMonitor pm= pmdialog.getProgressMonitor();
- IFile[] states= null;
- try {
- states= container.findDeletedMembersWithHistory(IContainer.DEPTH_INFINITE, pm);
- } catch (CoreException ex) {
- pm.done();
- }
-
- if (states == null || states.length <= 0) {
- String msg= Utilities.getString(bundle, "noLocalHistoryError"); //$NON-NLS-1$
- MessageDialog.openInformation(parentShell, title, msg);
- return;
- }
-
- if (dialog == null)
- dialog= new AddFromHistoryDialog(parentShell, bundle);
-
- if (dialog.select(container, states)) {
-
- AddFromHistoryDialog.HistoryInput[] selected= dialog.getSelected();
-
- if (selected != null && selected.length > 0) {
- try {
- updateWorkspace(bundle, parentShell, selected);
-
- } catch (InterruptedException x) {
- // Do nothing. Operation has been canceled by user.
-
- } catch (InvocationTargetException x) {
- String reason= x.getTargetException().getMessage();
- MessageDialog.openError(parentShell, title, Utilities.getFormattedString(bundle, "replaceError", reason)); //$NON-NLS-1$
- }
- }
- }
- }
- }
- }
-
- private void createContainers(IResource resource) throws CoreException {
- IContainer container= resource.getParent();
- if (container instanceof IFolder) {
- IFolder parent= (IFolder) container;
- if (parent != null && !parent.exists()) {
- createContainers(parent);
- parent.create(false, true, null);
- }
- }
- }
-
- private void updateWorkspace(final ResourceBundle bundle, Shell shell,
- final AddFromHistoryDialog.HistoryInput[] selected)
- throws InvocationTargetException, InterruptedException {
-
- WorkspaceModifyOperation operation= new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor pm) throws InvocationTargetException {
- try {
- String taskName= Utilities.getString(bundle, "taskName"); //$NON-NLS-1$
- pm.beginTask(taskName, selected.length);
-
- for (int i= 0; i < selected.length; i++) {
- IFile file= selected[i].fFile;
- IFileState fileState= selected[i].fFileState;
- createContainers(file);
-
- SubProgressMonitor subMonitor= new SubProgressMonitor(pm, 1);
- try {
- file.create(fileState.getContents(), false, subMonitor);
- } finally {
- subMonitor.done();
- }
- }
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- pm.done();
- }
- }
- };
-
- ProgressMonitorDialog pmdialog= new ProgressMonitorDialog(shell);
- pmdialog.run(false, true, operation);
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryAction.properties b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryAction.properties
deleted file mode 100644
index 4c3e7dbcd..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryAction.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-# =====================================
-# (c) Copyright IBM Corp. 2000, 2001.
-# All Rights Reserved.
-# =====================================
-
-# @(#)AddFromHistoryAction.properties
-#
-# Resources for AddFromHistoryAction.java
-
-title= Restore from Local History
-
-memberPaneTitle= {0} - Available Files in Local History:
-
-treeTitleFormat= Local History of ''{0}''
-dateIcon= obj16/day_obj.gif
-timeIcon= obj16/resource_obj.gif
-
-memberDescription= Check files to restore from the local history:
-editionDescription= Select an edition of a file:
-
-treeFormat= {0}
-workspaceTreeFormat= {0} (Workspace File)
-parseErrorFormat= {0} (Parse Error)
-
-editionLabel= Local History ({0})
-workspaceEditionLabel= Workspace File
-
-targetLabel= {0}
-
-todayFormat= Today ({0})
-yesterdayFormat= Yesterday ({0})
-dayFormat= {0}
-
-buttonLabel= Restore
-
-noLocalHistoryError= No deleted resources in local history for selected container.
-replaceError=Can''t replace resource (reason: {0}).
-
-taskName=Restoring \ No newline at end of file
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryDialog.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryDialog.java
deleted file mode 100644
index b27427690..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryDialog.java
+++ /dev/null
@@ -1,449 +0,0 @@
-package org.eclipse.compare.internal;
-
-import java.io.*;
-import java.text.*;
-import java.util.*;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.Viewer;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-
-import org.eclipse.compare.*;
-
-
-public class AddFromHistoryDialog extends ResizableDialog {
-
- static class HistoryInput implements ITypedElement, IStreamContentAccessor, IModificationDate {
- IFile fFile;
- IFileState fFileState;
-
- HistoryInput(IFile file, IFileState fileState) {
- fFile= file;
- fFileState= fileState;
- }
- public InputStream getContents() throws CoreException {
- return new BufferedInputStream(fFileState.getContents());
- }
- public String getName() {
- return fFile.getName();
- }
- public String getType() {
- return fFile.getFileExtension();
- }
- public Image getImage() {
- return CompareUI.getImage(fFile);
- }
- public long getModificationDate() {
- return fFileState.getModificationTime();
- }
- }
-
- static class FileHistory {
- private IFile fFile;
- private IFileState[] fStates;
- private int fSelected;
-
- FileHistory(IFile file) {
- fFile= file;
- }
-
- IFile getFile() {
- return fFile;
- }
-
- IFileState[] getStates() {
- if (fStates == null) {
- try {
- fStates= fFile.getHistory(new NullProgressMonitor());
- } catch (CoreException ex) {
- }
- }
- return fStates;
- }
-
- IFileState getSelectedState() {
- return getStates()[fSelected];
- }
-
- void setSelected(IFileState state) {
- for (int i= 0; i < fStates.length; i++) {
- if (fStates[i] == state) {
- fSelected= i;
- return;
- }
- }
- }
-
- HistoryInput getHistoryInput() {
- return new HistoryInput(fFile, getSelectedState());
- }
-
- boolean isSelected(int index) {
- return index == fSelected;
- }
- }
-
- private CompareConfiguration fCompareConfiguration;
- private ArrayList fArrayList= new ArrayList();
- private FileHistory fCurrentFileHistory;
-
- // SWT controls
- private CompareViewerSwitchingPane fContentPane;
- private Button fCommitButton;
- private Table fMemberTable;
- private CompareViewerPane fMemberPane;
- private Tree fEditionTree;
- private CompareViewerPane fEditionPane;
- private Image fDateImage;
- private Image fTimeImage;
- private CompareViewerSwitchingPane fStructuredComparePane;
-
-
- public AddFromHistoryDialog(Shell parent, ResourceBundle bundle) {
- super(parent, bundle);
-
- String iconName= Utilities.getString(fBundle, "dateIcon", "obj16/day_obj.gif"); //$NON-NLS-2$ //$NON-NLS-1$
- ImageDescriptor id= CompareUIPlugin.getImageDescriptor(iconName);
- if (id != null)
- fDateImage= id.createImage();
- iconName= Utilities.getString(fBundle, "timeIcon", "obj16/resource_obj.gif"); //$NON-NLS-1$ //$NON-NLS-2$
- id= CompareUIPlugin.getImageDescriptor(iconName);
- if (id != null)
- fTimeImage= id.createImage();
- }
-
- public boolean select(IContainer root, IFile[] inputFiles) {
-
- create(); // create widgets
-
- String format= Utilities.getString(fBundle, "memberPaneTitle"); //$NON-NLS-1$
- String title= MessageFormat.format(format, new Object[] { root.getName() });
- fMemberPane.setImage(CompareUI.getImage(root));
- fMemberPane.setText(title);
-
- // sort input files
- final int count= inputFiles.length;
- final IFile[] files= new IFile[count];
- for (int i= 0; i < count; i++)
- files[i]= (IFile) inputFiles[i];
- if (count > 1)
- internalSort(files, 0, count-1);
-
-
- String prefix= root.getFullPath().toString();
-
- if (fMemberTable != null && !fMemberTable.isDisposed()) {
- for (int i= 0; i < files.length; i++) {
- IFile file= files[i];
- String path= file.getFullPath().toString();
- if (path.startsWith(prefix))
- path= path.substring(prefix.length()+1);
- TableItem ti= new TableItem(fMemberTable, SWT.NONE);
- ti.setImage(CompareUI.getImage(file));
- ti.setText(path);
- ti.setData(new FileHistory(file));
- }
- }
-
- open();
-
- return (getReturnCode() == OK) && (fArrayList.size() > 0);
- }
-
- HistoryInput[] getSelected() {
- HistoryInput[] selected= new HistoryInput[fArrayList.size()];
- Iterator iter= fArrayList.iterator();
- for (int i= 0; iter.hasNext(); i++) {
- FileHistory h= (FileHistory) iter.next();
- selected[i]= h.getHistoryInput();
- }
- return selected;
- }
-
- protected synchronized Control createDialogArea(Composite parent) {
-
- getShell().setText(Utilities.getString(fBundle, "title")); //$NON-NLS-1$
-
- Splitter vsplitter= new Splitter(parent, SWT.VERTICAL);
- vsplitter.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL
- | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_VERTICAL));
-
- vsplitter.addDisposeListener(
- new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- if (fDateImage != null)
- fDateImage.dispose();
- if (fTimeImage != null)
- fTimeImage.dispose();
- }
- }
- );
-
- // we need two panes: the left for the elements, the right one for the editions
- Splitter hsplitter= new Splitter(vsplitter, SWT.HORIZONTAL);
-
- Composite c= new Composite(hsplitter, SWT.NONE);
- GridLayout layout= new GridLayout();
- layout.marginWidth= 0;
- layout.marginHeight= 2;
- layout.verticalSpacing= 2;
- layout.numColumns= 1;
- c.setLayout(layout);
- Label l1= new Label(c, SWT.NONE);
- l1.setText(Utilities.getString(fBundle, "memberDescription")); //$NON-NLS-1$
- fMemberPane= new CompareViewerPane(c, SWT.BORDER | SWT.FLAT);
- GridData gd= new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
- fMemberPane.setLayoutData(gd);
-
- fMemberTable= new Table(fMemberPane, SWT.CHECK | SWT.H_SCROLL | SWT.V_SCROLL);
- fMemberTable.addSelectionListener(
- new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- if (e.detail == SWT.CHECK) {
- if (e.item instanceof TableItem) {
- TableItem ti= (TableItem) e.item;
- if (ti.getChecked())
- fArrayList.add(ti.getData());
- else
- fArrayList.remove(ti.getData());
-
- if (fCommitButton != null)
- fCommitButton.setEnabled(fArrayList.size() > 0);
- }
- } else {
- handleMemberSelect(e.item);
- }
- }
- }
- );
-
- fMemberPane.setContent(fMemberTable);
-
- c= new Composite(hsplitter, SWT.NONE);
- layout= new GridLayout();
- layout.marginWidth= 0;
- layout.marginHeight= 2;
- layout.verticalSpacing= 2;
- layout.numColumns= 1;
- c.setLayout(layout);
- Label l2= new Label(c, SWT.NONE);
- l2.setText(Utilities.getString(fBundle, "editionDescription")); //$NON-NLS-1$
- fEditionPane= new CompareViewerPane(c, SWT.BORDER | SWT.FLAT);
- gd= new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
- fEditionPane.setLayoutData(gd);
-
- fEditionTree= new Tree(fEditionPane, SWT.H_SCROLL | SWT.V_SCROLL);
- fEditionTree.addSelectionListener(
- new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- feedContent(e.item);
- }
- }
- );
- fEditionPane.setContent(fEditionTree);
-
- fContentPane= new CompareViewerSwitchingPane(vsplitter, SWT.BORDER | SWT.FLAT) {
- protected Viewer getViewer(Viewer oldViewer, Object input) {
- return CompareUIPlugin.findContentViewer(oldViewer, input, this, fCompareConfiguration);
- }
- };
- vsplitter.setWeights(new int[] { 30, 70 });
-
- return vsplitter;
- }
-
- /**
- * Feeds selection from member viewer to edition viewer.
- */
- private void handleMemberSelect(Widget w) {
- Object data= w.getData();
- if (data instanceof FileHistory) {
-
- FileHistory h= (FileHistory) data;
- fCurrentFileHistory= h;
-
- IFile file= h.getFile();
- IFileState[] states= h.getStates();
-
- fEditionPane.setImage(CompareUI.getImage(file));
- String pattern= Utilities.getString(fBundle, "treeTitleFormat"); //$NON-NLS-1$
- String title= MessageFormat.format(pattern, new Object[] { file.getName() });
- fEditionPane.setText(title);
-
- if (fEditionTree != null) {
- fEditionTree.setRedraw(false);
- fEditionTree.removeAll();
- for (int i= 0; i < states.length; i++) {
- addEdition(new HistoryInput(file, states[i]), h.isSelected(i));
- }
- fEditionTree.setRedraw(true);
- }
- } else
- fCurrentFileHistory= null;
- }
-
- /**
- * Adds the given Pair to the edition tree.
- * It takes care of creating tree nodes for different dates.
- */
- private void addEdition(HistoryInput input, boolean isSelected) {
- if (fEditionTree == null || fEditionTree.isDisposed())
- return;
-
- IFileState state= input.fFileState;
-
- // find last day
- TreeItem[] days= fEditionTree.getItems();
- TreeItem lastDay= null;
- if (days.length > 0)
- lastDay= days[days.length-1];
-
- long ldate= state.getModificationTime();
- long day= dayNumber(ldate);
- Date date= new Date(ldate);
- if (lastDay == null || day != dayNumber(((Date)lastDay.getData()).getTime())) {
- lastDay= new TreeItem(fEditionTree, SWT.NONE);
- lastDay.setImage(fDateImage);
- String df= DateFormat.getDateInstance().format(date);
- long today= dayNumber(System.currentTimeMillis());
-
- String formatKey;
- if (day == today)
- formatKey= "todayFormat"; //$NON-NLS-1$
- else if (day == today-1)
- formatKey= "yesterdayFormat"; //$NON-NLS-1$
- else
- formatKey= "dayFormat"; //$NON-NLS-1$
- String pattern= Utilities.getString(fBundle, formatKey);
- if (pattern != null)
- df= MessageFormat.format(pattern, new String[] { df });
- lastDay.setText(df);
- lastDay.setData(date);
- }
- TreeItem ti= new TreeItem(lastDay, SWT.NONE);
- ti.setImage(fTimeImage);
- ti.setText(DateFormat.getTimeInstance().format(date));
- ti.setData(input);
-
- if (isSelected) {
- lastDay.setExpanded(true);
- fEditionTree.setSelection(new TreeItem[] { ti });
- feedContent(ti);
- }
- }
-
- /**
- * Returns the number of s since Jan 1st, 1970.
- * The given date is converted to GMT and daylight saving is taken into account too.
- */
- private long dayNumber(long date) {
- int ONE_DAY_MS= 24*60*60 * 1000; // one day in milli seconds
-
- Calendar calendar= Calendar.getInstance();
- long localTimeOffset= calendar.get(Calendar.ZONE_OFFSET) + calendar.get(Calendar.DST_OFFSET);
-
- return (date + localTimeOffset) / ONE_DAY_MS;
- }
-
- /**
- * Feeds the tree viewer's selection to the contentviewer
- */
- private void feedContent(Widget w) {
- if (fContentPane != null && !fContentPane.isDisposed()) {
- Object o= w.getData();
- if (o instanceof HistoryInput) {
- HistoryInput selected= (HistoryInput) o;
- fContentPane.setInput(selected);
- fContentPane.setText(getEditionLabel(selected));
- fContentPane.setImage(fTimeImage);
-
- if (fCurrentFileHistory != null)
- fCurrentFileHistory.setSelected(selected.fFileState);
- } else {
- fContentPane.setInput(null);
- }
- }
- }
-
- protected String getEditionLabel(HistoryInput input) {
- String format= Utilities.getString(fBundle, "historyEditionLabel", null); //$NON-NLS-1$
- if (format == null)
- format= Utilities.getString(fBundle, "editionLabel"); //$NON-NLS-1$
- if (format == null)
- format= "x{0}"; //$NON-NLS-1$
-
- long modDate= input.getModificationDate();
- String date= DateFormat.getDateTimeInstance().format(new Date(modDate));
-
- return MessageFormat.format(format, new Object[] { date });
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected void createButtonsForButtonBar(Composite parent) {
- String buttonLabel= Utilities.getString(fBundle, "buttonLabel", IDialogConstants.OK_LABEL); //$NON-NLS-1$
- // a 'Cancel' and a 'Add' button
- fCommitButton= createButton(parent, IDialogConstants.OK_ID, buttonLabel, true);
- fCommitButton.setEnabled(false);
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
- }
-
- /**
- * Returns true if the pathname of f1 comes after f2
- */
- private static boolean greaterThan(IFile f1, IFile f2) {
- String[] ss1= f1.getFullPath().segments();
- String[] ss2= f2.getFullPath().segments();
- int l1= ss1.length;
- int l2= ss2.length;
- int n= Math.max(l1, l2);
-
- for (int i= 0; i < n; i++) {
- String s1= i < l1 ? ss1[i] : ""; //$NON-NLS-1$
- String s2= i < l2 ? ss2[i] : ""; //$NON-NLS-1$
- int rc= s1.compareToIgnoreCase(s2);
- if (rc != 0)
- return rc < 0;
- }
- return false;
- }
-
- private static void internalSort(IFile[] keys, int left, int right) {
-
- int original_left= left;
- int original_right= right;
-
- IFile mid= keys[(left + right) / 2];
- do {
- while (greaterThan(keys[left], mid))
- left++;
-
- while (greaterThan(mid, keys[right]))
- right--;
-
- if (left <= right) {
- IFile tmp= keys[left];
- keys[left]= keys[right];
- keys[right]= tmp;
- left++;
- right--;
- }
- } while (left <= right);
-
- if (original_left < right)
- internalSort(keys, original_left, right);
-
- if (left < original_right)
- internalSort(keys, left, original_right);
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewer.java
deleted file mode 100644
index c1ff3bda9..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewer.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.io.*;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ResourceBundle;
-import java.text.MessageFormat;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-
-/**
- * A simple compare viewer for binary files.
- * Shows the position of the first non-matching byte.
- */
-public class BinaryCompareViewer extends AbstractViewer {
-
- private static final String BUNDLE_NAME= "org.eclipse.compare.internal.BinaryCompareViewerResources"; //$NON-NLS-1$
-
- private static final int EOF= -1;
- private Text fControl;
- private ICompareInput fInput;
- private ResourceBundle fBundle;
- private boolean fLeftIsLocal;
-
-
- public BinaryCompareViewer(Composite parent, CompareConfiguration cc) {
-
- fBundle= ResourceBundle.getBundle(BUNDLE_NAME);
-
- fControl= new Text(parent, SWT.NONE);
- fControl.setEditable(false);
- fControl.setData(CompareUI.COMPARE_VIEWER_TITLE, Utilities.getString(fBundle, "title")); //$NON-NLS-1$
-
- fLeftIsLocal= Utilities.getBoolean(cc, "LEFT_IS_LOCAL", false); //$NON-NLS-1$
- }
-
- public Control getControl() {
- return fControl;
- }
-
- public void setInput(Object input) {
- if (fControl != null && input instanceof ICompareInput) {
- fInput= (ICompareInput) input;
-
- InputStream left= null;
- InputStream right= null;
-
- String message= null;
- try {
- left= getStream(fInput.getLeft());
- right= getStream(fInput.getRight());
-
- if (left != null && right != null) {
- int pos= 0;
- while (true) {
- int l= left.read();
- int r= right.read();
- if (l != r) {
- String format= Utilities.getString(fBundle, "diffMessageFormat"); //$NON-NLS-1$
- message= MessageFormat.format(format, new String[] { Integer.toString(pos) } );
- break;
- }
- if (l == EOF)
- break;
- pos++;
- }
- } else if (left == null && right == null) {
- message= Utilities.getString(fBundle, "deleteConflictMessage"); //$NON-NLS-1$
- } else if (left == null) {
- if (fLeftIsLocal)
- message= Utilities.getString(fBundle, "deletedMessage"); //$NON-NLS-1$
- else
- message= Utilities.getString(fBundle, "addedMessage"); //$NON-NLS-1$
- } else if (right == null) {
- if (fLeftIsLocal)
- message= Utilities.getString(fBundle, "addedMessage"); //$NON-NLS-1$
- else
- message= Utilities.getString(fBundle, "deletedMessage"); //$NON-NLS-1$
- }
- } catch (CoreException ex) {
- message= Utilities.getString(fBundle, "errorMessage"); //$NON-NLS-1$
- } catch (IOException ex) {
- message= Utilities.getString(fBundle, "errorMessage"); //$NON-NLS-1$
- } finally {
- if (left != null) {
- try {
- left.close();
- } catch (IOException ex) {
- }
- }
- if (right != null) {
- try {
- right.close();
- } catch (IOException ex) {
- }
- }
- }
- if (message != null)
- fControl.setText(message);
- }
- }
-
- public Object getInput() {
- return fInput;
- }
-
- private InputStream getStream(ITypedElement input) throws CoreException {
- if (input instanceof IStreamContentAccessor)
- return ((IStreamContentAccessor)input).getContents();
- return null;
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewerCreator.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewerCreator.java
deleted file mode 100644
index 364785dc8..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewerCreator.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.jface.viewers.Viewer;
-
-import org.eclipse.compare.*;
-
-/**
- * A factory object for the <code>BinaryCompareViewer</code>.
- * This indirection is necessary because only objects with a default
- * constructor can be created via an extension point
- * (this precludes Viewers).
- */
-public class BinaryCompareViewerCreator implements IViewerCreator {
-
- public Viewer createViewer(Composite parent, CompareConfiguration mp) {
- return new BinaryCompareViewer(parent, mp);
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewerResources.properties b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewerResources.properties
deleted file mode 100644
index 2900356a5..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewerResources.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-# =====================================
-# (c) Copyright IBM Corp. 2000, 2001.
-# All Rights Reserved.
-# =====================================
-
-# @(#)BinaryCompareViewerResources.properties
-#
-# Resource strings for BinaryCompareViewer.java
-
-title= Binary Compare
-
-diffMessageFormat= First bytes differ at position {0}
-deleteConflictMessage= Delete Conflict
-addedMessage= Added Resource
-deletedMessage= Removed Resource
-errorMessage= Internal Error
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BufferedCanvas.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BufferedCanvas.java
deleted file mode 100644
index 1a1bdd3e9..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BufferedCanvas.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.events.*;
-
-/**
- * A Canvas which reduces flicker by drawing in an off screen buffer.
- */
-public abstract class BufferedCanvas extends Canvas {
-
- /** The drawable for double buffering */
- private Image fBuffer;
-
- public BufferedCanvas(Composite parent, int flags) {
- super(parent, flags + SWT.NO_BACKGROUND);
-
- addPaintListener(
- new PaintListener() {
- public void paintControl(PaintEvent event) {
- doubleBufferPaint(event.gc);
- }
- }
- );
-
- addDisposeListener(
- new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- if (fBuffer != null) {
- fBuffer.dispose();
- fBuffer= null;
- }
- }
- }
- );
- }
-
- public void repaint() {
- if (!isDisposed()) {
- GC gc= new GC(this);
- doubleBufferPaint(gc);
- gc.dispose();
- }
- }
-
- /**
- * Double buffer drawing.
- * @private
- */
- private void doubleBufferPaint(GC dest) {
-
- Point size= getSize();
-
- if (size.x <= 0 || size.y <= 0)
- return;
-
- if (fBuffer != null) {
- Rectangle r= fBuffer.getBounds();
- if (r.width != size.x || r.height != size.y) {
- fBuffer.dispose();
- fBuffer= null;
- }
- }
- if (fBuffer == null)
- fBuffer= new Image(getDisplay(), size.x, size.y);
-
- GC gc= new GC(fBuffer);
- try {
- gc.setBackground(getBackground());
- gc.fillRectangle(0, 0, size.x, size.y);
- doPaint(gc);
- } finally {
- gc.dispose();
- }
-
- dest.drawImage(fBuffer, 0, 0);
- }
-
- abstract public void doPaint(GC gc);
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BufferedResourceNode.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BufferedResourceNode.java
deleted file mode 100644
index 8e1b8018e..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BufferedResourceNode.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.io.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.IStructureComparator;
-
-/**
- * A buffer for a workspace resource.
- */
-public class BufferedResourceNode extends ResourceNode {
-
- private boolean fDirty= false;
- private IFile fDeleteFile;
-
- /**
- * Creates a <code>ResourceNode</code> for the given resource.
- *
- * @param resource the resource
- */
- public BufferedResourceNode(IResource resource) {
- super(resource);
- }
-
- protected IStructureComparator createChild(IResource child) {
- return new BufferedResourceNode(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 {
- 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= Utilities.readBytes(is);
- if (bytes != null)
- dst.setContent(bytes);
- } catch (CoreException ex) {
- }
- }
- return child;
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ChangePropertyAction.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ChangePropertyAction.java
deleted file mode 100644
index 1e76626fa..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ChangePropertyAction.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.compare.CompareConfiguration;
-
-/**
- * Toggles a boolean property of an <code>ICompareConfiguration</code>.
- */
-public class ChangePropertyAction extends Action {
-
- private CompareConfiguration fCompareConfiguration;
- private String fPropertyKey;
- private ResourceBundle fBundle;
- private String fPrefix;
-
-
- public ChangePropertyAction(ResourceBundle bundle, CompareConfiguration cc, String rkey, String pkey) {
- fPropertyKey= pkey;
- fBundle= bundle;
- fPrefix= rkey;
- Utilities.initAction(this, fBundle, fPrefix);
- setCompareConfiguration(cc);
- }
-
- public void run() {
- boolean b= !Utilities.getBoolean(fCompareConfiguration, fPropertyKey, false);
- setChecked(b);
- if (fCompareConfiguration != null)
- fCompareConfiguration.setProperty(fPropertyKey, new Boolean(b));
- }
-
- public void setChecked(boolean state) {
- super.setChecked(state);
- Utilities.initToggleAction(this, fBundle, fPrefix, state);
- }
-
- public void setCompareConfiguration(CompareConfiguration cc) {
- fCompareConfiguration= cc;
- setChecked(Utilities.getBoolean(fCompareConfiguration, fPropertyKey, false));
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ColorEditor.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ColorEditor.java
deleted file mode 100644
index d3aea03f8..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ColorEditor.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.ColorDialog;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-
-import org.eclipse.jface.resource.JFaceResources;
-
-/**
- * A "button" of a certain color determined by the color picker.
- */
-public class ColorEditor {
-
- private Point fExtent;
- private Image fImage;
- private RGB fColorValue;
- private Color fColor;
- private Button fButton;
-
- public ColorEditor(Composite parent) {
-
- fButton= new Button(parent, SWT.PUSH);
- fExtent= computeImageSize(parent);
- fImage= new Image(parent.getDisplay(), fExtent.x, fExtent.y);
-
- GC gc= new GC(fImage);
- gc.setBackground(fButton.getBackground());
- gc.fillRectangle(0, 0, fExtent.x, fExtent.y);
- gc.dispose();
-
- fButton.setImage(fImage);
- fButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- ColorDialog colorDialog= new ColorDialog(fButton.getShell());
- colorDialog.setRGB(fColorValue);
- RGB newColor = colorDialog.open();
- if (newColor != null) {
- fColorValue= newColor;
- updateColorImage();
- }
- }
- });
-
- fButton.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent event) {
- if (fImage != null) {
- fImage.dispose();
- fImage= null;
- }
- if (fColor != null) {
- fColor.dispose();
- fColor= null;
- }
- }
- });
- }
-
- public RGB getColorValue() {
- return fColorValue;
- }
-
- public void setColorValue(RGB rgb) {
- fColorValue= rgb;
- updateColorImage();
- }
-
- public Button getButton() {
- return fButton;
- }
-
- protected void updateColorImage() {
-
- Display display= fButton.getDisplay();
-
- GC gc= new GC(fImage);
- gc.setForeground(display.getSystemColor(SWT.COLOR_BLACK));
- gc.drawRectangle(0, 2, fExtent.x - 1, fExtent.y - 4);
-
- if (fColor != null)
- fColor.dispose();
-
- fColor= new Color(display, fColorValue);
- gc.setBackground(fColor);
- gc.fillRectangle(1, 3, fExtent.x - 2, fExtent.y - 5);
- gc.dispose();
-
- fButton.setImage(fImage);
- }
-
- protected Point computeImageSize(Control window) {
- GC gc= new GC(window);
- Font f= JFaceResources.getFontRegistry().get(JFaceResources.DEFAULT_FONT);
- gc.setFont(f);
- int height= gc.getFontMetrics().getHeight();
- gc.dispose();
- Point p= new Point(height * 3 - 6, height);
- return p;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareAction.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareAction.java
deleted file mode 100644
index 4daf9e54f..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareAction.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-
-import org.eclipse.ui.IActionDelegate;
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.CompareUI;
-
-
-public class CompareAction implements IActionDelegate {
-
- private ResourceCompareInput fInput;
-
- public void run(IAction action) {
- if (fInput != null) {
- CompareUI.openCompareEditor(fInput);
- fInput= null; // don't reuse this input!
- }
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- if (fInput == null) {
- CompareConfiguration cc= new CompareConfiguration();
- // buffered merge mode: don't ask for confirmation
- // when switching between modified resources
- cc.setProperty(CompareEditor.CONFIRM_SAVE_PROPERTY, new Boolean(false));
-
- fInput= new ResourceCompareInput(cc);
- }
- action.setEnabled(fInput.setSelection(selection));
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareDialog.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareDialog.java
deleted file mode 100644
index 6b6c3c49f..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareDialog.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.CompareEditorInput;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.util.Assert;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-
-public class CompareDialog extends ResizableDialog implements IPropertyChangeListener {
-
- private CompareEditorInput fCompareEditorInput;
- private Button fCommitButton;
-
-
- CompareDialog(Shell shell, CompareEditorInput input) {
- super(shell, null);
-
- Assert.isNotNull(input);
- fCompareEditorInput= input;
- fCompareEditorInput.addPropertyChangeListener(this);
- }
-
- public boolean close() {
- if (super.close()) {
- if (fCompareEditorInput != null)
- fCompareEditorInput.addPropertyChangeListener(this);
- return true;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected void createButtonsForButtonBar(Composite parent) {
- fCommitButton= createButton(parent, IDialogConstants.OK_ID, Utilities.getString("CompareDialog.commitAction.label"), true); //$NON-NLS-1$
- fCommitButton.setEnabled(false);
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
- }
-
- public void propertyChange(PropertyChangeEvent event) {
- if (fCommitButton != null && fCompareEditorInput != null)
- fCommitButton.setEnabled(fCompareEditorInput.isSaveNeeded());
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected Control createDialogArea(Composite parent) {
-
- Control c= fCompareEditorInput.createContents(parent);
- c.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Shell shell= c.getShell();
- shell.setText(fCompareEditorInput.getTitle());
- shell.setImage(fCompareEditorInput.getTitleImage());
-
- return c;
- }
-
- /* (non-Javadoc)
- * Method declared on Window.
- */
- public int open() {
-
- int rc= super.open();
-
- if (rc == OK && fCompareEditorInput.isSaveNeeded()) {
-
- WorkspaceModifyOperation operation= new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor pm) throws CoreException {
- fCompareEditorInput.saveChanges(pm);
- }
- };
-
- Shell shell= getParentShell();
- ProgressMonitorDialog pmd= new ProgressMonitorDialog(shell);
- try {
- operation.run(pmd.getProgressMonitor());
-
- } catch (InterruptedException x) {
- } catch (OperationCanceledException x) {
- } catch (InvocationTargetException x) {
- String title= Utilities.getString("CompareDialog.saveErrorTitle"); //$NON-NLS-1$
- String msg= Utilities.getString("CompareDialog.saveErrorMessage"); //$NON-NLS-1$
- MessageDialog.openError(shell, title, msg + x.getTargetException().getMessage());
- }
- }
-
- return rc;
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java
deleted file mode 100644
index 215309b76..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.util.*;
-
-import org.eclipse.ui.*;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-import org.eclipse.ui.part.EditorPart;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.*;
-
-import org.eclipse.compare.*;
-
-
-/**
- * A CompareEditor takes a ICompareEditorInput as input.
- * Most functionality is delegated to the ICompareEditorInput.
- */
-public class CompareEditor extends EditorPart implements IPropertyChangeListener {
-
- public final static String CONFIRM_SAVE_PROPERTY= "org.eclipse.compare.internal.CONFIRM_SAVE_PROPERTY"; //$NON-NLS-1$
-
- private IActionBars fActionBars;
-
-
- public CompareEditor() {
- }
-
- /* package */ CompareConfiguration getCompareConfiguration() {
- IEditorInput input= getEditorInput();
- if (input instanceof CompareEditorInput)
- return ((CompareEditorInput)input).getCompareConfiguration();
- return null;
- }
-
- public void init(IEditorSite site, IEditorInput input) throws PartInitException {
-
- if (!(input instanceof CompareEditorInput))
- throw new PartInitException(Utilities.getString("CompareEditor.invalidInput")); //$NON-NLS-1$
-
- CompareEditorInput cei= (CompareEditorInput) input;
-
- setSite(site);
- setInput(input);
-
- setTitleImage(cei.getTitleImage());
- setTitle(cei.getTitle());
-
- if (input instanceof IPropertyChangeNotifier)
- ((IPropertyChangeNotifier)input).addPropertyChangeListener(this);
- }
-
- public IActionBars getActionBars() {
- return fActionBars;
- }
-
- public void setActionBars(IActionBars actionBars) {
- fActionBars= actionBars;
- }
-
- /*
- * @see IDesktopPart#createPartControl(Composite)
- */
- public void createPartControl(Composite parent) {
- parent.setData(this);
-
- IEditorInput input= getEditorInput();
- if (input instanceof CompareEditorInput)
- ((CompareEditorInput) input).createContents(parent);
- }
-
- /*
- * @see DesktopPart#dispose
- */
- public void dispose() {
-
- IEditorInput input= getEditorInput();
- if (input instanceof IPropertyChangeNotifier)
- ((IPropertyChangeNotifier)input).removePropertyChangeListener(this);
-
- super.dispose();
- }
-
- /*
- * @see IDesktopPart#setFocus
- */
- public void setFocus() {
- IEditorInput input= getEditorInput();
- if (input instanceof CompareEditorInput)
- ((CompareEditorInput)input).setFocus();
- }
-
- /**
- * Returns false because the editor doesn't support "Save As...".
- */
- public boolean isSaveAsAllowed() {
- return false;
- }
-
- public void gotoMarker(IMarker marker) {
- }
-
- /**
- * Always throws an AssertionFailedException.
- */
- /*
- * @see IEditorPart#doSaveAs()
- */
- public void doSaveAs() {
- Assert.isTrue(false); // Save As not supported for CompareEditor
- }
-
- /*
- * @see IEditorPart#doSave()
- */
- public void doSave(IProgressMonitor progressMonitor) {
-
- final IEditorInput input= getEditorInput();
-
- WorkspaceModifyOperation operation= new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor pm) throws CoreException {
- if (input instanceof CompareEditorInput)
- ((CompareEditorInput)input).saveChanges(pm);
- }
- };
-
- Shell shell= getSite().getShell();
-
- try {
-
- operation.run(progressMonitor);
-
- firePropertyChange(PROP_DIRTY);
-
- } catch (InterruptedException x) {
- } catch (OperationCanceledException x) {
- } catch (InvocationTargetException x) {
- String title= Utilities.getString("CompareEditor.saveError.title"); //$NON-NLS-1$
- String reason= x.getTargetException().getMessage();
- MessageDialog.openError(shell, title, Utilities.getFormattedString("CompareEditor.cantSaveError", reason)); //$NON-NLS-1$
- }
- }
-
- /*
- * @see IEditorPart#isDirty()
- */
- public boolean isDirty() {
- IEditorInput input= getEditorInput();
- if (input instanceof CompareEditorInput)
- return ((CompareEditorInput)input).isSaveNeeded();
- return false;
- }
-
- public void propertyChange(PropertyChangeEvent event) {
- if (isDirty())
- firePropertyChange(PROP_DIRTY);
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorContributor.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorContributor.java
deleted file mode 100644
index 186006516..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorContributor.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.jface.action.*;
-
-import org.eclipse.ui.*;
-import org.eclipse.ui.part.EditorActionBarContributor;
-
-import org.eclipse.compare.*;
-
-
-public class CompareEditorContributor extends EditorActionBarContributor {
-
- private IEditorPart fActiveEditorPart= null;
-
- private IgnoreWhiteSpaceAction fIgnoreWhitespace;
- private NavigationAction fNext;
- private NavigationAction fPrevious;
-
- private NavigationAction fToolbarNext;
- private NavigationAction fToolbarPrevious;
-
-
- public CompareEditorContributor() {
- ResourceBundle bundle= CompareUIPlugin.getResourceBundle();
- fIgnoreWhitespace= new IgnoreWhiteSpaceAction(bundle, null);
- fNext= new NavigationAction(bundle, true);
- fPrevious= new NavigationAction(bundle, false);
- fToolbarNext= new NavigationAction(bundle, true);
- fToolbarPrevious= new NavigationAction(bundle, false);
- }
-
- /*
- * @see EditorActionBarContributor#contributeToToolBar(IToolBarManager)
- */
- public void contributeToToolBar(IToolBarManager tbm) {
- tbm.add(new Separator());
- tbm.add(fIgnoreWhitespace);
- tbm.add(fToolbarNext);
- tbm.add(fToolbarPrevious);
- }
-
- /*
- * @see EditorActionBarContributor#contributeToMenu(IMenuManager)
- */
- public void contributeToMenu(IMenuManager menuManager) {
- }
-
- public void setActiveEditor(IEditorPart targetEditor) {
-
- if (fActiveEditorPart == targetEditor)
- return;
-
- fActiveEditorPart= targetEditor;
-
- if (fActiveEditorPart != null) {
- IEditorInput input= fActiveEditorPart.getEditorInput();
- if (input instanceof CompareEditorInput) {
- CompareEditorInput compareInput= (CompareEditorInput) input;
- fNext.setCompareEditorInput(compareInput);
- fPrevious.setCompareEditorInput(compareInput);
- }
- }
-
- if (targetEditor instanceof CompareEditor) {
- IActionBars actionBars= getActionBars();
-
- CompareEditor editor= (CompareEditor) targetEditor;
- editor.setActionBars(actionBars);
-
- actionBars.setGlobalActionHandler(IWorkbenchActionConstants.NEXT, fNext);
- actionBars.setGlobalActionHandler(IWorkbenchActionConstants.PREVIOUS, fPrevious);
-
- CompareConfiguration cc= editor.getCompareConfiguration();
- fIgnoreWhitespace.setCompareConfiguration(cc);
- }
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.java
deleted file mode 100644
index 96b7c0407..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2002.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class CompareMessages {
-
- private static final String RESOURCE_BUNDLE= "org.eclipse.compare.internal.CompareMessages";//$NON-NLS-1$
-
- private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
-
- private CompareMessages() {
- }
-
- public static String getString(String key) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
- }
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.properties b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.properties
deleted file mode 100644
index 7c7e50a81..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.properties
+++ /dev/null
@@ -1,52 +0,0 @@
-# =====================================
-# (c) Copyright IBM Corp. 2002.
-# All Rights Reserved.
-# =====================================
-
-ComparePlugin.internal_error= Internal Error
-ExceptionDialog.seeErrorLogMessage= See error log for more details.
-
-#
-# Title format for CompareViewerSwitchingPane
-#
-CompareViewerSwitchingPane.Titleformat= {0} ({1})
-
-#
-# Title message for StructureDiffViewer if no structural differences could be found
-#
-StructureDiffViewer.NoStructuralDifferences= No Structural Differences
-StructureDiffViewer.StructureError= Can't Compare Structures
-
-#
-# TextMergeViewer
-#
-TextMergeViewer.cursorPosition.format= {0} : {1}
-
-TextMergeViewer.beforeLine.format= before line {0}
-TextMergeViewer.range.format= {0} : {1}
-
-TextMergeViewer.changeType.addition= addition
-TextMergeViewer.changeType.deletion= deletion
-TextMergeViewer.changeType.change= change
-
-TextMergeViewer.direction.outgoing= outgoing
-TextMergeViewer.direction.incoming= incoming
-TextMergeViewer.direction.conflicting= conflicting
-
-TextMergeViewer.diffType.format= {0} {1}
-
-TextMergeViewer.diffDescription.noDiff.format= no diff
-TextMergeViewer.diffDescription.diff.format= {0} #{1} (Left: {2}, Right: {3})
-TextMergeViewer.statusLine.format= Left: {0}, Right: {1}, {2}
-
-TextMergeViewer.atEnd.title= Go to Next Difference
-TextMergeViewer.atEnd.message= End of document reached. Continue at beginning?
-
-TextMergeViewer.atBeginning.title= Go to Previous Difference
-TextMergeViewer.atBeginning.message= Beginning of document reached. Continue at end?
-
-CompareNavigator.atEnd.title= Go to Next Difference
-CompareNavigator.atEnd.message= Last difference reached.
-
-CompareNavigator.atBeginning.title= Go to Previous Difference
-CompareNavigator.atBeginning.message= First difference reached.
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareNavigator.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareNavigator.java
deleted file mode 100644
index 6255c805a..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareNavigator.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.dialogs.MessageDialog;
-
-import org.eclipse.compare.CompareEditorInput;
-import org.eclipse.compare.*;
-
-/**
- * Supports cross-pane navigation through differences.
- * XXX: Design is as it is because the feature had to be added without touching API.
- */
-public class CompareNavigator {
-
- private boolean fLastDirection= true;
- private CompareViewerSwitchingPane[] fPanes;
-
- public CompareNavigator(CompareViewerSwitchingPane[] panes) {
- fPanes= panes;
- }
-
- public CompareViewerSwitchingPane[] getPanes() {
- return fPanes;
- }
-
- public void selectChange(boolean next) {
-
- fLastDirection= next;
-
- // 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;
- }
- // beep
- if (fPanes[0] != null) {
- Control c= fPanes[0].getContent();
- if (c != null) {
- Display display= c.getDisplay();
- if (display != null)
- display.beep();
-
- String title;
- String message;
- if (next) {
- title= CompareMessages.getString("CompareNavigator.atEnd.title"); //$NON-NLS-1$
- message= CompareMessages.getString("CompareNavigator.atEnd.message"); //$NON-NLS-1$
- } else {
- title= CompareMessages.getString("CompareNavigator.atBeginning.title"); //$NON-NLS-1$
- message= CompareMessages.getString("CompareNavigator.atBeginning.message"); //$NON-NLS-1$
- }
- MessageDialog.openInformation(c.getShell(), title, message);
- }
- }
- }
-
- private static INavigatable getNavigator(CompareViewerSwitchingPane pane) {
- 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(INavigatable.NAVIGATOR_PROPERTY);
- if (data instanceof INavigatable)
- return (INavigatable) data;
- 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;
- }
-
- public static boolean getDirection(Control c) {
- CompareNavigator nav= findNavigator(c);
- if (nav != null)
- return nav.resetDirection();
- return true;
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferencePage.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferencePage.java
deleted file mode 100644
index e4dd22515..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferencePage.java
+++ /dev/null
@@ -1,358 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.util.*;
-import java.io.*;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-
-import org.eclipse.jface.preference.*;
-import org.eclipse.jface.util.*;
-
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.texteditor.WorkbenchChainedTextFontFieldEditor;
-import org.eclipse.ui.texteditor.AbstractTextEditor;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.contentmergeviewer.TextMergeViewer;
-import org.eclipse.compare.structuremergeviewer.*;
-
-
-public class ComparePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
-
- class FakeInput implements ITypedElement, IStreamContentAccessor {
- String fContent;
-
- FakeInput(String name) {
- fContent= loadPreviewContentFromFile(name);
- }
- public Image getImage() {
- return null;
- }
- public String getName() {
- return "no name"; //$NON-NLS-1$
- }
- public String getType() {
- return "no type"; //$NON-NLS-1$
- }
- public InputStream getContents() {
- return new ByteArrayInputStream(fContent.getBytes());
- }
- };
-
- private static final String PREFIX= CompareUIPlugin.PLUGIN_ID + "."; //$NON-NLS-1$
- public static final String OPEN_STRUCTURE_COMPARE= PREFIX + "OpenStructureCompare"; //$NON-NLS-1$
- public static final String SYNCHRONIZE_SCROLLING= PREFIX + "SynchronizeScrolling"; //$NON-NLS-1$
- public static final String SHOW_PSEUDO_CONFLICTS= PREFIX + "ShowPseudoConflicts"; //$NON-NLS-1$
- public static final String INITIALLY_SHOW_ANCESTOR_PANE= PREFIX + "InitiallyShowAncestorPane"; //$NON-NLS-1$
- public static final String PREF_SAVE_ALL_EDITORS= PREFIX + "SaveAllEditors"; //$NON-NLS-1$
- public static final String SHOW_MORE_INFO= PREFIX + "ShowMoreInfo"; //$NON-NLS-1$
- public static final String TEXT_FONT= PREFIX + "TextFont"; //$NON-NLS-1$
- public static final String IGNORE_WHITESPACE= PREFIX + "IgnoreWhitespace"; //$NON-NLS-1$
-
- private WorkbenchChainedTextFontFieldEditor fFontEditor;
- private TextMergeViewer fPreviewViewer;
- private IPropertyChangeListener fPreferenceChangeListener;
- private CompareConfiguration fCompareConfiguration;
- private OverlayPreferenceStore fOverlayStore;
- private Map fCheckBoxes= new HashMap();
- private SelectionListener fCheckBoxListener;
-
-
- public final OverlayPreferenceStore.OverlayKey[] fKeys= new OverlayPreferenceStore.OverlayKey[] {
- new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, OPEN_STRUCTURE_COMPARE),
- new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, SYNCHRONIZE_SCROLLING),
- new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, SHOW_PSEUDO_CONFLICTS),
- new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, INITIALLY_SHOW_ANCESTOR_PANE),
- new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, SHOW_MORE_INFO),
- new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, TEXT_FONT),
- new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IGNORE_WHITESPACE),
-
- new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND),
- new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT)
- };
-
-
- public static void initDefaults(IPreferenceStore store) {
- store.setDefault(OPEN_STRUCTURE_COMPARE, true);
- store.setDefault(SYNCHRONIZE_SCROLLING, true);
- store.setDefault(SHOW_PSEUDO_CONFLICTS, false);
- store.setDefault(INITIALLY_SHOW_ANCESTOR_PANE, false);
- store.setDefault(SHOW_MORE_INFO, false);
- store.setDefault(IGNORE_WHITESPACE, false);
-
- Display display= Display.getDefault();
- Color color= display.getSystemColor(SWT.COLOR_LIST_BACKGROUND);
- PreferenceConverter.setDefault(store, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND, color.getRGB());
- store.setDefault(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT, true);
-
- WorkbenchChainedTextFontFieldEditor.startPropagate(store, TEXT_FONT);
- }
-
- public ComparePreferencePage() {
-
- //setDescription(Utilities.getString("ComparePreferencePage.description")); //$NON-NLS-1$
-
- setPreferenceStore(CompareUIPlugin.getDefault().getPreferenceStore());
-
- fOverlayStore= new OverlayPreferenceStore(getPreferenceStore(), fKeys);
- fPreferenceChangeListener= new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- String key= event.getProperty();
- if (key.equals(INITIALLY_SHOW_ANCESTOR_PANE)) {
- boolean b= fOverlayStore.getBoolean(INITIALLY_SHOW_ANCESTOR_PANE);
- if (fCompareConfiguration != null) {
- fCompareConfiguration.setProperty(INITIALLY_SHOW_ANCESTOR_PANE, new Boolean(b));
- }
- }
- }
- };
- fOverlayStore.addPropertyChangeListener(fPreferenceChangeListener);
- }
-
- /*
- * @see IWorkbenchPreferencePage#init()
- */
- public void init(IWorkbench workbench) {
- }
-
- /*
- * @see PreferencePage#performOk()
- */
- public boolean performOk() {
- fFontEditor.store();
- fOverlayStore.propagate();
- return true;
- }
-
- /*
- * @see PreferencePage#performDefaults()
- */
- protected void performDefaults() {
-
- fFontEditor.loadDefault();
-
- fOverlayStore.loadDefaults();
- initializeFields();
-
- super.performDefaults();
- }
-
- /*
- * @see DialogPage#dispose()
- */
- public void dispose() {
-
- fFontEditor.setPreferencePage(null);
- fFontEditor.setPreferenceStore(null);
-
- if (fOverlayStore != null) {
- if (fPreferenceChangeListener != null) {
- fOverlayStore.removePropertyChangeListener(fPreferenceChangeListener);
- fPreferenceChangeListener= null;
- }
- fOverlayStore.stop();
- fOverlayStore= null;
- }
-
- super.dispose();
- }
-
- static public boolean getSaveAllEditors() {
- IPreferenceStore store= CompareUIPlugin.getDefault().getPreferenceStore();
- return store.getBoolean(PREF_SAVE_ALL_EDITORS);
- }
-
- static public void setSaveAllEditors(boolean value) {
- IPreferenceStore store= CompareUIPlugin.getDefault().getPreferenceStore();
- store.setValue(PREF_SAVE_ALL_EDITORS, value);
- }
-
- /*
- * @see PreferencePage#createContents(Composite)
- */
- protected Control createContents(Composite parent) {
-
- fOverlayStore.load();
- fOverlayStore.start();
-
- TabFolder folder= new TabFolder(parent, SWT.NONE);
- folder.setLayout(new TabFolderLayout());
- folder.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- TabItem item= new TabItem(folder, SWT.NONE);
- item.setText(Utilities.getString("ComparePreferencePage.generalTab.label")); //$NON-NLS-1$
- //item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE));
- item.setControl(createGeneralPage(folder));
-
- item= new TabItem(folder, SWT.NONE);
- item.setText(Utilities.getString("ComparePreferencePage.textCompareTab.label")); //$NON-NLS-1$
- //item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE));
- item.setControl(createTextComparePage(folder));
-
- initializeFields();
-
- return folder;
- }
-
- private Control createGeneralPage(Composite parent) {
- Composite composite= new Composite(parent, SWT.NULL);
- GridLayout layout= new GridLayout();
- layout.numColumns= 1;
- composite.setLayout(layout);
-
- addCheckBox(composite, "ComparePreferencePage.structureCompare.label", OPEN_STRUCTURE_COMPARE, 0); //$NON-NLS-1$
-
- addCheckBox(composite, "ComparePreferencePage.showMoreInfo.label", SHOW_MORE_INFO, 0); //$NON-NLS-1$
-
- addCheckBox(composite, "ComparePreferencePage.ignoreWhitespace.label", IGNORE_WHITESPACE, 0); //$NON-NLS-1$
-
- return composite;
- }
-
- private Control createTextComparePage(Composite parent) {
-
- Composite composite= new Composite(parent, SWT.NULL);
- GridLayout layout= new GridLayout();
- layout.numColumns= 1;
- composite.setLayout(layout);
-
- addCheckBox(composite, "ComparePreferencePage.synchronizeScrolling.label", SYNCHRONIZE_SCROLLING, 0); //$NON-NLS-1$
-
- addCheckBox(composite, "ComparePreferencePage.initiallyShowAncestorPane.label", INITIALLY_SHOW_ANCESTOR_PANE, 0); //$NON-NLS-1$
-
- addCheckBox(composite, "ComparePreferencePage.showPseudoConflicts.label", SHOW_PSEUDO_CONFLICTS, 0); //$NON-NLS-1$
-
- fFontEditor= addTextFontEditor(composite, "ComparePreferencePage.textFont.label", TEXT_FONT); //$NON-NLS-1$
- fFontEditor.setPreferenceStore(getPreferenceStore());
- fFontEditor.setPreferencePage(this);
- fFontEditor.load();
-
- Label previewLabel= new Label(composite, SWT.NULL);
- previewLabel.setText(Utilities.getString("ComparePreferencePage.preview.label")); //$NON-NLS-1$
-
- Control previewer= createPreviewer(composite);
- GridData gd= new GridData(GridData.FILL_BOTH);
- gd.widthHint= convertWidthInCharsToPixels(80);
- gd.heightHint= convertHeightInCharsToPixels(15);
- previewer.setLayoutData(gd);
-
- return composite;
- }
-
- private Control createPreviewer(Composite parent) {
-
- fCompareConfiguration= new CompareConfiguration(fOverlayStore);
- fCompareConfiguration.setAncestorLabel(Utilities.getString("ComparePreferencePage.ancestor.label")); //$NON-NLS-1$
-
- fCompareConfiguration.setLeftLabel(Utilities.getString("ComparePreferencePage.left.label")); //$NON-NLS-1$
- fCompareConfiguration.setLeftEditable(false);
-
- fCompareConfiguration.setRightLabel(Utilities.getString("ComparePreferencePage.right.label")); //$NON-NLS-1$
- fCompareConfiguration.setRightEditable(false);
-
- fPreviewViewer= new TextMergeViewer(parent, SWT.BORDER, fCompareConfiguration);
-
- fPreviewViewer.setInput(
- new DiffNode(Differencer.CONFLICTING,
- new FakeInput("previewAncestor.txt"), //$NON-NLS-1$
- new FakeInput("previewLeft.txt"), //$NON-NLS-1$
- new FakeInput("previewRight.txt") //$NON-NLS-1$
- )
- );
-
- return fPreviewViewer.getControl();
- }
-
- private void initializeFields() {
-
- Iterator e= fCheckBoxes.keySet().iterator();
- while (e.hasNext()) {
- Button b= (Button) e.next();
- String key= (String) fCheckBoxes.get(b);
- b.setSelection(fOverlayStore.getBoolean(key));
- }
- }
-
- // overlay stuff
-
- private WorkbenchChainedTextFontFieldEditor addTextFontEditor(Composite parent, String labelKey, String key) {
-
- String label= Utilities.getString(labelKey);
-
- Group group= new Group(parent, SWT.NULL);
- group.setText(label);
- GridLayout layout= new GridLayout();
- layout.numColumns= 3;
- layout.marginWidth+= 3;
- group.setLayout(layout);
- WorkbenchChainedTextFontFieldEditor fe= new WorkbenchChainedTextFontFieldEditor(key, "", group); //$NON-NLS-1$
-
- GridData gd= new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan= 2;
- group.setLayoutData(gd);
-
- return fe;
- }
-
- private Button addCheckBox(Composite parent, String labelKey, String key, int indentation) {
-
- String label= Utilities.getString(labelKey);
-
- Button checkBox= new Button(parent, SWT.CHECK);
- checkBox.setText(label);
-
- GridData gd= new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalIndent= indentation;
- gd.horizontalSpan= 2;
- checkBox.setLayoutData(gd);
-
- if (fCheckBoxListener == null) {
- fCheckBoxListener= new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Button button= (Button) e.widget;
- fOverlayStore.setValue((String) fCheckBoxes.get(button), button.getSelection());
- }
- };
- }
- checkBox.addSelectionListener(fCheckBoxListener);
-
- fCheckBoxes.put(checkBox, key);
-
- return checkBox;
- }
-
- private String loadPreviewContentFromFile(String filename) {
- String separator= System.getProperty("line.separator"); //$NON-NLS-1$
- StringBuffer buffer= new StringBuffer(512);
- BufferedReader reader= null;
- try {
- reader= new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(filename)));
- String line;
- while ((line= reader.readLine()) != null) {
- buffer.append(line);
- buffer.append(separator);
- }
- } catch (IOException io) {
- CompareUIPlugin.log(io);
- } finally {
- if (reader != null) {
- try {
- reader.close();
- } catch (IOException e) {
- }
- }
- }
- return buffer.toString();
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java
deleted file mode 100644
index a55ff322c..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java
+++ /dev/null
@@ -1,862 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-
-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.jface.viewers.Viewer;
-import org.eclipse.jface.util.Assert;
-import org.eclipse.jface.preference.IPreferenceStore;
-
-import org.eclipse.ui.internal.SharedImages;
-import org.eclipse.core.runtime.*;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.ui.*;
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.*;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-
-/**
- * The Compare UI plug-in defines the entry point to initiate a configurable
- * compare operation on arbitrary resources. The result of the compare
- * is opened into a compare editor where the details can be browsed and
- * edited in dynamically selected structure and content viewers.
- * <p>
- * The Compare UI provides a registry for content and structure compare viewers,
- * which is initialized from extensions contributed to extension points
- * declared by this plug-in.
- * <p>
- * This class is the plug-in runtime class for the
- * <code>"org.eclipse.compare"</code> plug-in.
- * </p>
- */
-public final class CompareUIPlugin extends AbstractUIPlugin {
-
- public static final String DTOOL_NEXT= "dlcl16/next_nav.gif"; //$NON-NLS-1$
- public static final String CTOOL_NEXT= "clcl16/next_nav.gif"; //$NON-NLS-1$
- public static final String ETOOL_NEXT= "elcl16/next_nav.gif"; //$NON-NLS-1$
-
- public static final String DTOOL_PREV= "dlcl16/prev_nav.gif"; //$NON-NLS-1$
- public static final String CTOOL_PREV= "clcl16/prev_nav.gif"; //$NON-NLS-1$
- public static final String ETOOL_PREV= "elcl16/prev_nav.gif"; //$NON-NLS-1$
-
- /** Status code describing an internal error */
- public static final int INTERNAL_ERROR= 1;
-
- private static boolean NORMALIZE_CASE= true;
-
- private final static String CLASS_ATTRIBUTE= "class"; //$NON-NLS-1$
- private final static String EXTENSIONS_ATTRIBUTE= "extensions"; //$NON-NLS-1$
-
- public static final String PLUGIN_ID= "org.eclipse.compare"; //$NON-NLS-1$
-
- private static final String STRUCTURE_CREATOR_EXTENSION_POINT= "structureCreators"; //$NON-NLS-1$
- private static final String STRUCTURE_MERGEVIEWER_EXTENSION_POINT= "structureMergeViewers"; //$NON-NLS-1$
- private static final String CONTENT_MERGEVIEWER_EXTENSION_POINT= "contentMergeViewers"; //$NON-NLS-1$
- private static final String CONTENT_VIEWER_EXTENSION_POINT= "contentViewers"; //$NON-NLS-1$
-
- private static final String COMPARE_EDITOR= PLUGIN_ID + ".CompareEditor"; //$NON-NLS-1$
-
- private static final String STRUCTUREVIEWER_ALIASES_PREFERENCE_NAME= "StructureViewerAliases"; //$NON-NLS-1$
-
- /** Maps type to icons */
- private static Map fgImages= new Hashtable(10);
- /** Maps type to ImageDescriptors */
- private static Map fgImageDescriptors= new Hashtable(10);
- /** Maps ImageDescriptors to Images */
- private static Map fgImages2= new Hashtable(10);
-
- private static Map fgStructureCreators= new Hashtable(10);
- private static Map fgStructureViewerDescriptors= new Hashtable(10);
- private static Map fgStructureViewerAliases= new Hashtable(10);
- private static Map fgContentViewerDescriptors= new Hashtable(10);
- private static Map fgContentMergeViewerDescriptors= new Hashtable(10);
-
- private static List fgDisposeOnShutdownImages= new ArrayList();
-
- private static ResourceBundle fgResourceBundle;
-
- private static CompareUIPlugin fgComparePlugin;
-
- /**
- * Creates the <code>CompareUIPlugin</code> object and registers all
- * structure creators, content merge viewers, and structure merge viewers
- * contributed to this plug-in's extension points.
- * <p>
- * Note that instances of plug-in runtime classes are automatically created
- * by the platform in the course of plug-in activation.
- * </p>
- *
- * @param descriptor the plug-in descriptor
- */
- public CompareUIPlugin(IPluginDescriptor descriptor) {
- super(descriptor);
-
- fgComparePlugin= this;
-
- fgResourceBundle= descriptor.getResourceBundle();
-
- registerExtensions();
-
- initPreferenceStore();
- }
-
- /**
- * @see AbstractUIPlugin#initializeDefaultPreferences
- */
- protected void initializeDefaultPreferences(IPreferenceStore store) {
- super.initializeDefaultPreferences(store);
-
- ComparePreferencePage.initDefaults(store);
- }
-
- /**
- * Registers all structure creators, content merge viewers, and structure merge viewers
- * that are found in the XML plugin files.
- */
- private void registerExtensions() {
- IPluginRegistry registry= Platform.getPluginRegistry();
-
- // collect all IStructureCreators
- IConfigurationElement[] elements= registry.getConfigurationElementsFor(PLUGIN_ID, STRUCTURE_CREATOR_EXTENSION_POINT);
- for (int i= 0; i < elements.length; i++) {
- final IConfigurationElement conf= elements[i];
- String extensions= conf.getAttribute(EXTENSIONS_ATTRIBUTE);
- registerStructureCreator(extensions,
- new IStructureCreatorDescriptor() {
- public IStructureCreator createStructureCreator() {
- try {
- return (IStructureCreator) conf.createExecutableExtension(CLASS_ATTRIBUTE);
- } catch (CoreException ex) {
- }
- return null;
- }
- }
- );
- }
-
- // collect all viewers which define the structure mergeviewer extension point
- elements= registry.getConfigurationElementsFor(PLUGIN_ID, STRUCTURE_MERGEVIEWER_EXTENSION_POINT);
- for (int i= 0; i < elements.length; i++) {
- ViewerDescriptor desc= new ViewerDescriptor(elements[i]);
- String ext= desc.getExtension();
- if (ext != null)
- registerStructureViewerDescriptor(desc.getExtension(), desc);
- }
-
- // collect all viewers which define the content mergeviewer extension point
- elements= registry.getConfigurationElementsFor(PLUGIN_ID, CONTENT_MERGEVIEWER_EXTENSION_POINT);
- for (int i= 0; i < elements.length; i++) {
- ViewerDescriptor desc= new ViewerDescriptor(elements[i]);
- String ext= desc.getExtension();
- if (ext != null)
- registerContentMergeViewerDescriptor(desc.getExtension(), desc);
- }
-
- // collect all viewers which define the content viewer extension point
- elements= registry.getConfigurationElementsFor(PLUGIN_ID, CONTENT_VIEWER_EXTENSION_POINT);
- for (int i= 0; i < elements.length; i++) {
- ViewerDescriptor desc= new ViewerDescriptor(elements[i]);
- String ext= desc.getExtension();
- if (ext != null)
- registerContentViewerDescriptor(desc.getExtension(), desc);
- }
- }
-
- /**
- * Returns the singleton instance of this plug-in runtime class.
- *
- * @return the compare plug-in instance
- */
- public static CompareUIPlugin getDefault() {
- return fgComparePlugin;
- }
-
- /**
- * Returns this plug-in's resource bundle.
- *
- * @return the plugin's resource bundle
- */
- public static ResourceBundle getResourceBundle() {
- return fgResourceBundle;
- }
-
- public static IWorkbench getActiveWorkbench() {
- CompareUIPlugin plugin= getDefault();
- if (plugin == null)
- return null;
- return plugin.getWorkbench();
- }
-
- public static IWorkbenchWindow getActiveWorkbenchWindow() {
- IWorkbench workbench= getActiveWorkbench();
- if (workbench == null)
- return null;
- return workbench.getActiveWorkbenchWindow();
- }
-
- /**
- * Returns the active workkbench page or <code>null</code> if
- * no active workkbench page can be determined.
- *
- * @return the active workkbench page or <code>null</code> if
- * no active workkbench page can be determined
- */
- private static IWorkbenchPage getActivePage() {
- IWorkbenchWindow window= getActiveWorkbenchWindow();
- if (window == null)
- return null;
- return window.getActivePage();
- }
-
- /**
- * Returns the SWT Shell of the active workbench window or <code>null</code> if
- * no workbench window is active.
- *
- * @return the SWT Shell of the active workbench window, or <code>null</code> if
- * no workbench window is active
- */
- public static Shell getShell() {
- IWorkbenchWindow window= getActiveWorkbenchWindow();
- if (window == null)
- return null;
- return window.getShell();
- }
-
- /**
- * Registers the given image for being disposed when this plug-in is shutdown.
- *
- * @param image the image to register for disposal
- */
- public static void disposeOnShutdown(Image image) {
- if (image != null)
- fgDisposeOnShutdownImages.add(image);
- }
-
- /* (non-Javadoc)
- * Method declared on Plugin.
- * Frees all resources of the compare plug-in.
- */
- public void shutdown() throws CoreException {
-
- /*
- * Converts the aliases into a single string before they are stored
- * in the preference store.
- * The format is:
- * <key> '.' <alias> ' ' <key> '.' <alias> ...
- */
- IPreferenceStore ps= getPreferenceStore();
- if (ps != null) {
- StringBuffer sb= new StringBuffer();
- Iterator iter= fgStructureViewerAliases.keySet().iterator();
- while (iter.hasNext()) {
- String key= (String) iter.next();
- String alias= (String) fgStructureViewerAliases.get(key);
- sb.append(key);
- sb.append('.');
- sb.append(alias);
- sb.append(' ');
- }
- ps.setValue(STRUCTUREVIEWER_ALIASES_PREFERENCE_NAME, sb.toString());
- }
-
- super.shutdown();
-
- if (fgDisposeOnShutdownImages != null) {
- Iterator i= fgDisposeOnShutdownImages.iterator();
- while (i.hasNext()) {
- Image img= (Image) i.next();
- if (!img.isDisposed())
- img.dispose();
- }
- fgImages= null;
- }
- }
-
- /**
- * Performs the comparison described by the given input and opens a
- * compare editor on the result.
- *
- * @param input the input on which to open the compare editor
- * @see CompareEditorInput
- */
- public void openCompareEditor(CompareEditorInput input) {
-
- if (compareResultOK(input)) {
- IWorkbenchPage activePage= getActivePage();
- if (activePage != null) {
- try {
- activePage.openEditor(input, COMPARE_EDITOR);
- } catch (PartInitException e) {
- MessageDialog.openError(getShell(), Utilities.getString("CompareUIPlugin.openEditorError"), e.getMessage()); //$NON-NLS-1$
- }
- } else {
- MessageDialog.openError(getShell(),
- Utilities.getString("CompareUIPlugin.openEditorError"), //$NON-NLS-1$
- Utilities.getString("CompareUIPlugin.noActiveWorkbenchPage")); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Performs the comparison described by the given input and opens a
- * compare dialog on the result.
- *
- * @param input the input on which to open the compare editor
- * @see CompareEditorInput
- */
- public void openCompareDialog(final CompareEditorInput input) {
-
- if (compareResultOK(input)) {
- CompareDialog dialog= new CompareDialog(getShell(), input);
- dialog.open();
- }
- }
-
- /**
- * @return <code>true</code> if compare result is OK to show, <code>false</code> otherwise
- */
- private boolean compareResultOK(CompareEditorInput input) {
- final Shell shell= getShell();
- try {
-
- // run operation in separate thread and make it canceable
- new ProgressMonitorDialog(shell).run(true, true, input);
-
- String message= input.getMessage();
- if (message != null) {
- MessageDialog.openError(shell, Utilities.getString("CompareUIPlugin.compareFailed"), message); //$NON-NLS-1$
- return false;
- }
-
- if (input.getCompareResult() == null) {
- MessageDialog.openInformation(shell, Utilities.getString("CompareUIPlugin.dialogTitle"), Utilities.getString("CompareUIPlugin.noDifferences")); //$NON-NLS-2$ //$NON-NLS-1$
- return false;
- }
-
- return true;
-
- } catch (InterruptedException x) {
- // cancelled by user
- } catch (InvocationTargetException x) {
- MessageDialog.openError(shell, Utilities.getString("CompareUIPlugin.compareFailed"), x.getTargetException().getMessage()); //$NON-NLS-1$
- }
- return false;
- }
-
- /**
- * Registers an image for the given type.
- */
- private static void registerImage(String type, Image image, boolean dispose) {
- fgImages.put(normalizeCase(type), image);
- if (image != null && dispose) {
- fgDisposeOnShutdownImages.add(image);
- }
- }
-
- /**
- * Registers an image descriptor for the given type.
- *
- * @param type the type
- * @param descriptor the image descriptor
- */
- public static void registerImageDescriptor(String type, ImageDescriptor descriptor) {
- fgImageDescriptors.put(normalizeCase(type), descriptor);
- }
-
- public static ImageDescriptor getImageDescriptor(String relativePath) {
-
- URL installURL= null;
- if (fgComparePlugin != null)
- installURL= fgComparePlugin.getDescriptor().getInstallURL();
-
- if (installURL != null) {
- try {
- URL url= new URL(installURL, Utilities.getIconPath(null) + relativePath);
- return ImageDescriptor.createFromURL(url);
- } catch (MalformedURLException e) {
- Assert.isTrue(false);
- }
- }
- return null;
- }
-
- /**
- * Returns a shared image for the given type, or a generic image if none
- * has been registered for the given type.
- * <p>
- * Note: Images returned from this method will be automitically disposed
- * of when this plug-in shuts down. Callers must not dispose of these
- * images themselves.
- * </p>
- *
- * @param type the type
- * @return the image
- */
- public static Image getImage(String type) {
-
- type= normalizeCase(type);
-
- boolean dispose= false;
- Image image= null;
- if (type != null)
- image= (Image) fgImages.get(type);
- if (image == null) {
- ImageDescriptor id= (ImageDescriptor) fgImageDescriptors.get(type);
- if (id != null) {
- image= id.createImage();
- dispose= true;
- }
-
- if (image == null) {
- if (fgComparePlugin != null) {
- if (ITypedElement.FOLDER_TYPE.equals(type)) {
- image= getDefault().getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER);
- //image= SharedImages.getImage(ISharedImages.IMG_OBJ_FOLDER);
- } else {
- image= createWorkbenchImage(type);
- dispose= true;
- }
- } else {
- id= (ImageDescriptor) fgImageDescriptors.get(normalizeCase("file")); //$NON-NLS-1$
- image= id.createImage();
- dispose= true;
- }
- }
- if (image != null)
- registerImage(type, image, dispose);
- }
- return image;
- }
-
- /**
- * Returns a shared image for the given adaptable.
- * This convenience method queries the given adaptable
- * for its <code>IWorkbenchAdapter.getImageDescriptor</code>, which it
- * uses to create an image if it does not already have one.
- * <p>
- * Note: Images returned from this method will be automitically disposed
- * of when this plug-in shuts down. Callers must not dispose of these
- * images themselves.
- * </p>
- *
- * @param adaptable the adaptable for which to find an image
- * @return an image
- */
- public static Image getImage(IAdaptable adaptable) {
- if (adaptable != null) {
- Object o= adaptable.getAdapter(IWorkbenchAdapter.class);
- if (o instanceof IWorkbenchAdapter) {
- ImageDescriptor id= ((IWorkbenchAdapter) o).getImageDescriptor(adaptable);
- if (id != null) {
- Image image= (Image)fgImages2.get(id);
- if (image == null) {
- image= id.createImage();
- try {
- fgImages2.put(id, image);
- } catch (NullPointerException ex) {
- }
- fgDisposeOnShutdownImages.add(image);
-
- }
- return image;
- }
- }
- }
- return null;
- }
-
- private static Image createWorkbenchImage(String type) {
- IEditorRegistry er= getDefault().getWorkbench().getEditorRegistry();
- ImageDescriptor id= er.getImageDescriptor("foo." + type); //$NON-NLS-1$
- return id.createImage();
- }
-
- /**
- * Registers the given structure creator descriptor for one or more types.
- *
- * @param types one or more types separated by commas and whitespace
- * @param descriptor the descriptor to register
- */
- public static void registerStructureCreator(String types, IStructureCreatorDescriptor descriptor) {
- if (types != null) {
- StringTokenizer tokenizer= new StringTokenizer(types, ","); //$NON-NLS-1$
- while (tokenizer.hasMoreElements()) {
- String extension= tokenizer.nextToken().trim();
- fgStructureCreators.put(normalizeCase(extension), descriptor);
- }
- }
- }
-
- /**
- * Returns an structure creator descriptor for the given type.
- *
- * @param type the type for which to find a descriptor
- * @return a descriptor for the given type, or <code>null</code> if no
- * descriptor has been registered
- */
- public static IStructureCreatorDescriptor getStructureCreator(String type) {
- return (IStructureCreatorDescriptor) fgStructureCreators.get(normalizeCase(type));
- }
-
- /**
- * Registers the given structure viewer descriptor for one or more types.
- *
- * @param types one or more types separated by commas and whitespace
- * @param the descriptor to register
- */
- public static void registerStructureViewerDescriptor(String types, IViewerDescriptor descriptor) {
- StringTokenizer tokenizer= new StringTokenizer(types, ","); //$NON-NLS-1$
- while (tokenizer.hasMoreElements()) {
- String extension= tokenizer.nextToken().trim();
- fgStructureViewerDescriptors.put(normalizeCase(extension), descriptor);
- }
- }
-
- /**
- * Registers the given content merge viewer descriptor for one or more types.
- *
- * @param types one or more types separated by commas and whitespace
- * @param descriptor the descriptor to register
- */
- public static void registerContentMergeViewerDescriptor(String types, IViewerDescriptor descriptor) {
- StringTokenizer tokenizer= new StringTokenizer(types, ","); //$NON-NLS-1$
- while (tokenizer.hasMoreElements()) {
- String extension= tokenizer.nextToken().trim();
- fgContentMergeViewerDescriptors.put(normalizeCase(extension), descriptor);
- }
- }
-
- /**
- * Registers the given content viewer descriptor for one or more types.
- *
- * @param types one or more types separated by commas and whitespace
- * @param descriptor the descriptor to register
- */
- public static void registerContentViewerDescriptor(String types, IViewerDescriptor descriptor) {
- StringTokenizer tokenizer= new StringTokenizer(types, ","); //$NON-NLS-1$
- while (tokenizer.hasMoreElements()) {
- String extension= tokenizer.nextToken().trim();
- fgContentViewerDescriptors.put(normalizeCase(extension), descriptor);
- }
- }
-
- /**
- * Returns a structure compare viewer based on an old viewer and an input object.
- * If the old viewer is suitable for showing the input, the old viewer
- * is returned. Otherwise, the input's type is used to find a viewer descriptor in the registry
- * which in turn is used to create a structure compare viewer under the given parent composite.
- * If no viewer descriptor can be found <code>null</code> is returned.
- *
- * @param oldViewer a new viewer is only created if this old viewer cannot show the given input
- * @param input the input object for which to find a structure viewer
- * @param parent the SWT parent composite under which the new viewer is created
- * @param configuration a configuration which is passed to a newly created viewer
- * @return the compare viewer which is suitable for the given input object or <code>null</code>
- */
- public static Viewer findStructureViewer(Viewer oldViewer, ICompareInput input, Composite parent,
- CompareConfiguration configuration) {
-
- if (input.getLeft() == null || input.getRight() == null) // we don't show the structure of additions or deletions
- return null;
-
- String type= getType(input);
- if (type == null)
- return null;
-
- type= normalizeCase(type);
-
- IViewerDescriptor vd= (IViewerDescriptor) fgStructureViewerDescriptors.get(type);
- if (vd == null) {
- String alias= (String) fgStructureViewerAliases.get(type);
- if (alias != null)
- vd= (IViewerDescriptor) fgStructureViewerDescriptors.get(alias);
- }
- if (vd != null)
- return vd.createViewer(oldViewer, parent, configuration);
-
- IStructureCreatorDescriptor scc= getStructureCreator(type);
- if (scc != null) {
- IStructureCreator sc= scc.createStructureCreator();
- if (sc != null) {
- StructureDiffViewer sdv= new StructureDiffViewer(parent, configuration);
- sdv.setStructureCreator(sc);
- return sdv;
- }
- }
- return null;
- }
-
- /**
- * Returns a content compare viewer based on an old viewer and an input object.
- * If the old viewer is suitable for showing the input the old viewer
- * is returned. Otherwise the input's type is used to find a viewer descriptor in the registry
- * which in turn is used to create a content compare viewer under the given parent composite.
- * If no viewer descriptor can be found <code>null</code> is returned.
- *
- * @param oldViewer a new viewer is only created if this old viewer cannot show the given input
- * @param input the input object for which to find a content viewer
- * @param parent the SWT parent composite under which the new viewer is created
- * @param configuration a configuration which is passed to a newly created viewer
- * @return the compare viewer which is suitable for the given input object or <code>null</code>
- */
- public static Viewer findContentViewer(Viewer oldViewer, Object in, Composite parent, CompareConfiguration cc) {
-
- if (in instanceof IStreamContentAccessor) {
- String type= ITypedElement.TEXT_TYPE;
-
- if (in instanceof ITypedElement) {
- ITypedElement tin= (ITypedElement) in;
- String ty= tin.getType();
- if (ty != null)
- type= ty;
- }
- type= normalizeCase(type);
-
- IViewerDescriptor vd= (IViewerDescriptor) fgContentViewerDescriptors.get(type);
- Viewer viewer= null;
- if (vd != null) {
- viewer= vd.createViewer(oldViewer, parent, cc);
- if (viewer != null)
- return viewer;
- }
- // fallback
- return new SimpleTextViewer(parent);
- }
-
- if (!(in instanceof ICompareInput))
- return null;
-
- ICompareInput input= (ICompareInput) in;
- String type= getType(input);
- type= normalizeCase(type);
-
- if (ITypedElement.FOLDER_TYPE.equals(type))
- return null;
-
- if (type != null) {
- IViewerDescriptor vd= (IViewerDescriptor) fgContentMergeViewerDescriptors.get(type);
- Viewer viewer= null;
- if (vd != null) {
- viewer= vd.createViewer(oldViewer, parent, cc);
- if (viewer != null)
- return viewer;
- }
- }
-
- // fallback
- String leftType= guessType(input.getLeft());
- String rightType= guessType(input.getRight());
-
- if (leftType != null || rightType != null) {
- boolean right_text= rightType != null && ITypedElement.TEXT_TYPE.equals(rightType);
- boolean left_text= leftType != null && ITypedElement.TEXT_TYPE.equals(leftType);
- if ((leftType == null && right_text) || (left_text && rightType == null) || (left_text && right_text))
- type= ITypedElement.TEXT_TYPE;
- else
- type= "binary"; //$NON-NLS-1$
-
- IViewerDescriptor vd= (IViewerDescriptor) fgContentMergeViewerDescriptors.get(normalizeCase(type));
- if (vd != null)
- return vd.createViewer(oldViewer, parent, cc);
- }
- return null;
- }
-
- /**
- * Determines the type of the given threeway input by analyzing
- * the types (file extension) of the individual parts.
- * Returns null if no type can be determined.
- */
- private static String getType(ICompareInput input) {
- ITypedElement ancestor= input.getAncestor();
- ITypedElement left= input.getLeft();
- ITypedElement right= input.getRight();
-
- String[] types= new String[3];
- int cnt= 0;
-
- if (ancestor != null) {
- String type= ancestor.getType();
- if (type != null)
- types[cnt++]= type;
- }
- if (left != null) {
- String type= left.getType();
- if (type != null)
- types[cnt++]= type;
- }
- if (right != null) {
- String type= right.getType();
- if (type != null)
- types[cnt++]= type;
- }
- boolean homogenous= false;
- switch (cnt) {
- case 1:
- homogenous= true;
- break;
- case 2:
- homogenous= types[0].equals(types[1]);
- break;
- case 3:
- homogenous= types[0].equals(types[1]) && types[1].equals(types[2]);
- break;
- }
- if (homogenous)
- return types[0];
- return null;
- }
-
- /**
- * Guesses the file type of the given input.
- * Returns ITypedElement.TEXT_TYPE if none of the first 10 lines is longer than 1000 bytes.
- * Returns ITypedElement.UNKNOWN_TYPE otherwise.
- * Returns <code>null</code> if the input isn't an <code>IStreamContentAccessor</code>.
- */
- private static String guessType(ITypedElement input) {
- if (input instanceof IStreamContentAccessor) {
- IStreamContentAccessor sca= (IStreamContentAccessor) input;
- InputStream is= null;
- try {
- is= sca.getContents();
- if (is == null)
- return null;
- int lineLength= 0;
- int lines= 0;
- while (lines < 10) {
- int c= is.read();
- if (c == -1) // EOF
- break;
- if (c == '\n' || c == '\r') { // reset line length
- lineLength= 0;
- lines++;
- } else
- lineLength++;
- if (lineLength > 1000)
- return ITypedElement.UNKNOWN_TYPE;
- }
- return ITypedElement.TEXT_TYPE;
- } catch (CoreException ex) {
- // be silent and return UNKNOWN_TYPE
- } catch (IOException ex) {
- // be silent and return UNKNOWN_TYPE
- } finally {
- if (is != null) {
- try {
- is.close();
- } catch (IOException ex) {
- }
- }
- }
- return ITypedElement.UNKNOWN_TYPE;
- }
- return null;
- }
-
- private static IViewerDescriptor getContentViewerDescriptor2(String type) {
- return (IViewerDescriptor) fgContentMergeViewerDescriptors.get(normalizeCase(type));
- }
-
- private static String normalizeCase(String s) {
- if (NORMALIZE_CASE && s != null)
- return s.toUpperCase();
- return s;
- }
-
- //---- alias mgmt
-
- private void initPreferenceStore() {
- //System.out.println("initPreferenceStore");
- IPreferenceStore ps= getPreferenceStore();
- if (ps != null) {
- String aliases= ps.getString(STRUCTUREVIEWER_ALIASES_PREFERENCE_NAME);
- //System.out.println(" <" + aliases + ">");
- if (aliases != null && aliases.length() > 0) {
- StringTokenizer st= new StringTokenizer(aliases, " "); //$NON-NLS-1$
- while (st.hasMoreTokens()) {
- String pair= st.nextToken();
- int pos= pair.indexOf('.');
- if (pos > 0) {
- String key= pair.substring(0, pos);
- String alias= pair.substring(pos+1);
- fgStructureViewerAliases.put(key, alias);
- //System.out.println("<" + key + "><" + alias + ">");
- }
- }
- }
- }
- }
-
- public static void addStructureViewerAlias(String type, String alias) {
- //System.out.println("addStructureViewerAlias: " + type + " " + alias);
- fgStructureViewerAliases.put(normalizeCase(alias), normalizeCase(type));
- }
-
- public static void removeAllStructureViewerAliases(String type) {
- String t= normalizeCase(type);
- Set entrySet= fgStructureViewerAliases.entrySet();
- for (Iterator iter= entrySet.iterator(); iter.hasNext(); ) {
- Map.Entry entry= (Map.Entry)iter.next();
- if (entry.getValue().equals(t))
- iter.remove();
- }
- }
-
- /**
- * Returns an array of all editors that have an unsaved content. If the identical content is
- * presented in more than one editor, only one of those editor parts is part of the result.
- *
- * @return an array of all dirty editor parts.
- */
- public static IEditorPart[] getDirtyEditors() {
- Set inputs= new HashSet();
- List result= new ArrayList(0);
- IWorkbench workbench= getDefault().getWorkbench();
- IWorkbenchWindow[] windows= workbench.getWorkbenchWindows();
- for (int i= 0; i < windows.length; i++) {
- IWorkbenchPage[] pages= windows[i].getPages();
- for (int x= 0; x < pages.length; x++) {
- IEditorPart[] editors= pages[x].getDirtyEditors();
- for (int z= 0; z < editors.length; z++) {
- IEditorPart ep= editors[z];
- IEditorInput input= ep.getEditorInput();
- if (!inputs.contains(input)) {
- inputs.add(input);
- result.add(ep);
- }
- }
- }
- }
- return (IEditorPart[])result.toArray(new IEditorPart[result.size()]);
- }
-
- public static void log(Throwable e) {
- log(new Status(IStatus.ERROR, getPluginId(), INTERNAL_ERROR, CompareMessages.getString("ComparePlugin.internal_error"), e)); //$NON-NLS-1$
- }
-
- public static void log(IStatus status) {
- getDefault().getLog().log(status);
- }
-
- public static String getPluginId() {
- return getDefault().getDescriptor().getUniqueIdentifier();
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithEditionAction.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithEditionAction.java
deleted file mode 100644
index dc5191df7..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithEditionAction.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-public class CompareWithEditionAction extends EditionAction {
-
- public CompareWithEditionAction() {
- super(false, "org.eclipse.compare.internal.CompareWithEditionAction"); //$NON-NLS-1$
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithEditionAction.properties b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithEditionAction.properties
deleted file mode 100644
index 7a4b31a68..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithEditionAction.properties
+++ /dev/null
@@ -1,32 +0,0 @@
-# =====================================
-# (c) Copyright IBM Corp. 2000, 2001.
-# All Rights Reserved.
-# ====================================
-
-# @(#)CompareWithEditionAction.properties
-#
-# Resources for CompareWithEditionAction.java
-
-title= Compare with Local History
-
-treeTitleFormat= Local History of ''{0}''
-dateIcon= obj16/day_obj.gif
-timeIcon= obj16/resource_obj.gif
-
-treeFormat= {0}
-workspaceTreeFormat= {0} (Workspace File)
-parseErrorFormat= {0} (Parse Error)
-
-editionLabel= Local History ({0})
-workspaceEditionLabel= Workspace File
-
-targetLabel= Editor Buffer
-workspaceTargetLabel= Workspace File
-
-todayFormat= Today ({0})
-yesterdayFormat= Yesterday ({0})
-dayFormat= {0}
-
-closeButton.label=Close
-
-noLocalHistoryError= No local history available for selected resource.
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DiffImage.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DiffImage.java
deleted file mode 100644
index 2e166ef80..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DiffImage.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.graphics.*;
-
-import org.eclipse.jface.resource.CompositeImageDescriptor;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-/**
- * Combines an image with an overlay.
- */
-public class DiffImage extends CompositeImageDescriptor {
-
- static final int HEIGHT= 16;
-
- private Image fBaseImage;
- private ImageDescriptor fOverlayImage;
- private int fWidth;
- private boolean fLeft= true;
-
- public DiffImage(Image base, ImageDescriptor overlay, int w) {
- fBaseImage= base;
- fOverlayImage= overlay;
- fWidth= w;
- }
-
- public DiffImage(Image base, ImageDescriptor overlay, int w, boolean onLeft) {
- fBaseImage= base;
- fOverlayImage= overlay;
- fWidth= w;
- fLeft= onLeft;
- }
-
- protected Point getSize() {
- return new Point(fWidth, HEIGHT);
- }
-
- protected void drawCompositeImage(int width, int height) {
- if (fLeft) {
- if (fBaseImage != null) {
- ImageData base= fBaseImage.getImageData();
- if (base == null)
- base= DEFAULT_IMAGE_DATA;
- drawImage(base, fWidth - base.width, 0);
- }
-
- if (fOverlayImage != null) {
- ImageData overlay= fOverlayImage.getImageData();
- if (overlay == null)
- overlay= DEFAULT_IMAGE_DATA;
- drawImage(overlay, 0, (HEIGHT - overlay.height) / 2);
- }
- } else {
- if (fBaseImage != null) {
- ImageData base= fBaseImage.getImageData();
- if (base == null)
- base= DEFAULT_IMAGE_DATA;
- drawImage(base, 0, 0);
- }
-
- if (fOverlayImage != null) {
- ImageData overlay= fOverlayImage.getImageData();
- if (overlay == null)
- overlay= DEFAULT_IMAGE_DATA;
- drawImage(overlay, fWidth - overlay.width, (HEIGHT - overlay.height) / 2);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java
deleted file mode 100644
index 80b6409f1..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.jface.text.*;
-import org.eclipse.compare.contentmergeviewer.ITokenComparator;
-import org.eclipse.compare.rangedifferencer.IRangeComparator;
-
-/**
- * Implements the <code>IRangeComparator</code> interface for lines in a document.
- * A <code>DocLineComparator</code> is used as the input for the <code>RangeDifferencer</code>
- * engine to perform a line oriented compare on documents.
- * <p>
- * A <code>DocLineComparator</code> doesn't know anything about line separators because
- * its notion of lines is solely defined in the underlying <code>IDocument</code>.
- */
-public class DocLineComparator implements ITokenComparator {
-
- private IDocument fDocument;
- private int fLineOffset;
- private int fLineCount;
- private int fLength;
- private boolean fIgnoreWhiteSpace;
-
- /**
- * Creates a <code>DocLineComparator</code> for the given document range.
- * ignoreWhiteSpace controls whether comparing lines (in method
- * <code>rangesEqual<code>) should ignore whitespace.
- *
- * @param document the document from which the lines are taken
- * @param region if non-<code>null</code> only lines within this range are taken
- * @param ignoreWhiteSpace if <code>true</code> white space is ignored when comparing lines
- */
- public DocLineComparator(IDocument document, IRegion region, boolean ignoreWhiteSpace) {
-
- fDocument= document;
- fIgnoreWhiteSpace= ignoreWhiteSpace;
-
- fLineOffset= 0;
- if (region != null) {
- fLength= region.getLength();
- int start= region.getOffset();
- try {
- fLineOffset= fDocument.getLineOfOffset(start);
- } catch (BadLocationException ex) {
- }
-
- if (fLength == 0)
- fLineCount= 0;
- else {
- int endLine= fDocument.getNumberOfLines();
- try {
- endLine= fDocument.getLineOfOffset(start + fLength);
- } catch (BadLocationException ex) {
- }
- fLineCount= endLine - fLineOffset + 1;
- }
-
- } else {
- fLength= document.getLength();
- fLineCount= fDocument.getNumberOfLines();
- }
- }
-
- /**
- * Returns the number of lines in the document.
- *
- * @return number of lines
- */
- public int getRangeCount() {
- return fLineCount;
- }
-
- /* (non Javadoc)
- * see ITokenComparator.getTokenStart
- */
- public int getTokenStart(int line) {
- try {
- IRegion r= fDocument.getLineInformation(fLineOffset + line);
- return r.getOffset();
- } catch (BadLocationException ex) {
- return fDocument.getLength();
- }
- }
-
- /* (non Javadoc)
- * Returns the length of the given line.
- * see ITokenComparator.getTokenLength
- */
- public int getTokenLength(int line) {
- return getTokenStart(line+1) - getTokenStart(line);
- }
-
- /**
- * Returns <code>true</code> if a line given by the first index
- * matches a line specified by the other <code>IRangeComparator</code> and index.
- *
- * @param thisIndex the number of the line within this range comparator
- * @param other the range comparator to compare this with
- * @param otherIndex the number of the line within the other comparator
- * @return <code>true</code> if the lines are equal
- */
- public boolean rangesEqual(int thisIndex, IRangeComparator other0, int otherIndex) {
-
- if (other0 != null && other0.getClass() == getClass()) {
- DocLineComparator other= (DocLineComparator) other0;
-
- if (fIgnoreWhiteSpace) {
- String s1= extract(thisIndex);
- String s2= other.extract(otherIndex);
- return compare(s1, s2);
- }
-
- int tlen= getTokenLength(thisIndex);
- int olen= other.getTokenLength(otherIndex);
- if (tlen == olen) {
- String s1= extract(thisIndex);
- String s2= other.extract(otherIndex);
- return s1.equals(s2);
- }
- }
- return false;
- }
-
- /**
- * Aborts the comparison if the number of tokens is too large.
- *
- * @return <code>true</code> to abort a token comparison
- */
- public boolean skipRangeComparison(int length, int max, IRangeComparator other) {
- return false;
- }
-
- //---- private methods
-
- /**
- * Extract a single line from the underlying document without the line separator.
- *
- * @param line the number of the line to extract
- * @return the contents of the line as a String
- */
- private String extract(int line) {
- if (line < fLineCount) {
- try {
- IRegion r= fDocument.getLineInformation(fLineOffset + line);
- return fDocument.get(r.getOffset(), r.getLength());
- } catch(BadLocationException e) {
- }
- }
- return ""; //$NON-NLS-1$
- }
-
- private boolean compare(String s1, String s2) {
- int i1= 0;
- int i2= 0;
- int l1= s1.length();
- int l2= s2.length();
- char c1= ' ';
- char c2= ' ';
- while (i1 < l1 || i2 < l2) {
- if (i1 < l1) {
- c1= s1.charAt(i1);
- if (Character.isWhitespace(c1)) {
- i1++;
- continue;
- }
- }
- if (i2 < l2) {
- c2= s2.charAt(i2);
- if (Character.isWhitespace(c2)) {
- i2++;
- continue;
- }
- }
- if (c1 != c2)
- return false;
- i1++;
- i2++;
- }
- return true;
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DocumentManager.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DocumentManager.java
deleted file mode 100644
index 76491b987..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DocumentManager.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.util.*;
-
-import org.eclipse.jface.text.IDocument;
-
-/**
- * No API yet.
- */
-public class DocumentManager {
-
- private static final boolean DEBUG= false;
-
- private static ArrayList fgKeys= new ArrayList();
- private static ArrayList fgValues= new ArrayList();
-
- public static IDocument get(Object o) {
-
- for (int i= 0; i < fgKeys.size(); i++) {
- if (fgKeys.get(i) == o)
- return (IDocument) fgValues.get(i);
- }
- return null;
- }
-
- public static void put(Object o, IDocument document) {
- if (DEBUG) System.out.println("DocumentManager.put: " + document); //$NON-NLS-1$
- for (int i= 0; i < fgKeys.size(); i++) {
- if (fgKeys.get(i) == o) {
- fgValues.set(i, document);
- return;
- }
- }
- fgKeys.add(o);
- fgValues.add(document);
- }
-
- public static void remove(IDocument document) {
- if (document != null) {
- if (DEBUG) System.out.println("DocumentManager.remove: " + document); //$NON-NLS-1$
- for (int i= 0; i < fgValues.size(); i++) {
- if (fgValues.get(i) == document) {
- fgKeys.remove(i);
- fgValues.remove(i);
- return;
- }
- }
- if (DEBUG) System.out.println("DocumentManager.remove: not found"); //$NON-NLS-1$
- }
- }
-
- public static void dump() {
- if (DEBUG) System.out.println("DocumentManager: managed docs:" + fgValues.size()); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/EditionAction.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/EditionAction.java
deleted file mode 100644
index a56b0692a..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/EditionAction.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.io.InputStream;
-import java.io.ByteArrayInputStream;
-import java.util.ArrayList;
-import java.util.ResourceBundle;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.BadLocationException;
-
-import org.eclipse.ui.*;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.ui.texteditor.IDocumentProvider;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.compare.IStreamContentAccessor;
-
-
-public class EditionAction implements IActionDelegate {
-
- /**
- * Implements the IStreamContentAccessor and ITypedElement protocols
- * for a Document.
- */
- class DocumentBufferNode implements ITypedElement, IStreamContentAccessor {
-
- private IDocument fDocument;
- private String type;
- private IFile fFile;
-
- DocumentBufferNode(IDocument document, IFile file) {
- fDocument= document;
- fFile= file;
- }
-
- public String getName() {
- return fFile.getName();
- }
-
- public String getType() {
- return fFile.getFileExtension();
- }
-
- public Image getImage() {
- return null;
- }
-
- public InputStream getContents() {
- return new ByteArrayInputStream(fDocument.get().getBytes());
- }
- }
-
- private ISelection fSelection;
- private String fBundleName;
- private boolean fReplaceMode;
- protected boolean fPrevious= false;
-
- EditionAction(boolean replaceMode, String bundleName) {
- fReplaceMode= replaceMode;
- fBundleName= bundleName;
- }
-
- public final void selectionChanged(IAction action, ISelection selection) {
- fSelection= selection;
- if (action != null) {
- IFile[] files= getFiles(selection, fReplaceMode);
- action.setEnabled(files.length == 1); // we don't support multiple selection for now
- }
- }
-
- public void run(IAction action) {
- IFile[] files= getFiles(fSelection, fReplaceMode);
- for (int i= 0; i < files.length; i++)
- doFromHistory(files[i]);
- }
-
- private void doFromHistory(final IFile file) {
-
- ResourceBundle bundle= ResourceBundle.getBundle(fBundleName);
- String title= Utilities.getString(bundle, "title"); //$NON-NLS-1$
-
- Shell parentShell= CompareUIPlugin.getShell();
-
- IFileState states[]= null;
- try {
- states= file.getHistory(null);
- } catch (CoreException ex) {
- MessageDialog.openError(parentShell, title, ex.getMessage());
- return;
- }
-
- if (states == null || states.length <= 0) {
- String msg= Utilities.getString(bundle, "noLocalHistoryError"); //$NON-NLS-1$
- MessageDialog.openInformation(parentShell, title, msg);
- return;
- }
-
- ITypedElement base= new ResourceNode(file);
-
- IDocument document= getDocument(file);
- ITypedElement target= base;
- if (document != null)
- target= new DocumentBufferNode(document, file);
-
- ITypedElement[] editions= new ITypedElement[states.length+1];
- editions[0]= base;
- for (int i= 0; i < states.length; i++)
- editions[i+1]= new HistoryItem(base, states[i]);
-
- EditionSelectionDialog d= new EditionSelectionDialog(parentShell, bundle);
- d.setEditionTitleArgument(file.getName());
- d.setEditionTitleImage(CompareUIPlugin.getImage(file));
- //d.setHideIdenticalEntries(false);
-
- if (fReplaceMode) {
-
- ITypedElement ti= null;
- if (fPrevious)
- ti= d.selectPreviousEdition(target, editions, null);
- else
- ti= d.selectEdition(target, editions, null);
-
- if (ti instanceof IStreamContentAccessor) {
- IStreamContentAccessor sa= (IStreamContentAccessor)ti;
- try {
-
- if (document != null)
- updateDocument(document, sa);
- else
- updateWorkspace(bundle, parentShell, sa, file);
-
- } catch (InterruptedException x) {
- // Do nothing. Operation has been canceled by user.
-
- } catch (InvocationTargetException x) {
- String reason= x.getTargetException().getMessage();
- MessageDialog.openError(parentShell, title, Utilities.getFormattedString(bundle, "replaceError", reason)); //$NON-NLS-1$
- }
- }
- } else {
- d.setCompareMode(true);
-
- d.selectEdition(target, editions, null);
- }
- }
-
- private void updateWorkspace(final ResourceBundle bundle, Shell shell,
- final IStreamContentAccessor sa, final IFile file)
- throws InvocationTargetException, InterruptedException {
-
- WorkspaceModifyOperation operation= new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor pm) throws InvocationTargetException {
- try {
- String taskName= Utilities.getString(bundle, "taskName"); //$NON-NLS-1$
- pm.beginTask(taskName, IProgressMonitor.UNKNOWN);
- file.setContents(sa.getContents(), false, true, pm);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- pm.done();
- }
- }
- };
-
- ProgressMonitorDialog pmdialog= new ProgressMonitorDialog(shell);
- pmdialog.run(false, true, operation);
- }
-
- private void updateDocument(IDocument document, IStreamContentAccessor sa) throws InvocationTargetException {
- try {
- InputStream is= sa.getContents();
- String text= Utilities.readString(is);
- document.replace(0, document.getLength(), text);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } catch (BadLocationException e) {
- throw new InvocationTargetException(e);
- }
- }
-
- private IDocument getDocument(IFile file) {
- IWorkbench wb= PlatformUI.getWorkbench();
- if (wb == null)
- return null;
- IWorkbenchWindow[] ws= wb.getWorkbenchWindows();
- if (ws == null)
- return null;
-
- FileEditorInput test= new FileEditorInput(file);
-
- for (int i= 0; i < ws.length; i++) {
- IWorkbenchWindow w= ws[i];
- IWorkbenchPage[] wps= w.getPages();
- if (wps != null) {
- for (int j= 0; j < wps.length; j++) {
- IWorkbenchPage wp= wps[j];
- IEditorPart ep= wp.findEditor(test);
- if (ep instanceof ITextEditor) {
- ITextEditor te= (ITextEditor) ep;
- IDocumentProvider dp= te.getDocumentProvider();
- if (dp != null) {
- IDocument doc= dp.getDocument(ep);
- if (doc != null)
- return doc;
- }
- }
- }
- }
- }
- return null;
- }
-
- private IFile[] getFiles(ISelection selection, boolean modifiable) {
- ArrayList result= new ArrayList();
- Object[] s= Utilities.toArray(selection);
- for (int i= 0; i < s.length; i++) {
- Object o= s[i];
- IFile file= null;
- if (o instanceof IFile) {
- file= (IFile) o;
- } else if (o instanceof IAdaptable) {
- IAdaptable a= (IAdaptable) o;
- Object adapter= a.getAdapter(IResource.class);
- if (adapter instanceof IFile)
- file= (IFile) adapter;
- }
- if (file != null) {
- if (modifiable) {
- if (!file.isReadOnly())
- result.add(file);
- } else {
- result.add(file);
- }
- }
- }
- return (IFile[]) result.toArray(new IFile[result.size()]);
- }
-
-
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ExceptionHandler.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ExceptionHandler.java
deleted file mode 100644
index 773b0499c..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ExceptionHandler.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.io.StringWriter;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.swt.widgets.Shell;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-
-/**
- * The default exception handler shows an error dialog when one of its handle methods
- * is called. If the passed exception is a <code>CoreException</code> an error dialog
- * pops up showing the exception's status information. For a <code>InvocationTargetException</code>
- * a normal message dialog pops up showing the exception's message. Additionally the exception
- * is written to the platform log.
- */
-public class ExceptionHandler {
-
- private static ExceptionHandler fgInstance= new ExceptionHandler();
-
- /**
- * Logs the given exception using the platform's logging mechanism. The exception is
- * logged as an error with the error code <code>JavaStatusConstants.INTERNAL_ERROR</code>.
- */
- public static void log(Throwable t, String message) {
- CompareUIPlugin.log(new Status(IStatus.ERROR, CompareUIPlugin.getPluginId(),
- CompareUIPlugin.INTERNAL_ERROR, message, t));
- }
-
- /**
- * Handles the given <code>CoreException</code>. The workbench shell is used as a parent
- * for the dialog window.
- *
- * @param e the <code>CoreException</code> to be handled
- * @param title the dialog window's window title
- * @param message message to be displayed by the dialog window
- */
- public static void handle(CoreException e, String title, String message) {
- handle(e, CompareUIPlugin.getShell(), title, message);
- }
-
- /**
- * Handles the given <code>CoreException</code>.
- *
- * @param e the <code>CoreException</code> to be handled
- * @param parent the dialog window's parent shell
- * @param title the dialog window's window title
- * @param message message to be displayed by the dialog window
- */
- public static void handle(CoreException e, Shell parent, String title, String message) {
- fgInstance.perform(e, parent, title, message);
- }
-
- /**
- * Handles the given <code>InvocationTargetException</code>. The workbench shell is used
- * as a parent for the dialog window.
- *
- * @param e the <code>InvocationTargetException</code> to be handled
- * @param title the dialog window's window title
- * @param message message to be displayed by the dialog window
- */
- public static void handle(InvocationTargetException e, String title, String message) {
- handle(e, CompareUIPlugin.getShell(), title, message);
- }
-
- /**
- * Handles the given <code>InvocationTargetException</code>.
- *
- * @param e the <code>InvocationTargetException</code> to be handled
- * @param parent the dialog window's parent shell
- * @param title the dialog window's window title
- * @param message message to be displayed by the dialog window
- */
- public static void handle(InvocationTargetException e, Shell parent, String title, String message) {
- fgInstance.perform(e, parent, title, message);
- }
-
- //---- Hooks for subclasses to control exception handling ------------------------------------
-
- protected void perform(CoreException e, Shell shell, String title, String message) {
- CompareUIPlugin.log(e);
- IStatus status= e.getStatus();
- if (status != null) {
- ErrorDialog.openError(shell, title, message, status);
- } else {
- displayMessageDialog(e, e.getMessage(), shell, title, message);
- }
- }
-
- protected void perform(InvocationTargetException e, Shell shell, String title, String message) {
- Throwable target= e.getTargetException();
- if (target instanceof CoreException) {
- perform((CoreException)target, shell, title, message);
- } else {
- CompareUIPlugin.log(e);
- if (e.getMessage() != null && e.getMessage().length() > 0) {
- displayMessageDialog(e, e.getMessage(), shell, title, message);
- } else {
- displayMessageDialog(e, target.getMessage(), shell, title, message);
- }
- }
- }
-
- //---- Helper methods -----------------------------------------------------------------------
-
- private void displayMessageDialog(Throwable t, String exceptionMessage, Shell shell, String title, String message) {
- StringWriter msg= new StringWriter();
- if (message != null) {
- msg.write(message);
- msg.write("\n\n"); //$NON-NLS-1$
- }
- if (exceptionMessage == null || exceptionMessage.length() == 0)
- msg.write(CompareMessages.getString("ExceptionDialog.seeErrorLogMessage")); //$NON-NLS-1$
- else
- msg.write(exceptionMessage);
- MessageDialog.openError(shell, title, msg.toString());
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/INavigatable.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/INavigatable.java
deleted file mode 100644
index 88ac71dbf..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/INavigatable.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-public interface INavigatable {
-
- static final String NAVIGATOR_PROPERTY= "org.eclipse.compare.internal.Navigator"; //$NON-NLS-1$
-
- /**
- * Returns true if at end or beginning.
- */
- boolean gotoDifference(boolean next);
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ISavable.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ISavable.java
deleted file mode 100644
index d4b4cc2f8..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ISavable.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.CoreException;
-
-public interface ISavable {
-
- void save(IProgressMonitor pm) throws CoreException;
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/IStructureCreatorDescriptor.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/IStructureCreatorDescriptor.java
deleted file mode 100644
index e637e5311..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/IStructureCreatorDescriptor.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.compare.structuremergeviewer.IStructureCreator;
-
-/**
- * A factory object for creating <code>IStructureCreator</code>s from a descriptor.
- * <p>
- * It is used when registering <code>IStructureCreator</code> for types
- * in <code>CompareUIPlugin.registerStructureCreator</code>.
- * </p>
- *
- * @see IStructureCreator
- * @see CompareUIPlugin
- */
-public interface IStructureCreatorDescriptor {
-
- /**
- * Creates a new structure creator.
- *
- * @return a newly created structure creator
- */
- IStructureCreator createStructureCreator();
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/IViewerDescriptor.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/IViewerDescriptor.java
deleted file mode 100644
index 8d69626db..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/IViewerDescriptor.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.widgets.Composite;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.compare.CompareConfiguration;
-
-/**
- * A factory object for creating a <code>Viewer</code>s from a descriptor.
- * <p>
- * It is used when registering a viewer for a specific type
- * in <code>CompareUIPlugin.registerContentViewerDescriptor</code> and
- * in <code>CompareUIPlugin.registerStructureViewerDescriptor</code>.
- *
- * @see org.eclipse.compare.structuremergeviewer.IStructureCreator
- * @see CompareUIPlugin
- */
-public interface IViewerDescriptor {
-
- /**
- * Creates a new viewer from this descriptor under the given STW parent control.
- * If the current viewer has the same type as a new viewer
- * the implementation of this method is free to return the current viewer instead.
- *
- * @param currentViewer the current viewer which is going to be replaced with a new viewer.
- * @param parent the SWT parent control under which the new viewer has to be created.
- * @param config a compare configuration the new viewer might be interested in.
- * @return a new viewer or the current viewer.
- */
- Viewer createViewer(Viewer currentViewer, Composite parent, CompareConfiguration config);
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/IgnoreWhiteSpaceAction.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/IgnoreWhiteSpaceAction.java
deleted file mode 100644
index bcfc62b60..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/IgnoreWhiteSpaceAction.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.compare.*;
-
-/**
- * Toggles the <code>ICompareConfiguration.IGNORE_WS</code> property of an
- * <code>ICompareConfiguration</code>.
- */
-public class IgnoreWhiteSpaceAction extends ChangePropertyAction {
-
- public IgnoreWhiteSpaceAction(ResourceBundle bundle, CompareConfiguration cc) {
- super(bundle, cc, "action.IgnoreWhiteSpace.", CompareConfiguration.IGNORE_WHITESPACE); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageCanvas.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageCanvas.java
deleted file mode 100644
index 3a3ec3326..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageCanvas.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * A <code>Canvas</code> showing a single centered SWT <code>Image</code>.
- * If the <code>Image</code> is larger than the <code>Canvas<code>,
- * <code>Scrollbars</code> will appear.
- */
-class ImageCanvas extends Canvas {
-
- private Image fImage;
-
- /**
- * Create a new ImageCanvas with the given SWT stylebits.
- * (SWT.H_SCROLL and SWT.V_SCROLL are automtically added).
- */
- public ImageCanvas(Composite parent, int style) {
- super(parent, style | SWT.H_SCROLL | SWT.V_SCROLL);
-
- ScrollBar sb= getHorizontalBar();
- sb.setIncrement(20);
- sb.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- repaint();
- }
- });
-
- sb= getVerticalBar();
- sb.setIncrement(20);
- sb.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- repaint();
- }
- });
-
- addListener(SWT.Resize, new Listener() {
- public void handleEvent(Event e) {
- updateScrollbars();
- }
- });
-
- addListener(SWT.Paint, new Listener() {
- public void handleEvent(Event event) {
- paint(event.gc);
- }
- });
- }
-
- /**
- * Set the SWT Image to use as the ImageCanvas contents.
- */
- public void setImage(Image img) {
- fImage= img;
-
- if (!isDisposed()) {
- getHorizontalBar().setSelection(0);
- getVerticalBar().setSelection(0);
- updateScrollbars();
- getParent().layout();
- redraw();
- }
- }
-
- public void repaint() {
- if (!isDisposed()) {
- GC gc= new GC(this);
- paint(gc);
- gc.dispose();
- }
- }
-
- /**
- * @private
- */
- private void paint(GC gc) {
- if (fImage != null) {
- Rectangle bounds= fImage.getBounds();
- Rectangle clientArea= getClientArea();
-
- int x;
- if (bounds.width < clientArea.width)
- x= (clientArea.width - bounds.width) / 2;
- else
- x= -getHorizontalBar().getSelection();
-
- int y;
- if (bounds.height < clientArea.height)
- y= (clientArea.height - bounds.height) / 2;
- else
- y= -getVerticalBar().getSelection();
-
- gc.drawImage(fImage, x, y);
- }
- }
-
- /**
- * @private
- */
- private void updateScrollbars() {
- Rectangle bounds= fImage != null ? fImage.getBounds() : new Rectangle(0, 0, 0, 0);
- Point size= getSize();
- Rectangle clientArea= getClientArea();
-
- ScrollBar horizontal= getHorizontalBar();
- if (bounds.width <= clientArea.width) {
- horizontal.setVisible(false);
- horizontal.setSelection(0);
- } else {
- horizontal.setPageIncrement(clientArea.width - horizontal.getIncrement());
- int max= bounds.width + (size.x - clientArea.width);
- horizontal.setMaximum(max);
- horizontal.setThumb(size.x > max ? max : size.x);
- horizontal.setVisible(true);
- }
-
- ScrollBar vertical= getVerticalBar();
- if (bounds.height <= clientArea.height) {
- vertical.setVisible(false);
- vertical.setSelection(0);
- } else {
- vertical.setPageIncrement(clientArea.height - vertical.getIncrement());
- int max= bounds.height + (size.y - clientArea.height);
- vertical.setMaximum(max);
- vertical.setThumb(size.y > max ? max : size.y);
- vertical.setVisible(true);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewer.java
deleted file mode 100644
index 8373bed55..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewer.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.IOException;
-import java.util.ResourceBundle;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.SWTException;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-
-import org.eclipse.core.runtime.CoreException;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.contentmergeviewer.ContentMergeViewer;
-
-/**
- */
-public class ImageMergeViewer extends ContentMergeViewer {
-
- private static final String BUNDLE_NAME= "org.eclipse.compare.internal.ImageMergeViewerResources"; //$NON-NLS-1$
-
- private Object fAncestorImage;
- private Object fLeftImage;
- private Object fRightImage;
-
- private ImageCanvas fAncestor;
- private ImageCanvas fLeft;
- private ImageCanvas fRight;
-
-
- public ImageMergeViewer(Composite parent, int styles, CompareConfiguration mp) {
- super(styles, ResourceBundle.getBundle(BUNDLE_NAME), mp);
- buildControl(parent);
- String title= Utilities.getString(getResourceBundle(), "title"); //$NON-NLS-1$
- getControl().setData(CompareUI.COMPARE_VIEWER_TITLE, title);
- }
-
- protected void updateContent(Object ancestor, Object left, Object right) {
-
- fAncestorImage= ancestor;
- setInput(fAncestor, ancestor);
-
- fLeftImage= left;
- setInput(fLeft, left);
-
- fRightImage= right;
- setInput(fRight, right);
- }
-
- /**
- * We can't modify the contents of either side we just return null.
- */
- protected byte[] getContents(boolean left) {
- return null;
- }
-
- public void createControls(Composite composite) {
- fAncestor= new ImageCanvas(composite, SWT.NO_FOCUS);
- fLeft= new ImageCanvas(composite, SWT.NO_FOCUS);
- fRight= new ImageCanvas(composite, SWT.NO_FOCUS);
- }
-
- private static void setInput(ImageCanvas canvas, Object input) {
- if (canvas != null) {
-
- InputStream stream= null;
- if (input instanceof IStreamContentAccessor) {
- IStreamContentAccessor sca= (IStreamContentAccessor) input;
- if (sca != null) {
- try {
- stream= sca.getContents();
- } catch (CoreException ex) {
- }
- }
- }
-
- Image image= null;
- Display display= canvas.getDisplay();
- if (stream != null) {
- try {
- image= new Image(display, stream);
- } catch (SWTException ex) {
- }
- }
-
- canvas.setImage(image);
- if (image != null) {
- canvas.setBackground(display.getSystemColor(SWT.COLOR_LIST_BACKGROUND));
- } else {
- canvas.setBackground(null);
- }
-
- if (stream != null) {
- try {
- stream.close();
- } catch (IOException ex) {
- }
- }
- }
- }
-
- protected void handleResizeAncestor(int x, int y, int width, int height) {
- if (width > 0) {
- fAncestor.setVisible(true);
- fAncestor.setBounds(x, y, width, height);
- } else {
- fAncestor.setVisible(false);
- }
- }
-
- protected void handleResizeLeftRight(int x, int y, int width1, int centerWidth, int width2, int height) {
- fLeft.setBounds(x, y, width1, height);
- fRight.setBounds(x+width1+centerWidth, y, width2, height);
- }
-
- protected void copy(boolean leftToRight) {
- if (leftToRight) {
- fRightImage= fLeftImage;
- setInput(fRight, fRightImage);
- setRightDirty(true);
- } else {
- fLeftImage= fRightImage;
- setInput(fLeft, fLeftImage);
- setLeftDirty(true);
- }
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewerCreator.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewerCreator.java
deleted file mode 100644
index 2d40636a5..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewerCreator.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-
-import org.eclipse.compare.*;
-import org.eclipse.jface.viewers.Viewer;
-
-/**
- * A factory object for the <code>ImageMergeViewer</code>.
- * This indirection is necessary because only objects with a default
- * constructor can be created via an extension point
- * (this precludes Viewers).
- */
-public class ImageMergeViewerCreator implements IViewerCreator {
-
- public Viewer createViewer(Composite parent, CompareConfiguration mp) {
- return new ImageMergeViewer(parent, SWT.NULL, mp);
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewerResources.properties b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewerResources.properties
deleted file mode 100644
index b150dda86..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewerResources.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-# =====================================
-# (c) Copyright IBM Corp. 2000, 2001.
-# All Rights Reserved.
-# =====================================
-
-# @(#)ImageMergeViewerResources.properties
-#
-# Resource strings for ImageMergeViewer.java
-
-title= Image Compare
-
-#####################################################
-# Actions
-#####################################################
-
-action.CopyLeftToRight.label= Copy Left to Right
-action.CopyLeftToRight.tooltip= Copy Image from Left to Right
-action.CopyLeftToRight.image= elcl16/copy_r_co.gif
-
-action.CopyRightToLeft.label= Copy Right to Left
-action.CopyRightToLeft.tooltip= Copy Image from Right to Left
-action.CopyRightToLeft.image= elcl16/copy_l_co.gif
-
-action.EnableAncestor.label= Enable Ancestor Pane
-action.EnableAncestor.tooltip= Control Visibility of Ancestor Pane
-action.EnableAncestor.image= elcl16/ancestorpane_co.gif
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ListContentProvider.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ListContentProvider.java
deleted file mode 100644
index 9170edeca..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ListContentProvider.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.util.List;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-
-/**
- * A specialized content provider to show a list of editor parts.
- */
-public class ListContentProvider implements IStructuredContentProvider {
- List fContents;
-
- public ListContentProvider() {
- }
-
- public Object[] getElements(Object input) {
- if (fContents != null && fContents == input)
- return fContents.toArray();
- return new Object[0];
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- if (newInput instanceof List)
- fContents= (List)newInput;
- else
- fContents= null;
- // we use a fixed set.
- }
-
- public void dispose() {
- }
-
- public boolean isDeleted(Object o) {
- return fContents != null && !fContents.contains(o);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ListDialog.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ListDialog.java
deleted file mode 100644
index 7cd262479..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ListDialog.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.*;
-
-import org.eclipse.ui.dialogs.SelectionDialog;
-
-public class ListDialog extends SelectionDialog {
-
- private IStructuredContentProvider fContentProvider;
- private ILabelProvider fLabelProvider;
- private Object fInput;
- private TableViewer fTableViewer;
- private boolean fAddCancelButton;
-
- public ListDialog(Shell parent) {
- super(parent);
- fAddCancelButton= false;
- }
-
- public void setInput(Object input) {
- fInput= input;
- }
-
- public void setContentProvider(IStructuredContentProvider sp){
- fContentProvider= sp;
- }
-
- public void setLabelProvider(ILabelProvider lp){
- fLabelProvider= lp;
- }
-
- public void setAddCancelButton(boolean addCancelButton) {
- fAddCancelButton= addCancelButton;
- }
-
- public TableViewer getTableViewer(){
- return fTableViewer;
- }
-
- public boolean hasFilters(){
- return fTableViewer.getFilters() != null && fTableViewer.getFilters().length != 0;
- }
-
- public void create() {
- setShellStyle(SWT.DIALOG_TRIM | SWT.RESIZE);
- super.create();
- }
-
- protected void createButtonsForButtonBar(Composite parent) {
- if (! fAddCancelButton)
- createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- else
- super.createButtonsForButtonBar(parent);
- }
-
- protected Control createDialogArea(Composite container) {
- Composite parent= (Composite) super.createDialogArea(container);
- createMessageArea(parent);
- fTableViewer= new TableViewer(parent, getTableStyle());
- fTableViewer.setContentProvider(fContentProvider);
- Table table= fTableViewer.getTable();
- fTableViewer.setLabelProvider(fLabelProvider);
- fTableViewer.setInput(fInput);
- GridData gd= new GridData(GridData.FILL_BOTH);
- gd.heightHint= convertHeightInCharsToPixels(15);
- gd.widthHint= convertWidthInCharsToPixels(55);
- table.setLayoutData(gd);
- return parent;
- }
-
- protected int getTableStyle() {
- return SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER;
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeSourceViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeSourceViewer.java
deleted file mode 100644
index 307a1d139..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeSourceViewer.java
+++ /dev/null
@@ -1,392 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.util.*;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.graphics.Font;
-
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.text.*;
-import org.eclipse.jface.util.*;
-import org.eclipse.jface.text.source.*;
-
-import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.ui.texteditor.IUpdate;
-import org.eclipse.ui.IWorkbenchActionConstants;
-
-import org.eclipse.compare.contentmergeviewer.TextMergeViewer;
-
-/**
- * Extends the JFace SourceViewer with some convenience methods.
- */
-public class MergeSourceViewer extends SourceViewer
- implements ISelectionChangedListener, ITextListener, IMenuListener {
-
- public static final String UNDO_ID= "undo"; //$NON-NLS-1$
- public static final String REDO_ID= "redo"; //$NON-NLS-1$
- public static final String CUT_ID= "cut"; //$NON-NLS-1$
- public static final String COPY_ID= "copy"; //$NON-NLS-1$
- public static final String PASTE_ID= "paste"; //$NON-NLS-1$
- public static final String DELETE_ID= "delete"; //$NON-NLS-1$
- public static final String SELECT_ALL_ID= "selectAll"; //$NON-NLS-1$
- public static final String SAVE_ID= "save"; //$NON-NLS-1$
-
- class TextOperationAction extends MergeViewerAction {
-
- private int fOperationCode;
-
- TextOperationAction(int operationCode, boolean mutable, boolean selection, boolean content) {
- super(mutable, selection, content);
- fOperationCode= operationCode;
- update();
- }
-
- public void run() {
- if (isEnabled())
- doOperation(fOperationCode);
- }
-
- public boolean isEnabled() {
- return fOperationCode != -1 && canDoOperation(fOperationCode);
- }
-
- public void update() {
- this.setEnabled(isEnabled());
- }
- }
-
- private ResourceBundle fResourceBundle;
- private Position fRegion;
- private boolean fEnabled= true;
- private HashMap fActions= new HashMap();
-
- private boolean fInitialized= true;
- private boolean fAddSaveAction= true;
-
-
- public MergeSourceViewer(Composite parent, ResourceBundle bundle) {
- super(parent, null, SWT.H_SCROLL + SWT.V_SCROLL);
-
- fResourceBundle= bundle;
-
- MenuManager menu= new MenuManager();
- menu.setRemoveAllWhenShown(true);
- menu.addMenuListener(this);
- StyledText te= getTextWidget();
- te.setMenu(menu.createContextMenu(te));
- }
-
- public void hideSaveAction() {
- fAddSaveAction= false;
- }
-
- public void setFont(Font font) {
- StyledText te= getTextWidget();
- if (te != null)
- te.setFont(font);
- }
-
- public void setBackgroundColor(Color color) {
- StyledText te= getTextWidget();
- if (te != null)
- te.setBackground(color);
- }
-
- public void setEnabled(boolean enabled) {
- if (enabled != fEnabled) {
- fEnabled= enabled;
- StyledText c= getTextWidget();
- if (c != null) {
- c.setEnabled(enabled);
- Display d= c.getDisplay();
- c.setBackground(enabled ? d.getSystemColor(SWT.COLOR_LIST_BACKGROUND) : null);
- }
- }
- }
-
- public boolean getEnabled() {
- return fEnabled;
- }
-
- public void setRegion(Position region) {
- fRegion= region;
- }
-
- public Position getRegion() {
- return fRegion;
- }
-
- public boolean isControlOkToUse() {
- StyledText t= getTextWidget();
- return t != null && !t.isDisposed();
- }
-
- public void setSelection(Position position) {
- if (position != null)
- setSelectedRange(position.getOffset(), position.getLength());
- }
-
- public void setLineBackground(Position position, Color c) {
- StyledText t= getTextWidget();
- if (t != null && !t.isDisposed()) {
- Point region= new Point(0, 0);
- getLineRange(position, region);
-
- region.x-= getDocumentRegionOffset();
-
- try {
- t.setLineBackground(region.x, region.y, c);
- } catch (IllegalArgumentException ex) {
- }
- }
- }
-
- public void resetLineBackground() {
- StyledText t= getTextWidget();
- if (t != null && !t.isDisposed()) {
- int lines= getLineCount();
- t.setLineBackground(0, lines, null);
- }
- }
-
- /**
- * Returns number of lines in document region.
- */
- public int getLineCount() {
- IRegion region= getVisibleRegion();
-
- int length= region.getLength();
- if (length == 0)
- return 0;
-
- IDocument doc= getDocument();
- int startLine= 0;
- int endLine= 0;
-
- int start= region.getOffset();
- try {
- startLine= doc.getLineOfOffset(start);
- } catch(BadLocationException ex) {
- }
- try {
- endLine= doc.getLineOfOffset(start+length);
- } catch(BadLocationException ex) {
- }
-
- return endLine-startLine+1;
- }
-
- public int getViewportLines() {
- StyledText te= getTextWidget();
- Rectangle clArea= te.getClientArea();
- if (!clArea.isEmpty())
- return clArea.height / te.getLineHeight();
- return 0;
- }
-
- public int getViewportHeight() {
- StyledText te= getTextWidget();
- Rectangle clArea= te.getClientArea();
- if (!clArea.isEmpty())
- return clArea.height;
- return 0;
- }
-
- /**
- * Returns lines
- */
- public int getDocumentRegionOffset() {
- int start= getVisibleRegion().getOffset();
- IDocument doc= getDocument();
- if (doc != null) {
- try {
- return doc.getLineOfOffset(start);
- } catch(BadLocationException ex) {
- }
- }
- return 0;
- }
-
- public int getVerticalScrollOffset() {
- StyledText st= getTextWidget();
- int lineHeight= st.getLineHeight();
- return getTopInset() - ((getDocumentRegionOffset()*lineHeight) + st.getTopPixel());
- }
-
- /**
- * Returns the start line and the number of lines which correspond to the given position.
- * Starting line number is 0 based.
- */
- public Point getLineRange(Position p, Point region) {
-
- IDocument doc= getDocument();
-
- if (p == null || doc == null) {
- region.x= 0;
- region.y= 0;
- return region;
- }
-
- int start= p.getOffset();
- int length= p.getLength();
-
- int startLine= 0;
- try {
- startLine= doc.getLineOfOffset(start);
- } catch (BadLocationException e) {
- }
-
- int lineCount= 0;
-
- if (length == 0) {
-// // if range length is 0 and if range starts a new line
-// try {
-// if (start == doc.getLineStartOffset(startLine)) {
-// lines--;
-// }
-// } catch (BadLocationException e) {
-// lines--;
-// }
-
- } else {
- int endLine= 0;
- try {
- endLine= doc.getLineOfOffset(start + length - 1); // why -1?
- } catch (BadLocationException e) {
- }
- lineCount= endLine-startLine+1;
- }
-
- region.x= startLine;
- region.y= lineCount;
- return region;
- }
-
- /**
- * Scroll TextPart to the given line.
- */
- public void vscroll(int line) {
-
- int srcViewSize= getLineCount();
- int srcExtentSize= getViewportLines();
-
- if (srcViewSize > srcExtentSize) {
-
- if (line < 0)
- line= 0;
-
- int cp= getTopIndex();
- if (cp != line)
- setTopIndex(line + getDocumentRegionOffset());
- }
- }
-
- public void addAction(String actionId, MergeViewerAction action) {
- fActions.put(actionId, action);
- }
-
- public MergeViewerAction getAction(String actionId) {
- MergeViewerAction action= (MergeViewerAction) fActions.get(actionId);
- if (action == null) {
- action= createAction(actionId);
- if (action == null)
- return null;
-
- if (action.isContentDependent())
- addTextListener(this);
- if (action.isSelectionDependent())
- addSelectionChangedListener(this);
-
- Utilities.initAction(action, fResourceBundle, "action." + actionId + "."); //$NON-NLS-1$ //$NON-NLS-2$
- fActions.put(actionId, action);
- }
- if (action.isEditableDependent() && !isEditable())
- return null;
- return action;
- }
-
- protected MergeViewerAction createAction(String actionId) {
- if (UNDO_ID.equals(actionId))
- return new TextOperationAction(UNDO, true, false, true);
- if (REDO_ID.equals(actionId))
- return new TextOperationAction(REDO, true, false, true);
- if (CUT_ID.equals(actionId))
- return new TextOperationAction(CUT, true, true, false);
- if (COPY_ID.equals(actionId))
- return new TextOperationAction(COPY, false, true, false);
- if (PASTE_ID.equals(actionId))
- return new TextOperationAction(PASTE, true, false, false);
- if (DELETE_ID.equals(actionId))
- return new TextOperationAction(DELETE, true, false, false);
- if (SELECT_ALL_ID.equals(actionId))
- return new TextOperationAction(SELECT_ALL, false, false, false);
- return null;
- }
-
- public void selectionChanged(SelectionChangedEvent event) {
- Iterator e= fActions.values().iterator();
- while (e.hasNext()) {
- MergeViewerAction action= (MergeViewerAction) e.next();
- if (action.isSelectionDependent())
- action.update();
- }
- }
-
- public void textChanged(TextEvent event) {
- Iterator e= fActions.values().iterator();
- while (e.hasNext()) {
- MergeViewerAction action= (MergeViewerAction) e.next();
- if (action.isContentDependent())
- action.update();
- }
- }
-
- /**
- * Allows the viewer to add menus and/or tools to the context menu.
- */
- public void menuAboutToShow(IMenuManager menu) {
-
- menu.add(new Separator("undo")); //$NON-NLS-1$
- addMenu(menu, UNDO_ID);
- addMenu(menu, REDO_ID);
-
- menu.add(new Separator("ccp")); //$NON-NLS-1$
- addMenu(menu, CUT_ID);
- addMenu(menu, COPY_ID);
- addMenu(menu, PASTE_ID);
- addMenu(menu, DELETE_ID);
- addMenu(menu, SELECT_ALL_ID);
-
- menu.add(new Separator("edit")); //$NON-NLS-1$
- menu.add(new Separator("find")); //$NON-NLS-1$
- //addMenu(menu, FIND_ID);
-
- menu.add(new Separator("save")); //$NON-NLS-1$
- if (fAddSaveAction)
- addMenu(menu, SAVE_ID);
-
- menu.add(new Separator("rest")); //$NON-NLS-1$
- }
-
- private void addMenu(IMenuManager menu, String actionId) {
- IAction action= getAction(actionId);
- if (action != null)
- menu.add(action);
- }
-
- protected void handleDispose() {
-
- removeTextListener(this);
- removeSelectionChangedListener(this);
-
- super.handleDispose();
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeViewerAction.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeViewerAction.java
deleted file mode 100644
index 52269f883..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeViewerAction.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.ui.texteditor.IUpdate;
-import org.eclipse.jface.action.Action;
-
-
-public abstract class MergeViewerAction extends Action implements IUpdate {
-
- private boolean fMutable;
- private boolean fSelection;
- private boolean fContent;
-
- public MergeViewerAction(boolean mutable, boolean selection, boolean content) {
- fMutable= mutable;
- fSelection= selection;
- fContent= content;
- }
-
- public boolean isSelectionDependent() {
- return fSelection;
- }
-
- public boolean isContentDependent() {
- return fContent;
- }
-
- public boolean isEditableDependent() {
- return fMutable;
- }
-
- public void update() {
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeViewerContentProvider.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeViewerContentProvider.java
deleted file mode 100644
index d193501e5..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeViewerContentProvider.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.jface.viewers.Viewer;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.*;
-import org.eclipse.compare.contentmergeviewer.IMergeViewerContentProvider;
-
-/**
- * Adapts any <code>ContentMergeViewer</code> to work on an <code>ICompareInput</code>
- * e.g. a <code>DiffNode</code>.
- */
-public class MergeViewerContentProvider implements IMergeViewerContentProvider {
-
- private CompareConfiguration fCompareConfiguration;
-
- public MergeViewerContentProvider(CompareConfiguration cc) {
- fCompareConfiguration= cc;
- }
-
- public void dispose() {
- }
-
- public void inputChanged(Viewer v, Object o1, Object o2) {
- // we are not interested since we have no state
- }
-
- //---- ancestor
-
- public String getAncestorLabel(Object element) {
- return fCompareConfiguration.getAncestorLabel(element);
- }
-
- public Image getAncestorImage(Object element) {
- return fCompareConfiguration.getAncestorImage(element);
- }
-
- public Object getAncestorContent(Object element) {
- if (element instanceof ICompareInput)
- return ((ICompareInput) element).getAncestor();
- return null;
- }
-
- public boolean showAncestor(Object element) {
- if (element instanceof ICompareInput)
- return (((ICompareInput)element).getKind() & Differencer.DIRECTION_MASK) == Differencer.CONFLICTING;
- return false;
- }
-
- //---- left
-
- public String getLeftLabel(Object element) {
- return fCompareConfiguration.getLeftLabel(element);
- }
-
- public Image getLeftImage(Object element) {
- return fCompareConfiguration.getLeftImage(element);
- }
-
- public Object getLeftContent(Object element) {
- if (element instanceof ICompareInput)
- return ((ICompareInput) element).getLeft();
- return null;
- }
-
- public boolean isLeftEditable(Object element) {
- if (element instanceof ICompareInput) {
- Object left= ((ICompareInput) element).getLeft();
- if (left == null) {
- IDiffElement parent= ((IDiffElement)element).getParent();
- if (parent instanceof ICompareInput)
- left= ((ICompareInput) parent).getLeft();
- }
- if (left instanceof IEditableContent)
- return ((IEditableContent)left).isEditable();
- }
- return false;
- }
-
- public void saveLeftContent(Object element, byte[] bytes) {
- if (element instanceof ICompareInput) {
- ICompareInput node= (ICompareInput) element;
- if (bytes != null) {
- ITypedElement left= node.getLeft();
- // #9869: problem if left is null (because no resource exists yet) nothing is done!
- if (left == null) {
- node.copy(false);
- left= node.getLeft();
- }
- if (left instanceof IEditableContent)
- ((IEditableContent)left).setContent(bytes);
- if (node instanceof ResourceCompareInput.MyDiffNode)
- ((ResourceCompareInput.MyDiffNode)node).fireChange();
- } else {
- node.copy(false);
- }
- }
- }
-
- //---- right
-
- public String getRightLabel(Object element) {
- return fCompareConfiguration.getRightLabel(element);
- }
-
- public Image getRightImage(Object element) {
- return fCompareConfiguration.getRightImage(element);
- }
-
- public Object getRightContent(Object element) {
- if (element instanceof ICompareInput)
- return ((ICompareInput) element).getRight();
- return null;
- }
-
- public boolean isRightEditable(Object element) {
- if (element instanceof ICompareInput) {
- Object right= ((ICompareInput) element).getRight();
- if (right == null) {
- IDiffContainer parent= ((IDiffElement)element).getParent();
- if (parent instanceof ICompareInput)
- right= ((ICompareInput) parent).getRight();
- }
- if (right instanceof IEditableContent)
- return ((IEditableContent)right).isEditable();
- }
- return false;
- }
-
- public void saveRightContent(Object element, byte[] bytes) {
- if (element instanceof ICompareInput) {
- ICompareInput node= (ICompareInput) element;
- if (bytes != null) {
- ITypedElement right= node.getRight();
- // #9869: problem if right is null (because no resource exists yet) nothing is done!
- if (right == null) {
- node.copy(true);
- right= node.getRight();
- }
- if (right instanceof IEditableContent)
- ((IEditableContent)right).setContent(bytes);
- if (node instanceof ResourceCompareInput.MyDiffNode)
- ((ResourceCompareInput.MyDiffNode)node).fireChange();
- } else {
- node.copy(true);
- }
- }
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/NullViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/NullViewer.java
deleted file mode 100644
index 32887e36f..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/NullViewer.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.compare.CompareViewerSwitchingPane;
-
-/**
- * Used whenever the input is null or no viewer can be found.
- */
-public class NullViewer extends AbstractViewer {
-
- private Control fDummy;
-
- public NullViewer(Composite parent) {
-
- fDummy= new Tree(parent, SWT.NULL);
-
- CompareViewerSwitchingPane.clearToolBar(parent);
- }
-
- public Control getControl() {
- return fDummy;
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/OverlayPreferenceStore.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/OverlayPreferenceStore.java
deleted file mode 100644
index 232a93d85..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/OverlayPreferenceStore.java
+++ /dev/null
@@ -1,446 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-package org.eclipse.compare.internal;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceStore;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-
-/**
- * An overlaying preference store.
- */
-public class OverlayPreferenceStore implements IPreferenceStore {
-
-
- public static final class TypeDescriptor {
- private TypeDescriptor() {
- }
- };
-
- public static final TypeDescriptor BOOLEAN= new TypeDescriptor();
- public static final TypeDescriptor DOUBLE= new TypeDescriptor();
- public static final TypeDescriptor FLOAT= new TypeDescriptor();
- public static final TypeDescriptor INT= new TypeDescriptor();
- public static final TypeDescriptor LONG= new TypeDescriptor();
- public static final TypeDescriptor STRING= new TypeDescriptor();
-
- public static class OverlayKey {
-
- TypeDescriptor fDescriptor;
- String fKey;
-
- public OverlayKey(TypeDescriptor descriptor, String key) {
- fDescriptor= descriptor;
- fKey= key;
- }
- };
-
- private class PropertyListener implements IPropertyChangeListener {
-
- /*
- * @see IPropertyChangeListener#propertyChange(PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- OverlayKey key= findOverlayKey(event.getProperty());
- if (key != null)
- propagateProperty(fParent, key, fStore);
- }
- };
-
-
- private IPreferenceStore fParent;
- private IPreferenceStore fStore;
- private OverlayKey[] fOverlayKeys;
-
- private PropertyListener fPropertyListener;
-
-
- public OverlayPreferenceStore(IPreferenceStore parent, OverlayKey[] overlayKeys) {
- fParent= parent;
- fOverlayKeys= overlayKeys;
- fStore= new PreferenceStore();
- }
-
- private OverlayKey findOverlayKey(String key) {
- for (int i= 0; i < fOverlayKeys.length; i++) {
- if (fOverlayKeys[i].fKey.equals(key))
- return fOverlayKeys[i];
- }
- return null;
- }
-
- private boolean covers(String key) {
- return (findOverlayKey(key) != null);
- }
-
- private void propagateProperty(IPreferenceStore orgin, OverlayKey key, IPreferenceStore target) {
-
- if (orgin.isDefault(key.fKey)) {
- if (!target.isDefault(key.fKey))
- target.setToDefault(key.fKey);
- return;
- }
-
- TypeDescriptor d= key.fDescriptor;
- if (BOOLEAN == d) {
-
- boolean originValue= orgin.getBoolean(key.fKey);
- boolean targetValue= target.getBoolean(key.fKey);
- if (targetValue != originValue)
- target.setValue(key.fKey, originValue);
-
- } else if (DOUBLE == d) {
-
- double originValue= orgin.getDouble(key.fKey);
- double targetValue= target.getDouble(key.fKey);
- if (targetValue != originValue)
- target.setValue(key.fKey, originValue);
-
- } else if (FLOAT == d) {
-
- float originValue= orgin.getFloat(key.fKey);
- float targetValue= target.getFloat(key.fKey);
- if (targetValue != originValue)
- target.setValue(key.fKey, originValue);
-
- } else if (INT == d) {
-
- int originValue= orgin.getInt(key.fKey);
- int targetValue= target.getInt(key.fKey);
- if (targetValue != originValue)
- target.setValue(key.fKey, originValue);
-
- } else if (LONG == d) {
-
- long originValue= orgin.getLong(key.fKey);
- long targetValue= target.getLong(key.fKey);
- if (targetValue != originValue)
- target.setValue(key.fKey, originValue);
-
- } else if (STRING == d) {
-
- String originValue= orgin.getString(key.fKey);
- String targetValue= target.getString(key.fKey);
- if (targetValue != null && originValue != null && !targetValue.equals(originValue))
- target.setValue(key.fKey, originValue);
-
- }
- }
-
- public void propagate() {
- for (int i= 0; i < fOverlayKeys.length; i++)
- propagateProperty(fStore, fOverlayKeys[i], fParent);
- }
-
- private void loadProperty(IPreferenceStore orgin, OverlayKey key, IPreferenceStore target, boolean forceInitialization) {
- TypeDescriptor d= key.fDescriptor;
- if (BOOLEAN == d) {
-
- if (forceInitialization)
- target.setValue(key.fKey, true);
- target.setValue(key.fKey, orgin.getBoolean(key.fKey));
- target.setDefault(key.fKey, orgin.getDefaultBoolean(key.fKey));
-
- } else if (DOUBLE == d) {
-
- if (forceInitialization)
- target.setValue(key.fKey, 1.0D);
- target.setValue(key.fKey, orgin.getDouble(key.fKey));
- target.setDefault(key.fKey, orgin.getDefaultDouble(key.fKey));
-
- } else if (FLOAT == d) {
-
- if (forceInitialization)
- target.setValue(key.fKey, 1.0F);
- target.setValue(key.fKey, orgin.getFloat(key.fKey));
- target.setDefault(key.fKey, orgin.getDefaultFloat(key.fKey));
-
- } else if (INT == d) {
-
- if (forceInitialization)
- target.setValue(key.fKey, 1);
- target.setValue(key.fKey, orgin.getInt(key.fKey));
- target.setDefault(key.fKey, orgin.getDefaultInt(key.fKey));
-
- } else if (LONG == d) {
-
- if (forceInitialization)
- target.setValue(key.fKey, 1L);
- target.setValue(key.fKey, orgin.getLong(key.fKey));
- target.setDefault(key.fKey, orgin.getDefaultLong(key.fKey));
-
- } else if (STRING == d) {
-
- if (forceInitialization)
- target.setValue(key.fKey, "1"); //$NON-NLS-1$
- target.setValue(key.fKey, orgin.getString(key.fKey));
- target.setDefault(key.fKey, orgin.getDefaultString(key.fKey));
-
- }
- }
-
- public void load() {
- for (int i= 0; i < fOverlayKeys.length; i++)
- loadProperty(fParent, fOverlayKeys[i], fStore, true);
- }
-
- public void loadDefaults() {
- for (int i= 0; i < fOverlayKeys.length; i++)
- setToDefault(fOverlayKeys[i].fKey);
- }
-
- public void start() {
- if (fPropertyListener == null) {
- fPropertyListener= new PropertyListener();
- fParent.addPropertyChangeListener(fPropertyListener);
- }
- }
-
- public void stop() {
- if (fPropertyListener != null) {
- fParent.removePropertyChangeListener(fPropertyListener);
- fPropertyListener= null;
- }
- }
-
- /*
- * @see IPreferenceStore#addPropertyChangeListener(IPropertyChangeListener)
- */
- public void addPropertyChangeListener(IPropertyChangeListener listener) {
- fStore.addPropertyChangeListener(listener);
- }
-
- /*
- * @see IPreferenceStore#removePropertyChangeListener(IPropertyChangeListener)
- */
- public void removePropertyChangeListener(IPropertyChangeListener listener) {
- fStore.removePropertyChangeListener(listener);
- }
-
- /*
- * @see IPreferenceStore#firePropertyChangeEvent(String, Object, Object)
- */
- public void firePropertyChangeEvent(String name, Object oldValue, Object newValue) {
- fStore.firePropertyChangeEvent(name, oldValue, newValue);
- }
-
- /*
- * @see IPreferenceStore#contains(String)
- */
- public boolean contains(String name) {
- return fStore.contains(name);
- }
-
- /*
- * @see IPreferenceStore#getBoolean(String)
- */
- public boolean getBoolean(String name) {
- return fStore.getBoolean(name);
- }
-
- /*
- * @see IPreferenceStore#getDefaultBoolean(String)
- */
- public boolean getDefaultBoolean(String name) {
- return fStore.getDefaultBoolean(name);
- }
-
- /*
- * @see IPreferenceStore#getDefaultDouble(String)
- */
- public double getDefaultDouble(String name) {
- return fStore.getDefaultDouble(name);
- }
-
- /*
- * @see IPreferenceStore#getDefaultFloat(String)
- */
- public float getDefaultFloat(String name) {
- return fStore.getDefaultFloat(name);
- }
-
- /*
- * @see IPreferenceStore#getDefaultInt(String)
- */
- public int getDefaultInt(String name) {
- return fStore.getDefaultInt(name);
- }
-
- /*
- * @see IPreferenceStore#getDefaultLong(String)
- */
- public long getDefaultLong(String name) {
- return fStore.getDefaultLong(name);
- }
-
- /*
- * @see IPreferenceStore#getDefaultString(String)
- */
- public String getDefaultString(String name) {
- return fStore.getDefaultString(name);
- }
-
- /*
- * @see IPreferenceStore#getDouble(String)
- */
- public double getDouble(String name) {
- return fStore.getDouble(name);
- }
-
- /*
- * @see IPreferenceStore#getFloat(String)
- */
- public float getFloat(String name) {
- return fStore.getFloat(name);
- }
-
- /*
- * @see IPreferenceStore#getInt(String)
- */
- public int getInt(String name) {
- return fStore.getInt(name);
- }
-
- /*
- * @see IPreferenceStore#getLong(String)
- */
- public long getLong(String name) {
- return fStore.getLong(name);
- }
-
- /*
- * @see IPreferenceStore#getString(String)
- */
- public String getString(String name) {
- return fStore.getString(name);
- }
-
- /*
- * @see IPreferenceStore#isDefault(String)
- */
- public boolean isDefault(String name) {
- return fStore.isDefault(name);
- }
-
- /*
- * @see IPreferenceStore#needsSaving()
- */
- public boolean needsSaving() {
- return fStore.needsSaving();
- }
-
- /*
- * @see IPreferenceStore#putValue(String, String)
- */
- public void putValue(String name, String value) {
- if (covers(name))
- fStore.putValue(name, value);
- }
-
- /*
- * @see IPreferenceStore#setDefault(String, double)
- */
- public void setDefault(String name, double value) {
- if (covers(name))
- fStore.setDefault(name, value);
- }
-
- /*
- * @see IPreferenceStore#setDefault(String, float)
- */
- public void setDefault(String name, float value) {
- if (covers(name))
- fStore.setDefault(name, value);
- }
-
- /*
- * @see IPreferenceStore#setDefault(String, int)
- */
- public void setDefault(String name, int value) {
- if (covers(name))
- fStore.setDefault(name, value);
- }
-
- /*
- * @see IPreferenceStore#setDefault(String, long)
- */
- public void setDefault(String name, long value) {
- if (covers(name))
- fStore.setDefault(name, value);
- }
-
- /*
- * @see IPreferenceStore#setDefault(String, String)
- */
- public void setDefault(String name, String value) {
- if (covers(name))
- fStore.setDefault(name, value);
- }
-
- /*
- * @see IPreferenceStore#setDefault(String, boolean)
- */
- public void setDefault(String name, boolean value) {
- if (covers(name))
- fStore.setDefault(name, value);
- }
-
- /*
- * @see IPreferenceStore#setToDefault(String)
- */
- public void setToDefault(String name) {
- fStore.setToDefault(name);
- }
-
- /*
- * @see IPreferenceStore#setValue(String, double)
- */
- public void setValue(String name, double value) {
- if (covers(name))
- fStore.setValue(name, value);
- }
-
- /*
- * @see IPreferenceStore#setValue(String, float)
- */
- public void setValue(String name, float value) {
- if (covers(name))
- fStore.setValue(name, value);
- }
-
- /*
- * @see IPreferenceStore#setValue(String, int)
- */
- public void setValue(String name, int value) {
- if (covers(name))
- fStore.setValue(name, value);
- }
-
- /*
- * @see IPreferenceStore#setValue(String, long)
- */
- public void setValue(String name, long value) {
- if (covers(name))
- fStore.setValue(name, value);
- }
-
- /*
- * @see IPreferenceStore#setValue(String, String)
- */
- public void setValue(String name, String value) {
- if (covers(name))
- fStore.setValue(name, value);
- }
-
- /*
- * @see IPreferenceStore#setValue(String, boolean)
- */
- public void setValue(String name, boolean value) {
- if (covers(name))
- fStore.setValue(name, value);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithEditionAction.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithEditionAction.java
deleted file mode 100644
index b4b965a0f..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithEditionAction.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-
-public class ReplaceWithEditionAction extends EditionAction {
-
- public ReplaceWithEditionAction() {
- super(true, "org.eclipse.compare.internal.ReplaceWithEditionAction"); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithEditionAction.properties b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithEditionAction.properties
deleted file mode 100644
index 0ee8160ba..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithEditionAction.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-# =====================================
-# (c) Copyright IBM Corp. 2000, 2001.
-# All Rights Reserved.
-# =====================================
-
-# @(#)ReplaceWithEditionAction.properties
-#
-# Resources for ReplaceWithEditionAction.java
-
-title= Replace from Local History
-
-treeTitleFormat= Local History of ''{0}''
-dateIcon= obj16/day_obj.gif
-timeIcon= obj16/resource_obj.gif
-
-treeFormat= {0}
-workspaceTreeFormat= {0} (Workspace File)
-parseErrorFormat= {0} (Parse Error)
-
-editionLabel= Local History ({0})
-workspaceEditionLabel= Workspace File
-
-targetLabel= {0}
-
-todayFormat= Today ({0})
-yesterdayFormat= Yesterday ({0})
-dayFormat= {0}
-
-buttonLabel= Replace
-
-noLocalHistoryError= No local history available for selected resource.
-replaceError=Can''t replace resource (reason: {0}).
-
-taskName=Replacing \ No newline at end of file
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithPreviousEditionAction.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithPreviousEditionAction.java
deleted file mode 100644
index 2f590db9c..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithPreviousEditionAction.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-
-public class ReplaceWithPreviousEditionAction extends EditionAction {
-
- public ReplaceWithPreviousEditionAction() {
- super(true, "org.eclipse.compare.internal.ReplaceWithEditionAction"); //$NON-NLS-1$
- fPrevious= true;
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ResizableDialog.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ResizableDialog.java
deleted file mode 100644
index 26e5fe34d..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ResizableDialog.java
+++ /dev/null
@@ -1,136 +0,0 @@
-package org.eclipse.compare.internal;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.Shell;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.DialogSettings;
-
-
-/**
- * Base class for resizable Dialogs with persistent window bounds.
- */
-public abstract class ResizableDialog extends Dialog {
-
- // dialog store id constants
- private final static String DIALOG_BOUNDS_KEY= "ResizableDialogBounds"; //$NON-NLS-1$
- private static final String X= "x"; //$NON-NLS-1$
- private static final String Y= "y"; //$NON-NLS-1$
- private static final String WIDTH= "width"; //$NON-NLS-1$
- private static final String HEIGHT= "height"; //$NON-NLS-1$
-
- protected ResourceBundle fBundle;
- private Rectangle fNewBounds;
- private IDialogSettings fSettings;
-
-
- public ResizableDialog(Shell parent, ResourceBundle bundle) {
- super(parent);
- setShellStyle(getShellStyle() | SWT.RESIZE);
-
- fBundle= bundle;
-
- fSettings= CompareUIPlugin.getDefault().getDialogSettings();
- }
-
- protected Point getInitialSize() {
-
- int width= 0;
- int height= 0;
-
- final Shell s= getShell();
- if (s != null) {
- s.addControlListener(
- new ControlListener() {
- public void controlMoved(ControlEvent arg0) {
- fNewBounds= s.getBounds();
- }
- public void controlResized(ControlEvent arg0) {
- fNewBounds= s.getBounds();
- }
- }
- );
- }
-
- IDialogSettings bounds= fSettings.getSection(DIALOG_BOUNDS_KEY); //$NON-NLS-1$
- if (bounds == null) {
- if (fBundle != null) {
- width= Utilities.getInteger(fBundle, WIDTH, 0);
- height= Utilities.getInteger(fBundle, HEIGHT, 0);
- Shell shell= getParentShell();
- if (shell != null) {
- Point parentSize= shell.getSize();
- if (width <= 0)
- width= parentSize.x-300;
- if (height <= 0)
- height= parentSize.y-200;
- }
- } else {
- Shell shell= getParentShell();
- if (shell != null) {
- Point parentSize= shell.getSize();
- width= parentSize.x-100;
- height= parentSize.y-100;
- }
- }
- if (width < 700)
- width= 700;
- if (height < 500)
- height= 500;
- } else {
- try {
- width= bounds.getInt(WIDTH);
- } catch (NumberFormatException e) {
- width= 700;
- }
- try {
- height= bounds.getInt(HEIGHT);
- } catch (NumberFormatException e) {
- height= 500;
- }
- }
-
- return new Point(width, height);
- }
-
- protected Point getInitialLocation(Point initialSize) {
- Point loc= super.getInitialLocation(initialSize);
-
- IDialogSettings bounds= fSettings.getSection(DIALOG_BOUNDS_KEY);
- if (bounds != null) {
- try {
- loc.x= bounds.getInt(X);
- } catch (NumberFormatException e) {
- }
- try {
- loc.y= bounds.getInt(Y);
- } catch (NumberFormatException e) {
- }
- }
- return loc;
- }
-
- public boolean close() {
- boolean closed= super.close();
- if (closed && fNewBounds != null)
- saveBounds(fNewBounds);
- return closed;
- }
-
- private void saveBounds(Rectangle bounds) {
- IDialogSettings dialogBounds= fSettings.getSection(DIALOG_BOUNDS_KEY);
- if (dialogBounds == null) {
- dialogBounds= new DialogSettings(DIALOG_BOUNDS_KEY);
- fSettings.addSection(dialogBounds);
- }
- dialogBounds.put(X, bounds.x);
- dialogBounds.put(Y, bounds.y);
- dialogBounds.put(WIDTH, bounds.width);
- dialogBounds.put(HEIGHT, bounds.height);
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ResourceCompareInput.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ResourceCompareInput.java
deleted file mode 100644
index 02a07d33b..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ResourceCompareInput.java
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.text.MessageFormat;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.swt.widgets.Composite;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.Viewer;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.*;
-
-
-/**
- * A two-way or three-way compare for arbitrary IResources.
- */
-class ResourceCompareInput extends CompareEditorInput {
-
- private static final boolean NORMALIZE_CASE= true;
-
- private boolean fThreeWay= false;
- private Object fRoot;
- private IStructureComparator fAncestor;
- private IStructureComparator fLeft;
- private IStructureComparator fRight;
- private IResource fAncestorResource;
- private IResource fLeftResource;
- private IResource fRightResource;
- private DiffTreeViewer fDiffViewer;
-
-
- class MyDiffNode extends DiffNode {
-
- private boolean fDirty= false;
- private ITypedElement fLastId;
- private String fLastName;
-
-
- public MyDiffNode(IDiffContainer parent, int description, ITypedElement ancestor, ITypedElement left, ITypedElement right) {
- super(parent, description, ancestor, left, right);
- }
- public void fireChange() {
- super.fireChange();
- setDirty(true);
- fDirty= true;
- if (fDiffViewer != null)
- fDiffViewer.refresh(this);
- }
- void clearDirty() {
- fDirty= false;
- }
- public String getName() {
- if (fLastName == null)
- fLastName= super.getName();
- if (fDirty)
- return '<' + fLastName + '>';
- return fLastName;
- }
-
- public ITypedElement getId() {
- ITypedElement id= super.getId();
- if (id == null)
- return fLastId;
- fLastId= id;
- return id;
- }
- }
-
- /**
- * Creates an compare editor input for the given selection.
- */
- ResourceCompareInput(CompareConfiguration config) {
- super(config);
- }
-
- public Viewer createDiffViewer(Composite parent) {
- Viewer v= super.createDiffViewer(parent);
- if (v instanceof DiffTreeViewer)
- fDiffViewer= (DiffTreeViewer) v;
- return v;
- }
-
- /**
- * Returns true if compare can be executed for the given selection.
- */
- boolean setSelection(ISelection s) {
-
- IResource[] selection= Utilities.getResources(s);
- if (selection.length < 2 || selection.length > 3)
- return false;
-
- fThreeWay= selection.length == 3;
-
- fLeftResource= selection[0];
- fRightResource= selection[1];
- if (fThreeWay) {
- fLeftResource= selection[1];
- fRightResource= selection[2];
- }
-
- fAncestor= null;
- fLeft= getStructure(fLeftResource);
- fRight= getStructure(fRightResource);
-
- if (incomparable(fLeft, fRight))
- return false;
-
- if (fThreeWay) {
- fAncestorResource= selection[0];
- fAncestor= getStructure(fAncestorResource);
-
- if (incomparable(fAncestor, fRight))
- return false;
- }
-
- return true;
- }
-
- /**
- * Returns true if the given arguments cannot be compared.
- */
- private boolean incomparable(IStructureComparator c1, IStructureComparator c2) {
- if (c1 == null || c2 == null)
- return true;
- return isLeaf(c1) != isLeaf(c2);
- }
-
- /**
- * Returns true if the given arguments is a leaf.
- */
- private boolean isLeaf(IStructureComparator c) {
- if (c instanceof ITypedElement) {
- ITypedElement te= (ITypedElement) c;
- return !ITypedElement.FOLDER_TYPE.equals(te.getType());
- }
- return false;
- }
-
- /**
- * Creates a <code>IStructureComparator</code> for the given input.
- * Returns <code>null</code> if no <code>IStructureComparator</code>
- * can be found for the <code>IResource</code>.
- */
- private IStructureComparator getStructure(IResource input) {
-
- if (input instanceof IContainer)
- return new BufferedResourceNode(input);
-
- if (input instanceof IFile) {
- IStructureComparator rn= new BufferedResourceNode(input);
- IFile file= (IFile) input;
- String type= normalizeCase(file.getFileExtension());
- if ("JAR".equals(type) || "ZIP".equals(type)) //$NON-NLS-2$ //$NON-NLS-1$
- return new ZipFileStructureCreator().getStructure(rn);
- return rn;
- }
- return null;
- }
-
- /**
- * Performs a two-way or three-way diff on the current selection.
- */
- public Object prepareInput(IProgressMonitor pm) throws InvocationTargetException {
-
- CompareConfiguration cc= (CompareConfiguration) getCompareConfiguration();
-
- try {
- // fix for PR 1GFMLFB: ITPUI:WIN2000 - files that are out of sync with the file system appear as empty
- fLeftResource.refreshLocal(IResource.DEPTH_INFINITE, pm);
- fRightResource.refreshLocal(IResource.DEPTH_INFINITE, pm);
- if (fThreeWay && fAncestorResource != null)
- fAncestorResource.refreshLocal(IResource.DEPTH_INFINITE, pm);
- // end fix
-
- pm.beginTask(Utilities.getString("ResourceCompare.taskName"), IProgressMonitor.UNKNOWN); //$NON-NLS-1$
-
- cc.setLeftLabel(buildLabel(fLeftResource));
- cc.setLeftImage(CompareUIPlugin.getImage(fLeftResource));
-
- cc.setRightLabel(buildLabel(fRightResource));
- cc.setRightImage(CompareUIPlugin.getImage(fRightResource));
-
- String leftLabel= fLeftResource.getName();
- String rightLabel= fRightResource.getName();
-
- String title;
- if (fThreeWay) {
- cc.setAncestorLabel(buildLabel(fAncestorResource));
- cc.setAncestorImage(CompareUIPlugin.getImage(fAncestorResource));
- String format= Utilities.getString("ResourceCompare.threeWay.title"); //$NON-NLS-1$
- String ancestorLabel= fAncestorResource.getName();
- title= MessageFormat.format(format, new String[] {ancestorLabel, leftLabel, rightLabel} );
- } else {
- String format= Utilities.getString("ResourceCompare.twoWay.title"); //$NON-NLS-1$
- title= MessageFormat.format(format, new String[] {leftLabel, rightLabel} );
- }
- setTitle(title);
-
- Differencer d= new Differencer() {
- protected Object visit(Object parent, int description, Object ancestor, Object left, Object right) {
- return new MyDiffNode((IDiffContainer) parent, description, (ITypedElement)ancestor, (ITypedElement)left, (ITypedElement)right);
- }
- };
-
- fRoot= d.findDifferences(fThreeWay, pm, null, fAncestor, fLeft, fRight);
- return fRoot;
-
- } catch (CoreException ex) {
- throw new InvocationTargetException(ex);
- } finally {
- pm.done();
- }
- }
-
- private String buildLabel(IResource r) {
- //return r.getName();
- String n= r.getFullPath().toString();
- if (n.charAt(0) == IPath.SEPARATOR)
- return n.substring(1);
- return n;
- }
-
- public void saveChanges(IProgressMonitor pm) throws CoreException {
- super.saveChanges(pm);
- if (fRoot instanceof DiffNode) {
- try {
- commit(pm, (DiffNode) fRoot);
- } finally {
- if (fDiffViewer != null)
- fDiffViewer.refresh();
- setDirty(false);
- }
- }
- }
-
- /*
- * Recursively walks the diff tree and commits all changes.
- */
- private static void commit(IProgressMonitor pm, DiffNode node) throws CoreException {
-
- if (node instanceof MyDiffNode)
- ((MyDiffNode)node).clearDirty();
-
- ITypedElement left= node.getLeft();
- if (left instanceof BufferedResourceNode)
- ((BufferedResourceNode) left).commit(pm);
-
- ITypedElement right= node.getRight();
- if (right instanceof BufferedResourceNode)
- ((BufferedResourceNode) right).commit(pm);
-
- IDiffElement[] children= node.getChildren();
- if (children != null) {
- for (int i= 0; i < children.length; i++) {
- IDiffElement element= children[i];
- if (element instanceof DiffNode)
- commit(pm, (DiffNode) element);
- }
- }
- }
-
- private static String normalizeCase(String s) {
- if (NORMALIZE_CASE && s != null)
- return s.toUpperCase();
- return s;
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ShowPseudoConflicts.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ShowPseudoConflicts.java
deleted file mode 100644
index e109359e8..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ShowPseudoConflicts.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.compare.*;
-
-/**
- * Toggles the <code>ICompareConfiguration.SHOW_PSEUDO_CONFLICTS</code> property of an
- * <code>ICompareConfiguration</code>.
- */
-public class ShowPseudoConflicts extends ChangePropertyAction {
-
- public ShowPseudoConflicts(ResourceBundle bundle, CompareConfiguration cc) {
- super(bundle, cc, "action.ShowPseudoConflicts.", CompareConfiguration.SHOW_PSEUDO_CONFLICTS); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/SimpleTextViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/SimpleTextViewer.java
deleted file mode 100644
index fd7a885bd..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/SimpleTextViewer.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.io.IOException;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.jface.text.Document;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-
-
-public class SimpleTextViewer extends AbstractViewer {
-
- private SourceViewer fSourceViewer;
- private ICompareInput fInput;
-
-
- SimpleTextViewer(Composite parent) {
- fSourceViewer= new SourceViewer(parent, null, SWT.H_SCROLL + SWT.V_SCROLL);
- fSourceViewer.setEditable(false);
- }
-
- public Control getControl() {
- return fSourceViewer.getTextWidget();
- }
-
- public void setInput(Object input) {
- if (input instanceof IStreamContentAccessor) {
- fSourceViewer.setDocument(new Document(getString(input)));
- } else if (input instanceof ICompareInput) {
- fInput= (ICompareInput) input;
- ITypedElement left= ((ICompareInput) fInput).getLeft();
- fSourceViewer.setDocument(new Document(getString(left)));
- }
- }
-
- public Object getInput() {
- return fInput;
- }
-
- private String getString(Object input) {
-
- if (input instanceof IStreamContentAccessor) {
- IStreamContentAccessor sca= (IStreamContentAccessor) input;
- try {
- return Utilities.readString(sca.getContents());
- } catch (CoreException ex) {
- }
- }
- return ""; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/Splitter.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/Splitter.java
deleted file mode 100644
index 846a378dc..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/Splitter.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.custom.SashForm;
-
-public class Splitter extends SashForm {
-
- private static final String VISIBILITY= "org.eclipse.compare.internal.visibility"; //$NON-NLS-1$
-
-
- public Splitter(Composite parent, int style) {
- super(parent, style);
- }
-
- public void setVisible(Control child, boolean visible) {
-
- boolean wasEmpty= isEmpty();
-
- child.setVisible(visible);
- child.setData(VISIBILITY, new Boolean(visible));
-
- if (wasEmpty != isEmpty()) {
- Composite parent= getParent();
- if (parent instanceof Splitter) {
- Splitter sp= (Splitter) parent;
- sp.setVisible(this, visible);
- sp.layout();
- }
- } else {
- layout();
- }
- }
-
- private boolean isEmpty() {
- Control[] controls= getChildren();
- for (int i= 0; i < controls.length; i++)
- if (isVisible(controls[i]))
- return false;
- return true;
- }
-
- private boolean isVisible(Control child) {
- if (child instanceof Sash)
- return false;
- Object data= child.getData(VISIBILITY);
- if (data instanceof Boolean)
- return ((Boolean)data).booleanValue();
- return true;
- }
-
- public void setMaximizedControl(Control control) {
- if (control == null || control == getMaximizedControl())
- super.setMaximizedControl(null);
- else
- super.setMaximizedControl(control);
-
- // walk up
- Composite parent= getParent();
- if (parent instanceof Splitter)
- ((Splitter) parent).setMaximizedControl(this);
- else
- layout(true);
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/TabFolderLayout.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/TabFolderLayout.java
deleted file mode 100644
index c33ac3c76..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/TabFolderLayout.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved
- */
-package org.eclipse.compare.internal; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Layout;
-
-public class TabFolderLayout extends Layout {
-
- protected Point computeSize (Composite composite, int wHint, int hHint, boolean flushCache) {
- if (wHint != SWT.DEFAULT && hHint != SWT.DEFAULT)
- return new Point(wHint, hHint);
-
- Control [] children = composite.getChildren ();
- int count = children.length;
- int maxWidth = 0, maxHeight = 0;
- for (int i=0; i<count; i++) {
- Control child = children [i];
- Point pt = child.computeSize (SWT.DEFAULT, SWT.DEFAULT, flushCache);
- maxWidth = Math.max (maxWidth, pt.x);
- maxHeight = Math.max (maxHeight, pt.y);
- }
-
- if (wHint != SWT.DEFAULT)
- maxWidth= wHint;
- if (hHint != SWT.DEFAULT)
- maxHeight= hHint;
-
- return new Point(maxWidth, maxHeight);
-
- }
-
- protected void layout (Composite composite, boolean flushCache) {
- Rectangle rect= composite.getClientArea();
-
- Control[] children = composite.getChildren();
- for (int i = 0; i < children.length; i++) {
- children[i].setBounds(rect);
- }
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/TextMergeViewerCreator.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/TextMergeViewerCreator.java
deleted file mode 100644
index 9fb4b935b..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/TextMergeViewerCreator.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.widgets.Composite;
-
-import org.eclipse.jface.viewers.Viewer;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.contentmergeviewer.TextMergeViewer;
-
-/**
- * A factory object for the <code>TextMergeViewer</code>.
- * This indirection is necessary because only objects with a default
- * constructor can be created via an extension point
- * (this precludes Viewers).
- */
-public class TextMergeViewerCreator implements IViewerCreator {
-
- public Viewer createViewer(Composite parent, CompareConfiguration mp) {
- return new TextMergeViewer(parent, mp);
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/TextViewerCreator.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/TextViewerCreator.java
deleted file mode 100644
index 554114cd5..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/TextViewerCreator.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.widgets.Composite;
-
-import org.eclipse.jface.viewers.Viewer;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.IViewerCreator;
-
-
-/**
- * A factory object for the <code>TextMergeViewer</code>.
- * This indirection is necessary because only objects with a default
- * constructor can be created via an extension point
- * (this precludes Viewers).
- */
-public class TextViewerCreator implements IViewerCreator {
-
- public Viewer createViewer(Composite parent, CompareConfiguration mp) {
- return new SimpleTextViewer(parent);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/TimeoutContext.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/TimeoutContext.java
deleted file mode 100644
index c52da8b58..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/TimeoutContext.java
+++ /dev/null
@@ -1,380 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.operation.*;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.util.Assert;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.compare.contentmergeviewer.*;
-
-/**
- * A modal dialog that displays progress during a long running operation.
- */
-public class TimeoutContext {
-
- private static class ModalContextThread extends Thread {
-
- private boolean fWorking;
- private IRunnableWithProgress fRunnable;
- private Throwable fThrowable;
- private IProgressMonitor fProgressMonitor;
- private boolean fContinueEventDispatching= true;
- private Display fDisplay;
-
- private ModalContextThread(IRunnableWithProgress operation, IProgressMonitor monitor) {
- super("TimeoutContext"); //$NON-NLS-1$
- fRunnable= operation;
- fProgressMonitor= monitor;
- }
-
- synchronized boolean timeout(Display display) {
- fDisplay= display;
- return fWorking;
- }
-
- public void run() {
- try {
- fWorking= true;
- if (fRunnable != null)
- fRunnable.run(fProgressMonitor);
- } catch (InvocationTargetException e) {
- fThrowable= e;
- } catch (InterruptedException e) {
- fThrowable= e;
- } catch (RuntimeException e) {
- fThrowable= e;
- } catch (ThreadDeath e) {
- // Make sure to propagate ThreadDeath, or threads will never fully terminate
- throw e;
- } catch (Error e) {
- fThrowable= e;
- } finally {
- fWorking= false;
-
- if (fDisplay != null) {
- // Make sure that all events in the asynchronous event queue
- // are dispatched.
- fDisplay.syncExec(
- new Runnable() {
- public void run() {
- // do nothing
- }
- }
- );
-
- // Stop event dispatching
- fContinueEventDispatching= false;
-
- // Force the event loop to return from sleep () so that
- // it stops event dispatching.
- fDisplay.asyncExec(null);
- }
- }
- }
-
- public void block() {
- while (fContinueEventDispatching)
- if (!fDisplay.readAndDispatch())
- fDisplay.sleep();
- }
- }
-
- static class ProgressMonitorDialog extends org.eclipse.jface.dialogs.Dialog {
-
- protected ProgressIndicator fProgressIndicator;
- protected Label fTaskLabel;
- protected Label fSubTaskLabel;
- protected Button fCancel;
- protected boolean fEnableCancelButton;
- private ProgressMonitor fProgressMonitor;
- private Cursor fArrowCursor;
- private Cursor fWaitCursor;
- private Shell fParentShell;
-
- private ProgressMonitorDialog(Shell parent, boolean cancelable, ProgressMonitor pm) {
- super(parent);
- fProgressMonitor= pm;
- fParentShell= parent;
- fEnableCancelButton= cancelable;
- this.setBlockOnOpen(false);
- setShellStyle(SWT.BORDER | SWT.TITLE | SWT.APPLICATION_MODAL); // no close button
- }
-
- public boolean close() {
- if (fCancel != null && !fCancel.isDisposed())
- fCancel.setCursor(null);
- Shell shell= getShell();
- if (shell != null && !shell.isDisposed())
- shell.setCursor(null);
- if (fArrowCursor != null)
- fArrowCursor.dispose();
- if (fWaitCursor != null)
- fWaitCursor.dispose();
- fArrowCursor= null;
- fWaitCursor= null;
- return super.close();
- }
-
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- shell.setText(JFaceResources.getString("ProgressMonitorDialog.title")); //$NON-NLS-1$
- if (fWaitCursor == null)
- fWaitCursor= new Cursor(shell.getDisplay(),SWT.CURSOR_WAIT);
- shell.setCursor(fWaitCursor);
- }
-
- protected void createButtonsForButtonBar(Composite parent) {
- // cancel button
- fCancel= createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true);
- if(fArrowCursor == null)
- fArrowCursor= new Cursor(fCancel.getDisplay(),SWT.CURSOR_ARROW);
- fCancel.setCursor(fArrowCursor);
- fCancel.addListener(SWT.Selection,
- new Listener() {
- public void handleEvent(Event e) {
- if (fCancel != null && !fCancel.isDisposed())
- fCancel.setEnabled(false);
- fProgressMonitor.setCanceled(true);
- }
- }
- );
- fCancel.setEnabled(fEnableCancelButton);
- }
-
- protected Control createDialogArea(Composite parent) {
-
- Composite c= (Composite)super.createDialogArea(parent);
- ((GridLayout)c.getLayout()).numColumns= 2;
-
- // icon
- Label iconLabel= new Label(c, SWT.LEFT);
- GridData gd= new GridData();
- iconLabel.setLayoutData(gd);
- iconLabel.setFont(parent.getFont());
- Image i= JFaceResources.getImageRegistry().get(org.eclipse.jface.dialogs.Dialog.DLG_IMG_INFO);
- if (i != null)
- iconLabel.setImage(i);
- else
- iconLabel.setText(JFaceResources.getString("Image_not_found")); //$NON-NLS-1$
-
- // label on right hand side of icon
- fTaskLabel= new Label(c, SWT.LEFT | SWT.WRAP);
- fTaskLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- fTaskLabel.setFont(parent.getFont());
-
- // progress indicator
- fProgressIndicator= new ProgressIndicator(c);
- gd= new GridData();
- gd.heightHint= 15;
- gd.horizontalAlignment= gd.FILL;
- gd.grabExcessHorizontalSpace= true;
- gd.horizontalSpan= 2;
- fProgressIndicator.setLayoutData(gd);
-
- // label showing current task
- fSubTaskLabel= new Label(c, SWT.LEFT | SWT.WRAP);
- gd= new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint= 35;
- gd.horizontalSpan= 2;
- fSubTaskLabel.setLayoutData(gd);
- fSubTaskLabel.setFont(parent.getFont());
-
- // update with values fProgressMonitor
- String s= fProgressMonitor.fTask;
- if (s == null)
- s= ""; //$NON-NLS-1$
- fTaskLabel.setText(s);
-
- if (fProgressMonitor.fMaxWork == IProgressMonitor.UNKNOWN)
- fProgressIndicator.beginAnimatedTask();
- else
- fProgressIndicator.beginTask(fProgressMonitor.fMaxWork);
-
- if (fProgressMonitor.fSubTask != null)
- fSubTaskLabel.setText(fProgressMonitor.fSubTask);
- fProgressIndicator.worked(fProgressMonitor.fWorked);
-
- fProgressMonitor.activate(this);
-
- return c;
- }
-
- void beginTask(final String name, final int totalWork) {
- fParentShell.getDisplay().syncExec(
- new Runnable() {
- public void run() {
- fTaskLabel.setText(name);
-
- if (fProgressIndicator != null && fProgressIndicator.isDisposed()) {
- if (totalWork == IProgressMonitor.UNKNOWN)
- fProgressIndicator.beginAnimatedTask();
- else
- fProgressIndicator.beginTask(totalWork);
- }
- }
- }
- );
- }
-
- void setTaskName(final String name) {
- fParentShell.getDisplay().syncExec(
- new Runnable() {
- public void run() {
- if (fTaskLabel != null && fTaskLabel.isDisposed())
- fTaskLabel.setText(name);
- }
- }
- );
- }
-
- void setSubTaskName(final String name) {
- fParentShell.getDisplay().syncExec(
- new Runnable() {
- public void run() {
- String n= (name == null) ? "" : name; //$NON-NLS-1$
- if (fSubTaskLabel != null && !fSubTaskLabel.isDisposed())
- fSubTaskLabel.setText(n);
- }
- }
- );
- }
-
- void done() {
- fParentShell.getDisplay().syncExec(
- new Runnable() {
- public void run() {
- if (fProgressIndicator != null && !fProgressIndicator.isDisposed()) {
- fProgressIndicator.sendRemainingWork();
- fProgressIndicator.done();
- }
- }
- }
- );
- }
-
- void worked(final double work) {
- fParentShell.getDisplay().syncExec(
- new Runnable() {
- public void run() {
- if (fProgressIndicator != null && !fProgressIndicator.isDisposed())
- fProgressIndicator.worked(work);
- }
- }
- );
- }
-
- protected Point getInitialSize() {
- return getShell().computeSize(450, SWT.DEFAULT);
- }
- }
-
- private static class ProgressMonitor implements IProgressMonitor {
-
- private int fMaxWork;
- private String fTask;
- private String fSubTask;
- private int fWorked;
- private ProgressMonitorDialog fProgressMonitorDialog;
- private boolean fIsCanceled;
-
- public void beginTask(String name, int totalWork) {
-
- fTask= name;
- fMaxWork= totalWork;
- fWorked= 0;
-
- if (fProgressMonitorDialog != null)
- fProgressMonitorDialog.beginTask(name, totalWork);
- }
-
- void activate(ProgressMonitorDialog dialog) {
- fProgressMonitorDialog= dialog;
- }
-
- public void done() {
- if (fProgressMonitorDialog != null)
- fProgressMonitorDialog.done();
- }
-
- public void setTaskName(String name) {
- fTask= name;
- if (fProgressMonitorDialog != null)
- fProgressMonitorDialog.setTaskName(name);
- }
-
- public boolean isCanceled() {
- return fIsCanceled;
- }
-
- public void setCanceled(boolean b) {
- fIsCanceled= b;
- }
-
- public void subTask(String name) {
- fSubTask= name;
- if (fProgressMonitorDialog != null)
- fProgressMonitorDialog.setSubTaskName(name);
- }
-
- public void worked(int work) {
- if (fProgressMonitorDialog != null)
- internalWorked(work);
- else
- fWorked+= work;
- }
-
- public void internalWorked(double work) {
- if (fProgressMonitorDialog != null)
- fProgressMonitorDialog.worked(work);
- }
- }
-
- public static void run(boolean cancelable, int timeout, Shell parent, IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException {
-
- Display display= parent.getDisplay();
-
- ProgressMonitor pm= new ProgressMonitor();
-
- ModalContextThread t= new ModalContextThread(runnable, pm);
- t.start(); // start the long running operation
-
- // wait until long operations terminates or timeout
- try {
- t.join(timeout);
- } catch (InterruptedException e) {
- }
-
- if (t.timeout(display)) { // timeout
- ProgressMonitorDialog dialog= new ProgressMonitorDialog(parent, cancelable, pm);
- dialog.open();
- t.block();
- dialog.close();
- }
-
- Throwable throwable= t.fThrowable;
- if (throwable != null) {
- if (throwable instanceof InvocationTargetException) {
- throw (InvocationTargetException) throwable;
- } else if (throwable instanceof InterruptedException) {
- throw (InterruptedException) throwable;
- } else if (throwable instanceof OperationCanceledException) {
- throw new InterruptedException(throwable.getMessage());
- } else {
- throw new InvocationTargetException(throwable);
- }
- }
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/TokenComparator.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/TokenComparator.java
deleted file mode 100644
index d4253cdf2..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/TokenComparator.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.jface.util.Assert;
-
-import org.eclipse.compare.rangedifferencer.IRangeComparator;
-import org.eclipse.compare.contentmergeviewer.ITokenComparator;
-
-/**
- * Implements the <code>ITokenComparator</code> interface for words (or tokens)
- * in a string.
- * A <code>TokenComparator</code> is used as the input for the <code>RangeDifferencer</code>
- * engine to perform a token oriented compare on strings.
- */
-public class TokenComparator implements ITokenComparator {
-
- private boolean fShouldEscape= true;
- private String fText;
- private int fCount;
- private int[] fStarts;
- private int[] fLengths;
-
- /**
- * Creates a <code>TokenComparator</code> for the given string.
- *
- * @param string the string that is split into token
- */
- public TokenComparator(String text) {
-
- Assert.isNotNull(text);
-
- fText= text;
-
- int length= fText.length();
- fStarts= new int[length]; // pessimistic assumption!
- fLengths= new int[length];
- fCount= 0;
-
- char lastCategory= 0; // 0: no category
- for (int i= 0; i < length; i++) {
- char c= fText.charAt(i);
-
- char category= '?'; // unspecified category
- if (Character.isWhitespace(c))
- category= ' '; // white space category
- else if (Character.isDigit(c))
- category= '0'; // digits
- else if (Character.isLetter(c))
- category= 'a'; // letters
-
- if (category != lastCategory) {
- // start a new token
- fStarts[fCount++]= i;
- lastCategory= category;
- }
- fLengths[fCount-1]++;
- }
- }
-
- /**
- * Creates a <code>TokenComparator</code> for the given string.
- *
- * @param string the string that is split into token
- * @param shouldEscape
- */
- public TokenComparator(String s, boolean shouldEscape) {
- this(s);
- fShouldEscape= shouldEscape;
- }
-
- /**
- * Returns the number of token in the string.
- *
- * @return number of token in the string
- */
- public int getRangeCount() {
- return fCount;
- }
-
- /* (non Javadoc)
- * see ITokenComparator.getTokenStart
- */
- public int getTokenStart(int index) {
- if (index < fCount)
- return fStarts[index];
- return fText.length();
- }
-
- /* (non Javadoc)
- * see ITokenComparator.getTokenLength
- */
- public int getTokenLength(int index) {
- if (index < fCount)
- return fLengths[index];
- return 0;
- }
-
- /**
- * Returns <code>true</code> if a token given by the first index
- * matches a token specified by the other <code>IRangeComparator</code> and index.
- *
- * @param thisIndex the number of the token within this range comparator
- * @param other the range comparator to compare this with
- * @param otherIndex the number of the token within the other comparator
- * @return <code>true</code> if the token are equal
- */
- public boolean rangesEqual(int thisIndex, IRangeComparator other, int otherIndex) {
- if (other != null && getClass() == other.getClass()) {
- TokenComparator tc= (TokenComparator) other;
- int thisLen= getTokenLength(thisIndex);
- int otherLen= tc.getTokenLength(otherIndex);
- if (thisLen == otherLen)
- return fText.regionMatches(false, getTokenStart(thisIndex), tc.fText, tc.getTokenStart(otherIndex), thisLen);
- }
- return false;
- }
-
- /**
- * Aborts the comparison if the number of tokens is too large.
- *
- * @return <code>true</code> to abort a token comparison
- */
- public boolean skipRangeComparison(int length, int max, IRangeComparator other) {
-
- if (!fShouldEscape)
- return false;
-
- if (getRangeCount() < 50 || other.getRangeCount() < 50)
- return false;
-
- if (max < 100)
- return false;
-
- if (length < 100)
- return false;
-
- if (max > 800)
- return true;
-
- if (length < max / 4)
- return false;
-
- return true;
- }
-
-// public static void main(String args[]) {
-// //String in= "private static boolean isWhitespace(char c) {";
-// //String in= "for (int j= 0; j < l-1; j++) {";
-// String in= "for do i= 123; i++";
-// TokenComparator tc= new TokenComparator(in, false);
-//
-// System.out.println("n: " + tc.getRangeCount());
-// System.out.println(in);
-//
-// int p= 0;
-// for (int i= 0; i < tc.getRangeCount(); i++) {
-// int l= tc.getTokenLength(i);
-// System.out.print("<");
-//
-// for (int j= 0; j < l-1; j++)
-// System.out.print(" ");
-// }
-// System.out.println();
-//
-// //System.out.println("extract: <" + tc.extract(16, 1) + ">");
-// }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java
deleted file mode 100644
index 951178767..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java
+++ /dev/null
@@ -1,370 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.io.*;
-import java.text.MessageFormat;
-import java.util.*;
-
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.*;
-import org.eclipse.jface.viewers.*;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-
-import org.eclipse.ui.*;
-
-import org.eclipse.compare.CompareConfiguration;
-
-/**
- * Convenience and utility methods.
- */
-public class Utilities {
-
- public static IActionBars findActionBars(Control c) {
- while (c != null && !c.isDisposed()) {
- Object data= c.getData();
- if (data instanceof CompareEditor)
- return ((CompareEditor)data).getActionBars();
-
- // PR 1GDVZV7: ITPVCM:WIN98 - CTRL + C does not work in Java source compare
- if (data instanceof IViewPart)
- return ((IViewPart)data).getViewSite().getActionBars();
- // end PR 1GDVZV7
-
- c= c.getParent();
- }
- return null;
- }
-
- public static void setEnableComposite(Composite composite, boolean enable) {
- Control[] children= composite.getChildren();
- for (int i= 0; i < children.length; i++)
- children[i].setEnabled(enable);
- }
-
- public static boolean getBoolean(CompareConfiguration cc, String key, boolean dflt) {
- if (cc != null) {
- Object value= cc.getProperty(key);
- if (value instanceof Boolean)
- return ((Boolean) value).booleanValue();
- }
- return dflt;
- }
-
- public static void firePropertyChange(ListenerList ll, Object source, String property, Object old, Object newValue) {
- if (ll != null) {
- PropertyChangeEvent event= null;
- Object[] listeners= ll.getListeners();
- for (int i= 0; i < listeners.length; i++) {
- IPropertyChangeListener l= (IPropertyChangeListener) listeners[i];
- if (event == null)
- event= new PropertyChangeEvent(source, property, old, newValue);
- l.propertyChange(event);
- }
- }
- }
-
- public static boolean okToUse(Widget widget) {
- return widget != null && !widget.isDisposed();
- }
-
- public static boolean isMotif() {
- return false;
- }
-
- /**
- * Returns the elements of the given selection.
- * Returns an empty array if the selection is empty or if
- * the given selection is not of type <code>IStructuredSelection</code>.
- *
- * @param selection the selection
- * @return the selected elements
- */
- public static Object[] toArray(ISelection selection) {
- if (!(selection instanceof IStructuredSelection)) {
- return new Object[0];
- }
- IStructuredSelection ss= (IStructuredSelection) selection;
- return ss.toArray();
- }
-
- /**
- * Convenience method: extract all <code>IResources</code> from given selection.
- * Never returns null.
- */
- public static IResource[] getResources(ISelection selection) {
-
- ArrayList tmp= new ArrayList();
-
- if (selection instanceof IStructuredSelection) {
-
- Object[] s= ((IStructuredSelection)selection).toArray();
-
- for (int i= 0; i < s.length; i++) {
- Object o= s[i];
- if (o instanceof IResource) {
- tmp.add(o);
- continue;
- }
- if (o instanceof IAdaptable) {
- IAdaptable a= (IAdaptable) o;
- Object adapter= a.getAdapter(IResource.class);
- if (adapter instanceof IResource)
- tmp.add(adapter);
- continue;
- }
- }
- }
- return (IResource[]) tmp.toArray(new IResource[tmp.size()]);
- }
-
- 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();
- }
-
- /**
- * Returns null if an error occurred.
- */
- public static String readString(InputStream is) {
- if (is == null)
- return null;
- BufferedReader reader= null;
- try {
- StringBuffer buffer= new StringBuffer();
- char[] part= new char[2048];
- int read= 0;
- reader= new BufferedReader(new InputStreamReader(is, ResourcesPlugin.getEncoding()));
-
- while ((read= reader.read(part)) != -1)
- buffer.append(part, 0, read);
-
- return buffer.toString();
-
- } catch (IOException ex) {
- } finally {
- if (reader != null) {
- try {
- reader.close();
- } catch (IOException ex) {
- }
- }
- }
- return null;
- }
-
- public static String getIconPath(Display display) {
- return "icons/full/"; //$NON-NLS-1$
- }
-
- /**
- * Initialize the given Action from a ResourceBundle.
- */
- public static void initAction(IAction a, ResourceBundle bundle, String prefix) {
-
- 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;
- }
-
- a.setText(getString(bundle, labelKey, labelKey));
- a.setToolTipText(getString(bundle, tooltipKey, null));
- a.setDescription(getString(bundle, descriptionKey, null));
-
- String relPath= getString(bundle, imageKey, null);
- if (relPath != null && relPath.trim().length() > 0) {
-
- String cPath;
- String dPath;
- String ePath;
-
- if (relPath.indexOf("/") >= 0) { //$NON-NLS-1$
- String path= relPath.substring(1);
- cPath= 'c' + path;
- dPath= 'd' + path;
- ePath= 'e' + path;
- } else {
- cPath= "clcl16/" + relPath; //$NON-NLS-1$
- dPath= "dlcl16/" + relPath; //$NON-NLS-1$
- ePath= "elcl16/" + relPath; //$NON-NLS-1$
- }
-
- ImageDescriptor id= CompareUIPlugin.getImageDescriptor(dPath); // we set the disabled image first (see PR 1GDDE87)
- if (id != null)
- a.setDisabledImageDescriptor(id);
- id= CompareUIPlugin.getImageDescriptor(cPath);
- if (id != null)
- a.setHoverImageDescriptor(id);
- id= CompareUIPlugin.getImageDescriptor(ePath);
- if (id != null)
- a.setImageDescriptor(id);
- }
- }
-
- public static void initToggleAction(IAction a, ResourceBundle bundle, String prefix, boolean checked) {
-
- String tooltip= null;
- if (checked)
- tooltip= getString(bundle, prefix + "tooltip.checked", null); //$NON-NLS-1$
- else
- tooltip= getString(bundle, prefix + "tooltip.unchecked", null); //$NON-NLS-1$
- if (tooltip == null)
- tooltip= getString(bundle, prefix + "tooltip", null); //$NON-NLS-1$
-
- if (tooltip != null)
- a.setToolTipText(tooltip);
-
- String description= null;
- if (checked)
- description= getString(bundle, prefix + "description.checked", null); //$NON-NLS-1$
- else
- description= getString(bundle, prefix + "description.unchecked", null); //$NON-NLS-1$
- if (description == null)
- description= getString(bundle, prefix + "description", null); //$NON-NLS-1$
-
- if (description != null)
- a.setDescription(description);
-
- }
-
- public static String getString(ResourceBundle bundle, String key, String dfltValue) {
-
- if (bundle != null) {
- try {
- return bundle.getString(key);
- } catch (MissingResourceException x) {
- }
- }
- return dfltValue;
- }
-
- public static String getFormattedString(ResourceBundle bundle, String key, String arg) {
-
- if (bundle != null) {
- try {
- return MessageFormat.format(bundle.getString(key), new String[] { arg });
- } catch (MissingResourceException x) {
- }
- }
- return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
- }
-
- public static String getString(String key) {
- try {
- return CompareUIPlugin.getResourceBundle().getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
- }
- }
-
- public static String getFormattedString(String key, String arg) {
- try{
- return MessageFormat.format(CompareUIPlugin.getResourceBundle().getString(key), new String[] { arg });
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
- }
- }
-
- public static String getString(ResourceBundle bundle, String key) {
- return getString(bundle, key, key);
- }
-
- public static int getInteger(ResourceBundle bundle, String key, int dfltValue) {
-
- if (bundle != null) {
- try {
- String s= bundle.getString(key);
- if (s != null)
- return Integer.parseInt(s);
- } catch (NumberFormatException x) {
- } catch (MissingResourceException x) {
- }
- }
- return dfltValue;
- }
-
- /**
- * Answers <code>true</code> if the given selection contains resources that don't
- * have overlapping paths and <code>false</code> otherwise.
- */
- /*
- public static boolean isSelectionNonOverlapping() throws TeamException {
- IResource[] resources = getSelectedResources();
- // allow operation for non-overlapping resource selections
- if(resources.length>0) {
- List validPaths = new ArrayList(2);
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
-
- // only allow cvs resources to be selected
- if(RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId()) == null) {
- return false;
- }
-
- // check if this resource overlaps other selections
- IPath resourceFullPath = resource.getFullPath();
- if(!validPaths.isEmpty()) {
- for (Iterator it = validPaths.iterator(); it.hasNext();) {
- IPath path = (IPath) it.next();
- if(path.isPrefixOf(resourceFullPath) ||
- resourceFullPath.isPrefixOf(path)) {
- return false;
- }
- }
- }
- validPaths.add(resourceFullPath);
-
- // ensure that resources are managed
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- if(cvsResource.isFolder()) {
- if( ! ((ICVSFolder)cvsResource).isCVSFolder()) return false;
- } else {
- if( ! cvsResource.isManaged()) return false;
- }
- }
- return true;
- }
- return false;
- }
- */
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ViewerDescriptor.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ViewerDescriptor.java
deleted file mode 100644
index d6a64cd6b..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ViewerDescriptor.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.widgets.Composite;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.compare.*;
-
-import org.eclipse.jface.viewers.Viewer;
-
-import org.eclipse.ui.internal.ViewerActionBuilder;
-
-/**
- * Creates <code>Viewer</code>s from an <code>IConfigurationElement</code>.
- */
-public class ViewerDescriptor implements IViewerDescriptor {
-
- private final static String CLASS_ATTRIBUTE= "class"; //$NON-NLS-1$
- private final static String EXTENSIONS_ATTRIBUTE= "extensions"; //$NON-NLS-1$
-
- private IConfigurationElement fConfiguration;
- private IViewerCreator fViewerCreator;
- private Class fViewerClass;
-
- public ViewerDescriptor(IConfigurationElement config) {
- fConfiguration= config;
- }
-
- public Viewer createViewer(Viewer currentViewer, Composite parent, CompareConfiguration mp) {
-
- if (currentViewer != null && currentViewer.getClass() == fViewerClass) {
- //System.out.println("reused viewer: " + currentViewer.getClass().getName());
- return currentViewer;
- }
-
- if (fViewerCreator == null) {
- try {
- fViewerCreator= (IViewerCreator) fConfiguration.createExecutableExtension(CLASS_ATTRIBUTE);
- } catch (CoreException e) {
- }
- }
-
- if (fViewerCreator != null) {
- Viewer viewer= fViewerCreator.createViewer(parent, mp);
- if (viewer != null)
- fViewerClass= viewer.getClass();
- return viewer;
- }
-
- return null;
- }
-
- public String getExtension() {
- return fConfiguration.getAttribute(EXTENSIONS_ATTRIBUTE);
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ViewerSwitchingCancelled.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ViewerSwitchingCancelled.java
deleted file mode 100644
index a3874dd09..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ViewerSwitchingCancelled.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package org.eclipse.compare.internal;
-
-
-public class ViewerSwitchingCancelled extends Error {
-
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/CompareWithPatchAction.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/CompareWithPatchAction.java
deleted file mode 100644
index 75bd62f3b..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/CompareWithPatchAction.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal.patch;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Arrays;
-
-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.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.util.Assert;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-
-import org.eclipse.ui.IActionDelegate;
-import org.eclipse.ui.IEditorPart;
-
-import org.eclipse.compare.internal.*;
-
-
-public class CompareWithPatchAction implements IActionDelegate {
-
- static class PatchWizardDialog extends WizardDialog {
-
- PatchWizardDialog(Shell parent, IWizard wizard) {
- super(parent, wizard);
-
- setShellStyle(getShellStyle() | SWT.RESIZE);
- setMinimumPageSize(700, 500);
- }
- }
-
- private ISelection fSelection;
- private boolean fSavedFiles;
- private boolean fAutobuildState;
-
-
- public void selectionChanged(IAction action, ISelection selection) {
- fSelection= selection;
- IResource[] resources= PatchWizard.getResource(fSelection);
- action.setEnabled(resources != null && resources.length == 1);
- }
-
- public void run(IAction action) {
- PatchWizard wizard= new PatchWizard(fSelection);
-
- if (areAllEditorsSaved()) {
- PatchWizardDialog dialog= new PatchWizardDialog(CompareUIPlugin.getShell(), wizard);
- dialog.open();
- }
- }
-
- private boolean areAllEditorsSaved(){
- if (CompareUIPlugin.getDirtyEditors().length == 0)
- return true;
- if (! saveAllDirtyEditors())
- return false;
- Shell shell= CompareUIPlugin.getShell();
- try {
- // Save isn't cancelable.
- IWorkspace workspace= ResourcesPlugin.getWorkspace();
- IWorkspaceDescription description= workspace.getDescription();
- boolean autoBuild= description.isAutoBuilding();
- description.setAutoBuilding(false);
- workspace.setDescription(description);
- try {
- new ProgressMonitorDialog(shell).run(false, false, createRunnable());
- fSavedFiles= true;
- } finally {
- description.setAutoBuilding(autoBuild);
- workspace.setDescription(description);
- }
- return true;
- } catch (InvocationTargetException e) {
- ExceptionHandler.handle(e, shell, PatchMessages.getString("PatchAction.ExceptionTitle"), PatchMessages.getString("Exception")); //$NON-NLS-1$ //$NON-NLS-2$
- return false;
- } catch (CoreException e) {
- ExceptionHandler.handle(e, shell, PatchMessages.getString("PatchAction.ExceptionTitle"), PatchMessages.getString("Exception")); //$NON-NLS-1$ //$NON-NLS-2$
- return false;
- } catch (InterruptedException e) {
- Assert.isTrue(false); // Can't happen. Operation isn't cancelable.
- return false;
- }
- }
-
- private IRunnableWithProgress createRunnable() {
- return new IRunnableWithProgress() {
- public void run(IProgressMonitor pm) {
- IEditorPart[] editorsToSave= CompareUIPlugin.getDirtyEditors();
- pm.beginTask(PatchMessages.getString("PatchAction.SavingDirtyEditorsTask"), editorsToSave.length); //$NON-NLS-1$
- for (int i= 0; i < editorsToSave.length; i++) {
- editorsToSave[i].doSave(new SubProgressMonitor(pm, 1));
- pm.worked(1);
- }
- pm.done();
- }
- };
- }
-
- private boolean saveAllDirtyEditors() {
- if (ComparePreferencePage.getSaveAllEditors()) //must save everything
- return true;
- ListDialog dialog= new ListDialog(CompareUIPlugin.getShell()) {
- protected Control createDialogArea(Composite parent) {
- Composite result= (Composite) super.createDialogArea(parent);
- final Button check= new Button(result, SWT.CHECK);
- check.setText(PatchMessages.getString("PatchAction.AlwaysSaveQuestion")); //$NON-NLS-1$
- check.setSelection(ComparePreferencePage.getSaveAllEditors());
- check.addSelectionListener(
- new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- ComparePreferencePage.setSaveAllEditors(check.getSelection());
- }
- }
- );
- return result;
- }
- };
- dialog.setTitle(PatchMessages.getString("PatchAction.SaveAllQuestion")); //$NON-NLS-1$
- dialog.setAddCancelButton(true);
- dialog.setLabelProvider(createDialogLabelProvider());
- dialog.setMessage(PatchMessages.getString("PatchAction.SaveAllDescription")); //$NON-NLS-1$
- dialog.setContentProvider(new ListContentProvider());
- dialog.setInput(Arrays.asList(CompareUIPlugin.getDirtyEditors()));
- return dialog.open() == Dialog.OK;
- }
-
- private ILabelProvider createDialogLabelProvider() {
- return new LabelProvider() {
- public Image getImage(Object element) {
- return ((IEditorPart) element).getTitleImage();
- }
- public String getText(Object element) {
- return ((IEditorPart) element).getTitle();
- }
- };
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Diff.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Diff.java
deleted file mode 100644
index 5239340c5..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Diff.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal.patch;
-
-import java.util.*;
-
-import org.eclipse.core.runtime.IPath;
-
-import org.eclipse.compare.structuremergeviewer.Differencer;
-
-
-/* package */ class Diff {
-
- IPath fOldPath, fNewPath;
- long fOldDate, fNewDate; // if 0: no file
- List fHunks= new ArrayList();
- boolean fMatches= false;
- private boolean fIsEnabled2= true;
- String fRejected;
-
-
- /* package */ Diff(IPath oldPath, long oldDate, IPath newPath, long newDate) {
- fOldPath= oldPath;
- fOldDate= oldPath == null ? 0 : oldDate;
- fNewPath= newPath;
- fNewDate= newPath == null ? 0 : newDate;
- }
-
- boolean isEnabled() {
- return fIsEnabled2;
- }
-
- void setEnabled(boolean b) {
- fIsEnabled2= b;
- }
-
- void reverse() {
- IPath tp= fOldPath;
- fOldPath= fNewPath;
- fNewPath= tp;
-
- long t= fOldDate;
- fOldDate= fNewDate;
- fNewDate= t;
-
- Iterator iter= fHunks.iterator();
- while (iter.hasNext()) {
- Hunk hunk= (Hunk) iter.next();
- hunk.reverse();
- }
- }
-
- Hunk[] getHunks() {
- return (Hunk[]) fHunks.toArray((Hunk[]) new Hunk[fHunks.size()]);
- }
-
- IPath getPath() {
- if (fOldPath != null)
- return fOldPath;
- return fNewPath;
- }
-
- void finish() {
- if (fHunks.size() == 1) {
- Hunk h= (Hunk) fHunks.get(0);
- if (h.fNewLength == 0) {
- fNewDate= 0;
- fNewPath= fOldPath;
- }
- }
- }
-
- /* package */ void add(Hunk hunk) {
- fHunks.add(hunk);
- }
-
- /* package */ int getType() {
- if (fOldDate == 0)
- return Differencer.ADDITION;
- if (fNewDate == 0)
- return Differencer.DELETION;
- return Differencer.CHANGE;
- }
-
- /* package */ String getDescription(int strip) {
- IPath path= fOldPath;
- if (fOldDate == 0)
- path= fNewPath;
- if (strip > 0 && strip < path.segmentCount())
- path= path.removeFirstSegments(strip);
- return path.toOSString();
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Hunk.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Hunk.java
deleted file mode 100644
index e49d5ad6a..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Hunk.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal.patch;
-
-import java.util.List;
-
-import org.eclipse.jface.util.Assert;
-
-
-/**
- * A Hunk describes a range of changed lines and some context lines.
- */
-/* package */ class Hunk {
-
- Diff fParent;
- int fOldStart, fOldLength;
- int fNewStart, fNewLength;
- String[] fLines;
- boolean fMatches= false;
- private boolean fIsEnabled2= true;
-
-
- /* package */ Hunk(Diff parent, int[] oldRange, int[] newRange, List lines) {
-
- fParent= parent;
- if (fParent != null)
- fParent.add(this);
-
- if (oldRange[0] > 0)
- fOldStart= oldRange[0]-1; // line number start at 0!
- else
- fOldStart= 0;
- fOldLength= oldRange[1];
- if (newRange[0] > 0)
- fNewStart= newRange[0]-1; // line number start at 0!
- else
- fNewStart= 0;
- fNewLength= newRange[1];
-
- fLines= (String[]) lines.toArray(new String[lines.size()]);
- }
-
- boolean isEnabled() {
- return fIsEnabled2;
- }
-
- void setEnabled(boolean b) {
- fIsEnabled2= b;
- }
-
- void reverse() {
- int t= fOldStart;
- fOldStart= fNewStart;
- fNewStart= t;
-
- t= fOldLength;
- fOldLength= fNewLength;
- fNewLength= t;
-
- for (int i= 0; i < fLines.length; i++) {
- String line= fLines[i];
- char c= line.charAt(0);
- switch (c) {
- case '+':
- fLines[i]= '-' + line.substring(1);
- break;
- case '-':
- fLines[i]= '+' + line.substring(1);
- break;
- default:
- break;
- }
- }
- }
-
- /**
- * Returns the contents of this hunk.
- * Each line starts with a control character. Their meaning is as follows:
- * <ul>
- * <li>
- * '+': add the line
- * <li>
- * '-': delete the line
- * <li>
- * ' ': no change, context line
- * </ul>
- */
- String getContent() {
- StringBuffer sb= new StringBuffer();
- for (int i= 0; i < fLines.length; i++) {
- String line= fLines[i];
- sb.append(line.substring(0, Patcher.length(line)));
- sb.append('\n');
- }
- return sb.toString();
- }
-
- /**
- * Returns a descriptive String for this hunk.
- * It is in the form old_start,old_length -> new_start,new_length.
- */
- String getDescription() {
- StringBuffer sb= new StringBuffer();
- sb.append(Integer.toString(fOldStart));
- sb.append(',');
- sb.append(Integer.toString(fOldLength));
- sb.append(" -> "); //$NON-NLS-1$
- sb.append(Integer.toString(fNewStart));
- sb.append(',');
- sb.append(Integer.toString(fNewLength));
- return sb.toString();
- }
-
- String getRejectedDescription() {
- StringBuffer sb= new StringBuffer();
- sb.append("@@ -"); //$NON-NLS-1$
- sb.append(Integer.toString(fOldStart));
- sb.append(',');
- sb.append(Integer.toString(fOldLength));
- sb.append(" +"); //$NON-NLS-1$
- sb.append(Integer.toString(fNewStart));
- sb.append(',');
- sb.append(Integer.toString(fNewLength));
- sb.append(" @@"); //$NON-NLS-1$
- return sb.toString();
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java
deleted file mode 100644
index e238378d1..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java
+++ /dev/null
@@ -1,623 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal.patch;
-
-import java.io.*;
-import java.util.*;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.*;
-
-import org.eclipse.ui.help.*;
-import org.eclipse.ui.model.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-
-import org.eclipse.compare.internal.Utilities;
-
-
-/* package */ class InputPatchPage extends WizardPage {
-
- // constants
- protected static final int SIZING_TEXT_FIELD_WIDTH= 250;
- protected static final int COMBO_HISTORY_LENGTH= 5;
-
- private final static int SIZING_SELECTION_WIDGET_WIDTH= 400;
- private final static int SIZING_SELECTION_WIDGET_HEIGHT= 150;
-
- // dialog store id constants
- private final static String PAGE_NAME= "PatchWizardPage1"; //$NON-NLS-1$
- private final static String STORE_PATCH_FILE_ID= PAGE_NAME + ".PATCH_FILE"; //$NON-NLS-1$
- private final static String STORE_PATCH_FILES_ID= PAGE_NAME + ".PATCH_FILES"; //$NON-NLS-1$
- private final static String STORE_USE_CLIPBOARD_ID= PAGE_NAME + ".USE_CLIPBOARD"; //$NON-NLS-1$
-
- // help IDs
- private final static String PATCH_HELP_CONTEXT_ID= "PatchWizardHelpId"; //$NON-NLS-1$
-
- private boolean fShowError= false;
-
- // SWT widgets
- private Button fUseClipboardButton;
- private Combo fPatchFileNameField;
- private Button fPatchFileBrowseButton;
- private Button fUsePatchFileButton;
- private Group fPatchFileGroup;
- private CheckboxTreeViewer fPatchTargets;
- private PatchWizard fPatchWizard;
-
-
- InputPatchPage(PatchWizard pw) {
- super("InputPatchPage", PatchMessages.getString("InputPatchPage.title"), null); //$NON-NLS-1$ //$NON-NLS-2$
- fPatchWizard= pw;
- setMessage(PatchMessages.getString("InputPatchPage.message")); //$NON-NLS-1$
- }
-
- /**
- * Get a path from the supplied text widget.
- * @return org.eclipse.core.runtime.IPath
- */
- protected IPath getPathFromText(Text textField) {
- return (new Path(textField.getText())).makeAbsolute();
- }
-
- /* package */ String getPatchName() {
- if (getUseClipboard())
- return PatchMessages.getString("InputPatchPage.Clipboard"); //$NON-NLS-1$
- return getPatchFilePath();
- }
-
- public void createControl(Composite parent) {
-
- Composite composite= new Composite(parent, SWT.NULL);
- composite.setLayout(new GridLayout());
- composite.setLayoutData(new GridData(/* GridData.VERTICAL_ALIGN_FILL | */ GridData.HORIZONTAL_ALIGN_FILL));
- setControl(composite);
-
- Label l= new Label(composite, SWT.NONE); // a spacer
- l.setText(PatchMessages.getString("InputPatchPage.SelectInput")); //$NON-NLS-1$
- buildInputGroup(composite);
-
- new Label(composite, SWT.NONE); // a spacer
-
- buildPatchFileGroup(composite);
-
- restoreWidgetValues();
-
- updateWidgetEnablements();
- //updatePageCompletion();
-
- WorkbenchHelp.setHelp(composite, PATCH_HELP_CONTEXT_ID);
- }
-
- /* (non-JavaDoc)
- * Method declared in IWizardPage.
- */
- public IWizardPage getNextPage() {
- if (true) {
-
- Patcher patcher= ((PatchWizard) getWizard()).getPatcher();
-
- // Create a reader for the input
- Reader reader= null;
- if (getUseClipboard()) {
- Control c= getControl();
- if (c != null) {
- Clipboard clipboard= new Clipboard(c.getDisplay());
- Object o= clipboard.getContents(TextTransfer.getInstance());
- clipboard.dispose();
- if (o instanceof String)
- reader= new StringReader((String)o);
- }
- } else {
- String patchFilePath= getPatchFilePath();
- if (patchFilePath != null) {
- try {
- reader= new FileReader(patchFilePath);
- } catch (FileNotFoundException ex) {
- MessageDialog.openError(null,
- PatchMessages.getString("InputPatchPage.PatchErrorDialog.title"), //$NON-NLS-1$
- PatchMessages.getString("InputPatchPage.PatchFileNotFound.message")); //$NON-NLS-1$
- }
- }
- }
-
- // parse the input
- if (reader != null) {
- try {
- patcher.parse(new BufferedReader(reader));
- } catch (IOException ex) {
- MessageDialog.openError(null,
- PatchMessages.getString("InputPatchPage.PatchErrorDialog.title"), //$NON-NLS-1$
- PatchMessages.getString("InputPatchPage.ParseError.message")); //$NON-NLS-1$
- }
-
- try {
- reader.close();
- } catch (IOException x) {
- }
- }
-
- Diff[] diffs= patcher.getDiffs();
- if (diffs == null || diffs.length == 0) {
- String source= getUseClipboard() ? "Clipboard" //$NON-NLS-1$
- : "File"; //$NON-NLS-1$
- MessageDialog.openError(null,
- PatchMessages.getString("InputPatchPage.PatchErrorDialog.title"), //$NON-NLS-1$
- PatchMessages.getString("InputPatchPage.NoDiffsFound_"+source+".message")); //$NON-NLS-1$ //$NON-NLS-2$
- return this;
- }
-
- // guess prefix count
- int guess= guessPrefix(diffs);
- patcher.setStripPrefixSegments(guess);
- }
- return super.getNextPage();
- }
-
- private int guessPrefix(Diff[] diffs) {
- /*
- ArrayList list= new ArrayList();
- IResource target= fPatchWizard.getTarget();
- if (target instanceof IFile) {
- list.add(target.getFullPath());
- } else if (target instanceof IContainer) {
- addLeaf(list, (IContainer) target);
- }
-
- // guess prefix count
- for (int i= 0; i < diffs.length; i++) {
- IPath p= diffs[i].fOldPath;
- if (p != null) {
- int matches= match(p, list);
- if (matches > 0) {
- return p.segmentCount() - matches;
- }
- }
- }
- */
- return 0;
- }
-
- private int match(IPath path, ArrayList list) {
- Iterator iter= list.iterator();
- while (iter.hasNext()) {
- IPath filePath= (IPath) iter.next();
- int matches= matchTrailingSegments(path, filePath);
- if (matches > 0)
- return matches;
- }
- return 0;
- }
-
- private int matchTrailingSegments(IPath p1, IPath p2) {
- int matches= 0;
- int i1= p1.segmentCount()-1;
- int i2= p2.segmentCount()-1;
- for (; i1 >= 0 && i2 >= 0; i1--, i2--) {
- String s1= p1.segment(i1);
- String s2= p2.segment(i2);
- if (!s1.equals(s2))
- break;
- matches++;
- }
- return matches;
- }
-
- private void addLeaf(ArrayList list, IContainer c) {
- IResource[] rs= null;
- try {
- rs= c.members();
- } catch(CoreException ex) {
- }
- if (rs != null) {
- for (int i= 0; i < rs.length; i++) {
- IResource r= rs[i];
- if (r instanceof IFile)
- list.add(r.getFullPath());
- else if (r instanceof IContainer)
- addLeaf(list, (IContainer) r);
- }
- }
- }
-
- /* (non-JavaDoc)
- * Method declared in IWizardPage.
- */
- public boolean canFlipToNextPage() {
- if (true) {
- // we can't call getNextPage to determine if flipping is allowed since computing
- // the next page is quite expensive. So we say yes if the page is complete.
- return isPageComplete();
- } else {
- return super.canFlipToNextPage();
- }
- }
-
- private void setEnablePatchFile(boolean enable) {
- fPatchFileNameField.setEnabled(enable);
- fPatchFileBrowseButton.setEnabled(enable);
- }
-
- /**
- * Create the group for selecting the patch file
- */
- private void buildPatchFileGroup(Composite parent) {
-
- fPatchFileGroup= new Group(parent, SWT.NONE);
- fPatchFileGroup.setText(PatchMessages.getString("InputPatchPage.SelectPatch.title")); //$NON-NLS-1$
- GridLayout layout= new GridLayout();
- layout.numColumns= 3;
- fPatchFileGroup.setLayout(layout);
- fPatchFileGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- // 1st row
- fUsePatchFileButton= new Button(fPatchFileGroup, SWT.RADIO);
- fUsePatchFileButton.setText(PatchMessages.getString("InputPatchPage.FileButton.text")); //$NON-NLS-1$
-
- fPatchFileNameField= new Combo(fPatchFileGroup, SWT.BORDER);
- GridData gd= new GridData(GridData.FILL_HORIZONTAL);
- //gd.horizontalIndent= 8;
- gd.widthHint= SIZING_TEXT_FIELD_WIDTH;
- fPatchFileNameField.setLayoutData(gd);
-
- fPatchFileBrowseButton= new Button(fPatchFileGroup, SWT.PUSH);
- fPatchFileBrowseButton.setText(PatchMessages.getString("InputPatchPage.ChooseFileButton.text")); //$NON-NLS-1$
- fPatchFileBrowseButton.setLayoutData(new GridData());
-
- // 2nd row
- fUseClipboardButton= new Button(fPatchFileGroup, SWT.RADIO);
- fUseClipboardButton.setText(PatchMessages.getString("InputPatchPage.UseClipboardButton.text")); //$NON-NLS-1$
- gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- gd.horizontalSpan= 2;
- fUseClipboardButton.setLayoutData(gd);
-
-
- // Add listeners
- fUsePatchFileButton.addSelectionListener(
- new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- fShowError= true;
- setEnablePatchFile(!getUseClipboard());
- updateWidgetEnablements();
- }
- }
- );
- fPatchFileNameField.addSelectionListener(
- new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- setSourceName(fPatchFileNameField.getText());
- updateWidgetEnablements();
- }
- }
- );
- fPatchFileNameField.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- fShowError= true;
- updateWidgetEnablements();
- }
- }
- );
- fPatchFileBrowseButton.addSelectionListener(
- new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handlePatchFileBrowseButtonPressed();
- updateWidgetEnablements();
- }
- }
- );
-
- //fPatchFileNameField.setFocus();
- }
-
- private void buildInputGroup(Composite parent) {
-
- PatchWizard pw= (PatchWizard) getWizard();
- IResource target= pw.getTarget();
- IWorkspace workspace= target.getWorkspace();
- IWorkspaceRoot root= workspace.getRoot();
-
- Tree tree= new Tree(parent, SWT.BORDER);
- GridData gd= new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint= 200;
- tree.setLayoutData(gd);
-
- fPatchTargets= new CheckboxTreeViewer(tree);
- fPatchTargets.setLabelProvider(new WorkbenchLabelProvider());
- fPatchTargets.setContentProvider(new WorkbenchContentProvider());
- fPatchTargets.setSorter(new WorkbenchViewerSorter());
- fPatchTargets.setInput(root);
- if (target != null) {
- fPatchTargets.expandToLevel(target, 0);
- fPatchTargets.setSelection(new StructuredSelection(target));
- }
-
- // register listeners
- fPatchTargets.addSelectionChangedListener(
- new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- fPatchWizard.setTargets(PatchWizard.getResource(event.getSelection()));
- updateWidgetEnablements();
- }
- }
- );
- //fPatchFileNameField.setFocus();
- }
-
- /**
- * Returns a content provider for <code>IResource</code>s that returns
- * only children of the given resource type.
- */
- private ITreeContentProvider getResourceProvider(final int resourceType) {
- return new WorkbenchContentProvider() {
- public Object[] getChildren(Object o) {
- if (o instanceof IContainer) {
- try {
- ArrayList results= new ArrayList();
- IResource[] members= ((IContainer)o).members();
- for (int i= 0; i < members.length; i++)
- // filter out the desired resource types
- if ((members[i].getType() & resourceType) != 0)
- results.add(members[i]);
- return results.toArray();
- } catch (CoreException e) {
- }
- }
- // just return an empty set of children
- return new Object[0];
- }
- };
- }
-
- /**
- * Updates the enable state of this page's controls.
- */
- private void updateWidgetEnablements() {
-
- String error= null;
-
- ISelection selection= fPatchTargets.getSelection();
- boolean anySelected= selection != null && !selection.isEmpty();
- if (!anySelected)
- error= PatchMessages.getString("InputPatchPage.NothingSelected.message"); //$NON-NLS-1$
-
- boolean gotPatch= false;
- if (getUseClipboard()) {
- Control c= getControl();
- if (c != null) {
- Clipboard clipboard= new Clipboard(c.getDisplay());
- Object o= clipboard.getContents(TextTransfer.getInstance());
- clipboard.dispose();
- if (o instanceof String) {
- String s= ((String) o).trim();
- if (s.length() > 0)
- gotPatch= true;
- else
- error= PatchMessages.getString("InputPatchPage.ClipboardIsEmpty.message"); //$NON-NLS-1$
- } else
- error= PatchMessages.getString("InputPatchPage.NoTextInClipboard.message"); //$NON-NLS-1$
- } else
- error= PatchMessages.getString("InputPatchPage.CouldNotReadClipboard.message"); //$NON-NLS-1$
- } else {
- String path= fPatchFileNameField.getText();
- if (path != null && path.length() > 0) {
- File file= new File(path);
- gotPatch= file.exists() && file.isFile() && file.length() > 0;
- if (!gotPatch)
- error= PatchMessages.getString("InputPatchPage.CannotLocatePatch.message") + path; //$NON-NLS-1$
- } else {
- error= PatchMessages.getString("InputPatchPage.NoFileName.message"); //$NON-NLS-1$
- }
- }
-
- setPageComplete(anySelected && gotPatch);
- if (fShowError)
- setErrorMessage(error);
- }
-
- protected void handlePatchFileBrowseButtonPressed() {
- FileDialog dialog= new FileDialog(getShell(), SWT.NONE);
- dialog.setText(PatchMessages.getString("InputPatchPage.SelectPatchFileDialog.title")); //$NON-NLS-1$
- dialog.setFilterPath(getPatchFilePath());
- String res= dialog.open();
- if (res == null)
- return;
-
- String patchFilePath= dialog.getFileName();
- IPath filterPath= new Path(dialog.getFilterPath());
- IPath path= filterPath.append(patchFilePath).makeAbsolute();
- patchFilePath= path.toOSString();
- //fDialogSettings.put(IUIConstants.DIALOGSTORE_LASTEXTJAR, filterPath.toOSString());
-
- fPatchFileNameField.setText(patchFilePath);
- //setSourceName(patchFilePath);
- }
-
- /**
- * Sets the source name of the import to be the supplied path.
- * Adds the name of the path to the list of items in the
- * source combo and selects it.
- *
- * @param path the path to be added
- */
- protected void setSourceName(String path) {
-
- if (path.length() > 0) {
-
- String[] currentItems= fPatchFileNameField.getItems();
- int selectionIndex= -1;
- for (int i= 0; i < currentItems.length; i++)
- if (currentItems[i].equals(path))
- selectionIndex= i;
-
- if (selectionIndex < 0) { // not found in history
- int oldLength= currentItems.length;
- String[] newItems= new String[oldLength + 1];
- System.arraycopy(currentItems, 0, newItems, 0, oldLength);
- newItems[oldLength]= path;
- fPatchFileNameField.setItems(newItems);
- selectionIndex= oldLength;
- }
- fPatchFileNameField.select(selectionIndex);
-
- //resetSelection();
- }
- }
-
- /**
- * The Finish button was pressed. Try to do the required work now and answer
- * a boolean indicating success. If false is returned then the wizard will
- * not close.
- *
- * @return boolean
- */
- public boolean finish() {
-// if (!ensureSourceIsValid())
-// return false;
-
- saveWidgetValues();
-
-// Iterator resourcesEnum = getSelectedResources().iterator();
-// List fileSystemObjects = new ArrayList();
-// while (resourcesEnum.hasNext()) {
-// fileSystemObjects.add(
-// ((FileSystemElement) resourcesEnum.next()).getFileSystemObject());
-// }
-//
-// if (fileSystemObjects.size() > 0)
-// return importResources(fileSystemObjects);
-//
-// MessageDialog
-// .openInformation(
-// getContainer().getShell(),
-// DataTransferMessages.getString("DataTransfer.information"), //$NON-NLS-1$
-// DataTransferMessages.getString("FileImport.noneSelected")); //$NON-NLS-1$
-//
-// return false;
-
- return true;
- }
-
- /**
- * Use the dialog store to restore widget values to the values that they held
- * last time this wizard was used to completion
- */
- private void restoreWidgetValues() {
-
- boolean useClipboard= false;
-
- IDialogSettings settings= getDialogSettings();
- if (settings != null) {
-
- useClipboard= settings.getBoolean(STORE_USE_CLIPBOARD_ID);
-
- // set filenames history
- String[] sourceNames= settings.getArray(STORE_PATCH_FILES_ID);
- if (sourceNames != null)
- for (int i= 0; i < sourceNames.length; i++)
- if (sourceNames[i] != null && sourceNames[i].length() > 0)
- fPatchFileNameField.add(sourceNames[i]);
-
- // set patch file path
- String patchFilePath= settings.get(STORE_PATCH_FILES_ID);
- if (patchFilePath != null)
- setSourceName(patchFilePath);
- }
-
- // set 'Use Clipboard' radio buttons
- setUseClipboard(useClipboard);
- }
-
- /**
- * Since Finish was pressed, write widget values to the dialog store so that they
- * will persist into the next invocation of this wizard page
- */
- void saveWidgetValues() {
- IDialogSettings settings= getDialogSettings();
- if (settings != null) {
-
- settings.put(STORE_USE_CLIPBOARD_ID, getUseClipboard());
- settings.put(STORE_PATCH_FILES_ID, getPatchFilePath());
-
- // update source names history
- String[] sourceNames= settings.getArray(STORE_PATCH_FILES_ID);
- if (sourceNames == null)
- sourceNames= new String[0];
-
- sourceNames= addToHistory(sourceNames, getPatchFilePath());
- settings.put(STORE_PATCH_FILES_ID, sourceNames);
- }
- }
-
- // static helpers
-
- private void setUseClipboard(boolean useClipboard) {
- if (useClipboard)
- fUseClipboardButton.setSelection(true);
- else
- fUsePatchFileButton.setSelection(true);
- setEnablePatchFile(!useClipboard);
- }
-
- private boolean getUseClipboard() {
- if (fUseClipboardButton != null)
- return fUseClipboardButton.getSelection();
- return false;
- }
-
- private String getPatchFilePath() {
- if (fPatchFileNameField != null)
- return fPatchFileNameField.getText();
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Creates a new label with a bold font.
- *
- * @param parent the parent control
- * @param text the label text
- * @return the new label control
- */
- private static Label buildPlainLabel(Composite parent, String text) {
- Label label= new Label(parent, SWT.NONE);
- label.setText(text);
- GridData data= new GridData();
- data.verticalAlignment= GridData.FILL;
- data.horizontalAlignment= GridData.FILL;
- label.setLayoutData(data);
- return label;
- }
-
- /**
- * Adds an entry to a history, while taking care of duplicate history items
- * and excessively long histories. The assumption is made that all histories
- * should be of length <code>COMBO_HISTORY_LENGTH</code>.
- *
- * @param history the current history
- * @param newEntry the entry to add to the history
- */
- protected static String[] addToHistory(String[] history, String newEntry) {
- java.util.ArrayList l= new java.util.ArrayList(java.util.Arrays.asList(history));
-
- l.remove(newEntry);
- l.add(0,newEntry);
-
- // since only one new item was added, we can be over the limit
- // by at most one item
- if (l.size() > COMBO_HISTORY_LENGTH)
- l.remove(COMBO_HISTORY_LENGTH);
-
- return (String[]) l.toArray(new String[l.size()]);
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/LineReader.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/LineReader.java
deleted file mode 100644
index 053e3b99a..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/LineReader.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal.patch;
-
-import java.io.*;
-import java.util.*;
-
-import org.eclipse.jface.util.Assert;
-
-/* package */ class LineReader {
-
- private boolean fHaveChar= false;
- private int fLastChar;
- private boolean fSawEOF= false;
- private BufferedReader fReader;
- private boolean fIgnoreSingleCR= false;
-
-
- /* package */ LineReader(BufferedReader reader) {
- fReader= reader;
- Assert.isNotNull(reader);
- }
-
- void ignoreSingleCR() {
- fIgnoreSingleCR= true;
- }
-
- /**
- * Reads a line of text. A line is considered to be terminated by any one
- * of a line feed ('\n'), a carriage return ('\r'), or a carriage return
- * followed immediately by a linefeed.
- * @return A string containing the contents of the line including
- * the line-termination characters, or <code>null</code> if the end of the
- * stream has been reached
- * @exception IOException If an I/O error occurs
- */
- /* package */ String readLine() throws IOException {
- StringBuffer sb= null;
-
- while (!fSawEOF) {
- int c= readChar();
- if (c == -1) {
- fSawEOF= true;
- break;
- }
- if (sb == null)
- sb= new StringBuffer();
- sb.append((char)c);
- if (c == '\n')
- break;
- if (c == '\r') {
- c= readChar();
- if (c == -1) {
- fSawEOF= true;
- break; // EOF
- }
- if (c != '\n') {
- if (fIgnoreSingleCR) {
- sb.append((char)c);
- continue;
- } else {
- fHaveChar= true;
- fLastChar= c;
- }
- } else
- sb.append((char)c);
- break;
- }
- }
-
- if (sb != null)
- return sb.toString();
- return null;
- }
-
- /* package */ void close() {
- try {
- fReader.close();
- } catch (IOException ex) {
- }
- }
-
- /* package */ List readLines() {
- try {
- List lines= new ArrayList();
- String line;
- while ((line= readLine()) != null)
- lines.add(line);
- return lines;
- } catch (IOException ex) {
- //System.out.println("error while reading file: " + fileName + "(" + ex + ")");
- } finally {
- close();
- }
- return null;
- }
- /**
- * Returns the number of characters in the given string without
- * counting a trailing line separator.
- */
- /* package */ int lineContentLength(String line) {
- if (line == null)
- return 0;
- int length= line.length();
- for (int i= length-1; i >= 0; i--) {
- char c= line.charAt(i);
- if (c =='\n' || c == '\r')
- length--;
- else
- break;
- }
- return length;
- }
-
- //---- private
-
- private int readChar() throws IOException {
- if (fHaveChar) {
- fHaveChar= false;
- return fLastChar;
- }
- return fReader.read();
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchCompareInput.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchCompareInput.java
deleted file mode 100644
index d99a4f819..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchCompareInput.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal.patch;
-
-import java.io.*;
-import java.io.ByteArrayInputStream;
-import java.text.MessageFormat;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.resources.*;
-
-import org.eclipse.jface.viewers.*;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.*;
-import org.eclipse.compare.internal.*;
-
-
-/**
- * A PatchCompareInput uses a Patcher to
- * patch selected workspace resources.
- */
-/* package */ class PatchCompareInput extends CompareEditorInput {
-
- static class Rejected extends DiffNode implements IStreamContentAccessor {
- Diff fDiff;
- String fName;
- Rejected(IDiffContainer parent, String name, Diff diff) {
- super(parent, Differencer.NO_CHANGE);
- fName= name;
- fDiff= diff;
- }
- public String getName() {
- return fName + " *"; //$NON-NLS-1$
- }
- public String getType() {
- return "txt"; //$NON-NLS-1$
- }
- public Image getImage() {
- return CompareUI.getImage("file"); //$NON-NLS-1$
- }
- public InputStream getContents() {
- return new ByteArrayInputStream(fDiff.fRejected.getBytes());
- }
- }
-
- private DiffNode fRoot;
- private IResource fTarget;
- private Patcher fPatcher;
-
- /**
- * Creates an compare editor input for the given selection.
- */
- /* package */ PatchCompareInput(CompareConfiguration config, Patcher patcher, ISelection selection) {
- super(config);
- fPatcher= patcher;
- IResource[] s= Utilities.getResources(selection);
- if (s.length == 1)
- fTarget= s[0];
- }
-
- /**
- * Performs a two-way or three-way diff on the current selection.
- */
- public Object prepareInput(IProgressMonitor pm) throws InvocationTargetException {
-
- CompareConfiguration cc= (CompareConfiguration) getCompareConfiguration();
-
- try {
- Diff[] diffs= fPatcher.getDiffs();
-
- pm.beginTask(Utilities.getString("ResourceCompare.taskName"), diffs.length); //$NON-NLS-1$
-
- fRoot= new DiffNode(0);
- IContainer rootFolder= null;
- if (fTarget instanceof IContainer)
- rootFolder= (IContainer) fTarget;
-
- for (int i= 0; i < diffs.length; i++) {
- Diff diff= diffs[i];
- if (diff.isEnabled()) {
- IPath path= fPatcher.getPath(diff);
- createPath(fRoot, rootFolder, path, diff, false);
-
- String rej= diff.fRejected;
- if (rej != null) {
- IPath pp= path.removeLastSegments(1);
- pp= pp.append(path.lastSegment() + ".rej"); //$NON-NLS-1$
- createPath(fRoot, rootFolder, pp, diff, true);
- }
- }
- pm.worked(1);
- }
-
- fTarget.refreshLocal(IResource.DEPTH_INFINITE, pm);
-
- String leftLabel= fTarget.getName();
- cc.setLeftLabel(leftLabel);
- cc.setLeftImage(CompareUIPlugin.getImage(fTarget));
-
- String rformat= PatchMessages.getString("PatchCompareInput.RightTitle.format"); //$NON-NLS-1$
- String rightLabel= MessageFormat.format(rformat, new String[] { fPatcher.getName() } );
- cc.setRightLabel(rightLabel);
- //cc.setRightImage(CompareUIPlugin.getImage(fRightResource));
-
- String format= Utilities.getString("ResourceCompare.twoWay.title"); //$NON-NLS-1$
- String title= MessageFormat.format(format, new String[] {leftLabel, rightLabel} );
- setTitle(title);
-
- return fRoot;
-
- } catch (CoreException ex) {
- throw new InvocationTargetException(ex);
- } finally {
- pm.done();
- }
- }
-
- public void saveChanges(IProgressMonitor pm) throws CoreException {
- if (fRoot instanceof DiffNode) {
- try {
- commit(pm, (DiffNode) fRoot);
- } finally {
- setDirty(false);
- }
- }
- }
-
- /*
- * Recursively walks the diff tree and commits all changes.
- */
- private static void commit(IProgressMonitor pm, DiffNode node) throws CoreException {
-
- ITypedElement left= node.getLeft();
- if (left instanceof BufferedResourceNode)
- ((BufferedResourceNode) left).commit(pm);
-
- ITypedElement right= node.getRight();
- if (right instanceof BufferedResourceNode)
- ((BufferedResourceNode) right).commit(pm);
-
- IDiffElement[] children= node.getChildren();
- if (children != null) {
- for (int i= 0; i < children.length; i++) {
- IDiffElement element= children[i];
- if (element instanceof DiffNode)
- commit(pm, (DiffNode) element);
- }
- }
- }
-
- private void createPath(DiffContainer root, IContainer folder, IPath path, Diff diff, boolean reject) {
- if (path.segmentCount() > 1) {
- IFolder f= folder.getFolder(path.uptoSegment(1));
- IDiffElement child= root.findChild(path.segment(0));
- if (child == null) {
- ResourceNode rn= new ResourceNode(f);
- child= new DiffNode(root, Differencer.CHANGE, null, rn, rn);
- }
- if (child instanceof DiffContainer)
- createPath((DiffContainer)child, f, path.removeFirstSegments(1), diff, reject);
- } else {
- // a leaf
- BufferedResourceNode rn= new BufferedResourceNode(folder.getFile(path));
- if (reject) {
- new Rejected(root, path.segment(0), diff);
- } else {
- new DiffNode(root, diff.getType(), null, rn, new PatchedResource(rn, diff, path, fPatcher));
- }
- }
- }
-}
-
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchErrorDialog.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchErrorDialog.java
deleted file mode 100644
index cd4cb28a6..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchErrorDialog.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal.patch;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-
-import org.eclipse.compare.internal.ListDialog;
-
-public class PatchErrorDialog {
-
- private PatchErrorDialog() {
- // no instance.
- }
-
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.java
deleted file mode 100644
index 8dce380cc..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2002.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal.patch;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class PatchMessages {
-
- private static final String RESOURCE_BUNDLE= "org.eclipse.compare.internal.patch.PatchMessages";//$NON-NLS-1$
-
- private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
-
- private PatchMessages() {
- }
-
- public static String getString(String key) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
- }
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.properties b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.properties
deleted file mode 100644
index 550b9ee7e..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.properties
+++ /dev/null
@@ -1,79 +0,0 @@
-# =====================================
-# (c) Copyright IBM Corp. 2002.
-# All Rights Reserved.
-# =====================================
-
-#
-# 'Compare with Patch' Action
-#
-PatchAction.ExceptionTitle=Saving Resources
-PatchAction.Exception=Unexpected exception. See log for details
-PatchAction.SavingDirtyEditorsTask=Saving dirty editors
-PatchAction.AlwaysSaveQuestion=&Always save all modified resources automatically prior to patching
-PatchAction.SaveAllQuestion=Save all modified resources
-PatchAction.SaveAllDescription=All modified resources must be saved before this operation.\nPress OK to confirm or Cancel otherwise
-
-#
-# PatchWizard
-#
-PatchWizard.title=Resource Patcher
-PatchWizard.unexpectedException.message= Unexpected exception while applying the patch. See log for a detailed error description.
-
-#
-# InputPatchPage
-#
-InputPatchPage.title= Patch Input Specification
-InputPatchPage.message= Define what resource to patch with which patch
-InputPatchPage.Clipboard=Clipboard
-InputPatchPage.SelectInput=Select a single file or folder to patch:
-InputPatchPage.PatchErrorDialog.title=Patch Error
-InputPatchPage.PatchErrorDialog=Patch Error
-InputPatchPage.SelectPatch.title=Select Patch
-InputPatchPage.FileButton.text=Fil&e
-InputPatchPage.ChooseFileButton.text=&Browse...
-InputPatchPage.UseClipboardButton.text=&Clipboard
-InputPatchPage.NothingSelected.message=Nothing selected to apply patch to
-InputPatchPage.ClipboardIsEmpty.message=Clipboard is empty
-InputPatchPage.NoTextInClipboard.message=Clipboard does not contain text
-InputPatchPage.CouldNotReadClipboard.message=Couldn't retrieve clipboard contents
-InputPatchPage.CannotLocatePatch.message=Can't locate patch file:
-InputPatchPage.NoFileName.message=No file name
-InputPatchPage.SelectPatchFileDialog.title=Select Patch File
-InputPatchPage.PatchFileNotFound.message=Patch file not found.
-InputPatchPage.ParseError.message=Error while parsing patch
-InputPatchPage.NoDiffsFound_Clipboard.message=Clipboard does not contain valid patch
-InputPatchPage.NoDiffsFound_File.message=File does not contain valid patch
-
-#
-# PreviewPatchPage
-#
-PreviewPatchPage.title= Verify Patch
-PreviewPatchPage.message= The tree shows the contents of the patch.\nA checked item indicates that a patch could be applied succesfully. Uncheck an item if you want to exclude it.
-PreviewPatchPage.Left.title= Original
-PreviewPatchPage.Right.title= Result
-PreviewPatchPage.PatchOptions.title=Patch Options
-PreviewPatchPage.IgnoreSegments.text=&Ignore leading path name segments:
-PreviewPatchPage.ReversePatch.text=&Reverse patch
-PreviewPatchPage.FuzzFactor.text=&Maximum fuzz factor:
-PreviewPatchPage.FuzzFactor.tooltip=Allow context to shift this number of lines from the original place
-PreviewPatchPage.IgnoreWhitespace.text=Ignore &whitespace
-PreviewPatchPage.NoName.text=no name
-PreviewPatchPage.FileExists.error=(file already exists)
-PreviewPatchPage.FileDoesNotExist.error=(file doesn't exist)
-PreviewPatchPage.NoMatch.error=(no match)
-PreviewPatchPage.FileIsReadOnly.error=(file is read only)
-
-#
-# Patcher
-#
-Patcher.ErrorDialog.title=title
-Patcher.DeleteError.message=Error while deleting resource
-Patcher.UpdateError.message=Error while updating resource
-Patcher.RefreshError.message=Error while refreshing from local
-Patcher.Marker.message=Rejected patch
-Patcher.Task.message=Patching
-
-#
-# PatchCompareInput
-#
-PatchCompareInput.RightTitle.format= Patch: {0}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizard.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizard.java
deleted file mode 100644
index a0e3d8d1b..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizard.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal.patch;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.Wizard;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.CoreException;
-
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.internal.*;
-import org.eclipse.compare.structuremergeviewer.Differencer;
-
-
-/* package */ class PatchWizard extends Wizard {
-
- // dialog store id constants
- private final static String DIALOG_SETTINGS_KEY= "PatchWizard"; //$NON-NLS-1$
-
- private boolean fHasNewDialogSettings;
-
- private InputPatchPage fPatchWizardPage;
- private PreviewPatchPage fPreviewPatchPage;
-
- private Patcher fPatcher;
- private IResource fTarget;
-
-
- /**
- * Creates a wizard for applying a patch file to the workspace.
- */
- /* package */ PatchWizard(ISelection selection) {
-
- setTargets(getResource(selection));
-
- fPatcher= new Patcher();
-
- setWindowTitle(PatchMessages.getString("PatchWizard.title")); //$NON-NLS-1$
-
- IDialogSettings workbenchSettings= CompareUIPlugin.getDefault().getDialogSettings();
- IDialogSettings section= workbenchSettings.getSection(DIALOG_SETTINGS_KEY); //$NON-NLS-1$
- if (section == null)
- fHasNewDialogSettings= true;
- else {
- fHasNewDialogSettings= false;
- setDialogSettings(section);
- }
- }
-
- static IResource[] getResource(ISelection selection) {
- IResource[] rs= Utilities.getResources(selection);
- ArrayList list= null;
- for (int i= 0; i < rs.length; i++) {
- IResource r= rs[i];
- if (r != null && r.isAccessible()) {
- if (list == null)
- list= new ArrayList();
- list.add(r);
- }
- }
- if (list != null && list.size() > 0)
- return (IResource[]) list.toArray(new IResource[list.size()]);
- return null;
- }
-
- Patcher getPatcher() {
- return fPatcher;
- }
-
- IResource getTarget() {
- return fTarget;
- }
-
- void setTargets(IResource[] targets) {
- fTarget= targets[0]; // right now we can only deal with a single selection
- }
-
- /* (non-Javadoc)
- * Method declared on IWizard.
- */
- public void addPages() {
- super.addPages();
-
- addPage(fPatchWizardPage= new InputPatchPage(this));
- addPage(fPreviewPatchPage= new PreviewPatchPage(this));
- }
-
- /* (non-Javadoc)
- * Method declared on IWizard.
- */
- public boolean needsProgressMonitor() {
- return true;
- }
-
- /* (non-Javadoc)
- * Method declared on IWizard.
- */
- public boolean performFinish() {
-
- if (false) {
- CompareConfiguration cc= new CompareConfiguration() {
- public Image getImage(int kind) {
- if (kind == Differencer.ADDITION)
- kind= Differencer.DELETION;
- else if (kind == Differencer.DELETION)
- kind= Differencer.ADDITION;
- return super.getImage(kind);
- }
- public Image getImage(Image base, int kind) {
- if (kind == Differencer.ADDITION)
- kind= Differencer.DELETION;
- else if (kind == Differencer.DELETION)
- kind= Differencer.ADDITION;
- return super.getImage(base, kind);
- }
- };
- cc.setProperty(CompareEditor.CONFIRM_SAVE_PROPERTY, new Boolean(false));
-
- fPatcher.setName(fPatchWizardPage.getPatchName());
-
- CompareUI.openCompareEditor(new PatchCompareInput(cc, fPatcher, new StructuredSelection(fTarget)));
- } else {
- fPatcher.setName(fPatchWizardPage.getPatchName());
-
- try {
- WorkspaceModifyOperation op= new WorkspaceModifyOperation() {
- protected void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- fPatcher.applyAll(getTarget(), monitor);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- };
- getContainer().run(true, false, op);
-
- } catch (InvocationTargetException e) {
- ExceptionHandler.handle(e,
- PatchMessages.getString("PatchWizard.title"), //$NON-NLS-1$
- PatchMessages.getString("PatchWizard.unexpectedException.message")); //$NON-NLS-1$
- } catch (InterruptedException e) {
- // cannot happen
- }
- }
-
- // Save the dialog settings
- if (fHasNewDialogSettings) {
- IDialogSettings workbenchSettings= CompareUIPlugin.getDefault().getDialogSettings();
- IDialogSettings section= workbenchSettings.getSection(DIALOG_SETTINGS_KEY);
- section= workbenchSettings.addNewSection(DIALOG_SETTINGS_KEY);
- setDialogSettings(section);
- }
-
- fPatchWizardPage.saveWidgetValues();
- //fPreviewPatchPage.saveWidgetValues();
-
- return true;
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchedResource.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchedResource.java
deleted file mode 100644
index b4932a657..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchedResource.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal.patch;
-
-import java.io.*;
-
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.*;
-
-import org.eclipse.compare.*;
-
-
-/* package */ class PatchedResource implements ITypedElement, IStreamContentAccessor {
-
- private Diff fDiff;
- private IStreamContentAccessor fCurrent;
- private IPath fPath;
- private byte[] fContent;
- private Patcher fPatcher;
-
- /* package */ PatchedResource(IStreamContentAccessor current, Diff diff, IPath path, Patcher patcher) {
- fDiff= diff;
- fCurrent= current;
- fPath= path;
- fPatcher= patcher;
- }
-
- public InputStream getContents() throws CoreException {
- if (fContent == null) {
- InputStream is= null;
-
- try {
- is= fCurrent.getContents();
- } catch (CoreException ex) {
- is= new ByteArrayInputStream(new byte[0]);
- }
- if (is != null) {
-
- try {
- String encoding= ResourcesPlugin.getEncoding();
- BufferedReader br= new BufferedReader(new InputStreamReader(is, encoding));
- String s= fPatcher.patch(fDiff,br, null);
- if (s != null)
- fContent= s.getBytes(encoding);
- } catch (UnsupportedEncodingException e) {
- throw new CoreException(new Status(IStatus.ERROR, CompareUI.PLUGIN_ID, Platform.PLUGIN_ERROR, e.getMessage(), e));
- }
-
- try {
- is.close();
- } catch (IOException ex) {
- }
- }
- }
- return new ByteArrayInputStream(fContent);
- }
-
- public Image getImage() {
- return CompareUI.getImage(getType());
- }
-
- public String getName() {
- return fPath.toOSString();
- }
-
- public String getType() {
- String type= fPath.getFileExtension();
- if (type != null)
- return type;
- return ITypedElement.UNKNOWN_TYPE;
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
deleted file mode 100644
index 9fe7f3752..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
+++ /dev/null
@@ -1,1006 +0,0 @@
-package org.eclipse.compare.internal.patch;
-
-import java.io.*;
-import java.text.*;
-import java.util.*;
-
-import org.eclipse.jface.util.Assert;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.resources.*;
-
-import org.eclipse.compare.structuremergeviewer.Differencer;
-import org.eclipse.compare.internal.ExceptionHandler;
-
-
-/**
- * A Patcher
- * - knows how to parse various patch file formats into some in-memory structure,
- * - holds onto the parsed data and the options to use when applying the patches,
- * - knows how to apply the patches to files and folders.
- */
-public class Patcher {
-
- private static final boolean DEBUG= false;
-
- private static final String DEV_NULL= "/dev/null"; //$NON-NLS-1$
-
- private static final String REJECT_FILE_EXTENSION= ".rej"; //$NON-NLS-1$
-
- private static final String MARKER_TYPE= "org.eclipse.compare.rejectedPatchMarker"; //$NON-NLS-1$
-
- // diff formats
- private static final int CONTEXT= 0;
- private static final int ED= 1;
- private static final int NORMAL= 2;
- private static final int UNIFIED= 3;
-
- // we recognize the following date/time formats
- private static DateFormat[] DATE_FORMATS= new DateFormat[] {
- new SimpleDateFormat("EEE MMM dd kk:mm:ss yyyy"), //$NON-NLS-1$
- new SimpleDateFormat("yyyy/MM/dd kk:mm:ss"), //$NON-NLS-1$
- new SimpleDateFormat("EEE MMM dd kk:mm:ss yyyy", Locale.US) //$NON-NLS-1$
- };
-
- private String fName;
- private Diff[] fDiffs;
- // patch options
- private int fStripPrefixSegments;
- private int fFuzz;
- private boolean fIgnoreWhitespace= false;
- private boolean fIgnoreLineDelimiter= true;
- private boolean fPreserveLineDelimiters= false;
- private boolean fReverse= false;
-
-
- Patcher() {
- }
-
- //---- options
-
- void setName(String name) {
- fName= name;
- }
-
- String getName() {
- return fName;
- }
-
- /**
- * Returns an array of Diffs after a sucessfull call to <code>parse</code>.
- * If <code>parse</code> hasn't been called returns <code>null</code>.
- */
- Diff[] getDiffs() {
- return fDiffs;
- }
-
- IPath getPath(Diff diff) {
- IPath path= diff.getPath();
- if (fStripPrefixSegments > 0 && fStripPrefixSegments < path.segmentCount())
- path= path.removeFirstSegments(fStripPrefixSegments);
- return path;
- }
-
- /**
- * Returns <code>true</code> if new value differs from old.
- */
- boolean setStripPrefixSegments(int strip) {
- if (strip != fStripPrefixSegments) {
- fStripPrefixSegments= strip;
- return true;
- }
- return false;
- }
-
- int getStripPrefixSegments() {
- return fStripPrefixSegments;
- }
-
- /**
- * Returns <code>true</code> if new value differs from old.
- */
- boolean setFuzz(int fuzz) {
- if (fuzz != fFuzz) {
- fFuzz= fuzz;
- return true;
- }
- return false;
- }
-
- /**
- * Returns <code>true</code> if new value differs from old.
- */
- boolean setReversed(boolean reverse) {
- if (fReverse != reverse) {
- fReverse= reverse;
-
- for (int i= 0; i < fDiffs.length; i++)
- fDiffs[i].reverse();
-
- return true;
- }
- return false;
- }
-
- /**
- * Returns <code>true</code> if new value differs from old.
- */
- boolean setIgnoreWhitespace(boolean ignoreWhitespace) {
- if (ignoreWhitespace != fIgnoreWhitespace) {
- fIgnoreWhitespace= ignoreWhitespace;
- return true;
- }
- return false;
- }
-
- //---- parsing patch files
-
- /* package */ void parse(BufferedReader reader) throws IOException {
- List diffs= new ArrayList();
- String line= null;
- boolean reread= false;
- String diffArgs= null;
- String fileName= null;
-
- LineReader lr= new LineReader(reader);
- lr.ignoreSingleCR();
-
- // read leading garbage
- while (true) {
- if (!reread)
- line= lr.readLine();
- reread= false;
- if (line == null)
- break;
- if (line.length() < 4)
- continue; // too short
-
- // remember some infos
- if (line.startsWith("Index: ")) { //$NON-NLS-1$
- fileName= line.substring(7).trim();
- continue;
- }
- if (line.startsWith("diff")) { //$NON-NLS-1$
- diffArgs= line.substring(4).trim();
- continue;
- }
-
- if (line.startsWith("--- ")) { //$NON-NLS-1$
- line= readUnifiedDiff(diffs, lr, line, diffArgs, fileName);
- diffArgs= fileName= null;
- reread= true;
- } else if (line.startsWith("*** ")) { //$NON-NLS-1$
- line= readContextDiff(diffs, lr, line, diffArgs, fileName);
- diffArgs= fileName= null;
- reread= true;
- }
- }
-
- lr.close();
-
- fDiffs= (Diff[]) diffs.toArray((Diff[]) new Diff[diffs.size()]);
- }
-
- /**
- * Returns the next line that does not belong to this diff
- */
- private String readUnifiedDiff(List diffs, LineReader reader, String line, String args, String fileName) throws IOException {
-
- String[] oldArgs= split(line.substring(4));
-
- // read info about new file
- line= reader.readLine();
- if (line == null || !line.startsWith("+++ ")) //$NON-NLS-1$
- return line;
-
- String[] newArgs= split(line.substring(4));
-
- Diff diff= new Diff(extractPath(oldArgs, 0, fileName), extractDate(oldArgs, 1),
- extractPath(newArgs, 0, fileName), extractDate(newArgs, 1));
- diffs.add(diff);
-
- int[] oldRange= new int[2];
- int[] newRange= new int[2];
- List lines= new ArrayList();
-
- try {
- // read lines of hunk
- while (true) {
-
- line= reader.readLine();
- if (line == null)
- return null;
-
- if (reader.lineContentLength(line) == 0) {
- //System.out.println("Warning: found empty line in hunk; ignored");
- //lines.add(' ' + line);
- continue;
- }
-
- char c= line.charAt(0);
- switch (c) {
- case '@':
- if (line.startsWith("@@ ")) { //$NON-NLS-1$
- // flush old hunk
- if (lines.size() > 0) {
- new Hunk(diff, oldRange, newRange, lines);
- lines.clear();
- }
-
- // format: @@ -oldStart,oldLength +newStart,newLength @@
- extractPair(line, '-', oldRange);
- extractPair(line, '+', newRange);
- continue;
- }
- break;
- case ' ':
- case '+':
- case '-':
- lines.add(line);
- continue;
- case '\\':
- if (line.startsWith("No newline at end of file", 2)) { //$NON-NLS-1$
- int lastIndex= lines.size();
- if (lastIndex > 0) {
- line= (String) lines.get(lastIndex-1);
- int end= line.length()-1;
- char lc= line.charAt(end);
- if (lc == '\n') {
- end--;
- if (end > 0 && line.charAt(end-1) == '\r')
- end--;
- } else if (lc == '\r') {
- end--;
- }
- line= line.substring(0, end);
- lines.set(lastIndex-1, line);
- }
- continue;
- }
- break;
- default:
- if (DEBUG) {
- int a1= c, a2= 0;
- if (line.length() > 1)
- a2= line.charAt(1);
- System.out.println("char: " + a1 + " " + a2); //$NON-NLS-1$ //$NON-NLS-2$
- }
- break;
- }
- return line;
- }
- } finally {
- if (lines.size() > 0)
- new Hunk(diff, oldRange, newRange, lines);
- diff.finish();
- }
- }
-
- /**
- * Returns the next line that does not belong to this diff
- */
- private String readContextDiff(List diffs, LineReader reader, String line, String args, String fileName) throws IOException {
-
- String[] oldArgs= split(line.substring(4));
-
- // read info about new file
- line= reader.readLine();
- if (line == null || !line.startsWith("--- ")) //$NON-NLS-1$
- return line;
-
- String[] newArgs= split(line.substring(4));
-
- Diff diff= new Diff(extractPath(oldArgs, 0, fileName), extractDate(oldArgs, 1),
- extractPath(newArgs, 0, fileName), extractDate(newArgs, 1));
- diffs.add(diff);
-
- int[] oldRange= new int[2];
- int[] newRange= new int[2];
- List oldLines= new ArrayList();
- List newLines= new ArrayList();
- List lines= oldLines;
-
- try {
- // read lines of hunk
- while (true) {
-
- line= reader.readLine();
- if (line == null)
- return line;
-
- int l= line.length();
- if (l == 0)
- continue;
- if (l > 1) {
- switch (line.charAt(0)) {
- case '*':
- if (line.startsWith("***************")) { // new hunk //$NON-NLS-1$
- // flush old hunk
- if (oldLines.size() > 0 || newLines.size() > 0) {
- new Hunk(diff, oldRange, newRange, unifyLines(oldLines, newLines));
- oldLines.clear();
- newLines.clear();
- }
- continue;
- }
- if (line.startsWith("*** ")) { // old range //$NON-NLS-1$
- // format: *** oldStart,oldEnd ***
- extractPair(line, ' ', oldRange);
- oldRange[1]= oldRange[1]-oldRange[0]+1;
- lines= oldLines;
- continue;
- }
- break;
- case ' ': // context line
- case '+': // addition
- case '!': // change
- if (line.charAt(1) == ' ') {
- lines.add(line);
- continue;
- }
- break;
- case '-':
- if (line.charAt(1) == ' ') { // deletion
- lines.add(line);
- continue;
- }
- if (line.startsWith("--- ")) { // new range //$NON-NLS-1$
- // format: *** newStart,newEnd ***
- extractPair(line, ' ', newRange);
- newRange[1]= newRange[1]-newRange[0]+1;
- lines= newLines;
- continue;
- }
- break;
- default:
- break;
- }
- }
- return line;
- }
- } finally {
- // flush last hunk
- if (oldLines.size() > 0 || newLines.size() > 0)
- new Hunk(diff, oldRange, newRange, unifyLines(oldLines, newLines));
- diff.finish();
- }
- }
-
- /**
- * Creates a List of lines in the unified format from
- * two Lists of lines in the 'classic' format.
- */
- private List unifyLines(List oldLines, List newLines) {
- List result= new ArrayList();
-
- String[] ol= (String[]) oldLines.toArray(new String[oldLines.size()]);
- String[] nl= (String[]) newLines.toArray(new String[newLines.size()]);
-
- int oi= 0, ni= 0;
-
- while (true) {
-
- char oc= 0;
- String o= null;
- if (oi < ol.length) {
- o= ol[oi];
- oc= o.charAt(0);
- }
-
- char nc= 0;
- String n= null;
- if (ni < nl.length) {
- n= nl[ni];
- nc= n.charAt(0);
- }
-
- // EOF
- if (oc == 0 && nc == 0)
- break;
-
- // deletion in old
- if (oc == '-') {
- do {
- result.add('-' + o.substring(2));
- oi++;
- if (oi >= ol.length)
- break;
- o= ol[oi];
- } while (o.charAt(0) == '-');
- continue;
- }
-
- // addition in new
- if (nc == '+') {
- do {
- result.add('+' + n.substring(2));
- ni++;
- if (ni >= nl.length)
- break;
- n= nl[ni];
- } while (n.charAt(0) == '+');
- continue;
- }
-
- // differing lines on both sides
- if (oc == '!' && nc == '!') {
- // remove old
- do {
- result.add('-' + o.substring(2));
- oi++;
- if (oi >= ol.length)
- break;
- o= ol[oi];
- } while (o.charAt(0) == '!');
-
- // add new
- do {
- result.add('+' + n.substring(2));
- ni++;
- if (ni >= nl.length)
- break;
- n= nl[ni];
- } while (n.charAt(0) == '!');
-
- continue;
- }
-
- // context lines
- if (oc == ' ' && nc == ' ') {
- do {
- Assert.isTrue(o.equals(n), "non matching context lines"); //$NON-NLS-1$
- result.add(' ' + o.substring(2));
- oi++;
- ni++;
- if (oi >= ol.length || ni >= nl.length)
- break;
- o= ol[oi];
- n= nl[ni];
- } while (o.charAt(0) == ' ' && n.charAt(0) == ' ');
- continue;
- }
-
- if (oc == ' ') {
- do {
- result.add(' ' + o.substring(2));
- oi++;
- if (oi >= ol.length)
- break;
- o= ol[oi];
- } while (o.charAt(0) == ' ');
- continue;
- }
-
- if (nc == ' ') {
- do {
- result.add(' ' + n.substring(2));
- ni++;
- if (ni >= nl.length)
- break;
- n= nl[ni];
- } while (n.charAt(0) == ' ');
- continue;
- }
-
- Assert.isTrue(false, "unexpected char <" + oc + "> <" + nc + ">"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- return result;
- }
-
- /**
- * Breaks the given string into tab separated substrings.
- * Leading and trailing whitespace is removed from each token.
- */
- private String[] split(String line) {
- List l= new ArrayList();
- StringTokenizer st= new StringTokenizer(line, "\t"); //$NON-NLS-1$
- while (st.hasMoreElements()) {
- String token= st.nextToken().trim();
- if (token.length() > 0)
- l.add(token);
- }
- return (String[]) l.toArray(new String[l.size()]);
- }
-
- /**
- * @return the parsed time/date in milliseconds or -1 on error
- */
- private long extractDate(String[] args, int n) {
- if (n < args.length) {
- String line= args[n];
- for (int i= 0; i < DATE_FORMATS.length; i++) {
- DATE_FORMATS[i].setLenient(true);
- try {
- Date date= DATE_FORMATS[i].parse(line);
- return date.getTime();
- } catch (ParseException ex) {
- }
- }
- // System.err.println("can't parse date: <" + line + ">");
- }
- return -1;
- }
-
- /**
- * Returns null if file name is "/dev/null".
- */
- private IPath extractPath(String[] args, int n, String path2) {
- if (n < args.length) {
- String path= args[n];
- if (DEV_NULL.equals(path))
- return null;
- int pos= path.lastIndexOf(':');
- if (pos >= 0)
- path= path.substring(0, pos);
- if (path2 != null && !path2.equals(path)) {
- if (DEBUG) System.out.println("path mismatch: " + path2); //$NON-NLS-1$
- path= path2;
- }
- return new Path(path);
- }
- return null;
- }
-
- /**
- * Tries to extract two integers separated by a comma.
- * The parsing of the line starts at the position after
- * the first occurrence of the given character start an ends
- * at the first blank (or the end of the line).
- * If only a single number is found this is assumed to be the length of the range.
- * In this case the start of the range is set to 1.
- * If an error occurs the range -1,-1 is returned.
- */
- private void extractPair(String line, char start, int[] pair) {
- pair[0]= pair[1]= -1;
- int startPos= line.indexOf(start);
- if (startPos < 0) {
- if (DEBUG) System.out.println("parsing error in extractPair: couldn't find \'" + start + "\'"); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
- line= line.substring(startPos+1);
- int endPos= line.indexOf(' ');
- if (endPos < 0) {
- if (DEBUG) System.out.println("parsing error in extractPair: couldn't find end blank"); //$NON-NLS-1$
- return;
- }
- line= line.substring(0, endPos);
- int comma= line.indexOf(',');
- if (comma >= 0) {
- pair[0]= Integer.parseInt(line.substring(0, comma));
- pair[1]= Integer.parseInt(line.substring(comma+1));
- } else {
- pair[0]= 1;
- pair[1]= Integer.parseInt(line.substring(comma+1));
- }
- }
-
- //---- applying a patch file
-
- /**
- * Tries to patch the given lines with the specified Diff.
- * Any hunk that couldn't be applied is returned in the list failedHunks.
- */
- /* package */ void patch(Diff diff, List lines, List failedHunks) {
-
- int shift= 0;
- Iterator iter= diff.fHunks.iterator();
- while (iter.hasNext()) {
- Hunk hunk= (Hunk) iter.next();
- hunk.fMatches= false;
- shift= patch(hunk, lines, shift, failedHunks);
- }
- }
-
- /**
- * Tries to patch the contents of the given reader with the specified Diff.
- * Any hunk that couldn't be applied is returned in the list failedHunks.
- */
- /* package */ String patch(Diff diff, BufferedReader reader, List failedHunks) {
-
- List lines= new LineReader(reader).readLines();
- if (lines == null)
- lines= new ArrayList();
-
- patch(diff, lines, failedHunks);
-
- return createString(lines);
- }
-
- /**
- * Tries to apply the specified hunk to the given lines.
- * If the hunk cannot be applied at the original position
- * the methods tries Fuzz lines before and after.
- * If this fails the Hunk is added to the given list of failed hunks.
- */
- private int patch(Hunk hunk, List lines, int shift, List failedHunks) {
- if (tryPatch(hunk, lines, shift)) {
- shift+= doPatch(hunk, lines, shift);
- } else {
- boolean found= false;
- int oldShift= shift;
-
- for (int i= shift-1; i > shift-fFuzz; i--) {
- if (tryPatch(hunk, lines, i)) {
- shift= i;
- found= true;
- break;
- }
- }
-
- if (! found) {
- for (int i= shift+1; i < shift+fFuzz; i++) {
- if (tryPatch(hunk, lines, i)) {
- shift= i;
- found= true;
- break;
- }
- }
- }
-
- if (found) {
- if (DEBUG) System.out.println("patched hunk at offset: " + (shift-oldShift)); //$NON-NLS-1$
- shift+= doPatch(hunk, lines, shift);
- } else {
- if (failedHunks != null) {
- if (DEBUG) System.out.println("failed hunk"); //$NON-NLS-1$
- failedHunks.add(hunk);
- }
- }
- oldShift= oldShift; // prevent compiler warning about unused local variable
- }
- return shift;
- }
-
- /**
- * Tries to apply the given hunk on the specified lines.
- * The parameter shift is added to the line numbers given
- * in the hunk.
- */
- private boolean tryPatch(Hunk hunk, List lines, int shift) {
- int pos= hunk.fOldStart + shift;
- int contextMatches= 0;
- int deleteMatches= 0;
- for (int i= 0; i < hunk.fLines.length; i++) {
- String s= hunk.fLines[i];
- Assert.isTrue(s.length() > 0);
- String line= s.substring(1);
- char controlChar= s.charAt(0);
- if (controlChar == ' ') { // context lines
- while (true) {
- if (pos < 0 || pos >= lines.size())
- return false;
- if (linesMatch(line, (String) lines.get(pos))) {
- contextMatches++;
- pos++;
- break;
- }
- if (contextMatches <= 0)
- return false;
- pos++;
- }
- } else if (controlChar == '-') {
- // deleted lines
- while (true) {
- if (pos < 0 || pos >= lines.size())
- return false;
- if (linesMatch(line, (String) lines.get(pos))) {
- deleteMatches++;
- pos++;
- break;
- }
- if (deleteMatches <= 0)
- return false;
- pos++;
- }
- } else if (controlChar == '+') {
- // added lines
- // we don't have to do anything for a 'try'
- } else
- Assert.isTrue(false, "tryPatch: unknown control charcter: " + controlChar); //$NON-NLS-1$
- }
- return true;
- }
-
- private int doPatch(Hunk hunk, List lines, int shift) {
- int pos= hunk.fOldStart + shift;
- for (int i= 0; i < hunk.fLines.length; i++) {
- String s= hunk.fLines[i];
- Assert.isTrue(s.length() > 0);
- String line= s.substring(1);
- char controlChar= s.charAt(0);
- if (controlChar == ' ') { // context lines
- while (true) {
- Assert.isTrue(pos < lines.size(), "doPatch: inconsistency in context"); //$NON-NLS-1$
- if (linesMatch(line, (String) lines.get(pos))) {
- pos++;
- break;
- }
- pos++;
- }
- } else if (controlChar == '-') {
- // deleted lines
- while (true) {
- Assert.isTrue(pos < lines.size(), "doPatch: inconsistency in deleted lines"); //$NON-NLS-1$
- if (linesMatch(line, (String) lines.get(pos))) {
- break;
- }
- pos++;
- }
- lines.remove(pos);
- } else if (controlChar == '+') {
- // added lines
- lines.add(pos, line);
- pos++;
- } else
- Assert.isTrue(false, "doPatch: unknown control character: " + controlChar); //$NON-NLS-1$
- }
- hunk.fMatches= true;
- return hunk.fNewLength - hunk.fOldLength;
- }
-
- public void applyAll(IResource target, IProgressMonitor pm) throws CoreException {
-
- final int WORK_UNIT= 10;
-
- IFile file= null; // file to be patched
- IContainer container= null;
- if (target instanceof IContainer)
- container= (IContainer) target;
- else if (target instanceof IFile) {
- file= (IFile) target;
- container= file.getParent();
- } else {
- Assert.isTrue(false);
- }
-
- if (pm != null) {
- String message= PatchMessages.getString("Patcher.Task.message"); //$NON-NLS-1$
- pm.beginTask(message, fDiffs.length*WORK_UNIT);
- }
-
- for (int i= 0; i < fDiffs.length; i++) {
-
- int workTicks= WORK_UNIT;
-
- Diff diff= fDiffs[i];
- if (diff.isEnabled()) {
-
- IPath path= getPath(diff);
- if (pm != null)
- pm.subTask(path.toString());
-
- if (container != null)
- file= createPath(container, path);
- List failed= new ArrayList();
- List result= null;
-
- int type= diff.getType();
- switch (type) {
- case Differencer.ADDITION:
- // patch it and collect rejected hunks
- result= apply(diff, file, true, failed);
- store(createString(result), file, new SubProgressMonitor(pm, workTicks));
- workTicks-= WORK_UNIT;
- break;
- case Differencer.DELETION:
- file.delete(true, true, new SubProgressMonitor(pm, workTicks));
- workTicks-= WORK_UNIT;
- break;
- case Differencer.CHANGE:
- // patch it and collect rejected hunks
- result= apply(diff, file, false, failed);
- store(createString(result), file, new SubProgressMonitor(pm, workTicks));
- workTicks-= WORK_UNIT;
- break;
- }
-
- if (failed.size() > 0) {
- IPath pp= null;
- if (path.segmentCount() > 1) {
- pp= path.removeLastSegments(1);
- pp= pp.append(path.lastSegment() + REJECT_FILE_EXTENSION);
- } else
- pp= new Path(path.lastSegment() + REJECT_FILE_EXTENSION);
- file= createPath(container, pp);
- if (file != null) {
- store(getRejected(failed), file, pm);
- try {
- IMarker marker= file.createMarker(MARKER_TYPE);
- marker.setAttribute(marker.MESSAGE, PatchMessages.getString("Patcher.Marker.message")); //$NON-NLS-1$
- marker.setAttribute(marker.PRIORITY, IMarker.PRIORITY_HIGH);
- } catch (CoreException ex) {
- }
- }
- }
- }
-
- if (pm != null) {
- if (pm.isCanceled())
- break;
- if (workTicks > 0)
- pm.worked(workTicks);
- }
- }
- }
-
- /**
- * Reads the contents from the given file and returns them as
- * a List of lines.
- */
- private List load(IFile file, boolean create) {
- List lines= null;
- if (!create && file != null) {
- // read current contents
- InputStream is= null;
- try {
- is= file.getContents();
-
- Reader streamReader= null;
- try {
- streamReader= new InputStreamReader(is, ResourcesPlugin.getEncoding());
- } catch (UnsupportedEncodingException x) {
- // use default encoding
- streamReader= new InputStreamReader(is);
- }
-
- BufferedReader reader= new BufferedReader(streamReader);
- lines= new LineReader(reader).readLines();
- } catch(CoreException ex) {
- } finally {
- if (is != null)
- try {
- is.close();
- } catch(IOException ex) {
- }
- }
- }
-
- if (lines == null)
- lines= new ArrayList();
- return lines;
- }
-
- List apply(Diff diff, IFile file, boolean create, List failedHunks) {
-
- List lines= load(file, create);
- patch(diff, lines, failedHunks);
- return lines;
- }
-
- /**
- * Converts the string into bytes and stores them in the given file.
- */
- private void store(String contents, IFile file, IProgressMonitor pm) throws CoreException {
-
- byte[] bytes;
- try {
- bytes= contents.getBytes(ResourcesPlugin.getEncoding());
- } catch (UnsupportedEncodingException x) {
- // uses default encoding
- bytes= contents.getBytes();
- }
-
- InputStream is= new ByteArrayInputStream(bytes);
- try {
- if (file.exists()) {
- file.setContents(is, false, true, pm);
- } else {
- file.create(is, false, pm);
- }
- } finally {
- if (is != null)
- try {
- is.close();
- } catch(IOException ex) {
- }
- }
- }
-
- /**
- * Concatenates all strings found in the given List.
- */
- private String createString(List lines) {
- StringBuffer sb= new StringBuffer();
- Iterator iter= lines.iterator();
- if (fPreserveLineDelimiters) {
- while (iter.hasNext())
- sb.append((String)iter.next());
- } else {
- String lineSeparator= System.getProperty("line.separator"); //$NON-NLS-1$
- while (iter.hasNext()) {
- String line= (String)iter.next();
- int l= length(line);
- if (l < line.length()) { // line has delimiter
- sb.append(line.substring(0, l));
- sb.append(lineSeparator);
- } else {
- sb.append(line);
- }
- }
- }
- return sb.toString();
- }
-
- String getRejected(List failedHunks) {
- if (failedHunks.size() <= 0)
- return null;
-
- String lineSeparator= System.getProperty("line.separator"); //$NON-NLS-1$
- StringBuffer sb= new StringBuffer();
- Iterator iter= failedHunks.iterator();
- while (iter.hasNext()) {
- Hunk hunk= (Hunk) iter.next();
- sb.append(hunk.getRejectedDescription());
- sb.append(lineSeparator);
- sb.append(hunk.getContent());
- }
- return sb.toString();
- }
-
- /**
- * Ensures that a file with the given path exists in
- * the given container. Folder are created as necessary.
- */
- private IFile createPath(IContainer container, IPath path) throws CoreException {
- if (path.segmentCount() > 1) {
- IFolder f= container.getFolder(path.uptoSegment(1));
- if (!f.exists())
- f.create(false, true, null);
- return createPath(f, path.removeFirstSegments(1));
- }
- // a leaf
- return container.getFile(path);
- }
-
- /**
- * Returns the given string with all whitespace characters removed.
- * Whitespace is defined by <code>Character.isWhitespace(...)</code>.
- */
- private static String stripWhiteSpace(String s) {
- StringBuffer sb= new StringBuffer();
- int l= s.length();
- for (int i= 0; i < l; i++) {
- char c= s.charAt(i);
- if (!Character.isWhitespace(c))
- sb.append(c);
- }
- return sb.toString();
- }
-
- /**
- * Compares two strings.
- * If fIgnoreWhitespace is true whitespace is ignored.
- */
- private boolean linesMatch(String line1, String line2) {
- if (fIgnoreWhitespace)
- return stripWhiteSpace(line1).equals(stripWhiteSpace(line2));
- if (fIgnoreLineDelimiter) {
- int l1= length(line1);
- int l2= length(line2);
- if (l1 != l2)
- return false;
- return line1.regionMatches(0, line2, 0, l1);
- }
- return line1.equals(line2);
- }
-
- /**
- * Returns the length (exluding a line delimiter CR, LF, CR/LF)
- * of the given string.
- */
- /* package */ static int length(String s) {
- int l= s.length();
- if (l > 0) {
- char c= s.charAt(l-1);
- if (c == '\r')
- return l-1;
- if (c == '\n') {
- if (l > 1 && s.charAt(l-2) == '\r')
- return l-2;
- return l-1;
- }
- }
- return l;
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage.java
deleted file mode 100644
index 90c1737cf..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage.java
+++ /dev/null
@@ -1,596 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal.patch;
-
-import java.io.*;
-import java.util.*;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.internal.*;
-import org.eclipse.compare.structuremergeviewer.*;
-
-
-/**
- * Shows the parsed patch file and any mismatches
- * between files, hunks and the currently selected
- * resources.
- */
-/* package */ class PreviewPatchPage extends WizardPage {
-
- /**
- * Used with CompareInput
- */
- static class HunkInput implements ITypedElement, IStreamContentAccessor {
- String fContent;
- String fType;
-
- HunkInput(String type, String s) {
- fType= type;
- fContent= s;
- }
- public Image getImage() {
- return null;
- }
- public String getName() {
- return PatchMessages.getString("PreviewPatchPage.NoName.text"); //$NON-NLS-1$
- }
- public String getType() {
- return fType;
- }
- public InputStream getContents() {
- return new ByteArrayInputStream(fContent.getBytes());
- }
- };
-
- private PatchWizard fPatchWizard;
-
- private Tree fTree;
- private Combo fStripPrefixSegments;
- private CompareViewerSwitchingPane fHunkViewer;
- private Button fIgnoreWhitespaceButton;
- private Button fReversePatchButton;
- private Text fFuzzField;
-
- private Image fNullImage;
- private Image fAddImage;
- private Image fDelImage;
- private Image fErrorImage;
- private Image fErrorAddImage;
- private Image fErrorDelImage;
-
- private CompareConfiguration fCompareConfiguration;
-
-
- /* package */ PreviewPatchPage(PatchWizard pw) {
- super("PreviewPatchPage", //$NON-NLS-1$
- PatchMessages.getString("PreviewPatchPage.title"), null); //$NON-NLS-1$
-
- setMessage(PatchMessages.getString("PreviewPatchPage.message")); //$NON-NLS-1$
-
- fPatchWizard= pw;
- //setPageComplete(false);
-
- int w= 16;
-
- ImageDescriptor addId= CompareUIPlugin.getImageDescriptor("ovr16/add_ov.gif"); //$NON-NLS-1$
- ImageDescriptor delId= CompareUIPlugin.getImageDescriptor("ovr16/del_ov.gif"); //$NON-NLS-1$
-
- ImageDescriptor errId= CompareUIPlugin.getImageDescriptor("ovr16/error_ov.gif"); //$NON-NLS-1$
- Image errIm= errId.createImage();
-
- fNullImage= new DiffImage(null, null, w).createImage();
- fAddImage= new DiffImage(null, addId, w).createImage();
- fDelImage= new DiffImage(null, delId, w).createImage();
-
- fErrorImage= new DiffImage(errIm, null, w).createImage();
- fErrorAddImage= new DiffImage(errIm, addId, w).createImage();
- fErrorDelImage= new DiffImage(errIm, delId, w).createImage();
-
- fCompareConfiguration= new CompareConfiguration();
-
- fCompareConfiguration.setLeftEditable(false);
- fCompareConfiguration.setLeftLabel(PatchMessages.getString("PreviewPatchPage.Left.title")); //$NON-NLS-1$
-
- fCompareConfiguration.setRightEditable(false);
- fCompareConfiguration.setRightLabel(PatchMessages.getString("PreviewPatchPage.Right.title")); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * Method declared in WizardPage
- */
- public void setVisible(boolean visible) {
- if (visible)
- buildTree();
- super.setVisible(visible);
- }
-
- Image getImage(Diff diff) {
- if (diff.fMatches) {
- switch (diff.getType()) {
- case Differencer.ADDITION:
- return fAddImage;
- case Differencer.DELETION:
- return fDelImage;
- }
- return fNullImage;
- }
- switch (diff.getType()) {
- case Differencer.ADDITION:
- return fErrorAddImage;
- case Differencer.DELETION:
- return fErrorDelImage;
- }
- return fErrorImage;
- }
-
- Image getImage(Hunk hunk) {
- if (hunk.fMatches)
- return fNullImage;
- return fErrorImage;
- }
-
- public void createControl(Composite parent) {
-
- Composite composite= new Composite(parent, SWT.NULL);
- composite.setLayout(new GridLayout());
- composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));
-
- setControl(composite);
-
- buildPatchOptionsGroup(composite);
-
- Splitter splitter= new Splitter(composite, SWT.VERTICAL);
- splitter.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL
- | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_VERTICAL));
-
-
- // top pane showing diffs and hunks in a check box tree
- fTree= new Tree(splitter, SWT.CHECK | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- GridData gd= new GridData();
- gd.verticalAlignment= GridData.FILL;
- gd.horizontalAlignment= GridData.FILL;
- gd.grabExcessHorizontalSpace= true;
- gd.grabExcessVerticalSpace= true;
- fTree.setLayoutData(gd);
-
- // bottom pane showing hunks in compare viewer
- fHunkViewer= new CompareViewerSwitchingPane(splitter, SWT.BORDER | SWT.FLAT) {
- protected Viewer getViewer(Viewer oldViewer, Object input) {
- return CompareUI.findContentViewer(oldViewer, (ICompareInput)input, this, fCompareConfiguration);
- }
- };
- gd= new GridData();
- gd.verticalAlignment= GridData.FILL;
- gd.horizontalAlignment= GridData.FILL;
- gd.grabExcessHorizontalSpace= true;
- gd.grabExcessVerticalSpace= true;
- fHunkViewer.setLayoutData(gd);
-
- // register listeners
-
- fTree.addSelectionListener(
- new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- TreeItem ti= (TreeItem) e.item;
- Object data= e.item.getData();
- if (e.detail == SWT.CHECK) {
- boolean checked= ti.getChecked();
- if (data instanceof Hunk) {
- Hunk hunk= (Hunk) data;
- checked= checked && hunk.fMatches;
- //hunk.setEnabled(checked);
- ti.setChecked(checked);
- updateGrayedState(ti);
- } else if (data instanceof Diff) {
- updateCheckedState(ti);
- }
- } else {
- if (data instanceof Hunk)
- PreviewPatchPage.this.fHunkViewer.setInput(createInput((Hunk)data));
- else
- PreviewPatchPage.this.fHunkViewer.setInput(null);
- }
- }
- }
- );
-
- // creating tree's content
- buildTree();
-
- // WorkbenchHelp.setHelp(composite, new DialogPageContextComputer(this, PATCH_HELP_CONTEXT_ID));
- }
-
- /**
- * Create the group for setting various patch options
- */
- private void buildPatchOptionsGroup(Composite parent) {
-
- final Patcher patcher= fPatchWizard.getPatcher();
-
- Group group= new Group(parent, SWT.NONE);
- group.setText(PatchMessages.getString("PreviewPatchPage.PatchOptions.title")); //$NON-NLS-1$
- GridLayout layout= new GridLayout();
- layout.numColumns= 5;
- group.setLayout(layout);
- group.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
- //fPatchFileGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- // 1st row
- new Label(group, SWT.NONE).setText(PatchMessages.getString("PreviewPatchPage.IgnoreSegments.text")); //$NON-NLS-1$
-
- fStripPrefixSegments= new Combo(group, SWT.DROP_DOWN | SWT.READ_ONLY | SWT.SIMPLE);
- int prefixCnt= patcher.getStripPrefixSegments();
- String prefix= Integer.toString(prefixCnt);
- fStripPrefixSegments.add(prefix);
- fStripPrefixSegments.setText(prefix);
-
- addSpacer(group);
-
- fReversePatchButton= new Button(group, SWT.CHECK);
- fReversePatchButton.setText(PatchMessages.getString("PreviewPatchPage.ReversePatch.text")); //$NON-NLS-1$
-
- addSpacer(group);
-
- // 2nd row
- Label l= new Label(group, SWT.NONE);
- l.setText(PatchMessages.getString("PreviewPatchPage.FuzzFactor.text")); //$NON-NLS-1$
- l.setToolTipText(PatchMessages.getString("PreviewPatchPage.FuzzFactor.tooltip")); //$NON-NLS-1$
- fFuzzField= new Text(group, SWT.BORDER);
- fFuzzField.setText("2"); //$NON-NLS-1$
- GridData gd2= new GridData(GridData.HORIZONTAL_ALIGN_CENTER);
- gd2.widthHint= 30;
- fFuzzField.setLayoutData(gd2);
-
- addSpacer(group);
-
- fIgnoreWhitespaceButton= new Button(group, SWT.CHECK);
- fIgnoreWhitespaceButton.setText(PatchMessages.getString("PreviewPatchPage.IgnoreWhitespace.text")); //$NON-NLS-1$
-
- addSpacer(group);
-
- // register listeners
-
- if (fStripPrefixSegments != null)
- fStripPrefixSegments.addSelectionListener(
- new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- if (patcher.setStripPrefixSegments(getStripPrefixSegments()))
- updateTree();
- }
- }
- );
- fReversePatchButton.addSelectionListener(
- new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- if (patcher.setReversed(fReversePatchButton.getSelection()))
- updateTree();
- }
- }
- );
- fIgnoreWhitespaceButton.addSelectionListener(
- new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- if (patcher.setIgnoreWhitespace(fIgnoreWhitespaceButton.getSelection()))
- updateTree();
- }
- }
- );
-
- fFuzzField.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- if (patcher.setFuzz(getFuzzFactor()))
- updateTree();
- }
- }
- );
- }
-
- ICompareInput createInput(Hunk hunk) {
-
- String[] lines= hunk.fLines;
- StringBuffer left= new StringBuffer();
- StringBuffer right= new StringBuffer();
-
- for (int i= 0; i < lines.length; i++) {
- String line= lines[i];
- String rest= line.substring(1);
- switch (line.charAt(0)) {
- case ' ':
- left.append(rest);
- right.append(rest);
- break;
- case '-':
- left.append(rest);
- break;
- case '+':
- right.append(rest);
- break;
- }
- }
-
- Diff diff= hunk.fParent;
- IPath path= diff.getPath();
- String type= path.getFileExtension();
-
- return new DiffNode(new HunkInput(type, left.toString()), new HunkInput(type, right.toString()));
- }
-
- /**
- * Builds a tree from list of Diffs.
- * As a side effect it calculates the maximum number of segments
- * in all paths.
- */
- private void buildTree() {
- setPageComplete(true);
- if (fTree != null && !fTree.isDisposed()) {
- fTree.removeAll();
- fHunkViewer.setInput(null);
-
- int length= 99;
-
- Diff[] diffs= fPatchWizard.getPatcher().getDiffs();
- if (diffs != null) {
- for (int i= 0; i < diffs.length; i++) {
- Diff diff= diffs[i];
- TreeItem d= new TreeItem(fTree, SWT.NULL);
- d.setData(diff);
- d.setImage(getImage(diff));
-
- if (diff.fOldPath != null)
- length= Math.min(length, diff.fOldPath.segmentCount());
- if (diff.fNewPath != null)
- length= Math.min(length, diff.fNewPath.segmentCount());
-
- java.util.List hunks= diff.fHunks;
- java.util.Iterator iter= hunks.iterator();
- while (iter.hasNext()) {
- Hunk hunk= (Hunk) iter.next();
- TreeItem h= new TreeItem(d, SWT.NULL);
- h.setData(hunk);
- h.setText(hunk.getDescription());
- }
- }
- }
- if (fStripPrefixSegments != null && length != 99)
- for (int i= 1; i < length; i++)
- fStripPrefixSegments.add(Integer.toString(i));
- }
-
- updateTree();
- }
-
- private IFile existsInSelection(IPath path) {
- IResource target= fPatchWizard.getTarget();
- if (target instanceof IFile) {
- IFile file= (IFile) target;
- if (matches(file.getFullPath(), path))
- return file;
- } else if (target instanceof IContainer) {
- IContainer c= (IContainer) target;
- if (c.exists(path))
- return c.getFile(path);
- }
- return null;
- }
-
- /**
- * Returns true if path completely matches the end of fullpath
- */
- private boolean matches(IPath fullpath, IPath path) {
-
- for (IPath p= fullpath; path.segmentCount() <= p.segmentCount();
- p= p.removeFirstSegments(1)) {
- if (p.equals(path))
- return true;
- }
- return false;
- }
-
- /**
- * Updates label and checked state of tree items.
- */
- private void updateTree() {
- if (fTree == null || fTree.isDisposed())
- return;
- int strip= getStripPrefixSegments();
- TreeItem[] children= fTree.getItems();
- for (int i= 0; i < children.length; i++) {
- TreeItem item= children[i];
- Diff diff= (Diff) item.getData();
- diff.fMatches= false;
- String error= null;
-
- boolean create= false;
- IFile file= null;
- if (diff.getType() == Differencer.ADDITION) {
- IPath p= diff.fNewPath;
- if (strip > 0 && strip < p.segmentCount())
- p= p.removeFirstSegments(strip);
- file= existsInSelection(p);
- if (file == null) {
- diff.fMatches= true;
- } else {
- // file already exists
- error= PatchMessages.getString("PreviewPatchPage.FileExists.error"); //$NON-NLS-1$
- }
- create= true;
- } else {
- IPath p= diff.fOldPath;
- if (strip > 0 && strip < p.segmentCount())
- p= p.removeFirstSegments(strip);
- file= existsInSelection(p);
- diff.fMatches= false;
- if (file != null) {
- if (file.isReadOnly()) {
- // file is readonly
- error= PatchMessages.getString("PreviewPatchPage.FileIsReadOnly.error"); //$NON-NLS-1$
- file= null;
- } else {
- diff.fMatches= true;
- }
- } else {
- // file doesn't exist
- error= PatchMessages.getString("PreviewPatchPage.FileDoesNotExist.error"); //$NON-NLS-1$
- }
- }
-
- ArrayList failedHunks= new ArrayList();
- fPatchWizard.getPatcher().apply(diff, file, create, failedHunks);
-
- if (failedHunks.size() > 0)
- diff.fRejected= fPatchWizard.getPatcher().getRejected(failedHunks);
-
- int checkedSubs= 0; // counts checked hunk items
- TreeItem[] hunkItems= item.getItems();
- for (int h= 0; h < hunkItems.length; h++) {
- Hunk hunk= (Hunk) hunkItems[h].getData();
- boolean failed= failedHunks.contains(hunk);
- String hunkError= null;
- if (failed)
- hunkError= PatchMessages.getString("PreviewPatchPage.NoMatch.error"); //$NON-NLS-1$
-
- boolean check= !failed;
- hunkItems[h].setChecked(check);
- if (check)
- checkedSubs++;
-
- String hunkLabel= hunk.getDescription();
- if (hunkError != null)
- hunkLabel+= " " + hunkError; //$NON-NLS-1$
- hunkItems[h].setText(hunkLabel);
- hunkItems[h].setImage(getImage(hunk));
- }
-
- String label= diff.getDescription(strip);
- if (error != null)
- label+= " " + error; //$NON-NLS-1$
- item.setText(label);
- item.setImage(getImage(diff));
- item.setChecked(checkedSubs > 0);
- boolean gray= (checkedSubs > 0 && checkedSubs < hunkItems.length);
- item.setGrayed(gray);
- item.setExpanded(gray);
- }
- setPageComplete(updateModel());
- }
-
- /**
- * Updates the gray state of the given diff and the checked state of its children.
- */
- private void updateCheckedState(TreeItem diffItem) {
- boolean checked= diffItem.getChecked();
- // check whether we can enable all hunks
- TreeItem[] hunks= diffItem.getItems();
- int checkedCount= 0;
- for (int i= 0; i < hunks.length; i++) {
- Hunk hunk= (Hunk) hunks[i].getData();
- if (checked) {
- if (hunk.fMatches) {
- hunks[i].setChecked(true);
- checkedCount++;
- }
- } else {
- hunks[i].setChecked(false);
- }
- }
- diffItem.setGrayed(checkedCount > 0 && checkedCount < hunks.length);
- diffItem.setChecked(checkedCount > 0);
-
- setPageComplete(updateModel());
- }
-
- /**
- * Updates the gray state of the given items parent.
- */
- private void updateGrayedState(TreeItem hunk) {
- TreeItem diff= hunk.getParentItem();
- TreeItem[] hunks= diff.getItems();
- int checked= 0;
- for (int i= 0; i < hunks.length; i++)
- if (hunks[i].getChecked())
- checked++;
- diff.setChecked(checked > 0);
- diff.setGrayed(checked > 0 && checked < hunks.length);
-
- setPageComplete(updateModel());
- }
-
- private void addSpacer(Composite parent) {
- Label label= new Label(parent, SWT.NONE);
- GridData gd= new GridData(GridData.FILL_HORIZONTAL);
- gd.widthHint= 20;
- label.setLayoutData(gd);
- }
-
- private int getStripPrefixSegments() {
- int stripPrefixSegments= 0;
- if (fStripPrefixSegments != null) {
- String s= fStripPrefixSegments.getText();
- try {
- stripPrefixSegments= Integer.parseInt(s);
- } catch(NumberFormatException ex) {
- }
- }
- return stripPrefixSegments;
- }
-
- private int getFuzzFactor() {
- int fuzzFactor= 0;
- if (fFuzzField != null) {
- String s= fFuzzField.getText();
- try {
- fuzzFactor= Integer.parseInt(s);
- } catch(NumberFormatException ex) {
- }
- }
- return fuzzFactor;
- }
-
- public boolean updateModel() {
- boolean atLeastOneIsEnabled= false;
- if (fTree != null && !fTree.isDisposed()) {
- TreeItem [] diffItems= fTree.getItems();
- for (int i= 0; i < diffItems.length; i++) {
- TreeItem diffItem= diffItems[i];
- Object data= diffItem.getData();
- if (data instanceof Diff) {
- Diff diff= (Diff) data;
- boolean b= diffItem.getChecked();
- diff.setEnabled(b);
- if (b) {
- TreeItem [] hunkItems= diffItem.getItems();
- for (int j= 0; j < hunkItems.length; j++) {
- TreeItem hunkItem= hunkItems[j];
- data= hunkItem.getData();
- if (data instanceof Hunk) {
- Hunk hunk= (Hunk) data;
- b= hunkItem.getChecked();
- hunk.setEnabled(b);
- if (b) {
- atLeastOneIsEnabled= true;
- }
- }
- }
- }
- }
- }
- }
- return atLeastOneIsEnabled;
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/previewAncestor.txt b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/previewAncestor.txt
deleted file mode 100644
index 8f848397c..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/previewAncestor.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-a
-b
-c
-d
-e
-f
-g
-h
-i
-j \ No newline at end of file
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/previewLeft.txt b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/previewLeft.txt
deleted file mode 100644
index e24e0aaf1..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/previewLeft.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-a
-x
-c
-z
-e
-f
-g
-h
-i
-j \ No newline at end of file
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/previewRight.txt b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/previewRight.txt
deleted file mode 100644
index b45f220e6..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/previewRight.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-a
-y
-c
-z
-e
-f
-g
-h
-i
-j \ No newline at end of file
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/package.html b/bundles/org.eclipse.compare/compare/org/eclipse/compare/package.html
deleted file mode 100644
index fb0ad6215..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/package.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides support for performing structural and textual
-compare operations on arbitrary data and displaying the results.
-<h2>
-Package Specification</h2>
-The class <tt>CompareUI</tt> defines the entry point to initiate a configurable
-compare operation on arbitrary resources. The result of the compare is
-opened into a compare editor where the details can be browsed and edited
-in dynamically selected structure and content viewers.
-<p>A compare operation must be implemented as a subclass of <tt>CompareEditorInput</tt>.
-A <tt>CompareEditorInput</tt> runs a (potentially lengthy) compare operation
-under progress monitor control, creates a UI for drilling-down into the
-compare results, tracks the dirty state of the result in case of merge,
-and saves any changes that occured during a merge.
-<p>An instance of <tt>CompareConfiguration</tt> configures various UI aspects
-of compare/merge viewers like title labels and images, or whether a side
-of a merge viewer is editable. It is passed to the <tt>CompareEditorInput</tt>
-on creation.
-<p>When implementing a compare operation clients have to provide a tree
-of <tt>IStructureComparator</tt> (see package org.eclipse.compare.structuremergeviewer)
-and <tt>IStreamContentAccessor</tt> that can be passed as the input to
-the differencing engine (org.eclipse.compare.structuremergeviewer.Differencer).
-A <tt>ResourceNode</tt> is a convenience class that implements both interfaces
-for Eclipse workbench resources (org.eclipse.core.resources.IResource).
-It can be used without modification as the input to the differencing engine.
-<p>The <tt>EditionSelectionDialog</tt> is a simple selection dialog where
-one input element can be compared against a list of historic variants (<i>editions</i>)
-of the same input element. The dialog can be used to implement functions
-like <i>"Replace with Version"</i> or
-<br><i>"Replace with Edition"</i> on workbench resources.
-<p>In addition it is possible to specify a subsection of the input element
-(e.g. a method in a Java source file) by means of a <i>path</i>. In this
-case the dialog compares only the subsection (as specified by the path)
-with the corresponding subsection in the list of editions. This functionality
-can be used to implement <i>"Replace with Method Edition"</i> for the Java
-language.
-<p>The <tt>EditionSelectionDialog</tt> requires that the editions implement
-the <tt>IStreamContentAccessor</tt> and <tt>IModificationDate</tt> interfaces.
-The <tt>HistoryItem</tt> is a convenience class that implements these interfaces
-for <tt>IFileState</tt> objects.
-</body>
-</html>
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/DifferencesIterator.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/DifferencesIterator.java
deleted file mode 100644
index 4fa96b73e..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/DifferencesIterator.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.rangedifferencer;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * A custom iterator to iterate over a List of <code>RangeDifferences</code>.
- * It is used internally by the <code>RangeDifferencer</code>.
- */
-/* package */ class DifferencesIterator {
-
- List fRange;
- int fIndex;
- RangeDifference[] fArray;
- RangeDifference fDifference;
-
- /**
- * Creates a differences iterator on an array of <code>RangeDifference</code>s.
- */
- DifferencesIterator(RangeDifference[] differenceRanges) {
-
- fArray= differenceRanges;
- fIndex= 0;
- fRange= new ArrayList();
- if (fIndex < fArray.length)
- fDifference= fArray[fIndex++];
- else
- fDifference= null;
- }
-
- /**
- * Returns the number of RangeDifferences
- */
- int getCount() {
- return fRange.size();
- }
-
- /**
- * Appends the edit to its list and moves to the next <code>RangeDifference</code>.
- */
- void next() {
- fRange.add(fDifference);
- if (fDifference != null) {
- if (fIndex < fArray.length)
- fDifference= fArray[fIndex++];
- else
- fDifference= null;
- }
- }
-
- /**
- * Difference iterators are used in pairs.
- * This method returns the other iterator.
- */
- DifferencesIterator other(DifferencesIterator right, DifferencesIterator left) {
- if (this == right)
- return left;
- return right;
- }
-
- /**
- * Removes all <code>RangeDifference</code>s
- */
- void removeAll() {
- fRange.clear();
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/IRangeComparator.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/IRangeComparator.java
deleted file mode 100644
index ce01dc1e9..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/IRangeComparator.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.rangedifferencer;
-
-/**
- * For breaking an object to compare into a sequence of comparable entities.
- * <p>
- * It is used by <code>RangeDifferencer</code> to find longest sequences of
- * matching and non-matching ranges.
- * <p>
- * For example, to compare two text documents and find longest common sequences
- * of matching and non-matching lines, the implementation must break the document
- * into lines. <code>getRangeCount</code> would return the number of lines in the
- * document, and <code>rangesEqual</code> would compare a specified line given
- * with one in another <code>IRangeComparator</code>.
- * </p>
- * <p>
- * Clients should implement this interface; there is no standard implementation.
- * </p>
- */
-public interface IRangeComparator {
-
- /**
- * Returns the number of comparable entities.
- *
- * @return the number of comparable entities
- */
- int getRangeCount();
-
- /**
- * Returns whether the comparable entity given by the first index
- * matches an entity specified by the other <code>IRangeComparator</code> and index.
- *
- * @param thisIndex the index of the comparable entity within this <code>IRangeComparator</code>
- * @param other the IRangeComparator to compare this with
- * @param otherIndex the index of the comparable entity within the other <code>IRangeComparator</code>
- * @return <code>true</code> if the comparable entities are equal
- */
- boolean rangesEqual(int thisIndex, IRangeComparator other, int otherIndex);
-
- /**
- * Returns whether a comparison should be skipped because it would be too costly (or lengthy).
- *
- * @param length a number on which to base the decision whether to return
- * <code>true</code> or <code>false</code>
- * @param maxLength another number on which to base the decision whether to return
- * <code>true</code> or <code>false</code>
- * @param other the other <code>IRangeComparator</code> to compare with
- * @return <code>true</code> to avoid a too lengthy range comparison
- */
- boolean skipRangeComparison(int length, int maxLength, IRangeComparator other);
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/LinkedRangeDifference.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/LinkedRangeDifference.java
deleted file mode 100644
index 9374957ba..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/LinkedRangeDifference.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.rangedifferencer;
-
-/* package */ class LinkedRangeDifference extends RangeDifference {
-
- static final int INSERT= 0;
- static final int DELETE= 1;
- static final int CHANGE= 2;
- static final int ERROR= 3;
-
- LinkedRangeDifference fNext;
-
- /**
- * Creates a LinkedRangeDifference an initializes it to the error state
- */
- LinkedRangeDifference() {
- super(ERROR);
- fNext= null;
- }
-
- /**
- * Constructs and links a LinkeRangeDifference to another LinkedRangeDifference
- */
- LinkedRangeDifference(LinkedRangeDifference next, int operation) {
- super(operation);
- fNext= next;
- }
-
- /**
- * Follows the next link
- */
- LinkedRangeDifference getNext() {
- return fNext;
- }
-
- boolean isDelete() {
- return kind() == DELETE;
- }
-
- boolean isInsert() {
- return kind() == INSERT;
- }
-
- /**
- * Sets the next link of this LinkedRangeDifference
- */
- void setNext(LinkedRangeDifference next) {
- fNext= next;
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/RangeDifference.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/RangeDifference.java
deleted file mode 100644
index 2c4d62bbc..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/RangeDifference.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.rangedifferencer;
-
-import org.eclipse.jface.*;
-import org.eclipse.jface.util.Assert;
-
-/**
- * Description of a change between two or three ranges of comparable entities.
- * <p>
- * <code>RangeDifference</code> objects are the elements of a compare result returned from
- * the <code>RangeDifferencer</code> <code>find* </code> methods.
- * Clients use these objects as they are returned from the differencer.
- * This class is not intended to be instantiated or subclassed.
- * <p>
- * Note: A range in the <code>RangeDifference</code> object is given as a start index
- * and length in terms of comparable entities. However, these entity indices and counts
- * are not necessarily character positions. For example, if an entity represents a line
- * in a document, the start index would be a line number and the count would be in lines.
- * </p>
- *
- * @see RangeDifferencer
- */
-public class RangeDifference {
-
- /** Two-way change constant indicating no change. */
- public final static int NOCHANGE= 0;
- /** Two-way change constant indicating two-way change (same as <code>RIGHT</code>) */
- public final static int CHANGE= 2;
-
- /** Three-way change constant indicating a change in both right and left. */
- public final static int CONFLICT= 1;
- /** Three-way change constant indicating a change in right. */
- public final static int RIGHT= 2;
- /** Three-way change constant indicating a change in left. */
- public final static int LEFT= 3;
- /**
- * Three-way change constant indicating the same change in both right and left,
- * that is only the ancestor is different.
- */
- public final static int ANCESTOR= 4;
-
- /** Constant indicating an unknown change kind. */
- public final static int ERROR= 5;
-
- /** the kind of change: NOCHANGE, CHANGE, LEFT, RIGHT, ANCESTOR, CONFLICT, ERROR */
- int fKind;
-
- int fLeftStart;
- int fLeftLength;
- int fRightStart;
- int fRightLength;
- int lAncestorStart;
- int lAncestorLength;
-
- /**
- * Creates a new range difference with the given change kind.
- *
- * @param changeKind the kind of change
- */
- /* package */ RangeDifference(int changeKind) {
- fKind= changeKind;
- }
-
- /**
- * Creates a new <code>RangeDifference</code> with the given change kind
- * and left and right ranges.
- *
- * @param changeKind the kind of change
- * @param rightStart start index of entity on right side
- * @param rightLength number of entities on right side
- * @param leftStart start index of entity on left side
- * @param leftLength number of entities on left side
- */
- /* package */ RangeDifference(int kind, int rightStart, int rightLength, int leftStart, int leftLength) {
- fKind= kind;
- fRightStart= rightStart;
- fRightLength= rightLength;
- fLeftStart= leftStart;
- fLeftLength= leftLength;
- }
-
- /**
- * Creates a new <code>RangeDifference</code> with the given change kind
- * and left, right, and ancestor ranges.
- *
- * @param changeKind the kind of change
- * @param rightStart start index of entity on right side
- * @param rightLength number of entities on right side
- * @param leftStart start index of entity on left side
- * @param leftLength number of entities on left side
- * @param ancestorStart start index of entity on ancestor side
- * @param ancestorLength number of entities on ancestor side
- */
- /* package */ RangeDifference(int kind, int rightStart, int rightLength, int leftStart, int leftLength,
- int ancestorStart, int ancestorLength) {
- this(kind, rightStart, rightLength, leftStart, leftLength);
- lAncestorStart= ancestorStart;
- lAncestorLength= ancestorLength;
- }
-
- /**
- * Returns the kind of difference.
- *
- * @return the kind of difference, one of
- * <code>NOCHANGE</code>, <code>CHANGE</code>, <code>LEFT</code>, <code>RIGHT</code>,
- * <code>ANCESTOR</code>, <code>CONFLICT</code>, <code>ERROR</code>
- */
- public int kind() {
- return fKind;
- }
-
- /**
- * Returns the start index of the entity range on the ancestor side.
- *
- * @return the start index of the entity range on the ancestor side
- */
- public int ancestorStart() {
- return lAncestorStart;
- }
-
- /**
- * Returns the number of entities on the ancestor side.
- *
- * @return the number of entities on the ancestor side
- */
- public int ancestorLength() {
- return lAncestorLength;
- }
-
- /**
- * Returns the end index of the entity range on the ancestor side.
- *
- * @return the end index of the entity range on the ancestor side
- */
- public int ancestorEnd() {
- return lAncestorStart + lAncestorLength;
- }
-
- /**
- * Returns the start index of the entity range on the right side.
- *
- * @return the start index of the entity range on the right side
- */
- public int rightStart() {
- return fRightStart;
- }
-
- /**
- * Returns the number of entities on the right side.
- *
- * @return the number of entities on the right side
- */
- public int rightLength() {
- return fRightLength;
- }
-
- /**
- * Returns the end index of the entity range on the right side.
- *
- * @return the end index of the entity range on the right side
- */
- public int rightEnd() {
- return fRightStart + fRightLength;
- }
-
- /**
- * Returns the start index of the entity range on the left side.
- *
- * @return the start index of the entity range on the left side
- */
- public int leftStart() {
- return fLeftStart;
- }
-
- /**
- * Returns the number of entities on the left side.
- *
- * @return the number of entities on the left side
- */
- public int leftLength() {
- return fLeftLength;
- }
-
- /**
- * Returns the end index of the entity range on the left side.
- *
- * @return the end index of the entity range on the left side
- */
- public int leftEnd() {
- return fLeftStart + fLeftLength;
- }
-
- /**
- * Returns the maximum number of entities in the left, right, and ancestor sides of this range.
- *
- * @return the maximum number of entities in the left, right, and ancestor sides of this range
- */
- public int maxLength() {
- return Math.max(fRightLength, Math.max(fLeftLength, lAncestorLength));
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/RangeDifferencer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/RangeDifferencer.java
deleted file mode 100644
index 43b880853..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/RangeDifferencer.java
+++ /dev/null
@@ -1,532 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.rangedifferencer;
-
-import java.util.*;
-
-import org.eclipse.jface.util.Assert;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * A <code>RangeDifferencer</code> finds the differences between two or three <code>IRangeComparator</code>s.
- * <p>
- * To use the differencer, clients provide an <code>IRangeComparator</code>
- * that breaks their input data into a sequence of comparable entities. The differencer
- * returns the differences among these sequences as an array of <code>RangeDifference</code> objects
- * (<code>findDifferences</code> methods).
- * Every <code>RangeDifference</code> represents a single kind of difference
- * and the corresponding ranges of the underlying comparable entities in the
- * left, right, and optionally ancestor sides.
- * <p>
- * Alternatively, the <code>findRanges</code> methods not only return objects for
- * the differing ranges but for non-differing ranges too.
- * <p>
- * The algorithm used is an objectified version of one described in:
- * <it>A File Comparison Program,</it> by Webb Miller and Eugene W. Myers,
- * Software Practice and Experience, Vol. 15, Nov. 1985.
- *
- * @see IRangeComparator
- * @see RangeDifference
- */
-public final class RangeDifferencer {
-
- private static final RangeDifference[] EMPTY_RESULT= new RangeDifference[0];
-
- /* (non Javadoc)
- * Non instantiatiable!
- */
- private RangeDifferencer() {
- }
-
- /**
- * Finds the differences between two <code>IRangeComparator</code>s.
- * The differences are returned as an array of <code>RangeDifference</code>s.
- * If no differences are detected an empty array is returned.
- *
- * @param left the left range comparator
- * @param right the right range comparator
- * @return an array of range differences, or an empty array if no differences were found
- */
- public static RangeDifference[] findDifferences(IRangeComparator left, IRangeComparator right) {
- return findDifferences((IProgressMonitor)null, left, right);
- }
-
- /**
- * Finds the differences between two <code>IRangeComparator</code>s.
- * The differences are returned as an array of <code>RangeDifference</code>s.
- * If no differences are detected an empty array is returned.
- *
- * @param pm if not <code>null</code> used to report progress
- * @param left the left range comparator
- * @param right the right range comparator
- * @return an array of range differences, or an empty array if no differences were found
- */
- public static RangeDifference[] findDifferences(IProgressMonitor pm, IRangeComparator left, IRangeComparator right) {
-
- // assert that both IRangeComparators are of the same class
- Assert.isTrue(right.getClass().equals(left.getClass()));
-
- int rightSize= right.getRangeCount();
- int leftSize= left.getRangeCount();
- //
- // Differences matrix:
- // only the last d of each diagonal is stored, i.e., lastDiagonal[k] = row of d
- //
- int diagLen= 2 * Math.max(rightSize, leftSize); // bound on the size of edit script
- int maxDiagonal= diagLen;
- int lastDiagonal[]= new int[diagLen + 1]; // the row containing the last d
- // on diagonal k (lastDiagonal[k] = row)
- int origin= diagLen / 2; // origin of diagonal 0
-
- // script corresponding to d[k]
- LinkedRangeDifference script[]= new LinkedRangeDifference[diagLen + 1];
- int row, col;
-
- // find common prefix
- for (row= 0; row < rightSize && row < leftSize && rangesEqual(right, row, left, row) == true; ++row)
- ;
-
- lastDiagonal[origin]= row;
- script[origin]= null;
- int lower= (row == rightSize) ? origin + 1 : origin - 1;
- int upper= (row == leftSize) ? origin - 1 : origin + 1;
-
- if (lower > upper)
- return EMPTY_RESULT;
-
- //System.out.println("findDifferences: " + maxDiagonal + " " + lower + " " + upper);
-
- // for each value of the edit distance
- for (int d= 1; d <= maxDiagonal; ++d) { // d is the current edit distance
-
- if (pm != null)
- pm.worked(1);
-
- if (right.skipRangeComparison(d, maxDiagonal, left))
- return EMPTY_RESULT; // should be something we already found
-
- // for each relevant diagonal (-d, -d+2 ..., d-2, d)
- for (int k= lower; k <= upper; k += 2) { // k is the current diagonal
- LinkedRangeDifference edit;
-
- if (pm != null && pm.isCanceled())
- return EMPTY_RESULT;
-
- if (k == origin - d || k != origin + d && lastDiagonal[k + 1] >= lastDiagonal[k - 1]) {
- //
- // move down
- //
- row= lastDiagonal[k + 1] + 1;
- edit= new LinkedRangeDifference(script[k + 1], LinkedRangeDifference.DELETE);
- } else {
- //
- // move right
- //
- row= lastDiagonal[k - 1];
- edit= new LinkedRangeDifference(script[k - 1], LinkedRangeDifference.INSERT);
- }
- col= row + k - origin;
- edit.fRightStart= row;
- edit.fLeftStart= col;
- Assert.isTrue(k >= 0 && k <= maxDiagonal);
- script[k]= edit;
-
- // slide down the diagonal as far as possible
- while (row < rightSize && col < leftSize && rangesEqual(right, row, left, col) == true) {
- ++row;
- ++col;
- }
-
- Assert.isTrue(k >= 0 && k <= maxDiagonal); // Unreasonable value for diagonal index
- lastDiagonal[k]= row;
-
- if (row == rightSize && col == leftSize) {
- //showScript(script[k], right, left);
- return createDifferencesRanges(script[k]);
- }
- if (row == rightSize)
- lower= k + 2;
- if (col == leftSize)
- upper= k - 2;
- }
- --lower;
- ++upper;
- }
- // too many differences
- Assert.isTrue(false);
- return null;
- }
-
- /**
- * Finds the differences among three <code>IRangeComparator</code>s.
- * The differences are returned as a list of <code>RangeDifference</code>s.
- * If no differences are detected an empty list is returned.
- * If the ancestor range comparator is <code>null</code>, a two-way
- * comparison is performed.
- *
- * @param ancestor the ancestor range comparator or <code>null</code>
- * @param left the left range comparator
- * @param right the right range comparator
- * @return an array of range differences, or an empty array if no differences were found
- */
- public static RangeDifference[] findDifferences(IRangeComparator ancestor, IRangeComparator left, IRangeComparator right) {
- return findDifferences(null, ancestor, left, right);
- }
-
- /**
- * Finds the differences among three <code>IRangeComparator</code>s.
- * The differences are returned as a list of <code>RangeDifference</code>s.
- * If no differences are detected an empty list is returned.
- * If the ancestor range comparator is <code>null</code>, a two-way
- * comparison is performed.
- *
- * @param pm if not <code>null</code> used to report progress
- * @param ancestor the ancestor range comparator or <code>null</code>
- * @param left the left range comparator
- * @param right the right range comparator
- * @return an array of range differences, or an empty array if no differences were found
- */
- public static RangeDifference[] findDifferences(IProgressMonitor pm, IRangeComparator ancestor, IRangeComparator left, IRangeComparator right) {
-
- if (ancestor == null)
- return findDifferences(pm, left, right);
-
- RangeDifference[] leftAncestorScript= null;
- RangeDifference[] rightAncestorScript= findDifferences(pm, ancestor, right);
- if (rightAncestorScript != null)
- leftAncestorScript= findDifferences(pm, ancestor, left);
- if (rightAncestorScript == null || leftAncestorScript == null)
- return null;
-
- DifferencesIterator myIter= new DifferencesIterator(rightAncestorScript);
- DifferencesIterator yourIter= new DifferencesIterator(leftAncestorScript);
-
- List diff3= new ArrayList();
- diff3.add(new RangeDifference(RangeDifference.ERROR)); // add a sentinel
-
- int changeRangeStart= 0;
- int changeRangeEnd= 0;
- //
- // Combine the two two-way edit scripts into one
- //
- while (myIter.fDifference != null || yourIter.fDifference != null) {
-
- DifferencesIterator startThread;
- myIter.removeAll();
- yourIter.removeAll();
- //
- // take the next diff that is closer to the start
- //
- if (myIter.fDifference == null)
- startThread= yourIter;
- else if (yourIter.fDifference == null)
- startThread= myIter;
- else { // not at end of both scripts take the lowest range
- if (myIter.fDifference.fLeftStart <= yourIter.fDifference.fLeftStart) // 2 -> common (Ancestor) change range
- startThread= myIter;
- else
- startThread= yourIter;
- }
- changeRangeStart= startThread.fDifference.fLeftStart;
- changeRangeEnd= startThread.fDifference.leftEnd();
-
- startThread.next();
- //
- // check for overlapping changes with other thread
- // merge overlapping changes with this range
- //
- DifferencesIterator other= startThread.other(myIter, yourIter);
- while (other.fDifference != null && other.fDifference.fLeftStart <= changeRangeEnd) {
- int newMax= other.fDifference.leftEnd();
- other.next();
- if (newMax >= changeRangeEnd) {
- changeRangeEnd= newMax;
- other= other.other(myIter, yourIter);
- }
- }
- diff3.add(createRangeDifference3(myIter, yourIter, diff3, right, left, changeRangeStart, changeRangeEnd));
- }
-
- // remove sentinel
- diff3.remove(0);
- return (RangeDifference[]) diff3.toArray(EMPTY_RESULT);
- }
-
- /**
- * Finds the differences among two <code>IRangeComparator</code>s.
- * In contrast to <code>findDifferences</code>, the result
- * contains <code>RangeDifference</code> elements for non-differing ranges too.
- *
- * @param left the left range comparator
- * @param right the right range comparator
- * @return an array of range differences
- */
- public static RangeDifference[] findRanges(IRangeComparator left, IRangeComparator right) {
- return findRanges((IProgressMonitor)null, left, right);
- }
-
- /**
- * Finds the differences among two <code>IRangeComparator</code>s.
- * In contrast to <code>findDifferences</code>, the result
- * contains <code>RangeDifference</code> elements for non-differing ranges too.
- *
- * @param pm if not <code>null</code> used to report progress
- * @param left the left range comparator
- * @param right the right range comparator
- * @return an array of range differences
- */
- public static RangeDifference[] findRanges(IProgressMonitor pm, IRangeComparator left, IRangeComparator right) {
- RangeDifference[] in= findDifferences(pm, left, right);
- List out= new ArrayList();
-
- RangeDifference rd;
-
- int mstart= 0;
- int ystart= 0;
-
- for (int i= 0; i < in.length; i++) {
- RangeDifference es= in[i];
-
- rd= new RangeDifference(RangeDifference.NOCHANGE, mstart, es.rightStart() - mstart, ystart, es.leftStart() - ystart);
- if (rd.maxLength() != 0)
- out.add(rd);
-
- out.add(es);
-
- mstart= es.rightEnd();
- ystart= es.leftEnd();
- }
- rd= new RangeDifference(RangeDifference.NOCHANGE, mstart, right.getRangeCount() - mstart, ystart, left.getRangeCount() - ystart);
- if (rd.maxLength() > 0)
- out.add(rd);
-
- return (RangeDifference[]) out.toArray(EMPTY_RESULT);
- }
-
- /**
- * Finds the differences among three <code>IRangeComparator</code>s.
- * In contrast to <code>findDifferences</code>, the result
- * contains <code>RangeDifference</code> elements for non-differing ranges too.
- * If the ancestor range comparator is <code>null</code>, a two-way
- * comparison is performed.
- *
- * @param pm if not <code>null</code> used to report progress
- * @param ancestor the ancestor range comparator or <code>null</code>
- * @param left the left range comparator
- * @param right the right range comparator
- * @return an array of range differences
- */
- public static RangeDifference[] findRanges(IRangeComparator ancestor, IRangeComparator left, IRangeComparator right) {
- return findRanges(null, ancestor, left, right);
- }
-
- /**
- * Finds the differences among three <code>IRangeComparator</code>s.
- * In contrast to <code>findDifferences</code>, the result
- * contains <code>RangeDifference</code> elements for non-differing ranges too.
- * If the ancestor range comparator is <code>null</code>, a two-way
- * comparison is performed.
- *
- * @param pm if not <code>null</code> used to report progress
- * @param ancestor the ancestor range comparator or <code>null</code>
- * @param left the left range comparator
- * @param right the right range comparator
- * @return an array of range differences
- */
- public static RangeDifference[] findRanges(IProgressMonitor pm, IRangeComparator ancestor, IRangeComparator left, IRangeComparator right) {
-
- if (ancestor == null)
- return findRanges(pm, left, right);
-
- RangeDifference[] in= findDifferences(pm, ancestor, left, right);
- List out= new ArrayList();
-
- RangeDifference rd;
-
- int mstart= 0;
- int ystart= 0;
- int astart= 0;
-
- for (int i= 0; i < in.length; i++) {
- RangeDifference es= (RangeDifference) in[i];
-
- rd= new RangeDifference(RangeDifference.NOCHANGE, mstart, es.rightStart() - mstart, ystart, es.leftStart() - ystart, astart, es.ancestorStart() - astart);
- if (rd.maxLength() > 0)
- out.add(rd);
-
- out.add(es);
-
- mstart= es.rightEnd();
- ystart= es.leftEnd();
- astart= es.ancestorEnd();
- }
- rd= new RangeDifference(RangeDifference.NOCHANGE, mstart, right.getRangeCount() - mstart, ystart, left.getRangeCount() - ystart, astart, ancestor.getRangeCount() - astart);
- if (rd.maxLength() > 0)
- out.add(rd);
-
- return (RangeDifference[]) out.toArray(EMPTY_RESULT);
- }
-
- //---- private methods
-
- /**
- * Creates a Vector of DifferencesRanges out of the LinkedRangeDifference.
- * It coalesces adjacent changes.
- * In addition, indices are changed such that the ranges are 1) open, i.e,
- * the end of the range is not included, and 2) are zero based.
- */
- private static RangeDifference[] createDifferencesRanges(LinkedRangeDifference start) {
-
- LinkedRangeDifference ep= reverseDifferences(start);
- ArrayList result= new ArrayList();
- RangeDifference es= null;
-
- while (ep != null) {
- es= new RangeDifference(RangeDifference.CHANGE);
-
- if (ep.isInsert()) {
- es.fRightStart= ep.fRightStart + 1;
- es.fLeftStart= ep.fLeftStart;
- RangeDifference b= ep;
- do {
- ep= ep.getNext();
- es.fLeftLength++;
- } while (ep != null && ep.isInsert() && ep.fRightStart == b.fRightStart);
- } else {
- es.fRightStart= ep.fRightStart;
- es.fLeftStart= ep.fLeftStart;
-
- RangeDifference a= ep;
- //
- // deleted lines
- //
- do {
- a= ep;
- ep= ep.getNext();
- es.fRightLength++;
- } while (ep != null && ep.isDelete() && ep.fRightStart == a.fRightStart + 1);
-
- boolean change= (ep != null && ep.isInsert() && ep.fRightStart == a.fRightStart);
-
- if (change) {
- RangeDifference b= ep;
- //
- // replacement lines
- //
- do {
- ep= ep.getNext();
- es.fLeftLength++;
- } while (ep != null && ep.isInsert() && ep.fRightStart == b.fRightStart);
- } else {
- es.fLeftLength= 0;
- }
- es.fLeftStart++; // meaning of range changes from "insert after", to "replace with"
-
- }
- //
- // the script commands are 1 based, subtract one to make them zero based
- //
- es.fRightStart--;
- es.fLeftStart--;
- result.add(es);
- }
- return (RangeDifference[]) result.toArray(EMPTY_RESULT);
- }
-
- /**
- * Creates a <code>RangeDifference3</code> given the
- * state of two DifferenceIterators.
- */
- private static RangeDifference createRangeDifference3(
- DifferencesIterator myIter,
- DifferencesIterator yourIter,
- List diff3,
- IRangeComparator right,
- IRangeComparator left,
- int changeRangeStart,
- int changeRangeEnd) {
-
- int rightStart, rightEnd;
- int leftStart, leftEnd;
- int kind= RangeDifference.ERROR;
- RangeDifference last= (RangeDifference) diff3.get(diff3.size() - 1);
-
- Assert.isTrue((myIter.getCount() != 0 || yourIter.getCount() != 0)); // At least one range array must be non-empty
- //
- // find corresponding lines to fChangeRangeStart/End in right and left
- //
- if (myIter.getCount() == 0) { // only left changed
- rightStart= changeRangeStart - last.ancestorEnd() + last.rightEnd();
- rightEnd= changeRangeEnd - last.ancestorEnd() + last.rightEnd();
- kind= RangeDifference.LEFT;
- } else {
- RangeDifference f= (RangeDifference) myIter.fRange.get(0);
- RangeDifference l= (RangeDifference) myIter.fRange.get(myIter.fRange.size() - 1);
- rightStart= changeRangeStart - f.fLeftStart + f.fRightStart;
- rightEnd= changeRangeEnd - l.leftEnd() + l.rightEnd();
- }
-
- if (yourIter.getCount() == 0) { // only right changed
- leftStart= changeRangeStart - last.ancestorEnd() + last.leftEnd();
- leftEnd= changeRangeEnd - last.ancestorEnd() + last.leftEnd();
- kind= RangeDifference.RIGHT;
- } else {
- RangeDifference f= (RangeDifference) yourIter.fRange.get(0);
- RangeDifference l= (RangeDifference) yourIter.fRange.get(yourIter.fRange.size() - 1);
- leftStart= changeRangeStart - f.fLeftStart + f.fRightStart;
- leftEnd= changeRangeEnd - l.leftEnd() + l.rightEnd();
- }
-
- if (kind == RangeDifference.ERROR) { // overlapping change (conflict) -> compare the changed ranges
- if (rangeSpansEqual(right, rightStart, rightEnd - rightStart, left, leftStart, leftEnd - leftStart))
- kind= RangeDifference.ANCESTOR;
- else
- kind= RangeDifference.CONFLICT;
- }
- return new RangeDifference(kind, rightStart, rightEnd - rightStart, leftStart, leftEnd - leftStart, changeRangeStart, changeRangeEnd - changeRangeStart);
- }
-
- /**
- * Tests if two ranges are equal
- */
- private static boolean rangesEqual(IRangeComparator a, int ai, IRangeComparator b, int bi) {
- return a.rangesEqual(ai, b, bi);
- }
-
- /**
- * Tests whether <code>right</code> and <code>left</left> changed in the same way
- */
- private static boolean rangeSpansEqual(IRangeComparator right, int rightStart, int rightLen, IRangeComparator left, int leftStart, int leftLen) {
- if (rightLen == leftLen) {
- int i= 0;
- for (i= 0; i < rightLen; i++) {
- if (!rangesEqual(right, rightStart + i, left, leftStart + i))
- break;
- }
- if (i == rightLen)
- return true;
- }
- return false;
- }
-
- /**
- * Reverses the range differences
- */
- private static LinkedRangeDifference reverseDifferences(LinkedRangeDifference start) {
- LinkedRangeDifference ep, behind, ahead;
-
- ahead= start;
- ep= null;
- while (ahead != null) {
- behind= ep;
- ep= ahead;
- ahead= ahead.getNext();
- ep.setNext(behind);
- }
- return ep;
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/package.html b/bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/package.html
deleted file mode 100644
index 2e4ffaf2b..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/package.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides support for finding the differences between
-two or three sequences of comparable entities.
-<h2>
-Package Specification</h2>
-The class <tt>Differencer</tt> finds longest sequences of matching and
-non-matching comparable entities.
-<p>Clients must supply the input to the differencer as an implementation
-of the <tt>IRangeComparator</tt> interface.
-<br>An <tt>IRangeComparator</tt> breaks the input data into a sequence
-of entities and provides a method for comparing
-<br>one entity with the entity in another <tt>IRangeComparator</tt>.
-<br>For example, to compare two text documents and find longest common
-sequences
-<br>of matching and non-matching lines, the implementation of <tt>IRangeComparator
-</tt>must break the document
-<br>into lines and provide a method for testing whether two lines are considered
-equal.
-<p>The differencer returns the differences among these sequences as an
-array of <tt>RangeDifference</tt> objects.
-<br>Every single <tt>RangeDifference</tt> describes kind of difference
-(no change, change, addition, deletion)
-<br>and the corresponding ranges of the underlying comparable entities
-in the two or three inputs.
-<p>The algorithm used is an objectified version of one described in:
-<br><i>A File Comparison Program,</i> by Webb Miller and Eugene W. Myers,
-<br>Software Practice and Experience, Vol. 15, Nov. 1985.
-</body>
-</html>
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffContainer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffContainer.java
deleted file mode 100644
index f101c35ba..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffContainer.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.structuremergeviewer;
-
-import java.util.Iterator;
-import java.util.ArrayList;
-import org.eclipse.swt.graphics.Image;
-
-
-/**
- * The standard implementation of a diff container element.
- * <p>
- * This class may be instantiated, or further subclassed.
- * </p>
- */
-public abstract class DiffContainer extends DiffElement implements IDiffContainer {
-
- private static IDiffElement[] fgEmptyArray= new IDiffElement[0];
- private ArrayList fChildren;
-
- /**
- * Creates a new container with the specified kind under the given parent.
- *
- * @param parent under which the new container is added as a child or <code>null</code>.
- * @param name of the container
- * @param kind of difference (defined in <code>Differencer</code>).
- */
- public DiffContainer(IDiffContainer parent, int kind) {
- super(parent, kind);
- }
-
- /**
- * Tries to find the child with the given name.
- * Returns <code>null</code> if no such child exists.
- *
- * @param name of the child to find
- * @return the first element with a matching name
- */
- public IDiffElement findChild(String name) {
- Object[] children= getChildren();
- for (int i= 0; i < children.length; i++) {
- IDiffElement child= (IDiffElement) children[i];
- if (name.equals(child.getName()))
- return child;
- }
- return null;
- }
-
- /* (non Javadoc)
- * see IDiffContainer.add
- */
- public void add(IDiffElement diff) {
- if (fChildren == null)
- fChildren= new ArrayList();
- fChildren.add(diff);
- diff.setParent(this);
- }
-
- /**
- * Removes the given child from this container.
- * If the container becomes empty it is removed from its container.
- */
- /* (non Javadoc)
- * see IDiffContainer.removeToRoot
- */
- public void removeToRoot(IDiffElement child) {
- if (fChildren != null) {
- fChildren.remove(child);
- child.setParent(null);
- if (fChildren.size() == 0) {
- IDiffContainer p= getParent();
- if (p != null)
- p.removeToRoot(this);
- }
- }
- }
-
- /**
- * Removes the given child (non-recursively) from this container.
- *
- * @param child to remove
- */
- public void remove(IDiffElement child) {
- if (fChildren != null) {
- fChildren.remove(child);
- child.setParent(null);
- }
- }
-
- /* (non Javadoc)
- * see IDiffContainer.hasChildren
- */
- public boolean hasChildren() {
- return fChildren != null && fChildren.size() > 0;
- }
-
- /* (non Javadoc)
- * see IDiffContainer.getChildren
- */
- public IDiffElement[] getChildren() {
- if (fChildren != null)
- return (IDiffElement[]) fChildren.toArray(fgEmptyArray);
- return fgEmptyArray;
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffElement.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffElement.java
deleted file mode 100644
index 7174a95a3..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffElement.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.structuremergeviewer;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.jface.util.Assert;
-
-/**
- * An abstract base implementation of the <code>IDiffElement</code> interface.
- * <p>
- * Subclasses may add behavior and state, and may override <code>getImage</code>
- * and <code>getType</code> to suit.
- * </p>
- */
-public abstract class DiffElement implements IDiffElement {
-
- private int fKind;
- private IDiffContainer fParent;
-
- /**
- * Creates a new <code>DiffElement</code> as a child of the given parent.
- * If parent is not <code>null</code> the new element is added to the parent.
- *
- * @param parent the parent of this child; if not <code>null</code> this element is automatically added as a child
- * @param kind the kind of change
- */
- public DiffElement(IDiffContainer parent, int kind) {
- fParent= parent;
- fKind= kind;
- if (parent != null)
- parent.add(this);
- }
-
- /**
- * The <code>DiffElement</code> implementation of this <code>ITypedInput</code>
- * method returns <code>null</code>. Subclasses may re-implement to provide
- * an image for this element.
- */
- public Image getImage() {
- return null;
- }
-
- /**
- * The <code>DiffElement</code> implementation of this <code>ITypedElement</code>
- * method returns <code>ITypedElement.UNKNOWN_TYPE</code>. Subclasses may
- * re-implement to provide a type for this element.
- */
- public String getType() {
- return ITypedElement.UNKNOWN_TYPE;
- }
-
- /**
- * Sets the kind of difference for this element.
- *
- * @param kind set the kind of difference this element represents
- * @see Differencer
- */
- public void setKind(int kind) {
- fKind= kind;
- }
-
- /* (non Javadoc)
- * see IDiffElement.getKind
- */
- public int getKind() {
- return fKind;
- }
-
- /* (non Javadoc)
- * see IDiffElement.getParent
- */
- public IDiffContainer getParent() {
- return fParent;
- }
-
- /* (non Javadoc)
- * see IDiffElement.setParent
- */
- public void setParent(IDiffContainer parent) {
- fParent= parent;
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffNode.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffNode.java
deleted file mode 100644
index a2960a2a7..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffNode.java
+++ /dev/null
@@ -1,351 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.structuremergeviewer;
-
-import java.text.MessageFormat;
-
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.jface.util.ListenerList;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.internal.Utilities;
-
-/**
- * Diff node are used as the compare result of the differencing engine.
- * 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>
- * <code>DiffNode</code>s are typically created as the result of performing
- * a compare with the <code>Differencer</code>.
- * <p>
- * Clients typically use this class as is, but may subclass if required.
- *
- * @see DiffTreeViewer
- * @see Differencer
- */
-public class DiffNode extends DiffContainer implements ITypedElement, ICompareInput {
-
- private ITypedElement fAncestor;
- private ITypedElement fLeft;
- private ITypedElement fRight;
- private boolean fDontExpand;
- private ListenerList fListener;
- private boolean fSwapSides;
-
-
- /**
- * Creates a new <code>DiffNode</code> and initializes with the given values.
- *
- * @param parent under which the new container is added as a child or <code>null</code>
- * @param kind of difference (defined in <code>Differencer</code>)
- * @param ancestor the common ancestor input to a compare
- * @param left the left input to a compare
- * @param right the right input to a compare
- */
- public DiffNode(IDiffContainer parent, int kind, ITypedElement ancestor, ITypedElement left, ITypedElement right) {
- this(parent, kind);
- fAncestor= ancestor;
- fLeft= left;
- fRight= right;
- }
-
- /**
- * Creates a new <code>DiffNode</code> with diff kind <code>Differencer.CHANGE</code>
- * and initializes with the given values.
- *
- * @param left the left input to a compare
- * @param right the right input to a compare
- */
- public DiffNode(ITypedElement left, ITypedElement right) {
- this(null, Differencer.CHANGE, null, left, right);
- }
-
- /**
- * Creates a new <code>DiffNode</code> and initializes with the given values.
- *
- * @param kind of difference (defined in <code>Differencer</code>)
- * @param ancestor the common ancestor input to a compare
- * @param left the left input to a compare
- * @param right the right input to a compare
- */
- public DiffNode(int kind, ITypedElement ancestor, ITypedElement left, ITypedElement right) {
- this(null, kind, ancestor, left, right);
- }
-
- /**
- * Creates a new <code>DiffNode</code> with the given diff kind.
- *
- * @param kind of difference (defined in <code>Differencer</code>)
- */
- public DiffNode(int kind) {
- super(null, kind);
- }
-
- /**
- * Creates a new <code>DiffNode</code> and initializes with the given values.
- *
- * @param parent under which the new container is added as a child or <code>null</code>
- * @param kind of difference (defined in <code>Differencer</code>)
- */
- public DiffNode(IDiffContainer parent, int kind) {
- super(parent, kind);
- }
-
- /**
- * Registers a listener for changes of this <code>ICompareInput</code>.
- * Has no effect if an identical listener is already registered.
- *
- * @param listener the listener to add
- */
- public void addCompareInputChangeListener(ICompareInputChangeListener listener) {
- if (fListener == null)
- fListener= new ListenerList();
- fListener.add(listener);
- }
-
- /**
- * Unregisters a <code>ICompareInput</code> listener.
- * Has no effect if listener is not registered.
- *
- * @param listener the listener to remove
- */
- public void removeCompareInputChangeListener(ICompareInputChangeListener listener) {
- if (fListener != null) {
- fListener.remove(listener);
- if (fListener.isEmpty())
- fListener= null;
- }
- }
-
- /**
- * Sends out notification that a change has occured on the <code>ICompareInput</code>.
- */
- protected void fireChange() {
- if (fListener != null) {
- Object[] listeners= fListener.getListeners();
- for (int i= 0; i < listeners.length; i++)
- ((ICompareInputChangeListener) listeners[i]).compareInputChanged(this);
- }
- }
-
- //---- getters & setters
-
- /**
- * Returns <code>true</code> if this node shouldn't automatically be expanded in
- * a </code>DiffTreeViewer</code>.
- *
- * @return <code>true</code> if node shouldn't automatically be expanded
- */
- public boolean dontExpand() {
- return fDontExpand;
- }
-
- /**
- * Controls whether this node is not automatically expanded when displayed in
- * a </code>DiffTreeViewer</code>.
- *
- * @param dontExpand if <code>true</code> this node is not automatically expanded in </code>DiffTreeViewer</code>
- */
- public void setDontExpand(boolean dontExpand) {
- fDontExpand= dontExpand;
- }
-
- /**
- * Returns the first not-<code>null</code> input of this node.
- * Method checks the three inputs in the order: ancestor, right, left.
- *
- * @return the first not-<code>null</code> input of this node
- */
- public ITypedElement getId() {
- if (fAncestor != null)
- return fAncestor;
- if (fRight != null)
- return fRight;
- return fLeft;
- }
-
- /**
- * Returns the (non-<code>null</code>) name of the left or right side if they are identical.
- * Otherwise both names are concatenated (separated with a slash ('/')).
- * <p>
- * Subclasses may re-implement to provide a different name for this node.
- */
- /* (non Javadoc)
- * see ITypedElement.getName
- */
- public String getName() {
- String right= null;
- if (fRight != null)
- right= fRight.getName();
-
- String left= null;
- if (fLeft != null)
- left= fLeft.getName();
-
- if (right == null && left == null) {
- if (fAncestor != null)
- return fAncestor.getName();
- return Utilities.getString("DiffNode.noName"); //$NON-NLS-1$
- }
-
- if (right == null)
- return left;
- if (left == null)
- return right;
-
- if (right.equals(left))
- return right;
-
- String s1;
- String s2;
-
- if (fSwapSides) {
- s1= left;
- s2= right;
- } else {
- s1= right;
- s2= left;
- }
-
- String fmt= Utilities.getString("DiffNode.nameFormat"); //$NON-NLS-1$
- return MessageFormat.format(fmt, new String[] { s1, s2 });
- }
-
- void swapSides(boolean swap) {
- fSwapSides= swap;
- }
-
- /* (non Javadoc)
- * see ITypedElement.getImage
- */
- public Image getImage() {
- ITypedElement id= getId();
- if (id != null)
- return id.getImage();
- return null;
- }
-
- /* (non Javadoc)
- * see ITypedElement.getType
- */
- public String getType() {
- ITypedElement id= getId();
- if (id != null)
- return id.getType();
- return ITypedElement.UNKNOWN_TYPE;
- }
-
- /* (non Javadoc)
- * see ICompareInput.getAncestor
- */
- public ITypedElement getAncestor() {
- return fAncestor;
- }
-
- /**
- * Sets the left input to the given value.
- *
- * @param left the new value for the left input
- */
- public void setLeft(ITypedElement left) {
- fLeft= left;
- }
-
- /* (non Javadoc)
- * see ICompareInput.getLeft
- */
- public ITypedElement getLeft() {
- return fLeft;
- }
-
- /**
- * Sets the right input to the given value.
- *
- * @param right the new value for the right input
- */
- public void setRight(ITypedElement right) {
- fRight= right;
- }
-
- /* (non Javadoc)
- * see ICompareInput.getRight
- */
- public ITypedElement getRight() {
- return fRight;
- }
-
- /* (non Javadoc)
- * see ICompareInput.copy
- */
- public void copy(boolean leftToRight) {
- //System.out.println("DiffNode.copy: " + leftToRight);
-
- IDiffContainer pa= getParent();
- if (pa instanceof ICompareInput) {
- ICompareInput parent= (ICompareInput) pa;
- Object dstParent= leftToRight ? parent.getRight() : parent.getLeft();
-
- if (dstParent instanceof IEditableContent) {
- ITypedElement dst= leftToRight ? getRight() : getLeft();
- ITypedElement src= leftToRight ? getLeft() : getRight();
- dst= ((IEditableContent)dstParent).replace(dst, src);
- if (leftToRight)
- setRight(dst);
- else
- setLeft(dst);
-
- //setKind(Differencer.NO_CHANGE);
-
- fireChange();
- }
- }
- }
-
- /* (non Javadoc)
- * see Object.hashCode
- */
- public int hashCode() {
- String[] path= getPath(this, 0);
- int hashCode= 1;
- for (int i= 0; i < path.length; i++) {
- String s= path[i];
- hashCode= (31*hashCode) + (s != null ? s.hashCode() : 0);
- }
- return hashCode;
- }
-
- /* (non Javadoc)
- * see Object.equals
- */
- public boolean equals(Object other) {
- if (other != null && getClass() == other.getClass()) {
- String[] path1= getPath(this, 0);
- String[] path2= getPath((DiffNode) other, 0);
- if (path1.length != path2.length)
- return false;
- for (int i= 0; i < path1.length; i++)
- if (! path1[i].equals(path2[i]))
- return false;
- return true;
- }
- return super.equals(other);
- }
-
- private static String[] getPath(ITypedElement el, int level) {
- String[] path= null;
- if (el instanceof IDiffContainer) {
- IDiffContainer parent= ((IDiffContainer)el).getParent();
- if (parent instanceof ITypedElement)
- path= getPath((ITypedElement)parent, level+1);
- }
- if (path == null)
- path= new String[level+1];
- path[(path.length-1)-level]= el.getName();
- return path;
- }
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java
deleted file mode 100644
index 918f5eff6..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java
+++ /dev/null
@@ -1,708 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.structuremergeviewer;
-
-import java.util.Iterator;
-import java.util.ResourceBundle;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.jface.util.*;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.preference.IPreferenceStore;
-
-import org.eclipse.compare.internal.*;
-import org.eclipse.compare.*;
-
-/**
- * A tree viewer that works on objects implementing
- * the <code>IDiffContainer</code> and <code>IDiffElement</code> interfaces.
- * <p>
- * This class may be instantiated; it is not intended to be subclassed outside
- * this package.
- * </p>
- *
- * @see IDiffContainer
- * @see IDiffElement
- */
-public class DiffTreeViewer extends TreeViewer {
-
- static class DiffViewerSorter extends ViewerSorter {
-
- public boolean isSorterProperty(Object element, Object property) {
- return false;
- }
-
- public int category(Object node) {
- if (node instanceof DiffNode) {
- Object o= ((DiffNode) node).getId();
- if (o instanceof DocumentRangeNode)
- return ((DocumentRangeNode) o).getTypeCode();
- }
- return 0;
- }
- }
-
- class DiffViewerContentProvider implements ITreeContentProvider {
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
- public boolean isDeleted(Object element) {
- return false;
- }
-
- public void dispose() {
- inputChanged(DiffTreeViewer.this, getInput(), null);
- }
-
- public Object getParent(Object element) {
- if (element instanceof IDiffElement)
- return ((IDiffElement)element).getParent();
- return null;
- }
-
- public final boolean hasChildren(Object element) {
- if (element instanceof IDiffContainer)
- return ((IDiffContainer)element).hasChildren();
- return false;
- }
-
- public final Object[] getChildren(Object element) {
- if (element instanceof IDiffContainer)
- return ((IDiffContainer)element).getChildren();
- return new Object[0];
- }
-
- public Object[] getElements(Object element) {
- return getChildren(element);
- }
- }
-
- /*
- * Takes care of swapping left and right if fLeftIsLocal
- * is true.
- */
- class DiffViewerLabelProvider extends LabelProvider {
-
- public String getText(Object element) {
-
- if (element instanceof IDiffElement)
- return ((IDiffElement)element).getName();
-
- return Utilities.getString(fBundle, "defaultLabel"); //$NON-NLS-1$
- }
-
- public Image getImage(Object element) {
- if (element instanceof IDiffElement) {
- IDiffElement input= (IDiffElement) element;
-
- int kind= input.getKind();
- if (fLeftIsLocal) {
- switch (kind & Differencer.DIRECTION_MASK) {
- case Differencer.LEFT:
- kind= (kind &~ Differencer.LEFT) | Differencer.RIGHT;
- break;
- case Differencer.RIGHT:
- kind= (kind &~ Differencer.RIGHT) | Differencer.LEFT;
- break;
- }
- }
-
- return fCompareConfiguration.getImage(input.getImage(), kind);
- }
- return null;
- }
- }
-
- static class FilterSame extends ViewerFilter {
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- if (element instanceof IDiffElement)
- return (((IDiffElement)element).getKind() & Differencer.PSEUDO_CONFLICT) == 0;
- return true;
- }
- public boolean isFilterProperty(Object element, Object property) {
- return false;
- }
- }
-
- private ResourceBundle fBundle;
- private CompareConfiguration fCompareConfiguration;
- /* package */ boolean fLeftIsLocal;
- private ViewerFilter fViewerFilter;
- private IPropertyChangeListener fPropertyChangeListener;
- //private IPropertyChangeListener fPreferenceChangeListener;
-
- private Action fCopyLeftToRightAction;
- private Action fCopyRightToLeftAction;
- private Action fNextAction;
- private Action fPreviousAction;
- private Action fEmptyMenuAction;
- private Action fExpandAllAction;
-
- /**
- * Creates a new viewer for the given SWT tree control with the specified configuration.
- *
- * @param tree the tree control
- * @param configuration the configuration for this viewer
- */
- public DiffTreeViewer(Tree tree, CompareConfiguration configuration) {
- super(tree);
- initialize(configuration);
- }
-
- /**
- * Creates a new viewer under the given SWT parent and with the specified configuration.
- *
- * @param parent the SWT control under which to create the viewer
- * @param configuration the configuration for this viewer
- */
- public DiffTreeViewer(Composite parent, CompareConfiguration configuration) {
- super(new Tree(parent, SWT.MULTI));
- initialize(configuration);
- }
-
- private void initialize(CompareConfiguration configuration) {
-
- Control tree= getControl();
-
- INavigatable nav= new INavigatable() {
- public boolean gotoDifference(boolean next) {
- return internalNavigate(next);
- }
- };
- tree.setData(INavigatable.NAVIGATOR_PROPERTY, nav);
-
- fLeftIsLocal= Utilities.getBoolean(configuration, "LEFT_IS_LOCAL", false); //$NON-NLS-1$
-
- tree.setData(CompareUI.COMPARE_VIEWER_TITLE, getTitle());
-
- Composite parent= tree.getParent();
-
- fBundle= ResourceBundle.getBundle("org.eclipse.compare.structuremergeviewer.DiffTreeViewerResources"); //$NON-NLS-1$
-
- // register for notification with the CompareConfiguration
- fCompareConfiguration= configuration;
- if (fCompareConfiguration != null) {
- fPropertyChangeListener= new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- DiffTreeViewer.this.propertyChange(event);
- }
- };
- fCompareConfiguration.addPropertyChangeListener(fPropertyChangeListener);
- }
-
- // register for notification with the Compare plugin's PreferenceStore
- /*
- fPreferenceChangeListener= new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(ComparePreferencePage.SHOW_PSEUDO_CONFLICTS))
- syncShowPseudoConflictFilter();
- }
- };
- IPreferenceStore ps= CompareUIPlugin.getDefault().getPreferenceStore();
- if (ps != null)
- ps.addPropertyChangeListener(fPreferenceChangeListener);
- */
-
-
- setContentProvider(new DiffViewerContentProvider());
- setLabelProvider(new DiffViewerLabelProvider());
-
- addSelectionChangedListener(
- new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent se) {
- updateActions();
- }
- }
- );
-
- // syncShowPseudoConflictFilter();
-
- setSorter(new DiffViewerSorter());
-
- ToolBarManager tbm= CompareViewerSwitchingPane.getToolBarManager(parent);
- if (tbm != null) {
- tbm.removeAll();
-
- tbm.add(new Separator("merge")); //$NON-NLS-1$
- tbm.add(new Separator("modes")); //$NON-NLS-1$
- tbm.add(new Separator("navigation")); //$NON-NLS-1$
-
- createToolItems(tbm);
- updateActions();
-
- tbm.update(true);
- }
-
- MenuManager mm= new MenuManager();
- mm.setRemoveAllWhenShown(true);
- mm.addMenuListener(
- new IMenuListener() {
- public void menuAboutToShow(IMenuManager mm) {
- fillContextMenu(mm);
- if (mm.isEmpty()) {
- if (fEmptyMenuAction == null) {
- fEmptyMenuAction=
- new Action(Utilities.getString(fBundle, "emptyMenuItem")) {}; //$NON-NLS-1$
- fEmptyMenuAction.setEnabled(false);
- }
- mm.add(fEmptyMenuAction);
- }
- }
- }
- );
- tree.setMenu(mm.createContextMenu(tree));
- }
-
- /**
- * Returns the viewer's name.
- *
- * @return the viewer's name
- */
- public String getTitle() {
- String title= Utilities.getString(fBundle, "title", null); //$NON-NLS-1$
- if (title == null)
- title= Utilities.getString("DiffTreeViewer.title"); //$NON-NLS-1$
- return title;
- }
-
- /**
- * Returns the resource bundle.
- *
- * @return the viewer's resource bundle
- */
- protected ResourceBundle getBundle() {
- return fBundle;
- }
-
- /**
- * Returns the compare configuration of this viewer.
- *
- * @return the compare configuration of this viewer
- */
- public CompareConfiguration getCompareConfiguration() {
- return fCompareConfiguration;
- }
-
- /**
- * Called on the viewer disposal.
- * Unregisters from the compare configuration.
- * Clients may extend if they have to do additional cleanup.
- */
- protected void handleDispose(DisposeEvent event) {
-
- /*
- if (fPreferenceChangeListener != null) {
- IPreferenceStore ps= CompareUIPlugin.getDefault().getPreferenceStore();
- if (ps != null)
- ps.removePropertyChangeListener(fPreferenceChangeListener);
- fPreferenceChangeListener= null;
- }
- */
-
- if (fCompareConfiguration != null) {
- if (fPropertyChangeListener != null)
- fCompareConfiguration.removePropertyChangeListener(fPropertyChangeListener);
- fCompareConfiguration= null;
- }
- fPropertyChangeListener= null;
-
- super.handleDispose(event);
- }
-
- /**
- * Tracks property changes of the configuration object.
- * Clients may extend to track their own property changes.
- */
- protected void propertyChange(PropertyChangeEvent event) {
- }
-
- protected void inputChanged(Object in, Object oldInput) {
- super.inputChanged(in, oldInput);
-
- if (in != oldInput) {
- initialSelection();
- updateActions();
- }
- }
-
- /**
- * This hook method is called from within <code>inputChanged</code>
- * after a new input has been set but before any controls are updated.
- * This default implementation calls <code>navigate(true)<code>
- * to select and expand the first leaf node.
- * Clients can override this method and are free to decide whether
- * they want to call the inherited method.
- */
- protected void initialSelection() {
- navigate(true);
- }
-
- /**
- * Overridden to avoid expanding <code>DiffNode</code>s that shouldn't expand
- * (i.e. where the <code>dontExpand</code> method returns <code>true</code>).
- */
- protected void internalExpandToLevel(Widget node, int level) {
-
- Object data= node.getData();
-
- if (dontExpand(data))
- return;
-
- super.internalExpandToLevel(node, level);
- }
-
- protected boolean dontExpand(Object o) {
- return o instanceof DiffNode && ((DiffNode)o).dontExpand();
- }
-
- //---- merge action support
-
- /**
- * This factory method is called after the viewer's controls have been created.
- * It installs four actions in the given <code>ToolBarManager</code>. Two actions
- * allow for copying one side of a <code>DiffNode</code> to the other side.
- * Two other actions are for navigating from one node to the next (previous).
- * <p>
- * Clients can override this method and are free to decide whether they want to call
- * the inherited method.
- *
- * @param toolbarManager the toolbar manager for which to add the actions
- */
- protected void createToolItems(ToolBarManager toolbarManager) {
-
-// fCopyLeftToRightAction= new Action() {
-// public void run() {
-// copySelected(true);
-// }
-// };
-// Utilities.initAction(fCopyLeftToRightAction, fBundle, "action.TakeLeft.");
-// toolbarManager.appendToGroup("merge", fCopyLeftToRightAction);
-
-// fCopyRightToLeftAction= new Action() {
-// public void run() {
-// copySelected(false);
-// }
-// };
-// Utilities.initAction(fCopyRightToLeftAction, fBundle, "action.TakeRight.");
-// toolbarManager.appendToGroup("merge", fCopyRightToLeftAction);
-
-// fNextAction= new Action() {
-// public void run() {
-// navigate(true);
-// }
-// };
-// Utilities.initAction(fNextAction, fBundle, "action.NextDiff."); //$NON-NLS-1$
-// toolbarManager.appendToGroup("navigation", fNextAction); //$NON-NLS-1$
-
-// fPreviousAction= new Action() {
-// public void run() {
-// navigate(false);
-// }
-// };
-// Utilities.initAction(fPreviousAction, fBundle, "action.PrevDiff."); //$NON-NLS-1$
-// toolbarManager.appendToGroup("navigation", fPreviousAction); //$NON-NLS-1$
- }
-
- /**
- * This method is called to add actions to the viewer's context menu.
- * It installs actions for expanding tree nodes, copying one side of a <code>DiffNode</code> to the other side.
- * Clients can override this method and are free to decide whether they want to call
- * the inherited method.
- *
- * @param manager the menu manager for which to add the actions
- */
- protected void fillContextMenu(IMenuManager manager) {
- if (fExpandAllAction == null) {
- fExpandAllAction= new Action() {
- public void run() {
- expandSelection();
- }
- };
- Utilities.initAction(fExpandAllAction, fBundle, "action.ExpandAll."); //$NON-NLS-1$
- }
- ISelection selection= getSelection();
- fExpandAllAction.setEnabled(selection != null && !selection.isEmpty());
- manager.add(fExpandAllAction);
-
- if (fCopyLeftToRightAction != null)
- manager.add(fCopyLeftToRightAction);
- if (fCopyRightToLeftAction != null)
- manager.add(fCopyRightToLeftAction);
- }
-
- /**
- * Expands to infinity all items in the selection.
- */
- protected void expandSelection() {
- ISelection selection= getSelection();
- if (selection instanceof IStructuredSelection) {
- Iterator elements= ((IStructuredSelection)selection).iterator();
- while (elements.hasNext()) {
- Object next= elements.next();
- expandToLevel(next, ALL_LEVELS);
- }
- }
- }
-
- /**
- * Copies one side of all <code>DiffNode</code>s in the current selection to the other side.
- * Called from the (internal) actions for copying the sides of a <code>DiffNode</code>.
- * Clients may override.
- *
- * @param leftToRight if <code>true</code> the left side is copied to the right side.
- * If <code>false</code> the right side is copied to the left side
- */
- protected void copySelected(boolean leftToRight) {
- ISelection selection= getSelection();
- if (selection instanceof IStructuredSelection) {
- Iterator e= ((IStructuredSelection) selection).iterator();
- while (e.hasNext()) {
- Object element= e.next();
- if (element instanceof ICompareInput)
- copyOne((ICompareInput) element, leftToRight);
- }
- }
- }
-
- /**
- * Called to copy one side of the given node to the other.
- * This default implementation delegates the call to <code>ICompareInput.copy(...)</code>.
- * Clients may override.
- *
- * @param leftToRight if <code>true</code> the left side is copied to the right side.
- * If <code>false</code> the right side is copied to the left side
- */
- protected void copyOne(ICompareInput node, boolean leftToRight) {
-
- node.copy(leftToRight);
-
- // update node's image
- update(new Object[] { node }, null);
- }
-
- /**
- * 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 override.
- *
- * @param next if <code>true</code> the next node is selected, otherwise the previous node
- */
- protected void navigate(boolean next) {
- internalNavigate(next);
- }
-
- //---- private
-
- /**
- * 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 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)
- */
- private boolean internalNavigate(boolean next) {
-
- Control c= getControl();
- if (!(c instanceof Tree))
- return false;
-
- Tree tree= (Tree) c;
- 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) {
- internalSetSelection(item);
- return false;
- }
- }
- }
-
- while (true) {
- item= findNextPrev(item, next);
- if (item == null)
- break;
- if (item.getItemCount() <= 0)
- break;
- }
-
- if (item != null) {
- internalSetSelection(item);
- return false;
- }
- return true;
- }
-
- private TreeItem findNextPrev(TreeItem item, boolean next) {
-
- if (item == null)
- return null;
-
- TreeItem children[]= null;
-
- 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) {
- 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);
- 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 void internalSetSelection(TreeItem ti) {
- if (ti != null) {
- Object data= ti.getData();
- if (data != null)
- setSelection(new StructuredSelection(data), true);
- }
- }
-
- /*
- private void syncShowPseudoConflictFilter() {
-
- IPreferenceStore ps= CompareUIPlugin.getDefault().getPreferenceStore();
- boolean showPseudoConflicts= ps.getBoolean(ComparePreferencePage.SHOW_PSEUDO_CONFLICTS);
-
- Control tree= getControl();
- if (!tree.isDisposed()) {
- if (showPseudoConflicts) {
- if (fViewerFilter != null) {
- removeFilter(fViewerFilter);
- }
- } else {
- if (fViewerFilter == null)
- fViewerFilter= new FilterSame();
- addFilter(fViewerFilter);
- }
- }
- }
- */
-
- private final boolean isEditable(Object element, boolean left) {
- if (element instanceof ICompareInput) {
- ICompareInput diff= (ICompareInput) element;
- Object side= left ? diff.getLeft() : diff.getRight();
- if (side == null && diff instanceof IDiffElement) {
- IDiffContainer container= ((IDiffElement)diff).getParent();
- if (container instanceof ICompareInput) {
- ICompareInput parent= (ICompareInput) container;
- side= left ? parent.getLeft() : parent.getRight();
- }
- }
- if (side instanceof IEditableContent)
- return ((IEditableContent) side).isEditable();
- }
- return false;
- }
-
- private void updateActions() {
- int leftToRight= 0;
- int rightToLeft= 0;
- ISelection selection= getSelection();
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ss= (IStructuredSelection) selection;
- Iterator e= ss.iterator();
- while (e.hasNext()) {
- Object element= e.next();
- if (element instanceof ICompareInput) {
- if (isEditable(element, false))
- leftToRight++;
- if (isEditable(element, true))
- rightToLeft++;
- if (leftToRight > 0 && rightToLeft > 0)
- break;
- }
- }
- if (fExpandAllAction != null)
- fExpandAllAction.setEnabled(selection.isEmpty());
- }
- if (fCopyLeftToRightAction != null)
- fCopyLeftToRightAction.setEnabled(leftToRight > 0);
- if (fCopyRightToLeftAction != null)
- fCopyRightToLeftAction.setEnabled(rightToLeft > 0);
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewerResources.properties b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewerResources.properties
deleted file mode 100644
index 9fc63b64b..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewerResources.properties
+++ /dev/null
@@ -1,44 +0,0 @@
-# =====================================
-# (c) Copyright IBM Corp. 2000, 2001.
-# All Rights Reserved.
-# =====================================
-
-# @(#)DiffTreeViewerResources.properties
-#
-# Resource strings for DiffTreeViewer.java
-
-title= Structure Compare
-defaultLabel= <no name>
-
-#####################################################
-# Dummy menu item for empty context menu
-#####################################################
-
-emptyMenuItem= <Empty Menu>
-
-#####################################################
-# Actions
-#####################################################
-
-action.Smart.label=Smart
-action.Smart.tooltip=Try to Guess Similar Elements
-action.Smart.image=smartmode_co.gif
-
-action.ExpandAll.label=Expand All
-action.ExpandAll.tooltip=Expand All Nodes
-
-action.NextDiff.label=Next
-action.NextDiff.tooltip=Select Next Change
-action.NextDiff.image=next_nav.gif
-
-action.PrevDiff.label=Previous
-action.PrevDiff.tooltip=Select Previous Change
-action.PrevDiff.image=prev_nav.gif
-
-action.TakeLeft.label=Copy Left to Right
-action.TakeLeft.tooltip=Copy Selected Nodes from Left to Right
-action.TakeLeft.image=copycont_r_co.gif
-
-action.TakeRight.label=Copy Right to Left
-action.TakeRight.tooltip=Copy Selected Nodes from Right to Left
-action.TakeRight.image=copycont_l_co.gif
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/Differencer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/Differencer.java
deleted file mode 100644
index e8c8ab369..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/Differencer.java
+++ /dev/null
@@ -1,515 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.structuremergeviewer;
-
-import java.io.*;
-import java.util.*;
-import java.text.MessageFormat;
-
-import org.eclipse.jface.util.Assert;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.internal.Utilities;
-
-
-/**
- * A generic two-way or three-way differencing engine.
- * <p>
- * The engine is used by calling one of the <code>findDifferences</code> methods and passing
- * in the objects to compare.
- * The engine calls the following methods on the input objects to perform the compare:
- * <UL>
- * <LI><code>getChildren</code>: for enumerating the children of an object (if any),
- * <LI><code>contentsEqual</code>: for comparing the content of leaf objects, that is, objects without children,
- * <LI><code>visit</code>: for every pair of compared object the compare result is passed in.
- * </UL>
- * Clients may use as is, or subclass to provide a custom implementation for the three hooks.
- * However the default implementation already deals with the typical case:
- * <UL>
- * <LI><code>getChildren</code>: tries to apply the <code>IStructureComparator</code>
- * interface to enumerate the children,
- * <LI><code>contentsEqual</code>: tries to apply the <code>IStreamContentAccessor</code> interface
- * to perform a byte-wise content comparison,
- * <LI><code>visit</code>: creates a <code>DiffNode</code> for any detected difference between the compared objects and
- * links it under a parent node effectively creating a tree of differences.
- * </UL>
- * The different kind of changes detected by the engine are decoded as follows:
- * In the two-way case only NO_CHANGE, ADDITION, DELETION, and CHANGE are used.
- * In the three-way case these constants are bitwise ORed with one of directional constants
- * LEFT, RIGHT, and CONFLICTING.
- */
-public class Differencer {
-
- // The kind of differences.
- /**
- * Difference constant (value 0) indicating no difference.
- */
- public static final int NO_CHANGE= 0;
- /**
- * Difference constant (value 1) indicating one side was added.
- */
- public static final int ADDITION= 1;
- /**
- * Difference constant (value 2) indicating one side was removed.
- */
- public static final int DELETION= 2;
- /**
- * Difference constant (value 3) indicating side changed.
- */
- public static final int CHANGE= 3;
-
- /**
- * Bit mask (value 3) for extracting the kind of difference.
- */
- public static final int CHANGE_TYPE_MASK= 3;
-
- // The direction of a three-way change.
- /**
- * Three-way change constant (value 4) indicating a change on left side.
- */
- public static final int LEFT= 4;
-
- /**
- * Three-way change constant (value 8) indicating a change on right side.
- */
- public static final int RIGHT= 8;
-
- /**
- * Three-way change constant (value 12) indicating a change on left and
- * right sides.
- */
- public static final int CONFLICTING= 12;
-
- /**
- * Bit mask (value 12) for extracting the direction of a three-way change.
- */
- public static final int DIRECTION_MASK= 12;
-
- /**
- * Constant (value 16) indicating a change on left and
- * right side (with respect to ancestor) but left and right are identical.
- */
- public static final int PSEUDO_CONFLICT= 16;
-
-
- static class Node {
- List fChildren;
- int fCode;
- Object fAncestor;
- Object fLeft;
- Object fRight;
-
- Node() {
- }
- Node(Node parent, Object ancestor, Object left, Object right) {
- parent.add(this);
- fAncestor= ancestor;
- fLeft= left;
- fRight= right;
- }
- void add(Node child) {
- if (fChildren == null)
- fChildren= new ArrayList();
- fChildren.add(child);
- }
- Object visit(Differencer d, Object parent, int level) {
- if (fCode == NO_CHANGE)
- return null;
- //dump(level);
- Object data= d.visit(parent, fCode, fAncestor, fLeft, fRight);
- if (fChildren != null) {
- Iterator i= fChildren.iterator();
- while (i.hasNext()) {
- Node n= (Node) i.next();
- n.visit(d, data, level+1);
- }
- }
- return data;
- }
- private void dump(int level) {
- String name= null;
- if (fAncestor instanceof ITypedElement)
- name= ((ITypedElement)fAncestor).getName();
- if (name == null && fLeft instanceof ITypedElement)
- name= ((ITypedElement)fLeft).getName();
- if (name == null && fRight instanceof ITypedElement)
- name= ((ITypedElement)fRight).getName();
- if (name == null)
- name= "???"; //$NON-NLS-1$
-
- for (int i= 0; i < level; i++)
- System.out.print(" "); //$NON-NLS-1$
-
- System.out.println(getDiffType(fCode) + name);
- }
- private String getDiffType(int code) {
- String dir= " "; //$NON-NLS-1$
- switch (code & DIRECTION_MASK) {
- case LEFT:
- dir= ">"; //$NON-NLS-1$
- break;
- case RIGHT:
- dir= "<"; //$NON-NLS-1$
- break;
- case CONFLICTING:
- dir= "!"; //$NON-NLS-1$
- break;
- }
- String change= "="; //$NON-NLS-1$
- switch (code & CHANGE_TYPE_MASK) {
- case ADDITION:
- change= "+"; //$NON-NLS-1$
- break;
- case DELETION:
- change= "-"; //$NON-NLS-1$
- break;
- case CHANGE:
- change= "#"; //$NON-NLS-1$
- break;
- }
- return dir + change + " "; //$NON-NLS-1$
- }
- }
-
- /**
- * Creates a new differencing engine.
- */
- public Differencer() {
- }
-
- /**
- * Starts the differencing engine on the three input objects. If threeWay is <code>true</code> a
- * three-way comparison is performed, otherwise a two-way compare (in the latter case the ancestor argument is ignored).
- * The progress monitor is passed to the method <code>updateProgress</code> which is called for every node or
- * leaf compare. The method returns the object that was returned from the top-most call to method <code>visit</code>.
- * At most two of the ancestor, left, and right parameters are allowed to be <code>null</code>.
- *
- * @param threeWay if <code>true</code> a three-way comparison is performed, otherwise a two-way compare
- * @param pm a progress monitor which is passed to method <code>updateProgress</code>
- * @param data a client data that is passed to the top-level call to <code>visit</code>
- * @param ancestor the ancestor object of the compare (may be <code>null</code>)
- * @param left the left object of the compare
- * @param right the right object of the compare
- * @return the object returned from the top most call to method <code>visit</code>,
- * possibly <code>null</code>
- */
- public Object findDifferences(boolean threeWay, IProgressMonitor pm, Object data, Object ancestor, Object left, Object right) {
-
- Node root= new Node();
-
- int code= traverse(threeWay, root, pm, threeWay ? ancestor : null, left, right);
-
- if (code != NO_CHANGE) {
- List l= root.fChildren;
- if (l.size() > 0) {
- Node first= (Node)l.get(0);
- return first.visit(this, data, 0);
- }
- }
- return null;
- }
-
- /**
- * Traverse tree in postorder.
- */
- private int traverse(boolean threeWay, Node parent, IProgressMonitor pm, Object ancestor, Object left, Object right) {
-
- Object[] ancestorChildren= getChildren(ancestor);
- Object[] rightChildren= getChildren(right);
- Object[] leftChildren= getChildren(left);
-
- int code= NO_CHANGE;
-
- Node node= new Node(parent, ancestor, left, right);
-
- boolean content= true; // we reset this if we have at least one child
-
- if (((threeWay && ancestorChildren != null) || !threeWay)
- && rightChildren != null && leftChildren != null) {
- // we only recurse down if no leg is null
- // a node
-
- Set allSet= new HashSet(20);
- Map ancestorSet= null;
- Map rightSet= null;
- Map leftSet= null;
-
- if (ancestorChildren != null) {
- ancestorSet= new HashMap(10);
- for (int i= 0; i < ancestorChildren.length; i++) {
- Object ancestorChild= ancestorChildren[i];
- ancestorSet.put(ancestorChild, ancestorChild);
- allSet.add(ancestorChild);
- }
- }
-
- if (rightChildren != null) {
- rightSet= new HashMap(10);
- for (int i= 0; i < rightChildren.length; i++) {
- Object rightChild= rightChildren[i];
- rightSet.put(rightChild, rightChild);
- allSet.add(rightChild);
- }
- }
-
- if (leftChildren != null) {
- leftSet= new HashMap(10);
- for (int i= 0; i < leftChildren.length; i++) {
- Object leftChild= leftChildren[i];
- leftSet.put(leftChild, leftChild);
- allSet.add(leftChild);
- }
- }
-
- Iterator e= allSet.iterator();
- while (e.hasNext()) {
- Object keyChild= e.next();
-
- content= false;
-
- if (pm != null) {
-
- if (pm.isCanceled())
- throw new OperationCanceledException();
-
- updateProgress(pm, keyChild);
- }
-
- Object ancestorChild= ancestorSet != null ? ancestorSet.get(keyChild) : null;
- Object leftChild= leftSet != null ? leftSet.get(keyChild) : null;
- Object rightChild= rightSet != null ? rightSet.get(keyChild) : null;
-
- int c= traverse(threeWay, node, pm, ancestorChild, leftChild, rightChild);
-
- if ((c & CHANGE_TYPE_MASK) != NO_CHANGE) {
- code|= CHANGE; // deletions and additions of child result in a change of the container
- code|= (c & DIRECTION_MASK); // incoming & outgoing are just ored
- }
- }
- }
-
- if (content) // a leaf
- code= compare(threeWay, ancestor, left, right);
-
- node.fCode= code;
-
- return code;
- }
-
- /**
- * Called for every node or leaf comparison.
- * The differencing engine passes in the input objects of the compare and the result of the compare.
- * The data object is the value returned from a call to the <code>visit</code> method on the parent input.
- * It can be considered the "parent" reference and is useful when building a tree.
- * <p>
- * The <code>Differencer</code> implementation returns a new
- * <code>DiffNode</code> which is initialized with the corresponding values.
- * Subclasses may override.
- *
- * @param data object returned from parent call to <code>visit</code>,
- * possibly <code>null</code>
- * @param result the result of the compare operation performed on the three inputs
- * @param ancestor the compare ancestor of the left and right inputs
- * @param left the left input to the compare
- * @param right the right input to the compare
- * @return the result, possibly <code>null</code>
- */
- protected Object visit(Object data, int result, Object ancestor, Object left, Object right) {
- return new DiffNode((IDiffContainer) data, result, (ITypedElement)ancestor, (ITypedElement)left, (ITypedElement)right);
- }
-
- /**
- * Performs a 2-way or 3-way compare of the given leaf elements and returns an integer
- * describing the kind of difference.
- */
- private int compare(boolean threeway, Object ancestor, Object left, Object right) {
-
- int description= NO_CHANGE;
-
- if (threeway) {
- if (ancestor == null) {
- if (left == null) {
- if (right == null) {
- Assert.isTrue(false);
- // shouldn't happen
- } else {
- description= RIGHT | ADDITION;
- }
- } else {
- if (right == null) {
- description= LEFT | ADDITION;
- } else {
- description= CONFLICTING | ADDITION;
- if (contentsEqual(left, right))
- description|= PSEUDO_CONFLICT;
- }
- }
- } else {
- if (left == null) {
- if (right == null) {
- description= CONFLICTING | DELETION | PSEUDO_CONFLICT;
- } else {
- if (contentsEqual(ancestor, right))
- description= LEFT | DELETION;
- else
- description= CONFLICTING | CHANGE;
- }
- } else {
- if (right == null) {
- if (contentsEqual(ancestor, left))
- description= RIGHT | DELETION;
- else
- description= CONFLICTING | CHANGE;
- } else {
- boolean ay= contentsEqual(ancestor, left);
- boolean am= contentsEqual(ancestor, right);
-
- if (ay && am)
- ;
- else if (ay && !am) {
- description= RIGHT | CHANGE;
- } else if (!ay && am) {
- description= LEFT | CHANGE;
- } else {
- description= CONFLICTING | CHANGE;
- if (contentsEqual(left, right))
- description|= PSEUDO_CONFLICT;
- }
- }
- }
- }
- } else { // two way compare ignores ancestor
- if (left == null) {
- if (right == null) {
- Assert.isTrue(false);
- // shouldn't happen
- } else {
- description= ADDITION;
- }
- } else {
- if (right == null) {
- description= DELETION;
- } else {
- if (! contentsEqual(left, right))
- description= CHANGE;
- }
- }
- }
-
- return description;
- }
-
- /**
- * Performs a content compare on the two given inputs.
- * <p>
- * The <code>Differencer</code> implementation
- * returns <code>true</code> if both inputs implement <code>IStreamContentAccessor</code>
- * and their byte contents is identical. Subclasses may override to implement
- * a different content compare on the given inputs.
- * </p>
- *
- * @param input1 first input to contents compare
- * @param input2 second input to contents compare
- * @return <code>true</code> if content is equal
- */
- protected boolean contentsEqual(Object input1, Object input2) {
-
- if (input1 == input2)
- return true;
-
- InputStream is1= getStream(input1);
- InputStream is2= getStream(input2);
-
- if (is1 == null && is2 == null) // no byte contents
- return true;
-
- try {
- if (is1 == null || is2 == null) // only one has contents
- return false;
-
- while (true) {
- int c1= is1.read();
- int c2= is2.read();
- if (c1 == -1 && c2 == -1)
- return true;
- if (c1 != c2)
- break;
-
- }
- } catch (IOException ex) {
- } finally {
- if (is1 != null) {
- try {
- is1.close();
- } catch(IOException ex) {
- }
- }
- if (is2 != null) {
- try {
- is2.close();
- } catch(IOException ex) {
- }
- }
- }
- return false;
- }
-
- /**
- * Tries to return an InputStream for the given object.
- * Returns <code>null</code> if the object not an IStreamContentAccessor
- * or an error occured.
- */
- private InputStream getStream(Object o) {
- if (o instanceof IStreamContentAccessor) {
- try {
- return ((IStreamContentAccessor)o).getContents();
- } catch(CoreException ex) {
- }
- }
- return null;
- }
-
- /**
- * Returns the children of the given input or <code>null</code> if there are no children.
- * <p>
- * The <code>Differencer</code> implementation checks whether the input
- * implements the <code>IStructureComparator</code> interface. If yes it is used
- * to return an array containing all children. Otherwise <code>null</code> is returned.
- * Subclasses may override to implement a different strategy to enumerate children.
- * </p>
- *
- * @param input the object for which to return children
- */
- protected Object[] getChildren(Object input) {
- if (input instanceof IStructureComparator)
- return ((IStructureComparator)input).getChildren();
- return null;
- }
-
- /**
- * Called for every leaf or node compare to update progress information.
- * <p>
- * The <code>Differencer</code> implementation shows the name of the input object
- * as a subtask. Subclasses may override.
- * </p>
- *
- * @param progressMonitor the progress monitor for reporting progress
- * @name input a non-<code>null</code> input object
- */
- protected void updateProgress(IProgressMonitor progressMonitor, Object node) {
- if (node instanceof ITypedElement) {
- String name= ((ITypedElement)node).getName();
- String fmt= Utilities.getString("Differencer.progressFormat"); //$NON-NLS-1$
- String msg= MessageFormat.format(fmt, new String[] { name });
- progressMonitor.subTask(msg);
- //progressMonitor.worked(1);
- }
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DocumentRangeNode.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DocumentRangeNode.java
deleted file mode 100644
index 57073008b..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DocumentRangeNode.java
+++ /dev/null
@@ -1,354 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.structuremergeviewer;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.jface.text.*;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.compare.*;
-import org.eclipse.compare.internal.Utilities;
-import org.eclipse.compare.contentmergeviewer.*;
-import org.eclipse.compare.contentmergeviewer.IDocumentRange;
-import org.eclipse.compare.contentmergeviewer.TextMergeViewer;
-
-
-/**
- * A document range node represents a structural element
- * when performing a structure compare of documents.
- * <code>DocumentRangeNodes</code> are created while parsing the document and represent
- * a semantic entity (e.g. a Java class or method).
- * As a consequence of the parsing a <code>DocumentRangeNode</code> maps to a range
- * of characters in the document.
- * <p>
- * Since a <code>DocumentRangeNode</code> implements the <code>IStructureComparator</code>
- * and <code>IStreamContentAccessor</code> interfaces it can be used as input to the
- * differencing engine. This makes it possible to perform
- * a structural diff on a document and have the nodes and leaves of the compare easily map
- * to character ranges within the document.
- * <p>
- * Subclasses may add additional state collected while parsing the document.
- * </p>
- * @see Differencer
- */
-public class DocumentRangeNode
- implements IDocumentRange, IStructureComparator, IEditableContent, IStreamContentAccessor {
-
- private static final boolean POS_UPDATE= true;
-
- private IDocument fBaseDocument;
- private Position fRange; // the range in the base document
- private int fTypeCode;
- private String fID;
- private Position fAppendPosition; // a position where to insert a child textually
- private ArrayList fChildren;
-
- /**
- * Creates a new <code>DocumentRangeNode</code> for the given range within the specified
- * document. The <code>typeCode</code> is uninterpreted client data. The ID is used when comparing
- * two nodes with each other: i.e. the differencing engine performs a content compare
- * on two nodes if their IDs are equal.
- *
- * @param typeCode a type code for this node
- * @param id an identifier for this node
- * @param document document on which this node is based on
- * @param start start position of range within document
- * @param length length of range
- */
- public DocumentRangeNode(int typeCode, String id, IDocument document, int start, int length) {
-
- fTypeCode= typeCode;
- fID= id;
-
- fBaseDocument= document;
- fBaseDocument.addPositionCategory(RANGE_CATEGORY);
- fRange= new Position(start, length);
-
- if (POS_UPDATE) {
- try {
- document.addPosition(RANGE_CATEGORY, fRange);
- } catch (BadPositionCategoryException ex) {
- } catch (BadLocationException ex) {
- }
- }
- }
-
- /* (non Javadoc)
- * see IDocumentRange.getDocument
- */
- public IDocument getDocument() {
- return fBaseDocument;
- }
-
- /* (non Javadoc)
- * see IDocumentRange.getRange
- */
- public Position getRange() {
- return fRange;
- }
-
- /**
- * Returns the type code of this node.
- * The type code is uninterpreted client data which can be set in the constructor.
- *
- * @return the type code of this node
- */
- public int getTypeCode() {
- return fTypeCode;
- }
-
- /**
- * Returns this node's id.
- * It is used in <code>equals</code> and <code>hashcode</code>.
- *
- * @return the node's id
- */
- public String getId() {
- return fID;
- }
-
- /**
- * Sets this node's id.
- * It is used in <code>equals</code> and <code>hashcode</code>.
- *
- * @param id the new id for this node
- */
- public void setId(String id) {
- fID= id;
- }
-
- /**
- * Adds the given node as a child.
- *
- * @param node the node to add as a child
- */
- public void addChild(DocumentRangeNode node) {
- if (fChildren == null)
- fChildren= new ArrayList();
- fChildren.add(node);
- }
-
- /* (non Javadoc)
- * see IStructureComparator.getChildren
- */
- public Object[] getChildren() {
- if (fChildren != null)
- return fChildren.toArray();
- return new Object[0];
- }
-
- /**
- * Sets the length of the range of this node.
- *
- * @param length the length of the range
- */
- public void setLength(int length) {
- getRange().setLength(length);
- }
-
- /**
- * Sets a position within the document range that can be used to (legally) insert
- * text without breaking the syntax of the document.
- * <p>
- * E.g. when parsing a Java document the "append position" of a <code>DocumentRangeNode</code>
- * representating a Java class could be the character position just before the closing bracket.
- * Inserting the text of a new method there would not disturb the syntax of the class.
- *
- * @param pos the character position within the underlying document where text can be legally inserted
- */
- public void setAppendPosition(int pos) {
- if (POS_UPDATE) {
- fBaseDocument.removePosition(fAppendPosition);
- try {
- Position p= new Position(pos);
- fBaseDocument.addPosition(RANGE_CATEGORY, p);
- fAppendPosition= p;
- } catch (BadPositionCategoryException ex) {
- } catch (BadLocationException ex) {
- // ignore
- }
- } else {
- fAppendPosition= new Position(pos);
- }
- }
-
- /**
- * Returns the position that has been set with <code>setAppendPosition</code>.
- * If <code>setAppendPosition</code> hasn't been called, the position after the last character
- * of this range is returned.
- *
- * @return a position where text can be legally inserted
- */
- public Position getAppendPosition() {
- if (fAppendPosition == null) {
- if (POS_UPDATE) {
- try {
- Position p= new Position(fBaseDocument.getLength());
- fBaseDocument.addPosition(RANGE_CATEGORY, p);
- fAppendPosition= p;
- } catch (BadPositionCategoryException ex) {
- } catch (BadLocationException ex) {
- // ignore
- }
- } else {
- fAppendPosition= new Position(fBaseDocument.getLength());
- }
- }
- return fAppendPosition;
- }
-
- /**
- * Implementation based on <code>getID</code>.
- */
- public boolean equals(Object other) {
- if (other != null && other.getClass() == getClass()) {
- DocumentRangeNode tn= (DocumentRangeNode) other;
- return fTypeCode == tn.fTypeCode && fID.equals(tn.fID);
- }
- return super.equals(other);
- }
-
- /**
- * Implementation based on <code>getID</code>.
- */
- public int hashCode() {
- return fID.hashCode();
- }
-
- /**
- * Find corresponding position
- */
- private Position findCorrespondingPosition(DocumentRangeNode otherParent, DocumentRangeNode child) {
-
- // we try to find a predecessor of left Node which exists on the right side
-
- if (child != null && fChildren != null) {
- int ix= otherParent.fChildren.indexOf(child);
- if (ix >= 0) {
-
- for (int i= ix - 1; i >= 0; i--) {
- DocumentRangeNode c1= (DocumentRangeNode) otherParent.fChildren.get(i);
- int i2= fChildren.indexOf(c1);
- if (i2 >= 0) {
- DocumentRangeNode c= (DocumentRangeNode) fChildren.get(i2);
- //System.out.println(" found corresponding: " + i2 + " " + c);
- Position p= c.fRange;
-
- //try {
- Position po= new Position(p.getOffset() + p.getLength() + 1, 0);
- //c.fBaseDocument.addPosition(RANGE_CATEGORY, po);
- return po;
- //} catch (BadLocationException ex) {
- //}
- //break;
- }
- }
-
- for (int i= ix; i < otherParent.fChildren.size(); i++) {
- DocumentRangeNode c1= (DocumentRangeNode) otherParent.fChildren.get(i);
- int i2= fChildren.indexOf(c1);
- if (i2 >= 0) {
- DocumentRangeNode c= (DocumentRangeNode) fChildren.get(i2);
- //System.out.println(" found corresponding: " + i2 + " " + c);
- Position p= c.fRange;
- //try {
- Position po= new Position(p.getOffset(), 0);
- //c.fBaseDocument.addPosition(RANGE_CATEGORY, po);
- return po;
- //} catch (BadLocationException ex) {
- //}
- //break;
- }
- }
-
- }
- }
- return getAppendPosition();
- }
-
- private void add(String s, DocumentRangeNode parent, DocumentRangeNode child) {
-
- Position p= findCorrespondingPosition(parent, child);
- if (p != null) {
- try {
- fBaseDocument.replace(p.getOffset(), p.getLength(), s);
- } catch (BadLocationException ex) {
- // ignore
- }
- }
- }
-
- /* (non Javadoc)
- * see IStreamContentAccessor.getContents
- */
- public InputStream getContents() {
- String s;
- try {
- s= fBaseDocument.get(fRange.getOffset(), fRange.getLength());
- } catch (BadLocationException ex) {
- s= ""; //$NON-NLS-1$
- }
- return new ByteArrayInputStream(s.getBytes());
- }
-
- /* (non Javadoc)
- * see IEditableContent.isEditable
- */
- public boolean isEditable() {
- return true;
- }
-
- /* (non Javadoc)
- * see IEditableContent.replace
- */
- public ITypedElement replace(ITypedElement child, ITypedElement other) {
-
- DocumentRangeNode src= null;
- String srcContents= ""; //$NON-NLS-1$
-
- if (other != null) {
- src= (DocumentRangeNode) child;
-
- if (other instanceof IStreamContentAccessor) {
- try {
- InputStream is= ((IStreamContentAccessor)other).getContents();
- byte[] bytes= Utilities.readBytes(is);
- srcContents= new String(bytes);
- } catch(CoreException ex) {
- }
- }
- }
-
- if (child != null) { // there is a destination
-
-// if (child instanceof DocumentRangeNode) {
-// DocumentRangeNode drn= (DocumentRangeNode) child;
-//
-// IDocument doc= drn.getDocument();
-// Position range= drn.getRange();
-// try {
-// doc.replace(range.getOffset(), range.getLength(), srcContents);
-// } catch (BadLocationException ex) {
-// }
-// }
- } else {
- // no destination: we have to add the contents into the parent
- add(srcContents, null /*srcParentNode*/, src);
- }
- return child;
- }
-
- /* (non Javadoc)
- * see IEditableContent.setContent
- */
- public void setContent(byte[] content) {
-// fBaseDocument.set(new String(content));
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/ICompareInput.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/ICompareInput.java
deleted file mode 100644
index badc21666..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/ICompareInput.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.structuremergeviewer;
-
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Interface for objects used as input to a two-way or three-way compare viewer.
- * It defines API for accessing the three sides for the compare,
- * and a name and image which is used when displaying the three way input
- * in the UI, for example, in a title bar.
- * <p>
- * Note: at most two sides of an <code>ICompareInput</code> can be <code>null</code>,
- * (as it is normal for additions or deletions) but not all three.
- * <p>
- * <code>ICompareInput</code> provides methods for registering
- * <code>ICompareInputChangeListener</code>s
- * that get informed if one (or more)
- * of the three sides of an <code>ICompareInput</code> object changes its value.
- * <p>
- * For example when accepting an incoming addition
- * the (non-<code>null</code>) left side of an <code>ICompareInput</code>
- * is copied to the right side by means of method <code>copy</code>.
- * This should trigger a call to <code>compareInputChanged</code> of registered
- * <code>ICompareInputChangeListener</code>s.
- * <p>
- * Clients can implement this interface, or use the convenience implementation
- * <code>DiffNode</code>.
- * </p>
- *
- * @see StructureDiffViewer
- * @see org.eclipse.compare.contentmergeviewer.ContentMergeViewer
- * @see DiffNode
- */
-public interface ICompareInput {
-
- /**
- * Returns name of input.
- * This name is displayed when this input is shown in a viewer.
- * In many cases this name is the name of one of the non-<code>null</code> sides or a combination
- * thereof.
- *
- * @return name of input
- */
- String getName();
-
- /**
- * Returns an image representing this input.
- * This image is typically displayed when this input is shown in a viewer.
- * In many cases this image is the image of one of the non-<code>null</code> sides.
- *
- * @return image representing this input, or <code>null</code> if no icon should be shown
- */
- Image getImage();
-
- /**
- * Returns the kind of difference between the
- * three sides ancestor, left and right.
- * This field is only meaningful if the <code>ICompareInput</code>
- * is the result of another compare. In this case it is used
- * together with <code>getImage</code> to compose a icon
- * which reflects the kind of difference between the two or three elements.
- *
- * @return kind of difference (see <code>Differencer</code>)
- */
- int getKind();
-
- /**
- * Returns the ancestor side of this input.
- * Returns <code>null</code> if this input has no ancestor
- * or in the two-way compare case.
- *
- * @return the ancestor of this input, or <code>null</code>
- */
- ITypedElement getAncestor();
-
- /**
- * Returns the left side of this input.
- * Returns <code>null</code> if there is no left side (deletion or addition).
- *
- * @return the left side of this input, or <code>null</code>
- */
- ITypedElement getLeft();
-
- /**
- * Returns the right side of this input.
- * Returns <code>null</code> if there is no right side (deletion or addition).
- *
- * @return the right side of this input, or <code>null</code>
- */
- ITypedElement getRight();
-
- /**
- * Registers the given listener for notification.
- * If the identical listener is already registered the method has no effect.
- *
- * @param listener the listener to register for changes of this input
- */
- void addCompareInputChangeListener(ICompareInputChangeListener listener);
-
- /**
- * Unregisters the given listener.
- * If the identical listener is not registered the method has no effect.
- *
- * @param listener the listener to unregister
- */
- void removeCompareInputChangeListener(ICompareInputChangeListener listener);
-
- /**
- * Copy one side (source) to the other side (destination) depending on the
- * value of <code>leftToRight</code>. This method is called from
- * a merge viewer if a corresponding action ("take left" or "take right")
- * has been pressed.
- * <p>
- * The implementation should handle the following cases:
- * <UL>
- * <LI>
- * if the source side is <code>null</code> the destination must be deleted,
- * <LI>
- * if the destination is <code>null</code> the destination must be created
- * and filled with the contents from the source,
- * <LI>
- * if both sides are non-<code>null</code> the contents of source must be copied to destination.
- * </UL>
- * In addition the implementation should send out notification to the registered
- * <code>ICompareInputChangeListener</code>.
- *
- * @param leftToRight if <code>true</code> the left side is copied to the right side.
- * If <code>false</code> the right side is copied to the left side
- */
- void copy(boolean leftToRight);
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/ICompareInputChangeListener.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/ICompareInputChangeListener.java
deleted file mode 100644
index ba8d967b9..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/ICompareInputChangeListener.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.structuremergeviewer;
-
-/**
- * Listener that gets informed if one (or more)
- * of the three sides of an <code>ICompareInput</code> object changes its value.
- * <p>
- * For example when accepting an incoming addition
- * the (non-null) left side of an <code>ICompareInput</code>
- * is copied to the right side (which was <code>null</code>).
- * This triggers a call to <code>compareInputChanged</code> of registered
- * <code>ICompareInputChangeListener</code>.
- * <p>
- * Note however, that listener are not informed if the content of one of the sides changes.
- * <p>
- * Clients may implement this interface. It is also implemented by viewers that take
- * an <code>ICompareInput</code> as input.
- * </p>
- */
-public interface ICompareInputChangeListener {
-
- /**
- * Called whenever the value (not the content) of one or more of the three sides
- * of a <code>ICompareInput</code> has changed.
- *
- * @param source the <code>ICompareInput</code> that has changed
- */
- void compareInputChanged(ICompareInput source);
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IDiffContainer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IDiffContainer.java
deleted file mode 100644
index c87f30c5d..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IDiffContainer.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.structuremergeviewer;
-
-import java.util.Iterator;
-
-/**
- * <code>IDiffContainer</code> is a <code>IDiffElement</code> with children.
- * <p>
- * <code>IDiffContainer</code> are the inner nodes displayed
- * by the <code>DiffTreeViewer</code>.
- * <code>IDiffContainer</code> are typically created as the result of performing
- * a compare with the <code>Differencer</code>.
- * <p>
- * Clients may implement this interface, or use one of the standard implementations,
- * <code>DiffContainer</code> or <code>DiffNode</code>.
- *
- * @see Differencer
- * @see DiffTreeViewer
- */
-public interface IDiffContainer extends IDiffElement {
-
- /**
- * Returns whether this container has at least one child.
- * In some cases this methods avoids having to call the
- * potential more costly <code>getChildren</code> method.
- *
- * @return <code>true</code> if this container has at least one child
- */
- boolean hasChildren();
-
- /**
- * Returns the children of this container.
- * If this container has no children an empty array is returned (not <code>null</code>).
- *
- * @return the children of this container as an array
- */
- IDiffElement[] getChildren();
-
- /**
- * Adds the given child to this container.
- * If the child is already contained in this container, this method has no effect.
- *
- * @param child the child to be added to this container
- */
- void add(IDiffElement child);
-
- /**
- * Removes the given child from this container.
- * If the container becomes empty it is removed from its container.
- * If the child is not contained in this container, this method has no effect.
- *
- * @param child the child to be removed from this container
- */
- void removeToRoot(IDiffElement child);
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IDiffElement.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IDiffElement.java
deleted file mode 100644
index 32e858ab3..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IDiffElement.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.structuremergeviewer;
-
-import org.eclipse.compare.ITypedElement;
-
-/**
- * An <code>IDiffElement</code> is used in the <code>DiffTreeViewer</code>
- * to display the kind of change detected as the result of a two-way or three-way compare.
- * <p>
- * The base interface <code>ITypedElement</code> provides a name, a type, and an image.
- * <code>IDiffElement</code> adds API for maintaining a parent relationship.
- * <p>
- * <code>DiffTreeViewer</code> works on a tree of <code>IDiffElements</code>.
- * Leaf elements must implement the
- * <code>IDiffElement</code> interface, inner nodes the <code>IDiffContainer</code> interface.
- * <p>
- * <code>IDiffElement</code>s are typically created as the result of performing
- * a compare with the <code>Differencer</code>.
- * <p>
- * Clients may implement this interface, or use one of the standard implementations,
- * <code>DiffElement</code>, <code>DiffContainer</code>, or <code>DiffNode</code>.
- *
- * @see DiffTreeViewer
- * @see DiffElement
- * @see DiffContainer
- * @see DiffNode
- */
-public interface IDiffElement extends ITypedElement {
-
- /**
- * Returns the kind of difference as defined in <code>Differencer</code>.
- *
- * @return the kind of difference as defined in <code>Differencer</code>
- */
- int getKind();
-
- /**
- * Returns the parent of this element.
- * If the object is the root of a hierarchy <code>null</code> is returned.
- *
- * @return the parent of this element, or <code>null</code> if the element has no parent
- */
- IDiffContainer getParent();
-
- /**
- * Sets the parent of this element.
- *
- * @param parent the new parent of this element, or <code>null</code> if this
- * element is to have no parent
- */
- void setParent(IDiffContainer parent);
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IStructureComparator.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IStructureComparator.java
deleted file mode 100644
index 68626539f..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IStructureComparator.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.structuremergeviewer;
-
-import java.util.Iterator;
-
-import org.eclipse.compare.ITypedElement;
-
-/**
- * Interface used to compare hierarchical structures.
- * It is used by the differencing engine.
- * <p>
- * Clients typically implement this interface in an adaptor class which
- * wrappers the objects to be compared.
- *
- * @see org.eclipse.compare.ResourceNode
- * @see Differencer
- */
-public interface IStructureComparator {
-
- /**
- * Returns an iterator for all children of this object or <code>null</code>
- * if there are no children.
- *
- * @return an array with all children of this object, or an empty array if there are no children
- */
- Object[] getChildren();
-
- /**
- * Returns whether some other object is "equal to" this one
- * with respect to a structural comparison. For example, when comparing
- * Java class methods, <code>equals</code> would return <code>true</code>
- * if two methods have the same signature (the argument names and the
- * method body might differ).
- *
- * @param other the reference object with which to compare
- * @return <code>true</code> if this object is the same as the other argument; <code>false</code> otherwise
- * @see java.lang.Object#equals
- */
- boolean equals(Object other);
-}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IStructureCreator.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IStructureCreator.java
deleted file mode 100644
index d3e9f3c7f..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IStructureCreator.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.structuremergeviewer;
-
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.jface.text.IDocument;
-
-/**
- * For creating a hierarchical structure of <code>IStructureComparators</code> for a
- * given input object.
- * In addition, it provides methods for locating a path in the hierarchical structure
- * and to map a node of this structure back to the corresponding input object.
- * <p>
- * Structure creators are used in the following contexts:
- * <ul>
- * <li>
- * the <code>StructureDiffViewer</code> uses an <code>IStructureCreator</code> to
- * build two (or three) tree structures of its input elements (method <code>getStructure</code>).
- * These trees are then compared with each other by means of the differencing engine and displayed
- * with the <code>DiffTreeViewer</code>,
- * </li>
- * <li>
- * the <code>ReplaceWithEditionDialog</code> uses an <code>IStructureCreator</code>
- * to map a path back to a range of characters in the textual representation.
- * </li>
- * </ul>
- * A <code>IStructureCreator</code> provides methods for rewriting the tree produced by the differencing
- * engine to support "smart" structural differencing. E.g. certain patterns of pairs of "addition"
- * and "deletion" nodes can be detected as renames and merged into a single node.
- * </p>
- * <p>
- * Clients may implement this interface; there is no standard implementation.
- * </p>
- *
- * @see StructureDiffViewer
- * @see org.eclipse.compare.EditionSelectionDialog
- * @see Differencer
- */
-public interface IStructureCreator {
-
- /**
- * Returns a descriptive name which can be used in the UI of the <code>StructureDiffViewer</code>.
- *
- * @return a descriptive name for this <code>IStructureCreator</code>
- */
- String getName();
-
- /**
- * Creates a tree structure consisting of <code>IStructureComparator</code>s
- * from the given object and returns its root object.
- * Implementing this method typically involves parsing the input object.
- * In case of an error (e.g. a parsing error) the value <code>null</code> is returned.
- *
- * @param input the object from which to create the tree of <code>IStructureComparator</code>
- * @return the root node of the structure or <code>null</code> in case of error
- */
- IStructureComparator getStructure(Object input);
-
- /**
- * Creates the single node specified by path from the given input object.
- * In case of an error (e.g. a parsing error) the value <code>null</code> is returned.
- * This method is similar to <code>getStructure</code> but in
- * contrast to <code>getStructure</code> only a single node without any children must be returned.
- * This method is used in the <code>ReplaceWithEditionDialog</code> to locate a sub element
- * (e.g. a method) within an input object (e.g. a file containing source code).
- * <p>
- * One (not optimized) approach to implement this method is calling <code>getStructure(input)</code>
- * to build the full tree, and then finding that node within the tree that is specified
- * by <code>path</code>.
- * <p>
- * The syntax of <code>path</code> is not specified, because it is treated by the compare subsystem
- * as an opaque entity and is not further interpreted. Clients using this functionality
- * will pass a value of <code>path</code> to the <code>selectEdition</code>
- * method of <code>ReplaceWithEditionDialog</code> and will receive this value unchanged
- * as an argument to <code>locate</code>.
- *
- * @param path specifies a sub object within the input object
- * @param input the object from which to create the <code>IStructureComparator</code>
- * @return the single node specified by <code>path</code> or <code>null</code>
- *
- * @see org.eclipse.compare.EditionSelectionDialog#selectEdition
- */
- IStructureComparator locate(Object path, Object input);
-
- /**
- * Returns the contents of the given node as a string for the purpose
- * of performing a content comparison only (that is the string will not be visible in the UI).
- * If <code>ignoreWhitespace</code> is <code>true</code> all character sequences considered
- * whitespace should be removed from the returned string.
- *
- * @param node the node for which to return a string representation
- * @param ignoreWhitespace if <code>true</code> the returned string should not contain whitespace
- * @return the string contents of the given node
- */
- String getContents(Object node, boolean ignoreWhitespace);
-
- /**
- * FIXME: need better name?
- * Called whenever a copy operation has been performed on a tree node.
- *
- * @param node the node for which to save the new content
- * @param input the object from which the structure tree was created in <code>getStructure</code>
- */
- void save(IStructureComparator node, Object input);
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java
deleted file mode 100644
index 7a766746d..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java
+++ /dev/null
@@ -1,354 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.structuremergeviewer;
-
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.jface.util.PropertyChangeEvent;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.internal.*;
-
-
-/**
- * A diff tree viewer that can be configured with a <code>IStructureCreator</code>
- * to retrieve a hierarchical structure from the input object (an <code>ICompareInput</code>)
- * and perform a two-way or three-way compare on it.
- * <p>
- * This <code>DiffTreeViewer</code> supports the so called "smart" mode of the structure creator
- * by installing a button in the viewer's pane title bar.
- * <p>
- * This class may be instantiated; it is not intended to be subclassed outside
- * this package.
- * </p>
- *
- * @see IStructureCreator
- * @see ICompareInput
- */
-public class StructureDiffViewer extends DiffTreeViewer {
-
- private Differencer fDifferencer;
- private boolean fThreeWay= false;
-
- private ITypedElement fAncestorInput;
- private ITypedElement fLeftInput;
- private ITypedElement fRightInput;
-
- private IStructureComparator fAncestorStructure;
- private IStructureComparator fLeftStructure;
- private IStructureComparator fRightStructure;
-
- private IStructureCreator fStructureCreator;
- private IDiffContainer fRoot;
- private IContentChangeListener fContentChangedListener;
- private ICompareInputChangeListener fThreeWayInputChangedListener;
- private CompareViewerSwitchingPane fParent;
-
- /**
- * Creates a new viewer for the given SWT tree control with the specified configuration.
- *
- * @param tree the tree control
- * @param configuration the configuration for this viewer
- */
- public StructureDiffViewer(Tree tree, CompareConfiguration configuration) {
- super(tree, configuration);
- Composite c= tree.getParent();
- if (c instanceof CompareViewerSwitchingPane)
- fParent= (CompareViewerSwitchingPane) c;
- initialize();
- }
-
- /**
- * Creates a new viewer under the given SWT parent with the specified configuration.
- *
- * @param parent the SWT control under which to create the viewer
- * @param configuration the configuration for this viewer
- */
- public StructureDiffViewer(Composite parent, CompareConfiguration configuration) {
- super(parent, configuration);
- if (parent instanceof CompareViewerSwitchingPane)
- fParent= (CompareViewerSwitchingPane) parent;
- initialize();
- }
-
- private void initialize() {
-
- setAutoExpandLevel(3);
-
- fContentChangedListener= new IContentChangeListener() {
- public void contentChanged(IContentChangeNotifier changed) {
- StructureDiffViewer.this.contentChanged(changed);
- }
- };
- fThreeWayInputChangedListener= new ICompareInputChangeListener() {
- public void compareInputChanged(ICompareInput input) {
- StructureDiffViewer.this.compareInputChanged(input);
- }
- };
- }
-
- /**
- * Configures the <code>StructureDiffViewer</code> with a structure creator.
- * The structure creator is used to create a hierarchical structure
- * for each side of the viewer's input element of type <code>ICompareInput</code>.
- * <p>
- * If the structure creator's <code>canRewriteTree</code> returns <code>true</code>
- * the "smart" button in the viewer's pane control bar is enabled.
- *
- * @param structureCreator the new structure creator
- */
- public void setStructureCreator(IStructureCreator structureCreator) {
- if (fStructureCreator != structureCreator) {
- fStructureCreator= structureCreator;
- Control tree= getControl();
- if (tree != null && !tree.isDisposed())
- tree.setData(CompareUI.COMPARE_VIEWER_TITLE, getTitle());
- }
- }
-
- /**
- * Returns the structure creator or <code>null</code> if no
- * structure creator has been set with <code>setStructureCreator</code>.
- *
- * @return the structure creator or <code>null</code>
- */
- public IStructureCreator getStructureCreator() {
- return fStructureCreator;
- }
-
- /**
- * Reimplemented to get the descriptive title for this viewer from the <code>IStructureCreator</code>.
- */
- public String getTitle() {
- if (fStructureCreator != null)
- return fStructureCreator.getName();
- return super.getTitle();
- }
-
- /**
- * Overridden because the input of this viewer is not identical to the root of the tree.
- * The tree's root is a IDiffContainer that was returned from the method <code>diff</code>.
- *
- * @return the root of the diff tree produced by method <code>diff</code>
- */
- protected Object getRoot() {
- return fRoot;
- }
-
- /**
- * Overridden to create the comparable structures from the input object
- * and to feed them through the differencing engine. Note: for this viewer
- * the value from <code>getInput</code> is not identical to <code>getRoot</code>.
- */
- protected void inputChanged(Object input, Object oldInput) {
- if (input instanceof ICompareInput) {
- compareInputChanged((ICompareInput) input);
- if (input != oldInput)
- initialSelection();
- }
- }
-
- protected void initialSelection() {
- expandToLevel(2);
- }
-
- /* (non Javadoc)
- * Overridden to unregister all listeners.
- */
- protected void handleDispose(DisposeEvent event) {
-
- compareInputChanged(null);
-
- fContentChangedListener= null;
- fThreeWayInputChangedListener= null;
-
- super.handleDispose(event);
- }
-
- /**
- * Recreates the comparable structures for the input sides.
- */
- protected void compareInputChanged(ICompareInput input) {
- ITypedElement t= null;
- boolean changed= false;
-
- if (input != null)
- t= input.getAncestor();
-
- fThreeWay= (t != null);
-
- if (t != fAncestorInput) {
- if (fAncestorInput instanceof IContentChangeNotifier)
- ((IContentChangeNotifier)fAncestorInput).removeContentChangeListener(fContentChangedListener);
- fAncestorInput= t;
- if (fAncestorInput != null) {
- fAncestorStructure= fStructureCreator.getStructure(fAncestorInput);
- changed= true;
- } else
- fAncestorStructure= null;
- if (fAncestorInput instanceof IContentChangeNotifier)
- ((IContentChangeNotifier)fAncestorInput).addContentChangeListener(fContentChangedListener);
- }
-
- if (input != null)
- t= input.getLeft();
- if (t != fLeftInput) {
- if (fLeftInput instanceof IContentChangeNotifier)
- ((IContentChangeNotifier)fLeftInput).removeContentChangeListener(fContentChangedListener);
- fLeftInput= t;
- if (fLeftInput != null) {
- fLeftStructure= fStructureCreator.getStructure(fLeftInput);
- changed= true;
- } else
- fLeftStructure= null;
- if (fLeftInput instanceof IContentChangeNotifier)
- ((IContentChangeNotifier)fLeftInput).addContentChangeListener(fContentChangedListener);
- }
-
- if (input != null)
- t= input.getRight();
- if (t != fRightInput) {
- if (fRightInput instanceof IContentChangeNotifier)
- ((IContentChangeNotifier)fRightInput).removeContentChangeListener(fContentChangedListener);
- fRightInput= t;
- if (fRightInput != null) {
- fRightStructure= fStructureCreator.getStructure(fRightInput);
- changed= true;
- } else
- fRightStructure= null;
- if (fRightInput instanceof IContentChangeNotifier)
- ((IContentChangeNotifier)fRightInput).addContentChangeListener(fContentChangedListener);
- }
-
- if (changed)
- diff();
- }
-
- /**
- * Calls <code>diff</code> whenever the byte contents changes.
- */
- protected void contentChanged(IContentChangeNotifier changed) {
-
- if (fStructureCreator == null)
- return;
-
- if (changed != null) {
- if (changed == fAncestorInput) {
- fAncestorStructure= fStructureCreator.getStructure(fAncestorInput);
- } else if (changed == fLeftInput) {
- fLeftStructure= fStructureCreator.getStructure(fLeftInput);
- } else if (changed == fRightInput) {
- fRightStructure= fStructureCreator.getStructure(fRightInput);
- } else
- return;
- } else {
- fAncestorStructure= fStructureCreator.getStructure(fAncestorInput);
- fLeftStructure= fStructureCreator.getStructure(fLeftInput);
- fRightStructure= fStructureCreator.getStructure(fRightInput);
- }
-
- diff();
- }
-
- protected void preDiffHook(IStructureComparator ancestor, IStructureComparator left, IStructureComparator right) {
- // we do nothing here
- }
-
- /**
- * Runs the difference engine and refreshes the tree.
- */
- protected void diff() {
-
- preDiffHook(fAncestorStructure, fLeftStructure, fRightStructure);
-
- String message= null;
-
- if ((fThreeWay && fAncestorStructure == null) || fLeftStructure == null || fRightStructure == null) {
- // could not get structure of one (or more) of the legs
- fRoot= null;
- message= CompareMessages.getString("StructureDiffViewer.StructureError"); //$NON-NLS-1$
-
- } else { // calculate difference of the two (or three) structures
-
- if (fDifferencer == null)
- fDifferencer= new Differencer() {
- protected boolean contentsEqual(Object o1, Object o2) {
- return StructureDiffViewer.this.contentsEqual(o1, o2);
- }
- protected Object visit(Object data, int result, Object ancestor, Object left, Object right) {
- Object o= super.visit(data, result, ancestor, left, right);
- if (fLeftIsLocal && o instanceof DiffNode)
- ((DiffNode)o).swapSides(fLeftIsLocal);
- return o;
- }
- };
-
- fRoot= (IDiffContainer) fDifferencer.findDifferences(fThreeWay, null, null,
- fAncestorStructure, fLeftStructure, fRightStructure);
-
- if (fRoot == null || fRoot.getChildren().length == 0) {
- message= CompareMessages.getString("StructureDiffViewer.NoStructuralDifferences"); //$NON-NLS-1$
- } else {
- postDiffHook(fDifferencer, fRoot);
- }
- }
- if (fParent != null)
- fParent.setTitleArgument(message);
-
- refresh(getRoot());
- }
-
- protected void postDiffHook(Differencer differencer, IDiffContainer root) {
- // we do nothing here
- }
-
- /**
- * Performs a byte compare on the given objects.
- * Called from the difference engine.
- * Returns <code>null</code> if no structure creator has been set.
- */
- private boolean contentsEqual(Object o1, Object o2) {
- if (fStructureCreator != null) {
- boolean ignoreWhiteSpace= Utilities.getBoolean(getCompareConfiguration(), CompareConfiguration.IGNORE_WHITESPACE, false);
- String s1= fStructureCreator.getContents(o1, ignoreWhiteSpace);
- String s2= fStructureCreator.getContents(o2, ignoreWhiteSpace);
- if (s1 == null || s2 == null)
- return false;
- return s1.equals(s2);
- }
- return false;
- }
-
- /**
- * Tracks property changes of the configuration object.
- * Clients may override to track their own property changes.
- * In this case they must call the inherited method.
- */
- protected void propertyChange(PropertyChangeEvent event) {
- String key= event.getProperty();
- if (key.equals(CompareConfiguration.IGNORE_WHITESPACE))
- diff();
- else
- super.propertyChange(event);
- }
-
- /**
- * Overridden to call the <code>save</code> method on the structure creator after
- * nodes have been copied from one side to the other side of an input object.
- *
- * @param leftToRight if <code>true</code> the left side is copied to the right side.
- * If <code>false</code> the right side is copied to the left side
- */
- protected void copySelected(boolean leftToRight) {
- super.copySelected(leftToRight);
-
- if (fStructureCreator != null)
- fStructureCreator.save(
- leftToRight ? fRightStructure : fLeftStructure,
- leftToRight ? fRightInput : fLeftInput);
- }
-}
-
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/package.html b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/package.html
deleted file mode 100644
index b0cc1b33d..000000000
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/package.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides support for finding and displaying the differences
-between hierarchically structured data.
-<h2>
-Package Specification</h2>
-The class <tt>Differencer</tt> is a differencing engine for hierarchically
-structured data. It takes two or three inputs and performs a two-way or
-three-way compare on them.
-<p>If the input elements to the differencing engine implement the <tt>IStructureComparator</tt>
-interface the engine recursively applies itself&nbsp; to the children of
-the input element. Leaf elements must implement the <tt>IStreamContentAccessor</tt>
-interface (see package <tt>org.eclipse.compare</tt>) so that the
-differencer can perform a bytewise comparison on them.
-<p>By default the differencing engine returns the result of the compare
-as a tree of <tt>DiffNode</tt> objects. Every <tt>DiffNode</tt> describes
-the changes among the two or three inputs.
-<p>A tree of <tt>DiffNodes</tt> can be displayed in a <tt>DiffTreeViewer</tt>.
-The <tt>DiffTreeViewer</tt> requires that inner nodes of the tree implement
-the <tt>IDiffContainer</tt> interface and leafs the <tt>IDiffElement</tt>
-interface.
-<p>The typical steps to compare hierarchically structured data and to display
-the differences would be to:
-<ul>
-<li>
-map the input data into a tree of <tt>IStructureComparator</tt> and <tt>IStreamContentAccessor</tt>s,</li>
-
-<li>
-perform the compare operation by means of the <tt>Differencer</tt>, and</li>
-
-<li>
-feed the differencing result into the <tt>DiffTreeViewer</tt>.</li>
-
-</ul>
-The <tt>StructureDiffViewer</tt> is a specialized <tt>DiffTreeViewer</tt>
-that automates the three steps from above. It takes a single input object
-of type <tt>ICompareInput</tt> from which it retrieves the two or three
-input elements to compare. Then it uses a <tt>IStructureCreator</tt> to
-extract a tree of <tt>IStructureComparator</tt> and <tt>IStreamContentAccessor</tt>
-from them. These trees are then compared with the differencing engine and
-the result is displayed in the tree viewer.
-</body>
-</html>
diff --git a/bundles/org.eclipse.compare/doc/hglegal.htm b/bundles/org.eclipse.compare/doc/hglegal.htm
deleted file mode 100644
index b071dbdf4..000000000
--- a/bundles/org.eclipse.compare/doc/hglegal.htm
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.73 [en] (Win98; U) [Netscape]">
- <title>Legal Notices</title>
-</head>
-<body>
-
-<h3>
-<a NAME="Notices"></a>Notices</h3>
-(c) Copyright IBM Corp. 2000, 2001. All Rights Reserved.
-</body>
-</html>
diff --git a/bundles/org.eclipse.compare/doc/ngibmcpy.gif b/bundles/org.eclipse.compare/doc/ngibmcpy.gif
deleted file mode 100644
index 360f8e998..000000000
--- a/bundles/org.eclipse.compare/doc/ngibmcpy.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/doc/org_eclipse_compare.html b/bundles/org.eclipse.compare/doc/org_eclipse_compare.html
deleted file mode 100644
index c0e152c28..000000000
--- a/bundles/org.eclipse.compare/doc/org_eclipse_compare.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
- <title>Compare Infrastructure Extension Points</title>
-</head>
-<body link="#0000FF" vlink="#800080">
-
-<center>
-<h1>
-IBM Eclipse Platform Compare</h1></center>
-This document lists all of the extension points that the compare plug-in
-makes available to tool developers.
-<p>All XML sub-elements defined in the individual extension point documents
-may appear more than once inside an extension element. For example, an
-<tt>org.eclipse.compare.contentMergeViewers</tt> extension may contain
-several instances of <tt>viewer</tt> elements. Although making one extension
-per sub-element is not technically incorrect, we recommend grouping for
-consistent style. It can also improve platform startup time because there
-will be fewer extensions to process.
-<br>
-<hr WIDTH="100%">
-<h1>
-Extension Points</h1>
-The following extension points can be used to extend the capabilities of
-the compare infrastructure:
-<ul>
-<li>
-<a href="org_eclipse_compare_contentMergeViewers.html">org.eclipse.compare.contentMergeViewers</a></li>
-
-<li>
-<a href="org_eclipse_compare_contentViewers.html">org.eclipse.compare.contentViewers</a></li>
-
-<li>
-<a href="org_eclipse_compare_structureMergeViewers.html">org.eclipse.compare.structureMergeViewers</a></li>
-
-<li>
-<a href="org_eclipse_compare_structureCreators.html">org.eclipse.compare.structureCreators</a></li>
-</ul>
-<a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2001. All Rights Reserved." BORDER=0 height=12 width=195></a>
-</body>
-</html>
diff --git a/bundles/org.eclipse.compare/doc/org_eclipse_compare_contentMergeViewers.html b/bundles/org.eclipse.compare/doc/org_eclipse_compare_contentMergeViewers.html
deleted file mode 100644
index aebc43e02..000000000
--- a/bundles/org.eclipse.compare/doc/org_eclipse_compare_contentMergeViewers.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
- <title>Compare Extension Points: contentMergeViewers</title>
-</head>
-<body link="#0000FF" vlink="#800080">
-
-<center>
-<h1>
-ContentMergeViewers</h1></center>
-<b><i>Identifier: </i></b>org.eclipse.compare.contentMergeViewers
-<p><b><i>Description: </i></b>This extension point allows to plug in a
-compare/merge viewer for specific content types. The viewer must extend
-<tt>org.eclipse.jface.viewers.Viewer</tt>.
-<br>However since viewers don't have a default constructor the extension
-point must implement a factory object for viewers: the interface <tt>org.eclipse.compare.IViewerCreator</tt>.
-<p><b><i>Configuration Markup:</i></b>
-<p><tt>&nbsp;&nbsp; &lt;!ELEMENT viewer EMPTY></tt>
-<br><tt>&nbsp;&nbsp; &lt;!ATTLIST viewer</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extensions CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp; ></tt>
-<ul>
-<li>
-<b>id</b> - a unique identifier that can be used to reference the viewer</li>
-
-<li>
-<b>class</b> - name of a class that implements a factory for the content
-merge viewer and implements <tt>org.eclipse.compare.IViewerCreator</tt></li>
-
-<li>
-<b>extensions </b>- a comma separated list of file extensions e.g . "java,
-gif"</li>
-</ul>
-<b><i>Examples:</i></b>
-<br>The following is an example of compare/merge viewer for text files
-(extension "txt"):
-<p>&lt;extension point = "org.eclipse.compare.contentMergeViewers">
-<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;viewer
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id="org.eclipse.compare.contentmergeviewer.TextMergeViewer"
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class="org.eclipse.compare.internal.TextMergeViewerCreator"
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extensions="txt"
-<br>&nbsp;&nbsp;&nbsp; />
-<br>&lt;/extension>
-<p><b><i>Supplied Implementation:</i></b>
-<br>The Compare UI plugin defines content viewers for text, binary contents,
-and images.
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2001. All Rights Reserved." BORDER=0 height=12 width=195></a>
-</body>
-</html>
diff --git a/bundles/org.eclipse.compare/doc/org_eclipse_compare_contentViewers.html b/bundles/org.eclipse.compare/doc/org_eclipse_compare_contentViewers.html
deleted file mode 100644
index 1a877ed62..000000000
--- a/bundles/org.eclipse.compare/doc/org_eclipse_compare_contentViewers.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
- <title>Compare Extension Points: contentViewers</title>
-</head>
-<body link="#0000FF" vlink="#800080">
-
-<center>
-<h1>
-ContentViewers</h1></center>
-<b><i>Identifier: </i></b>org.eclipse.compare.contentViewers
-<p><b><i>Description: </i></b>This extension point allows to plug in a
-viewer for specific content types. These viewers are used in the EditionSelectionDialog
-when presenting an edition of a resource or a subsection thereof. The viewer
-must extend
-<tt>org.eclipse.jface.viewers.Viewer</tt> and must accept a
-viewer input of type <tt>IStreamContentAccessor</tt>.
-<br>However since viewers don't have a default constructor the extension
-point must implement a factory object for viewers: the interface <tt>org.eclipse.compare.IViewerCreator</tt>.
-<p><b><i>Configuration Markup:</i></b>
-<p><tt>&nbsp;&nbsp; &lt;!ELEMENT viewer EMPTY></tt>
-<br><tt>&nbsp;&nbsp; &lt;!ATTLIST viewer</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extensions CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp; ></tt>
-<ul>
-<li>
-<b>id</b> - a unique identifier that can be used to reference the viewer</li>
-
-<li>
-<b>class</b> - name of a class that implements a factory for the content
-merge viewer and implements <tt>org.eclipse.compare.IViewerCreator</tt></li>
-
-<li>
-<b>extensions </b>- a comma separated list of file extensions e.g . "java,
-gif"</li>
-</ul>
-<b><i>Examples:</i></b>
-<br>The following is an example of a viewer for text files (extension "txt"):
-<p>&lt;extension point = "org.eclipse.compare.contentViewers">
-<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;viewer
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id="org.eclipse.compare.internal.TextViewer"
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class="org.eclipse.compare.internal.TextViewerCreator"
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extensions="txt"
-<br>&nbsp;&nbsp;&nbsp; />
-<br>&lt;/extension>
-<p><b><i>Supplied Implementation:</i></b>
-<br>The Compare UI plugin defines content viewers for text and images.
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2001. All Rights Reserved." BORDER=0 height=12 width=195></a>
-</body>
-</html>
diff --git a/bundles/org.eclipse.compare/doc/org_eclipse_compare_structureCreators.html b/bundles/org.eclipse.compare/doc/org_eclipse_compare_structureCreators.html
deleted file mode 100644
index d48dd73e2..000000000
--- a/bundles/org.eclipse.compare/doc/org_eclipse_compare_structureCreators.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
- <title>Compare Extension Points: structureCreators</title>
-</head>
-<body link="#0000FF" vlink="#800080">
-
-<center>
-<h1>
-StructureCreators</h1></center>
-<b><i>Identifier: </i></b>org.eclipse.compare.structureCreators
-<p><b><i>Description: </i></b>This extension point allows to plug in an
-object that produces a tree structure of <tt>IStructureComparator</tt>
-for a given content.
-<p><b><i>Configuration Markup:</i></b>
-<p><tt>&nbsp;&nbsp; &lt;!ELEMENT structureCreator EMPTY></tt>
-<br><tt>&nbsp;&nbsp; &lt;!ATTLIST structureCreator</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extensions CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp; ></tt>
-<ul>
-<li>
-<b>id</b> - a unique identifier that can be used to reference the structure
-creator</li>
-
-<li>
-<b>class</b> - name of a class that implements the strcuture creator and
-implements <tt>org.eclipse.compare.structuremergeviewer.IStructureComparator</tt></li>
-
-<li>
-<b>extensions </b>- a comma separated list of file extensions e.g . "java,
-properties"</li>
-</ul>
-<b><i>Examples:</i></b>
-<br>The following is an example of a structure creator for java files (extension
-"java"):
-<p>&lt;extension point = "org.eclipse.compare.structureCreators">
-<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;structureCreator
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id="org.eclipse.compare.JavaStructureCreator"
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class="org.eclipse.compare.JavaStructureCreator"
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extensions="java"
-<br>&nbsp;&nbsp;&nbsp; />
-<br>&lt;/extension>
-<p><b><i>Supplied Implementation:</i></b>
-<br>The Compare UI plugin defines a structure creator for zip archives.
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2001. All Rights Reserved." BORDER=0 height=12 width=195></a>
-</body>
-</html>
diff --git a/bundles/org.eclipse.compare/doc/org_eclipse_compare_structureMergeViewers.html b/bundles/org.eclipse.compare/doc/org_eclipse_compare_structureMergeViewers.html
deleted file mode 100644
index 187fc44c8..000000000
--- a/bundles/org.eclipse.compare/doc/org_eclipse_compare_structureMergeViewers.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
- <title>Compare Extension Points: structureMergeViewers</title>
-</head>
-<body link="#0000FF" vlink="#800080">
-
-<center>
-<h1>
-StructureMergeViewers</h1></center>
-<b><i>Identifier: </i></b>org.eclipse.compare.structureMergeViewers
-<p><b><i>Description: </i></b>This extension point allows to plug in a
-compare/merge viewer for structured content. The viewer must extend <tt>org.eclipse.jface.viewers.Viewer</tt>.
-However since viewers don't have a default constructor the extension point
-must implement a factory object for viewers: the interface <tt>org.eclipse.compare.IViewerCreator</tt>.
-<p><b><i>Configuration Markup:</i></b>
-<p><tt>&nbsp;&nbsp; &lt;!ELEMENT viewer EMPTY></tt>
-<br><tt>&nbsp;&nbsp; &lt;!ATTLIST viewer</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extensions CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp; ></tt>
-<ul>
-<li>
-<b>id</b> - a unique identifier that can be used to reference the viewer</li>
-
-<li>
-<b>class</b> - name of a class that implements a factory for the strcuture
-merge viewer and implements <tt>org.eclipse.compare.IViewerCreator</tt></li>
-
-<li>
-<b>extensions </b>- a comma separated list of file extensions e.g . "zip,
-jar"</li>
-</ul>
-<b><i>Examples:</i></b>
-<br>The following is an example of compare/merge viewer for zip files (extension
-"zip"):
-<p>&lt;extension point = "org.eclipse.compare.structureMergeViewers">
-<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;viewer
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id="org.eclipse.compare.ZipCompareViewer"
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class="org.eclipse.compare.ZipCompareViewerCreator"
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extensions="zip"
-<br>&nbsp;&nbsp;&nbsp; />
-<br>&lt;/extension>
-<p><b><i>Supplied Implementation:</i></b>
-<br>The Compare UI plugin defines a structure compare viewer for zip archives.
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2001. All Rights Reserved." BORDER=0 height=12 width=195></a>
-</body>
-</html>
diff --git a/bundles/org.eclipse.compare/icons/full/clcl16/ancestorpane_co.gif b/bundles/org.eclipse.compare/icons/full/clcl16/ancestorpane_co.gif
deleted file mode 100644
index 0088c97c8..000000000
--- a/bundles/org.eclipse.compare/icons/full/clcl16/ancestorpane_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/clcl16/copy_l_co.gif b/bundles/org.eclipse.compare/icons/full/clcl16/copy_l_co.gif
deleted file mode 100644
index 6c83c45d9..000000000
--- a/bundles/org.eclipse.compare/icons/full/clcl16/copy_l_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/clcl16/copy_r_co.gif b/bundles/org.eclipse.compare/icons/full/clcl16/copy_r_co.gif
deleted file mode 100644
index a3a444adf..000000000
--- a/bundles/org.eclipse.compare/icons/full/clcl16/copy_r_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/clcl16/copycont_l_co.gif b/bundles/org.eclipse.compare/icons/full/clcl16/copycont_l_co.gif
deleted file mode 100644
index 706dc020e..000000000
--- a/bundles/org.eclipse.compare/icons/full/clcl16/copycont_l_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/clcl16/copycont_r_co.gif b/bundles/org.eclipse.compare/icons/full/clcl16/copycont_r_co.gif
deleted file mode 100644
index b95e26a1b..000000000
--- a/bundles/org.eclipse.compare/icons/full/clcl16/copycont_r_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/clcl16/next_nav.gif b/bundles/org.eclipse.compare/icons/full/clcl16/next_nav.gif
deleted file mode 100644
index 8392f3345..000000000
--- a/bundles/org.eclipse.compare/icons/full/clcl16/next_nav.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/clcl16/prev_nav.gif b/bundles/org.eclipse.compare/icons/full/clcl16/prev_nav.gif
deleted file mode 100644
index 9b278e6fa..000000000
--- a/bundles/org.eclipse.compare/icons/full/clcl16/prev_nav.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/clcl16/smartmode_co.gif b/bundles/org.eclipse.compare/icons/full/clcl16/smartmode_co.gif
deleted file mode 100644
index c2a47b6a2..000000000
--- a/bundles/org.eclipse.compare/icons/full/clcl16/smartmode_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/clcl16/syncpane_co.gif b/bundles/org.eclipse.compare/icons/full/clcl16/syncpane_co.gif
deleted file mode 100644
index 3aabbce51..000000000
--- a/bundles/org.eclipse.compare/icons/full/clcl16/syncpane_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/clcl16/twowaycompare_co.gif b/bundles/org.eclipse.compare/icons/full/clcl16/twowaycompare_co.gif
deleted file mode 100644
index 2045daedd..000000000
--- a/bundles/org.eclipse.compare/icons/full/clcl16/twowaycompare_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/ctool16/conflict_edit.gif b/bundles/org.eclipse.compare/icons/full/ctool16/conflict_edit.gif
deleted file mode 100644
index ecde52ea8..000000000
--- a/bundles/org.eclipse.compare/icons/full/ctool16/conflict_edit.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/ctool16/ignorews_edit.gif b/bundles/org.eclipse.compare/icons/full/ctool16/ignorews_edit.gif
deleted file mode 100644
index 097ecdda5..000000000
--- a/bundles/org.eclipse.compare/icons/full/ctool16/ignorews_edit.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/cview16/compare_view.gif b/bundles/org.eclipse.compare/icons/full/cview16/compare_view.gif
deleted file mode 100644
index 41800a0c9..000000000
--- a/bundles/org.eclipse.compare/icons/full/cview16/compare_view.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/dlcl16/ancestorpane_co.gif b/bundles/org.eclipse.compare/icons/full/dlcl16/ancestorpane_co.gif
deleted file mode 100644
index 6e00deec9..000000000
--- a/bundles/org.eclipse.compare/icons/full/dlcl16/ancestorpane_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/dlcl16/copy_l_co.gif b/bundles/org.eclipse.compare/icons/full/dlcl16/copy_l_co.gif
deleted file mode 100644
index cb11ac9f9..000000000
--- a/bundles/org.eclipse.compare/icons/full/dlcl16/copy_l_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/dlcl16/copy_r_co.gif b/bundles/org.eclipse.compare/icons/full/dlcl16/copy_r_co.gif
deleted file mode 100644
index 202b04139..000000000
--- a/bundles/org.eclipse.compare/icons/full/dlcl16/copy_r_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/dlcl16/copycont_l_co.gif b/bundles/org.eclipse.compare/icons/full/dlcl16/copycont_l_co.gif
deleted file mode 100644
index 4e9a3eb98..000000000
--- a/bundles/org.eclipse.compare/icons/full/dlcl16/copycont_l_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/dlcl16/copycont_r_co.gif b/bundles/org.eclipse.compare/icons/full/dlcl16/copycont_r_co.gif
deleted file mode 100644
index e84103f40..000000000
--- a/bundles/org.eclipse.compare/icons/full/dlcl16/copycont_r_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/dlcl16/next_nav.gif b/bundles/org.eclipse.compare/icons/full/dlcl16/next_nav.gif
deleted file mode 100644
index 6cbeced26..000000000
--- a/bundles/org.eclipse.compare/icons/full/dlcl16/next_nav.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/dlcl16/prev_nav.gif b/bundles/org.eclipse.compare/icons/full/dlcl16/prev_nav.gif
deleted file mode 100644
index a3441a062..000000000
--- a/bundles/org.eclipse.compare/icons/full/dlcl16/prev_nav.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/dlcl16/smartmode_co.gif b/bundles/org.eclipse.compare/icons/full/dlcl16/smartmode_co.gif
deleted file mode 100644
index 6f55d908b..000000000
--- a/bundles/org.eclipse.compare/icons/full/dlcl16/smartmode_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/dlcl16/syncpane_co.gif b/bundles/org.eclipse.compare/icons/full/dlcl16/syncpane_co.gif
deleted file mode 100644
index 2a8541ca8..000000000
--- a/bundles/org.eclipse.compare/icons/full/dlcl16/syncpane_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/dlcl16/twowaycompare_co.gif b/bundles/org.eclipse.compare/icons/full/dlcl16/twowaycompare_co.gif
deleted file mode 100644
index ecab86455..000000000
--- a/bundles/org.eclipse.compare/icons/full/dlcl16/twowaycompare_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/dtool16/conflict_edit.gif b/bundles/org.eclipse.compare/icons/full/dtool16/conflict_edit.gif
deleted file mode 100644
index c76fcc707..000000000
--- a/bundles/org.eclipse.compare/icons/full/dtool16/conflict_edit.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/dtool16/ignorews_edit.gif b/bundles/org.eclipse.compare/icons/full/dtool16/ignorews_edit.gif
deleted file mode 100644
index 55147cc33..000000000
--- a/bundles/org.eclipse.compare/icons/full/dtool16/ignorews_edit.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/elcl16/ancestorpane_co.gif b/bundles/org.eclipse.compare/icons/full/elcl16/ancestorpane_co.gif
deleted file mode 100644
index 3ce77c8d3..000000000
--- a/bundles/org.eclipse.compare/icons/full/elcl16/ancestorpane_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/elcl16/copy_l_co.gif b/bundles/org.eclipse.compare/icons/full/elcl16/copy_l_co.gif
deleted file mode 100644
index d9f5900b6..000000000
--- a/bundles/org.eclipse.compare/icons/full/elcl16/copy_l_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/elcl16/copy_r_co.gif b/bundles/org.eclipse.compare/icons/full/elcl16/copy_r_co.gif
deleted file mode 100644
index 61289f18f..000000000
--- a/bundles/org.eclipse.compare/icons/full/elcl16/copy_r_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/elcl16/copycont_l_co.gif b/bundles/org.eclipse.compare/icons/full/elcl16/copycont_l_co.gif
deleted file mode 100644
index 4fdde615d..000000000
--- a/bundles/org.eclipse.compare/icons/full/elcl16/copycont_l_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/elcl16/copycont_r_co.gif b/bundles/org.eclipse.compare/icons/full/elcl16/copycont_r_co.gif
deleted file mode 100644
index feb14bf53..000000000
--- a/bundles/org.eclipse.compare/icons/full/elcl16/copycont_r_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/elcl16/next_nav.gif b/bundles/org.eclipse.compare/icons/full/elcl16/next_nav.gif
deleted file mode 100644
index 03b7af342..000000000
--- a/bundles/org.eclipse.compare/icons/full/elcl16/next_nav.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/elcl16/prev_nav.gif b/bundles/org.eclipse.compare/icons/full/elcl16/prev_nav.gif
deleted file mode 100644
index dd65c5235..000000000
--- a/bundles/org.eclipse.compare/icons/full/elcl16/prev_nav.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/elcl16/smartmode_co.gif b/bundles/org.eclipse.compare/icons/full/elcl16/smartmode_co.gif
deleted file mode 100644
index e0a262e03..000000000
--- a/bundles/org.eclipse.compare/icons/full/elcl16/smartmode_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/elcl16/syncpane_co.gif b/bundles/org.eclipse.compare/icons/full/elcl16/syncpane_co.gif
deleted file mode 100644
index 3e45390ef..000000000
--- a/bundles/org.eclipse.compare/icons/full/elcl16/syncpane_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/elcl16/twowaycompare_co.gif b/bundles/org.eclipse.compare/icons/full/elcl16/twowaycompare_co.gif
deleted file mode 100644
index 4c2532296..000000000
--- a/bundles/org.eclipse.compare/icons/full/elcl16/twowaycompare_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/etool16/conflict_edit.gif b/bundles/org.eclipse.compare/icons/full/etool16/conflict_edit.gif
deleted file mode 100644
index b4451ec5e..000000000
--- a/bundles/org.eclipse.compare/icons/full/etool16/conflict_edit.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/etool16/ignorews_edit.gif b/bundles/org.eclipse.compare/icons/full/etool16/ignorews_edit.gif
deleted file mode 100644
index f816c9e43..000000000
--- a/bundles/org.eclipse.compare/icons/full/etool16/ignorews_edit.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/eview16/compare_view.gif b/bundles/org.eclipse.compare/icons/full/eview16/compare_view.gif
deleted file mode 100644
index 1030b6efc..000000000
--- a/bundles/org.eclipse.compare/icons/full/eview16/compare_view.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/obj16/day_obj.gif b/bundles/org.eclipse.compare/icons/full/obj16/day_obj.gif
deleted file mode 100644
index 96aae05cb..000000000
--- a/bundles/org.eclipse.compare/icons/full/obj16/day_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/obj16/resource_obj.gif b/bundles/org.eclipse.compare/icons/full/obj16/resource_obj.gif
deleted file mode 100644
index d1e679e38..000000000
--- a/bundles/org.eclipse.compare/icons/full/obj16/resource_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/ovr16/add_ov.gif b/bundles/org.eclipse.compare/icons/full/ovr16/add_ov.gif
deleted file mode 100644
index 2a8115602..000000000
--- a/bundles/org.eclipse.compare/icons/full/ovr16/add_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/ovr16/chg_ov.gif b/bundles/org.eclipse.compare/icons/full/ovr16/chg_ov.gif
deleted file mode 100644
index 67b25c457..000000000
--- a/bundles/org.eclipse.compare/icons/full/ovr16/chg_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/ovr16/confadd_ov.gif b/bundles/org.eclipse.compare/icons/full/ovr16/confadd_ov.gif
deleted file mode 100644
index e049755f2..000000000
--- a/bundles/org.eclipse.compare/icons/full/ovr16/confadd_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/ovr16/confchg_ov.gif b/bundles/org.eclipse.compare/icons/full/ovr16/confchg_ov.gif
deleted file mode 100644
index 020fc5438..000000000
--- a/bundles/org.eclipse.compare/icons/full/ovr16/confchg_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/ovr16/confdel_ov.gif b/bundles/org.eclipse.compare/icons/full/ovr16/confdel_ov.gif
deleted file mode 100644
index 39ed5115e..000000000
--- a/bundles/org.eclipse.compare/icons/full/ovr16/confdel_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/ovr16/del_ov.gif b/bundles/org.eclipse.compare/icons/full/ovr16/del_ov.gif
deleted file mode 100644
index 675c20fcc..000000000
--- a/bundles/org.eclipse.compare/icons/full/ovr16/del_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/ovr16/error_ov.gif b/bundles/org.eclipse.compare/icons/full/ovr16/error_ov.gif
deleted file mode 100644
index 95e4db64f..000000000
--- a/bundles/org.eclipse.compare/icons/full/ovr16/error_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/ovr16/inadd_ov.gif b/bundles/org.eclipse.compare/icons/full/ovr16/inadd_ov.gif
deleted file mode 100644
index 0dc3ea89a..000000000
--- a/bundles/org.eclipse.compare/icons/full/ovr16/inadd_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/ovr16/inchg_ov.gif b/bundles/org.eclipse.compare/icons/full/ovr16/inchg_ov.gif
deleted file mode 100644
index f719405c9..000000000
--- a/bundles/org.eclipse.compare/icons/full/ovr16/inchg_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/ovr16/indel_ov.gif b/bundles/org.eclipse.compare/icons/full/ovr16/indel_ov.gif
deleted file mode 100644
index 3e107d24d..000000000
--- a/bundles/org.eclipse.compare/icons/full/ovr16/indel_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/ovr16/outadd_ov.gif b/bundles/org.eclipse.compare/icons/full/ovr16/outadd_ov.gif
deleted file mode 100644
index 780da9881..000000000
--- a/bundles/org.eclipse.compare/icons/full/ovr16/outadd_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/ovr16/outchg_ov.gif b/bundles/org.eclipse.compare/icons/full/ovr16/outchg_ov.gif
deleted file mode 100644
index 4f6a3168e..000000000
--- a/bundles/org.eclipse.compare/icons/full/ovr16/outchg_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/ovr16/outdel_ov.gif b/bundles/org.eclipse.compare/icons/full/ovr16/outdel_ov.gif
deleted file mode 100644
index ab4898167..000000000
--- a/bundles/org.eclipse.compare/icons/full/ovr16/outdel_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/ovr16/r_inadd_ov.gif b/bundles/org.eclipse.compare/icons/full/ovr16/r_inadd_ov.gif
deleted file mode 100644
index 14ba0119b..000000000
--- a/bundles/org.eclipse.compare/icons/full/ovr16/r_inadd_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/ovr16/r_inchg_ov.gif b/bundles/org.eclipse.compare/icons/full/ovr16/r_inchg_ov.gif
deleted file mode 100644
index 0aca3c482..000000000
--- a/bundles/org.eclipse.compare/icons/full/ovr16/r_inchg_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/ovr16/r_indel_ov.gif b/bundles/org.eclipse.compare/icons/full/ovr16/r_indel_ov.gif
deleted file mode 100644
index c37753736..000000000
--- a/bundles/org.eclipse.compare/icons/full/ovr16/r_indel_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/ovr16/r_outadd_ov.gif b/bundles/org.eclipse.compare/icons/full/ovr16/r_outadd_ov.gif
deleted file mode 100644
index 11c2d5de0..000000000
--- a/bundles/org.eclipse.compare/icons/full/ovr16/r_outadd_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/ovr16/r_outchg_ov.gif b/bundles/org.eclipse.compare/icons/full/ovr16/r_outchg_ov.gif
deleted file mode 100644
index 704d70694..000000000
--- a/bundles/org.eclipse.compare/icons/full/ovr16/r_outchg_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/icons/full/ovr16/r_outdel_ov.gif b/bundles/org.eclipse.compare/icons/full/ovr16/r_outdel_ov.gif
deleted file mode 100644
index 95ec3012e..000000000
--- a/bundles/org.eclipse.compare/icons/full/ovr16/r_outdel_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugin.properties b/bundles/org.eclipse.compare/plugin.properties
deleted file mode 100644
index 18971a0d7..000000000
--- a/bundles/org.eclipse.compare/plugin.properties
+++ /dev/null
@@ -1,130 +0,0 @@
-#########################################
-# (c) Copyright IBM Corp. 2000, 2001.
-# All Rights Reserved.
-#########################################
-#
-# Resource strings for Compare Plug-in
-#
-pluginName= Compare Support
-providerName=Eclipse.org
-
-#
-# Extension point names
-#
-structureCreators= Structure Creator
-structureMergeViewers= Structure Merge Viewer
-contentMergeViewers= Content Merge Viewer
-contentViewers= Content Viewer
-
-#
-# CompareUIPlugin
-#
-CompareUIPlugin.dialogTitle=Compare
-CompareUIPlugin.noActiveWorkbenchPage=Can't find active workbench page
-CompareUIPlugin.compareFailed=Compare Failed
-CompareUIPlugin.openEditorError=Problems Opening Editor
-CompareUIPlugin.noDifferences=There are no differences between the selected inputs.
-
-#
-# Compare Editor
-#
-defaultCompareEditor.name= Default Compare Editor
-CompareEditor.saveError.title= Save Error
-CompareEditor.cantSaveError= Can''t save contents ({0})
-CompareEditor.invalidInput=Invalid Input: Must be CompareEditorInput
-
-#
-# Context menu & actions
-#
-CompareWithMenu.label= Comp&are With
-
-CompareWithEachOtherAction.label= &Each Other
-CompareWithEachOtherAction.tooltip= Compare the Selected Resources
-
-CompareWithPatchAction.label= P&atch...
-CompareWithPatchAction.tooltip= Compare the Selected Resource with a Patch
-
-CompareWithHistoryAction.label= &Local History...
-CompareWithHistoryAction.tooltip= Compare the Selected Resource with Local History
-
-ReplaceWithMenu.label= Rep&lace With
-
-ReplaceFromHistoryAction.label= &Local History...
-ReplaceFromHistoryAction.tooltip= Replace the Selected Resource with Local History
-
-ReplaceWithPreviousFromHistoryAction.label= &Previous From Local History
-ReplaceWithPreviousFromHistoryAction.tooltip= Replace the Selected Resource with the Previous from Local History
-
-addFromHistoryAction.label= Restore From Local Histor&y...
-addFromHistoryAction.tooltip= Restore Deleted Files From Local History
-
-#
-# Preference Page
-#
-ComparePreferencePage.name= Compare
-ComparePreferencePage.initiallyShowAncestorPane.label= Initially show a&ncestor pane
-ComparePreferencePage.showPseudoConflicts.label= Show &pseudo conflicts
-ComparePreferencePage.synchronizeScrolling.label= Synchronize &scrolling between panes in compare viewers
-ComparePreferencePage.textFont.label= Text &font
-ComparePreferencePage.showMoreInfo.label= Show additional compare &information in the status line
-ComparePreferencePage.preview.label= Preview:
-ComparePreferencePage.ancestor.label= Common Ancestor
-ComparePreferencePage.left.label= Local
-ComparePreferencePage.right.label= Remote
-ComparePreferencePage.structureCompare.label= &Open structure compare automatically
-ComparePreferencePage.generalTab.label= &General
-ComparePreferencePage.textCompareTab.label= &Text Compare
-ComparePreferencePage.backgroundColor1.label= Bac&kground Color:
-ComparePreferencePage.backgroundColor2.label= S&ystem Default
-ComparePreferencePage.backgroundColor3.label= C&ustom
-ComparePreferencePage.ignoreWhitespace.label= Ignore &Whitespace
-#
-# Toolbar actions
-#
-action.IgnoreWhiteSpace.label=Ignore White Space
-action.IgnoreWhiteSpace.tooltip=Ignore White Space Where Applicable
-action.IgnoreWhiteSpace.image=etool16/ignorews_edit.gif
-
-action.Next.label=Next Difference
-action.Next.tooltip=Go to Next Difference
-action.Next.image=elcl16/next_nav.gif
-
-action.Previous.label=Previous Difference
-action.Previous.tooltip=Go to Previous Difference
-action.Previous.image=elcl16/prev_nav.gif
-
-#
-# Built in Structure Creators
-#
-ZipStructureCreator.name=Zip Archive Compare
-
-#
-# Compare Dialog
-#
-CompareDialog.commit.label=Commit
-CompareDialog.saveErrorTitle=Save Error
-CompareDialog.saveErrorMessage=Can't save
-
-#
-# Compare With Each Other
-#
-ResourceCompare.taskName=Operation in Progress...
-ResourceCompare.twoWay.title=Compare ({0}-{1})
-ResourceCompare.threeWay.title=Compare ({0}-{1}-{2})
-
-#
-# DiffTreeViewer & DiffNodes
-#
-DiffTreeViewer.title= Structure Compare
-DiffNode.noName= <no name>
-DiffNode.nameFormat= {0} / {1}
-
-#
-# Differencing engine
-#
-Differencer.progressFormat= Comparing {0}
-
-#
-# Patch: rejected patch markers
-#
-rejectedPatchMarker.name= Rejected Patch
diff --git a/bundles/org.eclipse.compare/plugin.xml b/bundles/org.eclipse.compare/plugin.xml
deleted file mode 100644
index 3d67a73a0..000000000
--- a/bundles/org.eclipse.compare/plugin.xml
+++ /dev/null
@@ -1,195 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- ======================================================================= -->
-<!-- Compare UI Plugin -->
-<!-- ======================================================================= -->
-
-<plugin
- name="%pluginName"
- id="org.eclipse.compare"
- version="2.0.0"
- provider-name="%providerName"
- class="org.eclipse.compare.internal.CompareUIPlugin">
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.resources"/>
- </requires>
-
- <runtime>
- <library name="compare.jar" >
- <export name="*"/>
- </library>
- </runtime>
-
-<!-- Compare extension point definitions -->
-
- <extension-point
- name="%structureCreators"
- id="structureCreators"/>
-
- <extension-point
- name="%structureMergeViewers"
- id="structureMergeViewers"/>
-
- <extension-point
- name="%contentMergeViewers"
- id="contentMergeViewers"/>
-
- <extension-point
- name="%contentViewers"
- id="contentViewers"/>
-
-<!-- Extensions -->
-
- <extension point="org.eclipse.core.resources.markers"
- id="rejectedPatchMarker" name="%rejectedPatchMarker.name">
- <super type="org.eclipse.core.resources.taskmarker"/>
- <persistent value="true"/>
- </extension>
-
- <extension point="org.eclipse.ui.editors">
- <editor id="org.eclipse.compare.CompareEditor"
- name="%defaultCompareEditor.name"
- icon="icons/full/cview16/compare_view.gif"
- class="org.eclipse.compare.internal.CompareEditor"
- contributorClass="org.eclipse.compare.internal.CompareEditorContributor">
- </editor>
- </extension>
-
- <extension
- point="org.eclipse.ui.preferencePages">
- <page name="%ComparePreferencePage.name"
- id="org.eclipse.compare.internal.ComparePreferencePage"
- class="org.eclipse.compare.internal.ComparePreferencePage"
- category= "org.eclipse.ui.preferencePages.Workbench">
- </page>
- </extension>
-
- <extension point="org.eclipse.ui.popupMenus">
-
- <objectContribution
- id="org.eclipse.compare.CompareAction"
- objectClass="org.eclipse.core.resources.IResource" adaptable="true">
- <menu
- id="replaceWithMenu"
- path="additions"
- label="%ReplaceWithMenu.label">
- <separator name="replaceWithGroup"/>
- </menu>
- <menu
- id="compareWithMenu"
- path="additions"
- label="%CompareWithMenu.label">
- <separator name="compareWithGroup"/>
- </menu>
- <action
- id="compareWithEachOther"
- label="%CompareWithEachOtherAction.label"
- tooltip="%CompareWithEachOtherAction.tooltip"
- menubarPath="compareWithMenu/compareWithGroup"
- enablesFor="2+"
- class="org.eclipse.compare.internal.CompareAction">
- </action>
- <action
- id="compareWithPatch"
- label="%CompareWithPatchAction.label"
- tooltip="%CompareWithPatchAction.tooltip"
- menubarPath="compareWithMenu/compareWithGroup"
- enablesFor="1"
- class="org.eclipse.compare.internal.patch.CompareWithPatchAction">
- </action>
- </objectContribution>
-
- <objectContribution
- id="org.eclipse.compare.ReplaceWithEditionAction"
- objectClass="org.eclipse.core.resources.IFile" adaptable="true">
- <menu
- id="replaceWithMenu"
- path="additions"
- label="%ReplaceWithMenu.label">
- <separator name="replaceWithGroup"/>
- </menu>
- <action
- id="replaceFromHistory"
- label="%ReplaceFromHistoryAction.label"
- tooltip="%ReplaceFromHistoryAction.tooltip"
- menubarPath="replaceWithMenu/replaceWithGroup"
- enablesFor="1"
- class="org.eclipse.compare.internal.ReplaceWithEditionAction">
- </action>
- <action
- id="replaceWithPreviousFromHistory"
- label="%ReplaceWithPreviousFromHistoryAction.label"
- tooltip="%ReplaceWithPreviousFromHistoryAction.tooltip"
- menubarPath="replaceWithMenu/replaceWithGroup"
- enablesFor="1"
- class="org.eclipse.compare.internal.ReplaceWithPreviousEditionAction">
- </action>
- </objectContribution>
-
- <objectContribution
- id="org.eclipse.compare.CompareWithEditionAction"
- objectClass="org.eclipse.core.resources.IFile" adaptable="true">
- <menu
- id="compareWithMenu"
- path="additions"
- label="%CompareWithMenu.label">
- <separator name="compareWithGroup"/>
- </menu>
- <action
- id="compareWithHistory"
- label="%CompareWithHistoryAction.label"
- tooltip="%CompareWithHistoryAction.tooltip"
- menubarPath="compareWithMenu/compareWithGroup"
- enablesFor="1"
- class="org.eclipse.compare.internal.CompareWithEditionAction">
- </action>
- </objectContribution>
-
- <objectContribution
- id="org.eclipse.compare.AddFromHistoryAction"
- objectClass="org.eclipse.core.resources.IContainer" adaptable="true">
- <action
- id="addFromHistoryAction"
- label="%addFromHistoryAction.label"
- tooltip="%addFromHistoryAction.tooltip"
- menubarPath="replaceWithMenu"
- enablesFor="1"
- class="org.eclipse.compare.internal.AddFromHistoryAction">
- </action>
- </objectContribution>
-
- </extension>
-
- <extension point="org.eclipse.compare.structureCreators">
- <structureCreator
- extensions="zip"
- class="org.eclipse.compare.ZipFileStructureCreator">
- </structureCreator>
- </extension>
-
- <extension point="org.eclipse.compare.contentMergeViewers">
- <viewer
- extensions="class,exe,dll,binary,zip,jar"
- class="org.eclipse.compare.internal.BinaryCompareViewerCreator">
- </viewer>
- <viewer
- extensions="txt"
- class="org.eclipse.compare.internal.TextMergeViewerCreator">
- </viewer>
- <viewer
- extensions="gif,jpg"
- class="org.eclipse.compare.internal.ImageMergeViewerCreator">
- </viewer>
- </extension>
-
- <extension point="org.eclipse.compare.contentViewers">
- <viewer
- extensions="txt"
- class="org.eclipse.compare.internal.TextViewerCreator">
- </viewer>
- </extension>
-
-</plugin>
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/.classpath b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/.classpath
deleted file mode 100644
index 1e3546d6b..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/.classpath
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="compare"/>
- <classpathentry kind="src" path="/org.eclipse.core.boot"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
- <classpathentry kind="src" path="/org.eclipse.ui"/>
- <classpathentry kind="src" path="/org.eclipse.core.resources"/>
- <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
- <classpathentry kind="src" path="/org.eclipse.swt"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/.cvsignore b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/.cvsignore
deleted file mode 100644
index 092357e47..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/.project b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/.project
deleted file mode 100644
index 88d7c296f..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/.project
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.compare</name>
- <comment></comment>
- <projects>
- <project>org.eclipse.core.boot</project>
- <project>org.eclipse.ui</project>
- <project>org.eclipse.core.runtime</project>
- <project>org.eclipse.core.resources</project>
- <project>org.eclipse.swt</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.team.cvs.core.cvsnature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/about.html b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/about.html
deleted file mode 100644
index 768324e89..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/about.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<html>
-<head>
-<title>About</title>
-<style type="text/css">
-p, table, td, th { font-family: arial, helvetica, geneva; font-size: 10pt}
-pre { font-family: "Courier New", Courier, mono; font-size: 10pt}
-h2 { font-family: arial, helvetica, geneva; font-size: 18pt; font-weight: bold ; line-height: 14px}
-code { font-family: "Courier New", Courier, mono; font-size: 10pt}
-sup { font-family: arial,helvetica,geneva; font-size: 10px}
-h3 { font-family: arial, helvetica, geneva; font-size: 14pt; font-weight: bold}
-li { font-family: arial, helvetica, geneva; font-size: 10pt}
-h1 { font-family: arial, helvetica, geneva; font-size: 28px; font-weight: bold}
-body { font-family: arial, helvetica, geneva; font-size: 10pt; clip: rect( ); margin-top: 5mm; margin-left: 3mm}
-</style>
-</head>
-<body lang="EN-US" link="blue" vlink="purple">
-<table border="0" cellspacing="5" cellpadding="2" width="100%" >
- <tr>
- <td align="LEFT" valign="TOP" colspan="2" bgcolor="#0080C0"><b><font color="#FFFFFF">About This Content</font></b></td>
- </tr>
- <tr>
- <td>
-<p>11th December, 2001</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in &quot;Content&quot;. Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-<a href="http://www.eclipse.org/legal/cpl-v05.html">Common Public License Version 0.5</a> &quot;CPL&quot;. For purposes of the CPL, &quot;Program&quot; will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL &quot;Other License&quot;, any modifications, enhancements and/or
-other code and/or documentation &quot;Modifications&quot; uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-</td></tr></table>
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/build.properties b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/build.properties
deleted file mode 100644
index 68f93ee67..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.compare.jar = compare/
-bin.includes = icons/,\
- plugin.xml,\
- *.jar,\
- plugin.properties,\
- notice.html,\
- about.html
-src.includes=about.html
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html
deleted file mode 100644
index 28405b0d4..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html
+++ /dev/null
@@ -1,1056 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
- <meta name="Author" content="IBM">
- <title>Eclipse Platform Release Notes - Desktop</title>
-</head>
-<body>
-
-<h1>
-Eclipse Platform Build Notes<br>
-Compare</h1>
-Eclipse Build Input June 8th 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=18807">#18807</a>: Compare with patch fails due to missing LF<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=13730">#13730</a>: Entire zipfiles content sent prior when computing synchronization view content<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input June 7th 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=13730">#13730</a>: Entire zipfiles content sent prior when computing synchronization view content<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=14952">#14952</a>: Diff Browser Opens Too Small / Not Easily Resizable<br>
-
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input June 6th 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-New constant CompareUI.PLUGIN_ID
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=13949">#13949</a>: DBCS: bogus at text compare<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=19013">#19013</a>: backgronud color: is it honored?<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=19216">#19216</a>: Accessibility in Workbench > Compare > Text Compare<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=19371">#19371</a>: Java & Compare editor's Next/Previous toolbar buttons shouldn't be retargetable<br>
-
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input June 1st 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-Made class NavigationAction public.
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=8004">#8004</a>: Ctrl+E beeps every time<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=14800">#14800</a>: Compare View eats tabs<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=18200">#18200</a>: Both sets of arrows say "Select Next Change"<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=18206">#18206</a>: Casing, wording issue on "Last Resource reached" prompt<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=16285">#16285</a>: Add from Local History needs a description label<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=17431">#17431</a>: Accessibility issues<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=18148">#18148</a>: Using combinations of No and Next file button break wrapping<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=18151">#18151</a>: Next File button does not ding when on last file<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=16570">#16570</a>: Compare refuses to show further differences if not ignoring whitespaces<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=10790">#10790</a>: Patch does not apply if file not found locally<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=12643">#12643</a>: Expand all does not disable when there is no selection<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input May 31st 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=18116">#18116</a>: Compare view does not inherit Java editor background color<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=13190">#13190</a>: Compare with Patch does not apply Patch, if single file selected<br>
-
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input May 30th 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=17699">#17699</a>: Java Editor: Local Histroy menu entries are enabled for read-only files<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=16283">#16283</a>: Add from Local History items are unsorted<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=16288">#16288</a>: Add from Local History: list of available editions flashes<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=17664">#17664</a>: Applying a patch with deleted package fails<br>
-
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input May 29th 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=14040">#14040</a>: Platform interoperability issue w.r.t. Compare With Patch<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=17790">#17790</a>: Missing mnemonics in patch selection dialog<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=10917">#10917</a>: Patch support does not use mnemonics<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input May 28th 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=17889">#17889</a>: Should not assume type of PropertyChangeEvent values<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=17678">#17678</a>: Applying a patch does many compiles<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=17536">#17536</a>: NPE in compare<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=17121">#17121</a>: Casing of message when end of changes needs to be sentence style<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=17648">#17648</a>: Can't apply patch w/o ignoring whitespace<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=16936">#16936</a>: Compare with patch requires "Ignore Whitespace" to be turned off<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input May 18th 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=14371">#14371</a>: TextMergeViewer.sameDoc() is broken<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=14378">#14378</a>: CompareEditorInput never resets dirtyness flag (detailed)<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=14680">#14680</a>: Compare unreadable in high contrast black<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=14952">#14952</a>: Diff Browser Opens Too Small / Not Easily Resizable<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=14742">#14742</a>: Ignore whitespace preference<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=14624">#14624</a>: No visual cue when compared file wraps<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=13606">#13606</a>: Support multiple selection in Add from local history<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input May 16th 2002
-
-<h2>
-What's new in this drop</h2>
-Bumped plugin version number to 2.0.0<br>
-Adapted to new findEditor methods<br>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=8373">#8373</a>: Compare With->Patch... missing mnemonic<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=12719">#12719</a>: "Show Pseudo-Conflicts" setting is problematic<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input April 30th 2002
-
-<h2>
-What's new in this drop</h2>
-All strings NLSed.
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=14515">#14515</a>: java compare uses internal jcore scanner<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=14782">#14782</a>: Add from Local History missing mnemonic<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input April 18th 2002
-
-<h2>
-What's new in this drop</h2>
-All strings NLSed.
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=13152">#13152</a>: Internal error in "Add from Local History..." on packages<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input April 9th 2002
-
-<h2>
-What's new in this drop</h2>
-New context menu action 'Add From Local History'. Just select any resource container and
-'Add From Local History' presents all files that were deleted from the workspace but are
-still in the local history.
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-The new 'Add From Local History' suffers from #12915. It works if the files were deleted
-within the same session. However if you shut down and restart a workspace some deleted
-files are nor listed.
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=11578">#11578</a>: Patch: Missing resource on dialog<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=11579">#11579</a>: Compare with Patch should be disabled on closed projects<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=11907">#11907</a>: clicking in bird's eye view spots does nothing if panes not synched<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=11536">#11536</a>: Option to turn off structured comparison<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=10682">#10682</a>: Need better UI for recovering deletions from local history<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=11446">#11446</a>: provide "add from local history" for compilation units<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=8615">#8615</a>: Styled Text widget does not respond to system color change<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=9673">#9673</a>: editor background color - no effect on other viewers<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=11642">#11642</a>: Compare editors not using default background colors<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=10434">#10434</a>: Compare browser fails silently and does not give result<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input March 18th 2002
-
-<h2>
-What's new in this drop</h2>
-First cut of a birdseyeview for the text compare viewer.<br>
-'Compare which Each other' for Java elements.
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=3641">#3641</a>: DCR: Can't compare from outliner (1GDHJKK)<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input March 14th 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=11305">#11305</a>: Can't compare a "C" file<br>
-
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input March 12th 2002
-
-<h2>
-What's new in this drop</h2>
-Structure Compare viewers are enabled by default.<br>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=10379">#10379</a>: Compare with Local History Dialog: lower pane is missing a bordeer<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=9768">#9768</a>: (empty-menu) in compare view<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=9842">#9842</a>: Expand All action needed in structure compare view<br>
-
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input March 5th 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=9869">#9869</a>: Need more support for creating/deleting resources<br>
-
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input February 26th 2002
-
-<h2>
-What's new in this drop</h2>
-Patch: for every rejected file a task marker is added<br>
-Compare preference page shows options in a preview<br>
-New preference option for additional compare status line information
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=9540">#9540</a>: Compare with patch: it should not be possible to check items that could not be applied<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=9532">#9532</a>: Compare with patch: next disabled although clipboard specified<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=7681">#7681</a>: Structured results expands import statements<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=9572">#9572</a>: Debugging trace left in status bar<br>
-
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input February 12th 2002
-
-<h2>
-What's new in this drop</h2>
-The patch wizard no longer opens a Compare Editor but applies the
-patch directly to the workspace. This will be the default.
-In the future the old behavior of opening the Compare Editor will be
-an additional option when finishing the wizard.
-<br>
-Patch wizard has a 'Reverse' option for applying a "reversed" patch.
-This option can be used to 'undo' a patch.
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=9153">#9153</a>: NPE when closing synchronize view<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=9331">#9331</a>: NPE during compare with stream version<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=6346">#6346</a>: Problems with Patch<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=6727">#6727</a>: Patch: *.rej file must be saved in workspace<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=7358">#7358</a>: Internal Error in Compare with Patch with new files<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input February 5th 2002
-
-<h2>
-What's new in this drop</h2>
-The structure compare pane opens when a resource is selected.
-In previous version a double click was required.
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=5063">#5063</a>: Should not have to double-click to open Structure Compare<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=2602">#2602</a>: Compare FW accessibility issues (1GK79UB)<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=2707">#2707</a>: Merge viewer should ask for save before releasing (1GI9JXS)<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=2772">#2772</a>: DCR: Automatic structure compare (1GJ6EUY)<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=3829">#3829</a>: Smart rename button enabled when no smartness is available (1GEUVHN)<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=9089">#9089</a>: Local history - Selecting item in structured compare has no effect<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input January 29th 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=6271">#6271</a>: Can't tell which file is which in Compare browser<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=2519">#2519</a>: next/prev arrows active when only one difference in compare (1GFIQX3)<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=8363">#8363</a>: NPE comparing two resources in the navigator.<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=2501">#2501</a>: Empty menu in compare browser (1GFBQKE)<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=2854">#2854</a>: Compare: Save code path problematic (1GJYGAX)<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=8574">#8574</a>: Not structure compare in compare with local history<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input January 23th 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=8089">#8089</a>: Replace from local history: parse error<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input January 22th 2002
-
-<h2>
-What's new in this drop</h2>
-Fixed an inconsistency in the binary compare viewer:
-info message didn't match +/-icon in the resource compare pane.
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=3859">#3859</a>: replace from history does not work for elements with error (1GEYIZ6)<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=6177">#6177</a>: Double click action dangerous in 'Restore from Local History'<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=7821">#7821</a>: Team 2.0 CVS synchronze bug 'no-name' dirs..<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=2773">#2773</a>: Java structure compare should give better indication when no changes (1GJ6ENE)<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input January 15th 2002
-
-<h2>
-What's new in this drop</h2>
-Fixed a problem in DiffNode.getName()and the DiffTreeViewer's label provider
-where the left and right half of a DiffNode label would be reversed because
-the "leftIsLocal" property of a CompareConfiguration wasn't obeyed.
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=1893">#1893</a>: Compare Viewer doesn't scroll to last line (1GBB34N)<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=5839">#5839</a>: Usability: Initial diff is sometimes not horizontally aligned<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=5325">#5325</a>: Compare always scroll the text pane to the extreme limit<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=7048">#7048</a>: First element not selected<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=2548">#2548</a>: Project compare should open viewing selected file (1GFMRP6)<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=2938">#2938</a>: Replace from local history should show busy cursor (1GKU0P3)<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=7594">#7594</a>: Menu entry "Replace with Previous" shouldn't have a "..."<br>
-Workaround added for:<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=7320">#7320</a>: Next diff scrolls when going into current diff<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input January 8th 2002
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-Added methods to CompareUI plugin for adding and removing aliases
-for the file extension to StructureCompareViewer mapping
-(addStructureViewerAlias, removeStructureViewerAlias).
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=6828">#6828</a>: Support with replace with previous<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=2396">#2396</a>: Save in compare editors needs progress bar (1GEYF58)<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=5271">#5271</a>: JARs compared as source in release browser<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=5121">#5121</a>: Replace with Previous (from local history)<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input December 11th 2001
-
-<h2>
-What's new in this drop</h2>
-Keyboard shortcuts for 'Goto next Difference' and 'Goto previous Difference'
-changed to Control-E and Control-Shift-E.<br>
-Better NLS support.<br>
-Updated file "about.html".
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input December 4th 2001
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=4381">#4381</a>: Replace from local histroy - workspace element included <br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse Build Input November 27th 2001
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=6298">#6298</a>: Replace with Local History: Workbench -> Workspace<br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=5238">#5238</a>: Compare fails if takes more than 20 seconds<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse SDK Build 210, November 12th, 2001
-
-<h2>
-What's new in this drop</h2>
-First cut for 'rejected hunk' support.
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-new classes CompareViewerPane and CompareViewerSwitchingPane<br>
-
-<h3>
-Other highlights</h3>
-Improved Patch wizard.<br>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=5723">#5723</a>: Apply Patch dialog has no radio selection<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse SDK Build 207, November 1st, 2001
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=5334">#5334: Internal errors using patch tool</a><br>
-<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=5150">#5150: Compare with patch cannot read VCM's CVS patch file</a><br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse SDK Build 204, October 12th, 2001
-
-<h2>
-What's new in this drop</h2>
-First cut of patch support.
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse SDK Build 202, September 27th, 2001
-
-<h2>
-What's new in this drop</h2>
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-1GKKUA5: ITPUI:WINNT - Severe: memory leak in sync view<br>
-1GKKGGS: ITPJUI:WIN2000 - (136) compares zips as source<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse SDK Build 201, September 21st, 2001
-
-<h2>
-What's new in this drop</h2>
-removed direction icon in TextMergeViewer for two-way compare
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-1GJURWJ: ITPUI:WIN2000 - Hebrew + Japanese: compare view defaults to binary<br>
-1GK0388: ITPJCORE:WIN2000 - replace with local history: selecting (workspace) deletes source<br>
-1GITG2V: ITPUI:WIN2000 - Comparing html files uses binary compare<br>
-1GJW2TP: ITPJUI:WIN2000 - java compare: why beep every time?<br>
-
-<h2>
-Problem reports closed</h2>
-
-<h1>
-<hr WIDTH="100%"></h1>
-Eclipse SDK Build 200, September 13th, 2001
-
-<h2>
-What's new in this drop</h2>
-If not specified otherwise Compare viewer font is taken from workbench text font<br>
-The shortcut for "Goto Next/Previous Difference" is Ctrl-D/Ctrl-Shift-D
-to avoid a clash with Ctrl-P of the Print command.
-
-<h3>
-API changes</h3>
-
-<h3>
-API Additions</h3>
-new method EditionSelectionDialog.setHideIdenticalEntries(boolean)<br>
-new method EditionSelectionDialog.setTargetIsRight(boolean)<br>
-new method EditionSelectionDialog.setAddMode(boolean)<br>
-new method CompareEditorInput.saveChanges(...)<br>
-new method TextMergeViewer.createLineComparator(IDocument document, IRegion region, boolean ignoreWhiteSpace)<br>
-
-<h3>
-Other highlights</h3>
-
-<h2>
-Known deficiencies</h2>
-
-<h2>
-Problem reports fixed</h2>
-1GFMLFB: ITPUI:WIN2000 - files that are out of sync with the file system appear as empty<br>
-1GG0ELM: ITPVCM:ALL - Local history displayed some of Today's items as Yesterday<br>
-1GGNKHN: ITPJUI:ALL - No progress during replace with local history<br>
-1GF2JNI: ITPUI:ALL - (minor)Compare failed title should be title case<br>
-1GHBPA1: ITPVCM:WINNT - Compare - next change arrow switches to wrong file<br>
-1GGQQH3: ITPJUI:WINNT - Compare hightlights a non-change instead of the change<br>
-1GI5DN9: ITPUI:WIN2000 - Conflicting token deletions don't show up in text compare viewer<br>
-1GI3KUR: ITPJUI:WIN2000 - Compare: double-click in versions list closes view<br>
-1GFFR4B: ITPUI:WIN98 - local history is misleading<br>
-1GBM0IL: ITPUI:WINNT - CompareEditorInput#save should throw CoreException<br>
-1GI99LE: ITPUI:ALL - Compare viewer does not show last line when horizontal scroll bar is present<br>
-1GBB34N: ITPJUI:WIN2000 - Compare Viewer doesn't scroll to last line<br>
-1GGZ8DO: ITPJUI:WIN - MergeViewer invalid selection range<br>
-1GIIBHM: ITPUI:WIN2000 - Problems when comparing zip files<br>
-1GIKKOZ: ITPUI:ALL - alt copyright text in html doc needs update<br>
-1GIURNB: ITPUI:ALL - property file of EditionSelectionDialog contains configuration options<br>
-1GIUS6L: ITPUI:ALL - TextMergeViewer uses deprecated Thread.stop()<br>
-1GI3HDZ: ITPJUI:ALL - Compare: conflicts with no ancestor does not show differences<br>
-1GEUX0D: ITPJUI:ALL - not state aware toolbar button in compare<br>
-
-<h2>
-Problem reports closed</h2>
-1GF9Y9C: ITPUI:WIN2000 - DCR: only get ancestor pane contents if pane is visible<br>
-
-</body>
-</html>
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/BufferedContent.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/BufferedContent.java
deleted file mode 100644
index d64b12270..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/BufferedContent.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import java.io.*;
-import org.eclipse.jface.util.ListenerList;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.compare.internal.Utilities;
-
-/**
- * Abstract implementation for a buffered <code>IStreamContentAccessor</code>.
- * <p>
- * Subclasses must implement the <code>createStream</code> method
- * to connect the buffered content with a streamable source (e.g., a file).
- * <p>
- * As long as the contents of <code>BufferedContent</code> is only retrieved as an input stream
- * (by means of <code>getContents</code>) and the <code>BufferedContent</code> is not modified (with
- * <code>setContent</code>) no buffering takes place.
- * Buffering starts when either method <code>getContent</code> or <code>setContent</code> is called.
- *
- * @see IContentChangeNotifier
- * @see IStreamContentAccessor
- */
-public abstract class BufferedContent implements IContentChangeNotifier, IStreamContentAccessor {
-
- byte[] fContent;
- private ListenerList fListenerList;
-
- /**
- * Creates a buffered stream content accessor.
- */
- protected BufferedContent() {
- }
-
- /* (non-Javadoc)
- * see IStreamContentAccessor.getContents
- */
- public InputStream getContents() throws CoreException {
- if (fContent != null)
- return new ByteArrayInputStream(fContent);
- return createStream();
- }
-
- /**
- * Creates and returns a stream for reading the contents.
- * <p>
- * Subclasses must implement this method.
- * </p>
- *
- * @return the stream from which the content is read
- * @exception CoreException if the contents could not be accessed
- */
- protected abstract InputStream createStream() throws CoreException;
-
- /**
- * Sets the contents. Registered content change listeners are notified.
- *
- * @param contents the new contents
- */
- public void setContent(byte[] contents) {
- fContent= contents;
- fireContentChanged();
- }
-
- /**
- * Returns the contents as an array of bytes.
- *
- * @return the contents as an array of bytes, or <code>null</code> if
- * the contents could not be accessed
- */
- public byte[] getContent() {
- if (fContent == null) {
- try {
- InputStream is= createStream();
- fContent= Utilities.readBytes(is);
- } catch(CoreException ex) {
- }
- }
- return fContent;
- }
-
- /**
- * Discards the buffered content.
- */
- public void discardBuffer() {
- fContent= null;
- }
-
- /* (non-Javadoc)
- * see IContentChangeNotifier.addChangeListener
- */
- public void addContentChangeListener(IContentChangeListener listener) {
- if (fListenerList == null)
- fListenerList= new ListenerList();
- fListenerList.add(listener);
- }
-
- /* (non-Javadoc)
- * see IContentChangeNotifier.removeChangeListener
- */
- public void removeContentChangeListener(IContentChangeListener listener) {
- if (fListenerList != null) {
- fListenerList.remove(listener);
- if (fListenerList.isEmpty())
- fListenerList= null;
- }
- }
-
- /**
- * Notifies all registered <code>IContentChangeListener</code>s of a content change.
- */
- protected void fireContentChanged() {
- if (fListenerList != null) {
- Object[] listeners= fListenerList.getListeners();
- for (int i= 0; i < listeners.length; i++)
- ((IContentChangeListener)listeners[i]).contentChanged(this);
- }
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java
deleted file mode 100644
index c2c62dbac..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java
+++ /dev/null
@@ -1,425 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import java.util.HashMap;
-
-import org.eclipse.swt.graphics.*;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.*;
-import org.eclipse.jface.preference.IPreferenceStore;
-
-import org.eclipse.compare.internal.*;
-import org.eclipse.compare.structuremergeviewer.Differencer;
-
-/**
- * A <code>CompareConfiguration</code> object
- * controls various UI aspects of compare/merge viewers like
- * title labels and images, or whether a side of a merge viewer is editable.
- * In addition to these fixed properties <code>ICompareConfiguration</code> provides
- * API for an open ended set of properties. Different viewers which share the same
- * configuration can communicate via this mechanism. E.g. if a compare editor
- * has a button for controlling whether compare viewers ignore white space,
- * the button would trigger a change of the boolean <code>IGNORE_WHITESPACE</code> property
- * and all interested viewers would receive notification.
- * <p>
- * Suitable default labels are provided (without images); both the left and right sides
- * are editable.
- * </p>
- * <p>
- * Clients may use this class as is, or subclass to add new state and behavior.
- * </p>
- */
-public class CompareConfiguration {
-
- /**
- * Name of the ignore whitespace property.
- */
- public static final String IGNORE_WHITESPACE= "IGNORE_WHITESPACE"; //$NON-NLS-1$
- /**
- * Name of the show pseudo conflicts property.
- */
- public static final String SHOW_PSEUDO_CONFLICTS= "SHOW_PSEUDO_CONFLICTS"; //$NON-NLS-1$
-
-
- private static final int WIDTH= 22;
-
- private static ImageDescriptor[] fgImages= new ImageDescriptor[16];
- private static Object fgDummy= new Object();
- private static HashMap fgMap= new HashMap(20);
- private static boolean fLeftIsLocal= true;
-
- static {
- if (fLeftIsLocal) {
- fgImages[Differencer.ADDITION]= CompareUIPlugin.getImageDescriptor("ovr16/del_ov.gif"); //$NON-NLS-1$
- fgImages[Differencer.LEFT + Differencer.ADDITION]= CompareUIPlugin.getImageDescriptor("ovr16/r_inadd_ov.gif"); //$NON-NLS-1$
- fgImages[Differencer.RIGHT + Differencer.ADDITION]= CompareUIPlugin.getImageDescriptor("ovr16/r_outadd_ov.gif"); //$NON-NLS-1$
-
- fgImages[Differencer.DELETION]= CompareUIPlugin.getImageDescriptor("ovr16/add_ov.gif"); //$NON-NLS-1$
- fgImages[Differencer.LEFT + Differencer.DELETION]= CompareUIPlugin.getImageDescriptor("ovr16/r_indel_ov.gif"); //$NON-NLS-1$
- fgImages[Differencer.RIGHT + Differencer.DELETION]= CompareUIPlugin.getImageDescriptor("ovr16/r_outdel_ov.gif"); //$NON-NLS-1$
-
- fgImages[Differencer.LEFT + Differencer.CHANGE]= CompareUIPlugin.getImageDescriptor("ovr16/r_inchg_ov.gif"); //$NON-NLS-1$
- fgImages[Differencer.RIGHT + Differencer.CHANGE]= CompareUIPlugin.getImageDescriptor("ovr16/r_outchg_ov.gif"); //$NON-NLS-1$
- } else {
- fgImages[Differencer.ADDITION]= CompareUIPlugin.getImageDescriptor("ovr16/add_ov.gif"); //$NON-NLS-1$
- fgImages[Differencer.LEFT + Differencer.ADDITION]= CompareUIPlugin.getImageDescriptor("ovr16/inadd_ov.gif"); //$NON-NLS-1$
- fgImages[Differencer.RIGHT + Differencer.ADDITION]= CompareUIPlugin.getImageDescriptor("ovr16/outadd_ov.gif"); //$NON-NLS-1$
-
- fgImages[Differencer.DELETION]= CompareUIPlugin.getImageDescriptor("ovr16/del_ov.gif"); //$NON-NLS-1$
- fgImages[Differencer.LEFT + Differencer.DELETION]= CompareUIPlugin.getImageDescriptor("ovr16/indel_ov.gif"); //$NON-NLS-1$
- fgImages[Differencer.RIGHT + Differencer.DELETION]= CompareUIPlugin.getImageDescriptor("ovr16/outdel_ov.gif"); //$NON-NLS-1$
-
- fgImages[Differencer.LEFT + Differencer.CHANGE]= CompareUIPlugin.getImageDescriptor("ovr16/inchg_ov.gif"); //$NON-NLS-1$
- fgImages[Differencer.RIGHT + Differencer.CHANGE]= CompareUIPlugin.getImageDescriptor("ovr16/outchg_ov.gif"); //$NON-NLS-1$
- }
-
- fgImages[Differencer.CONFLICTING + Differencer.ADDITION]= CompareUIPlugin.getImageDescriptor("ovr16/confadd_ov.gif"); //$NON-NLS-1$
- fgImages[Differencer.CONFLICTING + Differencer.DELETION]= CompareUIPlugin.getImageDescriptor("ovr16/confdel_ov.gif"); //$NON-NLS-1$
- fgImages[Differencer.CONFLICTING + Differencer.CHANGE]= CompareUIPlugin.getImageDescriptor("ovr16/confchg_ov.gif"); //$NON-NLS-1$
-
-// ImageDescriptor tmp= fgImages[Differencer.ADDITION];
-// fgImages[Differencer.ADDITION]= fgImages[Differencer.DELETION];
-// fgImages[Differencer.DELETION]= tmp;
- }
-
- private IPreferenceStore fPreferenceStore;
- private ListenerList fListeners= new ListenerList();
- private HashMap fProperties= new HashMap();
- private boolean fLeftEditable= true;
- private boolean fRightEditable= true;
- private String fAncestorLabel;
- private String fLeftLabel;
- private String fRightLabel;
- private Image fAncestorImage;
- private Image fRightImage;
- private Image fLeftImage;
- private Image[] fImages= new Image[16];
-
- /**
- * Creates a new configuration with editable left and right sides,
- * suitable default labels, and no images.
- */
- public CompareConfiguration(IPreferenceStore prefStore) {
-
- setProperty("LEFT_IS_LOCAL", new Boolean(fLeftIsLocal)); //$NON-NLS-1$
-
- fPreferenceStore= prefStore;
- if (fPreferenceStore != null) {
- boolean b= fPreferenceStore.getBoolean(ComparePreferencePage.INITIALLY_SHOW_ANCESTOR_PANE);
- setProperty(ComparePreferencePage.INITIALLY_SHOW_ANCESTOR_PANE, new Boolean(b));
-
- b= fPreferenceStore.getBoolean(ComparePreferencePage.IGNORE_WHITESPACE);
- setProperty(CompareConfiguration.IGNORE_WHITESPACE, new Boolean(b));
- }
- }
-
- /**
- * Creates a new configuration with editable left and right sides,
- * suitable default labels, and no images.
- */
- public CompareConfiguration() {
- this(CompareUIPlugin.getDefault().getPreferenceStore());
- }
-
- /**
- * Returns the preference store of this configuration.
- * @return the preference store of this configuration.
- */
- public IPreferenceStore getPreferenceStore() {
- return fPreferenceStore;
- }
-
- /**
- * Returns an image showing the specified change kind.
- * The different kind of changes are defined in the <code>Differencer</code>.
- * Newly created images are remembered by this class and
- * disposed when the <code>dispose</code> method is called.
- *
- * @param kind the kind of change as defined in <code>Differencer</code>.
- * @return an modification of the base image reflecting the kind of change.
- * @see org.eclipse.compare.structuremergeviewer.Differencer
- */
- public Image getImage(int kind) {
- Image image= fImages[kind & 15];
- if (image == null) {
- ImageDescriptor id= fgImages[kind & 15];
- if (id != null)
- image= id.createImage();
- fImages[kind & 15]= image;
- }
- return image;
- }
-
- /**
- * Returns an image showing the specified change kind applied to a
- * given base image. The different kind of changes are defined in the <code>Differencer</code>.
- * Typically an implementation would build a composite image
- * from the given base image and an image representing the change kind.
- * Newly created images are remembered by this class and
- * disposed when the <code>dispose</code> method is called.
- *
- * @param base the image which is modified to reflect the kind of change
- * @param kind the kind of change as defined in <code>Differencer</code>.
- * @return an modification of the base image reflecting the kind of change.
- * @see org.eclipse.compare.structuremergeviewer.Differencer
- */
- public Image getImage(Image base, int kind) {
-
- Object key= base;
- if (key == null)
- key= fgDummy;
-
- kind &= 15;
-
- Image[] a= (Image[]) fgMap.get(key);
- if (a == null) {
- a= new Image[16];
- fgMap.put(key, a);
- }
- Image b= a[kind];
- if (b == null) {
- b= new DiffImage(base, fgImages[kind], WIDTH, !fLeftIsLocal).createImage();
- CompareUI.disposeOnShutdown(b);
- a[kind]= b;
- }
- return b;
- }
-
- /**
- * Dispose of this compare configuration.
- * This method is called if the compare configuration is no longer used.
- * An implementation must dispose of all resources.
- */
- public void dispose() {
- }
-
- /**
- * Fires a <code>PropertyChangeEvent</code> to registered listeners.
- *
- * @param propertyName the name of the property that has changed
- * @param oldValue the property's old value
- * @param newValue the property's new value
- */
- private void fireChange(String propertyName, Object oldValue, Object newValue) {
- PropertyChangeEvent event= null;
- Object[] listeners= fListeners.getListeners();
- if (listeners != null) {
- for (int i= 0; i < listeners.length; i++) {
- IPropertyChangeListener l= (IPropertyChangeListener) listeners[i];
- if (event == null)
- event= new PropertyChangeEvent(this, propertyName, oldValue, newValue);
- l.propertyChange(event);
- }
- }
- }
-
- /* (non javadoc)
- * see IPropertyChangeNotifier.addListener
- */
- public void addPropertyChangeListener(IPropertyChangeListener listener) {
- fListeners.add(listener);
- }
-
- /* (non javadoc)
- * see IPropertyChangeNotifier.removeListener
- */
- public void removePropertyChangeListener(IPropertyChangeListener listener) {
- fListeners.remove(listener);
- }
-
- /**
- * Sets the property with the given name.
- * If the new value differs from the old a <code>PropertyChangeEvent</code>
- * is sent to registered listeners.
- *
- * @param propertyName the name of the property to set
- * @param value the new value of the property
- */
- public void setProperty(String key, Object newValue) {
- Object oldValue= fProperties.get(key);
- fProperties.put(key, newValue);
- if (oldValue == null || !oldValue.equals(newValue))
- fireChange(key, oldValue, newValue);
- }
-
- /**
- * Returns the property with the given name, or <code>null</code>
- * if no such property exists.
- *
- * @param propertyName the name of the property to retrieve
- * @return the property with the given name, or <code>null</code> if not found
- */
- public Object getProperty(String key) {
- return fProperties.get(key);
- }
-
- //---- ancestor
-
- /**
- * Sets the label to use for the ancestor of compare/merge viewers.
- *
- * @param label the new label for the ancestor of compare/merge viewers
- */
- public void setAncestorLabel(String label) {
- fAncestorLabel= label;
- }
-
- /**
- * Returns the label for the ancestor side of compare/merge viewers.
- * This label is typically shown in the title of the ancestor area in a compare viewer.
- *
- * @param element the input object of a compare/merge viewer or <code>null</code>
- * @return the label for the ancestor side or <code>null</code>
- */
- public String getAncestorLabel(Object element) {
- return fAncestorLabel;
- }
-
- /**
- * Sets the image to use for the ancestor of compare/merge viewers.
- * The CompareConfiguration does not automatically dispose the old image.
- *
- * @param image the new image for the ancestor of compare/merge viewers
- */
- public void setAncestorImage(Image image) {
- fAncestorImage= image;
- }
-
- /**
- * Returns the image for the ancestor side of compare/merge viewers.
- * This image is typically shown in the title of the ancestor area in a compare viewer.
- *
- * @param element the input object of a compare/merge viewer or <code>null</code>
- * @return the image for the ancestor side or <code>null</code>
- */
- public Image getAncestorImage(Object element) {
- return fAncestorImage;
- }
-
- //---- left side
-
- /**
- * Controls whether the left side of a merge viewer is editable.
- *
- * @param editable if the value is <code>true</code> left side is editable
- */
- public void setLeftEditable(boolean editable) {
- fLeftEditable= editable;
- }
-
- /**
- * Returns whether the left hand side of a merge viewer is editable.
- *
- * @return <code>true</code> if the left hand side is editable
- */
- public boolean isLeftEditable() {
- return fLeftEditable;
- }
-
- /**
- * Sets the label to use for the left side of compare/merge viewers.
- *
- * @param label the new label for the left side of compare/merge viewers
- */
- public void setLeftLabel(String label) {
- fLeftLabel= label;
- }
-
- /**
- * Returns the label for the left hand side of compare/merge viewers.
- * This label is typically shown in the title of the left side of a compare viewer.
- *
- * @param element the input object of a compare/merge viewer or <code>null</code>
- * @return the label for the left hand side or <code>null</code>
- */
- public String getLeftLabel(Object element) {
- return fLeftLabel;
- }
-
- /**
- * Sets the image to use for the left side of compare/merge viewers.
- * The compare configuration does not automatically dispose the old image.
- *
- * @param image the new image for the left side of compare/merge viewers
- */
- public void setLeftImage(Image image) {
- fLeftImage= image;
- }
-
- /**
- * Returns the image for the left hand side of compare/merge viewers.
- * This image is typically shown in the title of the left side of a compare viewer.
- *
- * @param element the input object of a compare/merge viewer or <code>null</code>
- * @return the image for the left hand side or <code>null</code>
- */
- public Image getLeftImage(Object element) {
- return fLeftImage;
- }
-
- //---- right side
-
- /**
- * Controls whether the right side of a merge viewer is editable.
- *
- * @param editable if the value is <code>true</code> right side is editable
- */
- public void setRightEditable(boolean editable) {
- fRightEditable= editable;
- }
-
- /**
- * Returns whether the right hand side of a merge viewer is editable.
- *
- * @return <code>true</code> if the right hand side is editable
- */
- public boolean isRightEditable() {
- return fRightEditable;
- }
-
- /**
- * Sets the label to use for the right side of compare/merge viewers.
- *
- * @param label the new label for the right side of compare/merge viewers
- */
- public void setRightLabel(String label) {
- fRightLabel= label;
- }
-
- /**
- * Returns the label for the right hand side of compare/merge viewers.
- * This label is typically shown in the title of the right side of a compare viewer.
- *
- * @param element the input object of a compare/merge viewer or <code>null</code>
- * @return the label for the right hand side or <code>null</code>
- */
- public String getRightLabel(Object element) {
- return fRightLabel;
- }
-
- /**
- * Sets the image to use for the right side of compare/merge viewers.
- * The compare configuration does not automatically dispose the old image.
- *
- * @param image the new image for the right side of compare/merge viewers
- */
- public void setRightImage(Image image) {
- fRightImage= image;
- }
-
- /**
- * Returns the image for the right hand side of compare/merge viewers.
- * This image is typically shown in the title of the right side of a compare viewer.
- *
- * @param element the input object of a compare/merge viewer or <code>null</code>
- * @return the image for the right hand side or <code>null</code>
- */
- public Image getRightImage(Object element) {
- return fRightImage;
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java
deleted file mode 100644
index fdbe766f7..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java
+++ /dev/null
@@ -1,792 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import java.lang.reflect.InvocationTargetException;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.ResourceBundle;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.ui.IPersistableElement;
-import org.eclipse.ui.IEditorInput;
-
-import org.eclipse.jface.util.*;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-import org.eclipse.compare.contentmergeviewer.ContentMergeViewer;
-import org.eclipse.compare.internal.*;
-import org.eclipse.compare.structuremergeviewer.*;
-
-
-/**
- * A compare operation which can present its results in a special editor.
- * Running the compare operation and presentating the results in a compare editor
- * are combined in one interface because it allows a client to keep the implementation
- * all in one place while separating it from the innards of a specific UI implementation of compare/merge.
- * <p>
- * A <code>CompareEditorInput</code> defines methods for the following sequence steps:
- * <UL>
- * <LI>running a lengthy compare operation under progress monitor control,
- * <LI>creating a UI for displaying the model and initializing the some widgets with the compare result,
- * <LI>tracking the dirty state of the model in case of merge,
- * <LI>saving the model.
- * </UL>
- * The Compare plug-in's <code>openCompareEditor</code> method takes an <code>ICompareEditorInput</code>
- * and starts sequencing through the above steps. If the compare result is not empty a new compare editor
- * is opened and takes over the sequence until eventually closed.
- * <p>
- * The <code>prepareInput</code> method should contain the
- * code of the compare operation. It is executed under control of a progress monitor
- * and can be canceled. If the result of the compare is not empty, that is if there are differences
- * that needs to be presented, the <code>ICompareEditorInput</code> should hold onto them and return them with
- * the <code>getCompareResult</code> method.
- * If the value returned from <code>getCompareResult</code> is not <code>null</code>
- * a compare editor is opened on the <code>ICompareEditorInput</code> with title and title image initialized by the
- * corresponding methods of the <code>ICompareEditorInput</code>.
- * <p>
- * Creation of the editor's SWT controls is delegated to the <code>createContents</code> method.
- * Here the SWT controls must be created and initialized with the result of the compare operation.
- * <p>
- * If merging is allowed, the modification state of the compared constituents must be tracked and the dirty
- * state returned from method <code>isSaveNeeded</code>. The value <code>true</code> triggers a subsequent call
- * to <code>save</code> where the modified resources can be saved.
- * <p>
- * The most important part of this implementation is the setup of the compare/merge UI.
- * The UI uses a simple browser metaphor to present compare results.
- * The top half of the layout shows the structural compare results (e.g. added, deleted, and changed files),
- * the bottom half the content compare results (e.g. textual differences between two files).
- * A selection in the top pane is fed to the bottom pane. If a content viewer is registered
- * for the type of the selected object, this viewer is installed in the pane.
- * In addition if a structure viewer is registered for the selection type the top pane
- * is split horizontally to make room for another pane and the structure viewer is installed
- * in it. When comparing Java files this second structure viewer would show the structural
- * differences within a Java file, e.g. added, deleted or changed methods and fields.
- * <p>
- * Subclasses provide custom setups, e.g. for a Catchup/Release operation
- * by passing a subclass of <code>CompareConfiguration</code> and by implementing the <code>prepareInput</code> method.
- * If a subclass cannot use the <code>DiffTreeViewer</code> which is installed by default in the
- * top left pane, method <code>createDiffViewer</code> can be overridden.
- *
- * @see CompareUI
- * @see CompareEditorInput
- */
-public abstract class CompareEditorInput implements IEditorInput, IPropertyChangeNotifier, IRunnableWithProgress {
-
- private static final boolean DEBUG= false;
-
- /**
- * The name of the "dirty" property.
- */
- public static final String DIRTY_STATE= "DIRTY_STATE"; //$NON-NLS-1$
-
- private static final String COMPARE_EDITOR_IMAGE_NAME= "cview16/compare_view.gif"; //$NON-NLS-1$
- private static Image fgTitleImage;
-
- private Splitter fComposite;
- private CompareConfiguration fCompareConfiguration;
- private CompareViewerSwitchingPane fStructureInputPane;
- private CompareViewerSwitchingPane fStructurePane1;
- private CompareViewerSwitchingPane fStructurePane2;
- private CompareViewerSwitchingPane fContentInputPane;
- private CompareViewerSwitchingPane fFocusPane;
- private String fMessage;
- private ISelection fSelection2;
- private Object fInput;
- private String fTitle;
- private ListenerList fListenerList= new ListenerList();
- private CompareNavigator fNavigator;
- private boolean fDirty= false;
- private ArrayList fDirtyViewers= new ArrayList();
- private IPropertyChangeListener fDirtyStateListener;
-
- private IgnoreWhiteSpaceAction fIgnoreWhitespace;
- private ShowPseudoConflicts fShowPseudoConflicts;
-
- boolean fStructureCompareOnSingleClick= true;
-
- /**
- * Creates a <code>CompareEditorInput</code> which is initialized with the given
- * compare configuration.
- * The compare configuration is passed to subsequently created viewers.
- *
- * @param configuration the compare configuration
- */
- public CompareEditorInput(CompareConfiguration configuration) {
- fCompareConfiguration= configuration;
- Assert.isNotNull(configuration);
-
- ResourceBundle bundle= CompareUIPlugin.getResourceBundle();
- fIgnoreWhitespace= new IgnoreWhiteSpaceAction(bundle, configuration);
- fShowPseudoConflicts= new ShowPseudoConflicts(bundle, configuration);
-
- fDirtyStateListener= new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent e) {
- String propertyName= e.getProperty();
- if (CompareEditorInput.DIRTY_STATE.equals(propertyName)) {
- boolean changed= false;
- Object newValue= e.getNewValue();
- if (newValue instanceof Boolean)
- changed= ((Boolean)newValue).booleanValue();
- setDirty(e.getSource(), changed);
- }
- }
- };
-
- IPreferenceStore ps= configuration.getPreferenceStore();
- if (ps != null)
- fStructureCompareOnSingleClick= ps.getBoolean(ComparePreferencePage.OPEN_STRUCTURE_COMPARE);
- }
-
- private boolean structureCompareOnSingleClick() {
- return fStructureCompareOnSingleClick;
- }
-
- /* (non Javadoc)
- * see IAdaptable.getAdapter
- */
- public Object getAdapter(Class adapter) {
- if (CompareNavigator.class.equals(adapter)) {
- if (fNavigator == null)
- fNavigator= new CompareNavigator(
- new CompareViewerSwitchingPane[] {
- fStructureInputPane,
- fStructurePane1,
- fStructurePane2,
- fContentInputPane
- }
- );
- return fNavigator;
- }
- return null;
- }
-
- /* (non Javadoc)
- * see IEditorInput.getImageDescriptor
- */
- public ImageDescriptor getImageDescriptor() {
- return null;
- }
-
- /* (non Javadoc)
- * see IEditorInput.getToolTipText
- */
- public String getToolTipText() {
- return fTitle;
- }
-
- /* (non Javadoc)
- * see IEditorInput.getName
- */
- public String getName() {
- return fTitle;
- }
-
- /**
- * Returns <code>null</code> since this editor cannot be persisted.
- *
- * @return <code>null</code> because this editor cannot be persisted
- */
- public IPersistableElement getPersistable() {
- return null;
- }
-
- /**
- * Returns <code>false</code> to indicate that this input
- * should not appear in the "File Most Recently Used" menu.
- *
- * @return <code>false</code>
- */
- public boolean exists() {
- return false;
- }
-
- /*
- * FIXME!
- */
- protected void setMessage(String message) {
- fMessage= message;
- }
-
- /*
- * FIXME!
- */
- public String getMessage() {
- return fMessage;
- }
-
- /**
- * Returns the title which will be used in the compare editor's title bar.
- * It can be set with <code>setTitle</code>.
- *
- * @return the title
- */
- public String getTitle() {
- return fTitle;
- }
-
- /**
- * Sets the title which will be used when presenting the compare result.
- * This method must be called before the editor is opened.
- *
- * @param title the title to use for the CompareEditor
- */
- public void setTitle(String title) {
- fTitle= title;
- }
-
- /**
- * Returns the title image which will be used in the compare editor's title bar.
- * Returns the title image which will be used when presenting the compare result.
- * This implementation returns a generic compare icon.
- * Subclasses can override.
- *
- * @return the title image, or <code>null</code> if none
- */
- public Image getTitleImage() {
- if (fgTitleImage == null) {
- fgTitleImage= CompareUIPlugin.getImageDescriptor(COMPARE_EDITOR_IMAGE_NAME).createImage();
- CompareUI.disposeOnShutdown(fgTitleImage);
- }
- return fgTitleImage;
- }
-
- /**
- * Returns the configuration object for the viewers within the compare editor.
- * Returns the configuration which was passed to the constructor.
- *
- * @return the compare configuration
- */
- public CompareConfiguration getCompareConfiguration() {
- return fCompareConfiguration;
- }
-
- /**
- * Adds standard actions to the given <code>ToolBarManager</code>.
- * <p>
- * Subclasses may override to add their own actions.
- * </p>
- *
- * @param toolBarManager the <code>ToolBarManager</code> to which to contribute
- */
- public void contributeToToolBar(ToolBarManager toolBarManager) {
-
- toolBarManager.add(new Separator());
- toolBarManager.add(fIgnoreWhitespace);
- toolBarManager.add(fShowPseudoConflicts);
- }
-
- /**
- * Runs the compare operation and stores the compare result.
- *
- * @param monitor the progress monitor to use to display progress and receive
- * requests for cancelation
- * @exception InvocationTargetException if the <code>prepareInput</code> method must propagate a checked exception,
- * it should wrap it inside an <code>InvocationTargetException</code>; runtime exceptions are automatically
- * wrapped in an <code>InvocationTargetException</code> by the calling context
- * @exception InterruptedException if the operation detects a request to cancel,
- * using <code>IProgressMonitor.isCanceled()</code>, it should exit by throwing
- * <code>InterruptedException</code>
- */
- public void run(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- fInput= prepareInput(monitor);
- }
-
- /**
- * Runs the compare operation and returns the compare result.
- * If <code>null</code> is returned no differences were found and no compare editor needs to be opened.
- * Progress should be reported to the given progress monitor.
- * A request to cancel the operation should be honored and acknowledged
- * by throwing <code>InterruptedException</code>.
- *
- * @param monitor the progress monitor to use to display progress and receive
- * requests for cancelation
- * @return the result of the compare operation, or <code>null</code> if there are no differences
- * @exception InvocationTargetException if the <code>prepareInput</code> method must propagate a checked exception,
- * it should wrap it inside an <code>InvocationTargetException</code>; runtime exceptions are automatically
- * wrapped in an <code>InvocationTargetException</code> by the calling context
- * @exception InterruptedException if the operation detects a request to cancel,
- * using <code>IProgressMonitor.isCanceled()</code>, it should exit by throwing
- * <code>InterruptedException</code>
- */
- protected abstract Object prepareInput(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException;
-
- /**
- * Returns the compare result computed by the most recent call to the
- * <code>run</code> method. Returns <code>null</code> if no
- * differences were found.
- *
- * @return the compare result prepared in method <code>prepareInput</code>
- * or <code>null</code> if there were no differences
- */
- public Object getCompareResult() {
- return fInput;
- }
-
- /**
- * Create the SWT controls that are used to display the result of the compare operation.
- * Creates the SWT Controls and sets up the wiring between the individual panes.
- * This implementation creates all four panes but makes only the necessary ones visible.
- * Finally it feeds the compare result into the top left structure viewer
- * and the content viewer.
- * <p>
- * Subclasses may override if they need to change the layout or wiring between panes.
- *
- * @param parent the parent control under which the control must be created
- * @return the SWT control hierarchy for the compare editor
- */
- public Control createContents(Composite parent) {
-
- fComposite= new Splitter(parent, SWT.VERTICAL);
- fComposite.setData(this);
-
- final Splitter h= new Splitter(fComposite, SWT.HORIZONTAL);
-
- fStructureInputPane= new CompareViewerSwitchingPane(h, SWT.BORDER | SWT.FLAT, true) {
- protected Viewer getViewer(Viewer oldViewer, Object input) {
- if (input instanceof DiffNode) {
- DiffNode dn= (DiffNode) input;
- if (dn.hasChildren())
- return createDiffViewer(this);
- }
- if (input instanceof ICompareInput)
- return findStructureViewer(oldViewer, (ICompareInput)input, this);
- return null;
- }
- };
- fFocusPane= fStructureInputPane;
-
- fStructurePane1= new CompareViewerSwitchingPane(h, SWT.BORDER | SWT.FLAT, true) {
- protected Viewer getViewer(Viewer oldViewer, Object input) {
- if (input instanceof ICompareInput)
- return findStructureViewer(oldViewer, (ICompareInput)input, this);
- return null;
- }
- };
- h.setVisible(fStructurePane1, false);
-
- fStructurePane2= new CompareViewerSwitchingPane(h, SWT.BORDER | SWT.FLAT, true) {
- protected Viewer getViewer(Viewer oldViewer, Object input) {
- if (input instanceof ICompareInput)
- return findStructureViewer(oldViewer, (ICompareInput)input, this);
- return null;
- }
- };
- h.setVisible(fStructurePane2, false);
-
- fContentInputPane= new CompareViewerSwitchingPane(fComposite, SWT.BORDER | SWT.FLAT) {
- protected Viewer getViewer(Viewer oldViewer, Object input) {
- if (input instanceof ICompareInput)
- return findContentViewer(oldViewer, (ICompareInput)input, this);
- return null;
- }
- };
- fComposite.setVisible(h, false);
- fComposite.setVisible(fContentInputPane, true);
-
- fComposite.setWeights(new int[] { 30, 70 });
-
- fComposite.layout();
-
- // setup the wiring for top left pane
- fStructureInputPane.addOpenListener(
- new IOpenListener() {
- public void open(OpenEvent oe) {
- feed1(oe.getSelection());
- }
- }
- );
- fStructureInputPane.addSelectionChangedListener(
- new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent e) {
- ISelection s= e.getSelection();
- if (s == null || s.isEmpty())
- feed1(s);
- }
- }
- );
- fStructureInputPane.addDoubleClickListener(
- new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- feedDefault1(event.getSelection());
- }
- }
- );
-
- // setup the wiring for second pane
- fStructurePane1.addOpenListener(
- new IOpenListener() {
- public void open(OpenEvent oe) {
- feed2(oe.getSelection());
- }
- }
- );
- fStructurePane1.addSelectionChangedListener(
- new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent e) {
- ISelection s= e.getSelection();
- if (s == null || s.isEmpty())
- feed2(s);
- }
- }
- );
-
- // setup the wiring for third pane
- fStructurePane2.addOpenListener(
- new IOpenListener() {
- public void open(OpenEvent oe) {
- feed3(oe.getSelection());
- }
- }
- );
- fStructurePane2.addSelectionChangedListener(
- new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent e) {
- ISelection s= e.getSelection();
- if (s == null || s.isEmpty())
- feed3(s);
- }
- }
- );
-
- // now deal with activation/deactivation
- Listener activationListener= new Listener() {
- int fOldOpenStrategy;
-
- public void handleEvent(Event event) {
- if (event.widget instanceof CompareViewerSwitchingPane) {
-
- switch (event.type) {
- case SWT.Activate:
- fFocusPane= (CompareViewerSwitchingPane) event.widget;
- fOldOpenStrategy= OpenStrategy.getOpenMethod();
- OpenStrategy.setOpenMethod(OpenStrategy.SINGLE_CLICK | OpenStrategy.ARROW_KEYS_OPEN);
- break;
- case SWT.Deactivate:
- OpenStrategy.setOpenMethod(fOldOpenStrategy);
- break;
- }
- }
- }
- };
- fStructureInputPane.addListener(SWT.Activate, activationListener);
- fStructurePane1.addListener(SWT.Activate, activationListener);
- fStructurePane2.addListener(SWT.Activate, activationListener);
- fContentInputPane.addListener(SWT.Activate, activationListener);
-
- fStructureInputPane.addListener(SWT.Deactivate, activationListener);
- fStructurePane1.addListener(SWT.Deactivate, activationListener);
- fStructurePane2.addListener(SWT.Deactivate, activationListener);
- fContentInputPane.addListener(SWT.Deactivate, activationListener);
-
-
- if (fInput instanceof ICompareInput) {
- fStructureInputPane.setInput((ICompareInput) fInput);
- ISelection sel= fStructureInputPane.getSelection();
- if (sel == null || sel.isEmpty())
- feed1(sel); // we only feed downstream viewers if the top left pane is empty
- }
-
- fComposite.setData("Nav", //$NON-NLS-1$
- new CompareViewerSwitchingPane[] {
- fStructureInputPane,
- fStructurePane1,
- fStructurePane2,
- fContentInputPane
- }
- );
-
- return fComposite;
- }
-
- private void feed1(final ISelection selection) {
- BusyIndicator.showWhile(fComposite.getDisplay(),
- new Runnable() {
- public void run() {
- if (selection == null || selection.isEmpty()) {
- Object input= fStructureInputPane.getInput();
- fContentInputPane.setInput(input);
- fStructurePane2.setInput(null); // clear downstream pane
- fStructurePane1.setInput(null);
- } else {
- Object input= getElement(selection);
- fContentInputPane.setInput(input);
- if (structureCompareOnSingleClick())
- fStructurePane1.setInput(input);
- fStructurePane2.setInput(null); // clear downstream pane
- if (fStructurePane1.getInput() != input)
- fStructurePane1.setInput(null);
- }
- }
- }
- );
- }
-
- private void feedDefault1(final ISelection selection) {
- BusyIndicator.showWhile(fComposite.getDisplay(),
- new Runnable() {
- public void run() {
- if (!selection.isEmpty())
- fStructurePane1.setInput(getElement(selection));
- }
- }
- );
- }
-
- private void feed2(final ISelection selection) {
- BusyIndicator.showWhile(fComposite.getDisplay(),
- new Runnable() {
- public void run() {
- if (selection.isEmpty()) {
- Object input= fStructurePane1.getInput();
- fContentInputPane.setInput(input);
- fStructurePane2.setInput(null);
- } else {
- Object input= getElement(selection);
- fContentInputPane.setInput(input);
- fStructurePane2.setInput(input);
- }
- }
- }
- );
- }
-
- private void feed3(final ISelection selection) {
- BusyIndicator.showWhile(fComposite.getDisplay(),
- new Runnable() {
- public void run() {
- if (selection.isEmpty())
- fContentInputPane.setInput(fStructurePane2.getInput());
- else
- fContentInputPane.setInput(getElement(selection));
- }
- }
- );
-
- }
-
- /**
- * Returns the first element of the given selection if the selection
- * is a <code>IStructuredSelection</code> with exactly one element. Returns
- * <code>null</code> otherwise.
- *
- * @param selection the selection
- * @return the first element of the selection, or <code>null</code>
- */
- private static Object getElement(ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ss= (IStructuredSelection) selection;
- if (ss.size() == 1)
- return ss.getFirstElement();
- }
- return null;
- }
-
- /**
- * Asks this input to take focus within its container (editor).
- * <p>
- * Clients should not call this method but they may
- * override if they implement a different layout with different visual
- * components. Clients are free to call the inherited method.
- * </p>
- */
- public void setFocus() {
- if (fFocusPane != null) {
- Viewer v= fFocusPane.getViewer();
- if (v != null) {
- Control c= v.getControl();
- if (c != null)
- c.setFocus();
- }
- } else if (fComposite != null)
- fComposite.setFocus();
- }
-
- /**
- * Factory method for creating a differences viewer for the top left pane.
- * It is called from <code>createContents</code> and returns a <code>DiffTreeViewer</code>.
- * <p>
- * Subclasses may override if they need a different viewer.
- * </p>
- *
- * @param parent the SWT parent control under which to create the viewer's SWT controls
- * @return a compare viewer for the top left pane
- */
- public Viewer createDiffViewer(Composite parent) {
- return new DiffTreeViewer(parent, fCompareConfiguration);
- }
-
- /**
- * Implements the dynamic viewer switching for structure viewers.
- * The method must return a compare viewer based on the old (or current) viewer
- * and a new input object. If the old viewer is suitable for showing the new input the old viewer
- * can be returned. Otherwise a new viewer must be created under the given parent composite or
- * <code>null</code> can be returned to indicate that no viewer could be found.
- * <p>
- * This implementation forwards the request to <code>CompareUI.findStructureViewer</code>.
- * <p>
- * Subclasses may override to implement a different strategy.
- * </p>
- *
- * @return a compare viewer which is suitable for the given input object or <code>null</code>
- */
- public Viewer findStructureViewer(Viewer oldViewer, ICompareInput input, Composite parent) {
- return CompareUIPlugin.findStructureViewer(oldViewer, input, parent, fCompareConfiguration);
- }
-
- /**
- * Implements the dynamic viewer switching for content viewers.
- * The method must return a compare viewer based on the old (or current) viewer
- * and a new input object. If the old viewer is suitable for showing the new input the old viewer
- * can be returned. Otherwise a new viewer must be created under the given parent composite or
- * <code>null</code> can be returned to indicate that no viewer could be found.
- * <p>
- * This implementation forwards the request to <code>CompareUI.findContentViewer</code>.
- * <p>
- * Subclasses may override to implement a different strategy.
- * </p>
- *
- * @return a compare viewer which is suitable for the given input object or <code>null</code>
- */
- public Viewer findContentViewer(Viewer oldViewer, ICompareInput input, Composite parent) {
-
- Viewer newViewer= CompareUIPlugin.findContentViewer(oldViewer, input, parent, fCompareConfiguration);
-
- boolean isNewViewer= newViewer != oldViewer;
- if (DEBUG) System.out.println("CompareEditorInput.findContentViewer: " + isNewViewer); //$NON-NLS-1$
-
- if (isNewViewer && newViewer instanceof IPropertyChangeNotifier) {
- final IPropertyChangeNotifier dsp= (IPropertyChangeNotifier) newViewer;
- dsp.addPropertyChangeListener(fDirtyStateListener);
-
- Control c= newViewer.getControl();
- c.addDisposeListener(
- new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- dsp.removePropertyChangeListener(fDirtyStateListener);
- }
- }
- );
- }
-
- return newViewer;
- }
-
- /**
- * Returns <code>true</code> if there are unsaved changes.
- * The value returned is the value of the <code>DIRTY_STATE</code> property of this input object.
-
- * Returns <code>true</code> if this input has unsaved changes,
- * that is if <code>setDirty(true)</code> has been called.
- * Subclasses don't have to override if the functionality provided by <doce>setDirty</code>
- * is sufficient.
- *
- * @return <code>true</code> if there are changes that need to be saved
- */
- public boolean isSaveNeeded() {
- return fDirty || fDirtyViewers.size() > 0;
- }
-
- /**
- * Sets the dirty state of this input to the given
- * value and sends out a <code>PropertyChangeEvent</code> if the new value differs from the old value.
- *
- * @param dirty the dirty state for this compare input
- */
- public void setDirty(boolean dirty) {
-
- boolean confirmSave= true;
- Object o= fCompareConfiguration.getProperty(CompareEditor.CONFIRM_SAVE_PROPERTY);
- if (o instanceof Boolean)
- confirmSave= ((Boolean)o).booleanValue();
-
- if (!confirmSave) {
- fDirty= dirty;
- if (!fDirty)
- fDirtyViewers.clear();
- }
- }
-
- private void setDirty(Object source, boolean dirty) {
- Assert.isNotNull(source);
- boolean oldDirty= fDirtyViewers.size() > 0;
- if (dirty)
- fDirtyViewers.add(source);
- else
- fDirtyViewers.remove(source);
- boolean newDirty= fDirtyViewers.size() > 0;
- if (DEBUG) System.out.println("setDirty("+source+", "+dirty+"): " + newDirty); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- if (oldDirty != newDirty)
- Utilities.firePropertyChange(fListenerList, this, DIRTY_STATE, new Boolean(oldDirty), new Boolean(newDirty));
- }
-
- /* (non Javadoc)
- * see IPropertyChangeNotifier.addListener
- */
- public void addPropertyChangeListener(IPropertyChangeListener listener) {
- fListenerList.add(listener);
- }
-
- /* (non Javadoc)
- * see IPropertyChangeNotifier.removeListener
- */
- public void removePropertyChangeListener(IPropertyChangeListener listener) {
- fListenerList.remove(listener);
- }
-
- /**
- * Save any unsaved changes.
- * Empty implementation.
- * Subclasses must override to save any changes.
- *
- * @param progressMonitor an <code>IProgressMonitor</code> that the implementation of save may use to show progress
- * @deprecated Override method saveChanges instead.
- */
- public void save(IProgressMonitor pm) {
- }
-
- /**
- * Save any unsaved changes.
- * Subclasses must override to save any changes.
- * This implementation tries to flush changes in all viewers by
- * calling <code>ISavable.save</code> on them.
- *
- * @param progressMonitor an <code>IProgressMonitor</code> that the implementation of save may use to show progress
- */
- public void saveChanges(IProgressMonitor pm) throws CoreException {
-
- // flush changes in any dirty viewer
- flushViewer(fStructureInputPane, pm);
- flushViewer(fStructurePane1, pm);
- flushViewer(fStructurePane2, pm);
- flushViewer(fContentInputPane, pm);
-
- save(pm);
- }
-
- private static void flushViewer(CompareViewerSwitchingPane pane, IProgressMonitor pm) throws CoreException {
- if (pane != null) {
- Viewer v= pane.getViewer();
- if (v instanceof ISavable)
- ((ISavable)v).save(pm);
- }
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareUI.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareUI.java
deleted file mode 100644
index d439ee4a2..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareUI.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.Viewer;
-
-import org.eclipse.core.runtime.IAdaptable;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-import org.eclipse.compare.internal.CompareUIPlugin;
-import org.eclipse.compare.internal.IStructureCreatorDescriptor;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.compare.structuremergeviewer.IStructureCreator;
-
-
-/**
- * The class <code>CompareUI</code> defines the entry point to initiate a configurable
- * compare operation on arbitrary resources. The result of the compare
- * is opened into a compare editor where the details can be browsed and
- * edited in dynamically selected structure and content viewers.
- * <p>
- * The Compare UI provides a registry for content and structure compare viewers,
- * which is initialized from extensions contributed to extension points
- * declared by this plug-in.
- */
-public final class CompareUI {
-
- /**
- * Compare Plug-in ID (value <code>"org.eclipse.compare"</code>).
- * @since 2.0
- */
- public static final String PLUGIN_ID= "org.eclipse.compare"; //$NON-NLS-1$
-
- /** Image descriptors for the 'Next' tool bar button. */
- public static final ImageDescriptor DESC_DTOOL_NEXT= CompareUIPlugin.getImageDescriptor(CompareUIPlugin.DTOOL_NEXT);
- public static final ImageDescriptor DESC_CTOOL_NEXT= CompareUIPlugin.getImageDescriptor(CompareUIPlugin.CTOOL_NEXT);
- public static final ImageDescriptor DESC_ETOOL_NEXT= CompareUIPlugin.getImageDescriptor(CompareUIPlugin.ETOOL_NEXT);
-
- /** Image descriptors for the 'Previous' tool bar button. */
- public static final ImageDescriptor DESC_DTOOL_PREV= CompareUIPlugin.getImageDescriptor(CompareUIPlugin.DTOOL_PREV);
- public static final ImageDescriptor DESC_CTOOL_PREV= CompareUIPlugin.getImageDescriptor(CompareUIPlugin.CTOOL_PREV);
- public static final ImageDescriptor DESC_ETOOL_PREV= CompareUIPlugin.getImageDescriptor(CompareUIPlugin.ETOOL_PREV);
-
- /**
- * Name of the title property of a compare viewer.
- * If a property with this name is set
- * on the top level SWT control of a viewer, it is used as a title in the pane's
- * title bar.
- */
- public static final String COMPARE_VIEWER_TITLE= "org.eclipse.compare.CompareUI.CompareViewerTitle"; //$NON-NLS-1$
-
- /* (non Javadoc)
- * non inatiatiable!
- */
- private CompareUI() {
- }
-
- public static AbstractUIPlugin getPlugin() {
- return CompareUIPlugin.getDefault();
- }
-
- /**
- * Returns this plug-in's resource bundle.
- *
- * @return the plugin's resource bundle
- */
- public static ResourceBundle getResourceBundle() {
- return CompareUIPlugin.getResourceBundle();
- }
-
- /**
- * Performs the comparison described by the given input and opens a
- * compare editor on the result.
- *
- * @param input the input on which to open the compare editor
- */
- public static void openCompareEditor(CompareEditorInput input) {
- CompareUIPlugin plugin= CompareUIPlugin.getDefault();
- if (plugin != null)
- plugin.openCompareEditor(input);
- }
-
- /**
- * Performs the comparison described by the given input and opens a
- * modal compare dialog on the result.
- *
- * @param input the input on which to open the compare dialog
- */
- public static void openCompareDialog(CompareEditorInput input) {
- CompareUIPlugin plugin= CompareUIPlugin.getDefault();
- if (plugin != null)
- plugin.openCompareDialog(input);
- }
-
- /**
- * Registers an image descriptor for the given type.
- *
- * @param type the type
- * @param descriptor the image descriptor
- */
- public static void registerImageDescriptor(String type, ImageDescriptor descriptor) {
- CompareUIPlugin.registerImageDescriptor(type, descriptor);
- }
-
- /**
- * Returns a shared image for the given type, or a generic image if none
- * has been registered for the given type.
- * <p>
- * Note: Images returned from this method will be automatically disposed
- * of when this plug-in shuts down. Callers must not dispose of these
- * images themselves.
- * </p>
- *
- * @param type the type
- * @return the image
- */
- public static Image getImage(String type) {
- return CompareUIPlugin.getImage(type);
- }
-
- /**
- * Registers the given image for being disposed when this plug-in is shutdown.
- *
- * @param image the image to register for disposal
- */
- public static void disposeOnShutdown(Image image) {
- CompareUIPlugin.disposeOnShutdown(image);
- }
-
- /**
- * Returns a shared image for the given adaptable.
- * This convenience method queries the given adaptable
- * for its <code>IWorkbenchAdapter.getImageDescriptor</code>, which it
- * uses to create an image if it does not already have one.
- * <p>
- * Note: Images returned from this method will be automatically disposed
- * of when this plug-in shuts down. Callers must not dispose of these
- * images themselves.
- * </p>
- *
- * @param adaptable the adaptable for which to find an image
- * @return an image
- */
- public static Image getImage(IAdaptable adaptable) {
- return CompareUIPlugin.getImage(adaptable);
- }
-
- /**
- * Returns a structure compare viewer based on an old viewer and an input object.
- * If the old viewer is suitable for showing the input, the old viewer
- * is returned. Otherwise, the input's type is used to find a viewer descriptor in the registry
- * which in turn is used to create a structure compare viewer under the given parent composite.
- * If no viewer descriptor can be found <code>null</code> is returned.
- *
- * @param oldViewer a new viewer is only created if this old viewer cannot show the given input
- * @param input the input object for which to find a structure viewer
- * @param parent the SWT parent composite under which the new viewer is created
- * @param configuration a configuration which is passed to a newly created viewer
- * @return the compare viewer which is suitable for the given input object or <code>null</code>
- */
- public static Viewer findStructureViewer(Viewer oldViewer, ICompareInput input, Composite parent,
- CompareConfiguration configuration) {
-
- return CompareUIPlugin.findStructureViewer(oldViewer, input, parent, configuration);
- }
-
- /**
- * Returns a content compare viewer based on an old viewer and an input object.
- * If the old viewer is suitable for showing the input the old viewer
- * is returned. Otherwise the input's type is used to find a viewer descriptor in the registry
- * which in turn is used to create a content compare viewer under the given parent composite.
- * If no viewer descriptor can be found <code>null</code> is returned.
- *
- * @param oldViewer a new viewer is only created if this old viewer cannot show the given input
- * @param input the input object for which to find a content viewer
- * @param parent the SWT parent composite under which the new viewer is created
- * @param configuration a configuration which is passed to a newly created viewer
- * @return the compare viewer which is suitable for the given input object or <code>null</code>
- */
- public static Viewer findContentViewer(Viewer oldViewer, ICompareInput input, Composite parent,
- CompareConfiguration configuration) {
-
- return CompareUIPlugin.findContentViewer(oldViewer, input, parent, configuration);
- }
-
- public static void addStructureViewerAlias(String type, String alias) {
- CompareUIPlugin.addStructureViewerAlias(type, alias);
- }
-
- public static void removeAllStructureViewerAliases(String type) {
- CompareUIPlugin.removeAllStructureViewerAliases(type);
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerPane.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerPane.java
deleted file mode 100644
index 3106b1166..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerPane.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.jface.action.ToolBarManager;
-
-import org.eclipse.compare.internal.Splitter;
-
-/**
- * A <code>CompareViewerPane</code> is a convenience class which installs a
- * <code>CLabel</code> and a <code>Toolbar</code> in a <code>ViewForm</code>.
- * <P>
- * Double clicking onto the <code>CompareViewerPane</code>'s title bar maximizes
- * the <code>CompareViewerPane</code> to the size of an enclosing <code>Splitter</code>
- * (if there is one).
- * If more <code>Splitters</code> are nested maximizing walks up and
- * maximizes to the outermost <code>Splitter</code>.
- */
-public class CompareViewerPane extends ViewForm {
-
- private ToolBarManager fToolBarManager;
-
-
- public CompareViewerPane(Composite parent, int style) {
- super(parent, style);
-
- marginWidth= 0;
- marginHeight= 0;
-
- CLabel label= new CLabel(this, SWT.NONE);
- setTopLeft(label);
-
- MouseAdapter ml= new MouseAdapter() {
- public void mouseDoubleClick(MouseEvent e) {
- Control parent= getParent();
- if (parent instanceof Splitter)
- ((Splitter)parent).setMaximizedControl(CompareViewerPane.this);
- }
- };
-
- addMouseListener(ml);
- label.addMouseListener(ml);
- }
-
- public void setText(String label) {
- CLabel cl= (CLabel) getTopLeft();
- cl.setText(label);
- }
-
- public void setImage(Image image) {
- CLabel cl= (CLabel) getTopLeft();
- cl.setImage(image);
- }
-
- /**
- * Returns a <code>ToolBarManager</code> if the given parent is a <code>CompareViewerPane</code>.
- */
- public static ToolBarManager getToolBarManager(Composite parent) {
- if (parent instanceof CompareViewerPane) {
- CompareViewerPane pane= (CompareViewerPane) parent;
- return pane.getToolBarManager();
- }
- return null;
- }
-
- /**
- * Clear tool items in <code>CompareViewerPane</code>'s control bar.
- */
- public static void clearToolBar(Composite parent) {
- ToolBarManager tbm= getToolBarManager(parent);
- if (tbm != null) {
- tbm.removeAll();
- tbm.update(true);
- }
- }
-
- //---- private stuff
-
- private ToolBarManager getToolBarManager() {
- if (fToolBarManager == null) {
- ToolBar tb= new ToolBar(this, SWT.FLAT);
- setTopCenter(tb);
- fToolBarManager= new ToolBarManager(tb);
- }
- return fToolBarManager;
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java
deleted file mode 100644
index 7baa256d9..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java
+++ /dev/null
@@ -1,307 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import java.text.MessageFormat;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.jface.util.ListenerList;
-import org.eclipse.jface.viewers.*;
-
-import org.eclipse.compare.internal.*;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-
-
-/**
- * A custom <code>CompareViewerPane</code> which supports viewer switching.
- * <p>
- * Clients must implement the viewer switching strategy by implementing
- * <code>getViewer</code>method.
- * <p>
- * If a property with the name <code>CompareUI.COMPARE_VIEWER_TITLE</code> is set
- * on the top level SWT control of a viewer, it is used as a title in the <code>CompareViewerPane</code>'s
- * title bar.
- */
-public abstract class CompareViewerSwitchingPane extends CompareViewerPane
- implements ISelectionChangedListener, ISelectionProvider, IDoubleClickListener {
-
- private Viewer fViewer;
- private Object fInput;
- private ListenerList fSelectionListeners= new ListenerList();
- private ListenerList fDoubleClickListener= new ListenerList();
- private ListenerList fOpenListener= new ListenerList();
- private boolean fControlVisibility= false;
- private String fTitle;
- private String fTitleArgument;
-
- private IOpenListener fOpenHandler= new IOpenListener() {
- public void open(OpenEvent event) {
- Object[] listeners= fOpenListener.getListeners();
- for (int i= 0; i < listeners.length; i++)
- ((IOpenListener) listeners[i]).open(event);
- }
- };
-
- /**
- * Creates a <code>CompareViewerSwitchingPane</code> as a child of the given parent and with the
- * specified SWT style bits.
- */
- public CompareViewerSwitchingPane(Composite parent, int style) {
- this(parent, style, false);
- }
-
- /**
- * Creates a <code>CompareViewerSwitchingPane</code> as a child of the given parent and with the
- * specified SWT style bits.
- */
- public CompareViewerSwitchingPane(Composite parent, int style, boolean visibility) {
- super(parent, style);
-
- fControlVisibility= visibility;
-
- setViewer(new NullViewer(this));
-
- addDisposeListener(
- new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- if (fViewer instanceof ISelectionProvider)
- ((ISelectionProvider) fViewer).removeSelectionChangedListener(CompareViewerSwitchingPane.this);
- if (fViewer instanceof StructuredViewer) {
- StructuredViewer sv= (StructuredViewer) fViewer;
- sv.removeDoubleClickListener(CompareViewerSwitchingPane.this);
- sv.removeOpenListener(fOpenHandler);
- }
- fViewer= null;
- fInput= null;
- fSelectionListeners= null;
- }
- }
- );
- }
-
- /**
- * Returns the current viewer.
- */
- public Viewer getViewer() {
- return fViewer;
- }
-
- /**
- * Sets the current viewer.
- */
- private void setViewer(Viewer newViewer) {
-
- if (newViewer == fViewer)
- return;
-
- boolean oldEmpty= isEmpty();
-
- if (fViewer != null) {
-
- if (fViewer instanceof ISelectionProvider)
- ((ISelectionProvider) fViewer).removeSelectionChangedListener(this);
-
- if (fViewer instanceof StructuredViewer) {
- StructuredViewer sv= (StructuredViewer) fViewer;
- sv.removeDoubleClickListener(this);
- sv.removeOpenListener(fOpenHandler);
- }
-
- Control content= getContent();
- setContent(null);
-
- fViewer.setInput(null);
-
- if (content != null && !content.isDisposed())
- content.dispose();
-
- } else
- oldEmpty= false;
- setContent(null);
-
- fViewer= newViewer;
-
- if (fViewer != null) {
- // we have to remember and restore the old visibility of the CustomPane
- // since setContent changes the visibility
- boolean old= getVisible();
- setContent(fViewer.getControl());
- setVisible(old); // restore old visibility
-
- boolean newEmpty= isEmpty();
-
- if (fViewer instanceof ISelectionProvider)
- ((ISelectionProvider) fViewer).addSelectionChangedListener(this);
-
- if (fViewer instanceof StructuredViewer) {
- StructuredViewer sv= (StructuredViewer) fViewer;
- sv.addDoubleClickListener(this);
- sv.addOpenListener(fOpenHandler);
- }
-
- if (oldEmpty != newEmpty) { // relayout my container
- Composite parent= getParent();
- if (parent instanceof Splitter)
- ((Splitter)parent).setVisible(this, fControlVisibility ? !newEmpty : true);
- }
-
- layout(true);
- }
- }
-
- public String getTitleArgument() {
- return fTitleArgument;
- }
-
- /**
- * Returns <code>true</code> if no viewer is installed or if the current viewer
- * is a <code>NullViewer</code>.
- */
- public boolean isEmpty() {
- return fViewer == null || fViewer instanceof NullViewer;
- }
-
- public void addSelectionChangedListener(ISelectionChangedListener l) {
- fSelectionListeners.add(l);
- }
-
- public void removeSelectionChangedListener(ISelectionChangedListener l) {
- fSelectionListeners.remove(l);
- }
-
- public void addDoubleClickListener(IDoubleClickListener l) {
- fDoubleClickListener.add(l);
- }
-
- public void removeDoubleClickListener(IDoubleClickListener l) {
- fDoubleClickListener.remove(l);
- }
-
- public void addOpenListener(IOpenListener l) {
- fOpenListener.add(l);
- }
-
- public void removeOpenListener(IOpenListener l) {
- fOpenListener.remove(l);
- }
-
- public void doubleClick(DoubleClickEvent event) {
- Object[] listeners= fDoubleClickListener.getListeners();
- for (int i= 0; i < listeners.length; i++)
- ((IDoubleClickListener) listeners[i]).doubleClick(event);
- }
-
- public ISelection getSelection() {
- if (fViewer instanceof ISelectionProvider)
- return ((ISelectionProvider) fViewer).getSelection();
- return null;
- }
-
- public void setSelection(ISelection s) {
- if (fViewer instanceof ISelectionProvider)
- ((ISelectionProvider) fViewer).setSelection(s);
- }
-
- public void selectionChanged(SelectionChangedEvent ev) {
- Object[] listeners= fSelectionListeners.getListeners();
- for (int i= 0; i < listeners.length; i++)
- ((ISelectionChangedListener) listeners[i]).selectionChanged(ev);
- }
-
- private boolean hasFocus2() {
- // do we have focus?
- Display display= getDisplay();
- if (display != null)
- for (Control focus= display.getFocusControl(); focus != null; focus= focus.getParent())
- if (focus == this)
- return true;
- return false;
- }
-
- /**
- * If the old viewer had focus, new setInput tries to set
- * focus on new viewer too.
- */
- public void setInput(Object input) {
-
- if (fInput == input)
- return;
-
- boolean hadFocus= hasFocus2();
-
-// try {
-// if (fViewer != null)
-// fViewer.setInput(null); // force save before switching viewer
-// } catch (ViewerSwitchingCancelled ex) {
-// return;
-// }
-
- fInput= input;
-
- // viewer switching
- Viewer newViewer= null;
- if (input != null)
- newViewer= getViewer(fViewer, input);
-
- if (newViewer == null) {
- if (fViewer instanceof NullViewer)
- return;
- newViewer= new NullViewer(this);
- }
-
- setViewer(newViewer);
-
- // set input
- fViewer.setInput(input);
-
- Image image= null;
- if (!(fViewer instanceof NullViewer) && input instanceof ICompareInput)
- image= ((ICompareInput)input).getImage();
- setImage(image);
-
- String title= null;
- if (fViewer != null) {
- Control c= fViewer.getControl();
- if (c != null) {
- Object data= c.getData(CompareUI.COMPARE_VIEWER_TITLE);
- if (data instanceof String)
- title= (String) data;
- if (hadFocus)
- c.setFocus();
- }
- }
-
- fTitle= title;
- updateTitle();
- }
-
- public void setTitleArgument(String argument) {
- fTitleArgument= argument;
- updateTitle();
- }
-
- private void updateTitle() {
- if (fTitle != null) {
- if (fTitleArgument != null) {
- String format= CompareMessages.getString("CompareViewerSwitchingPane.Titleformat"); //$NON-NLS-1$
- String t= MessageFormat.format(format, new String[] { fTitle, fTitleArgument } );
- setText(t);
- } else
- setText(fTitle);
- } else {
- setText(""); //$NON-NLS-1$
- }
- }
-
- public Object getInput() {
- return fInput;
- }
-
- abstract protected Viewer getViewer(Viewer oldViewer, Object input);
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java
deleted file mode 100644
index ad21c2bab..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java
+++ /dev/null
@@ -1,1016 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import java.util.HashMap;
-import java.util.ResourceBundle;
-import java.util.Date;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.HashSet;
-import java.util.Calendar;
-import java.io.InputStream;
-import java.text.*;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.Item;
-import org.eclipse.swt.widgets.Button;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.util.Assert;
-import org.eclipse.jface.dialogs.*;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFileState;
-import org.eclipse.core.runtime.CoreException;
-
-import org.eclipse.compare.internal.*;
-import org.eclipse.compare.structuremergeviewer.*;
-import org.eclipse.compare.*;
-
-/**
- * A dialog where one input element can be compared against
- * a list of historic variants (editions) of the same input element.
- * The dialog can be used to implement functions like "Compare/Replace with Version" or
- * "Compare/Replace from Local History" on workspace resources.
- * <p>
- * In addition it is possible to specify a subsection of the input element
- * (e.g. a method in a Java source file) by means of a "path".
- * In this case the dialog compares only the subsection (as specified by the path)
- * with the corresponding subsection in the list of editions.
- * Only those editions are shown where the subsection differs from the same subsection in
- * another edition thereby minimizing the number of presented variants.
- * This functionality can be used to implement "Replace from Local History"
- * for the Java language.
- * <p>
- * Subsections of an input element are determined by first finding an
- * <code>IStructureCreator</code> for the input's type.
- * Then the method <code>locate</code> is used to extract the subsection.
- * <p>
- * Each edition (variant in the list of variants) must implement the <code>IModificationDate</code> interface
- * so that the dialog can sort the editions and present them in a tree structure where every
- * node corresponds one day.
- * <p>
- * The functionality is surfaced in a single function <code>selectEdition</code>.
- * <p>
- * Clients may instantiate this class; it is not intended to be subclassed.
- * </p>
- *
- * @see IModificationDate
- * @see ITypedElement
- */
-public class EditionSelectionDialog extends ResizableDialog {
-
- /**
- * An item in an underlying edition.
- */
- private static class Pair {
-
- private ITypedElement fEdition;
- private ITypedElement fItem;
- private String fContent;
- private IStructureCreator fStructureCreator;
- private boolean fHasError= false;
-
- Pair(IStructureCreator structureCreator, ITypedElement edition, ITypedElement item) {
- fStructureCreator= structureCreator;
- fEdition= edition;
- fItem= item;
- }
-
- Pair(IStructureCreator structureCreator, ITypedElement edition) {
- this(structureCreator, edition, edition);
- }
-
- ITypedElement getEdition() {
- return fEdition;
- }
-
- ITypedElement getItem() {
- return fItem;
- }
-
- /**
- * The content is lazily loaded
- */
- private String getContent() {
- if (fContent == null) {
- if (fStructureCreator != null)
- fContent= fStructureCreator.getContents(fItem, false);
- else {
- if (fItem instanceof IStreamContentAccessor) {
- IStreamContentAccessor sca= (IStreamContentAccessor) fItem;
- try {
- InputStream is= sca.getContents();
- if (is != null)
- fContent= Utilities.readString(is);
- } catch (CoreException ex) {
- }
- }
- }
- if (fContent == null)
- fContent= ""; //$NON-NLS-1$
- }
- return fContent;
- }
-
- /**
- * Compares content of item.
- */
- public boolean equals(Object other) {
- if (other != null && other.getClass() == getClass()) {
- if (getContent().equals(((Pair)other).getContent()))
- return true;
- }
- return super.equals(other);
- }
- }
-
- // Configuration options
- private CompareConfiguration fCompareConfiguration;
- /** use a side-by-side compare viewer */
- private boolean fCompare= true;
- /** show target on right hand side */
- private boolean fTargetIsRight= false;
- /** hide entries which have identical content */
- private boolean fHideIdentical= true;
- /** add mode if true, otherwise replace mode */
- private boolean fAddMode= false;
- /** compare mode if true, otherwise replace/add mode */
- private boolean fCompareMode= false;
- /** perform structure compare on editions */
- private boolean fStructureCompare= false;
-
- /**
- * Maps from members to their corresponding editions.
- * Has only a single entry if dialog is used in "Replace" (and not "Add") mode.
- */
- private HashMap fMemberEditions;
- /** The editions of the current selected member */
- private List fCurrentEditions;
- private Thread fThread;
- private Pair fTargetPair;
- /** The selected edition in the edition viewer */
- private ITypedElement fSelectedItem;
- private String fTitleArg;
- private Image fTitleImage;
-
- // SWT controls
- private CompareViewerSwitchingPane fContentPane;
- private Button fCommitButton;
- private Table fMemberTable;
- private CompareViewerPane fMemberPane;
- private Tree fEditionTree;
- private CompareViewerPane fEditionPane;
- private Image fDateImage;
- private Image fTimeImage;
- private CompareViewerSwitchingPane fStructuredComparePane;
-
- /**
- * Creates a new modal, resizable dialog.
- * Various titles, icons, and labels are configured from the given resource bundle.
- * The following resource keys are used:
- * <pre>
- * key type description
- * title String dialog title
- * width Integer initial width of dialog
- * height Integer initial height of dialog
- * treeTitleFormat MessageFormat pane title for edition tree; arg 0 is the target
- * dateIcon String icon for node in edition tree; path relative to plugin
- * timeIcon String icon for leaf in edition tree; path relative to plugin
- * todayFormat MessageFormat format string if date is todays date; arg 0 is date
- * yesterdayFormat MessageFormat format string if date is yesterdays date; arg 0 is date
- * dayFormat MessageFormat format string if date is any other date; arg 0 is date
- * editionLabel String label for editions side of compare viewer; arg 0 is the date
- * targetLabel String label for target side of compare viewer
- * buttonLabel String label for OK button; default is IDialogConstants.OK_LABEL
- * </pre>
- *
- * @param parent if not <code>null</code> the new dialog stays on top of this parent shell
- * @param bundle <code>ResourceBundle</code> to configure the dialog
- */
- public EditionSelectionDialog(Shell parent, ResourceBundle bundle) {
- super(parent, bundle);
-
- fCompareConfiguration= new CompareConfiguration();
- fCompareConfiguration.setLeftEditable(false);
- fCompareConfiguration.setRightEditable(false);
-
- String iconName= Utilities.getString(fBundle, "dateIcon", "obj16/day_obj.gif"); //$NON-NLS-2$ //$NON-NLS-1$
- ImageDescriptor id= CompareUIPlugin.getImageDescriptor(iconName);
- if (id != null)
- fDateImage= id.createImage();
- iconName= Utilities.getString(fBundle, "timeIcon", "obj16/resource_obj.gif"); //$NON-NLS-1$ //$NON-NLS-2$
- id= CompareUIPlugin.getImageDescriptor(iconName);
- if (id != null)
- fTimeImage= id.createImage();
- }
-
- public void setEditionTitleArgument(String titleArgument) {
- fTitleArg= titleArgument;
- }
-
- public void setEditionTitleImage(Image titleImage) {
- fTitleImage= titleImage;
- }
-
- /**
- * Select the previous edition (presenting a UI).
- *
- * @param target the input object against which the editions are compared; must not be <code>null</code>
- * @param editions the list of editions (element type: <code>ITypedElement</code>s)
- * @param path If <code>null</code> dialog shows full input; if non <code>null</code> it extracts a subsection
- * @return returns the selected edition or <code>null</code> if error occurred.
- * The returned <code>ITypedElement</code> is one of the original editions
- * if <code>path</code> was <code>null</code>; otherwise
- * it is an <code>ITypedElement</code> returned from <code>IStructureCreator.locate(path, item)</code>
- */
- public ITypedElement selectPreviousEdition(final ITypedElement target, ITypedElement[] inputEditions, Object ppath) {
- Assert.isNotNull(target);
- fTargetPair= new Pair(null, target);
-
- // sort input editions
- final int count= inputEditions.length;
- final IModificationDate[] editions= new IModificationDate[count];
- for (int i= 0; i < count; i++)
- editions[i]= (IModificationDate) inputEditions[i];
- if (count > 1)
- internalSort(editions, 0, count-1);
-
- // find StructureCreator if ppath is not null
- IStructureCreator structureCreator= null;
- if (ppath != null) {
- String type= target.getType();
- IStructureCreatorDescriptor scd= CompareUIPlugin.getStructureCreator(type);
- if (scd != null)
- structureCreator= scd.createStructureCreator();
- }
-
- if (fAddMode) {
- // does not work in add mode
- return null;
- }
-
- if (structureCreator != null) {
- Pair pair= createPair(structureCreator, ppath, target);
- if (pair != null)
- fTargetPair= pair;
- else
- ppath= null; // couldn't extract item because of error
- }
-
- // from front (newest) to back (oldest)
- for (int i= 0; i < count; i++) {
-
- ITypedElement edition= (ITypedElement) editions[i];
- Pair pair= null;
-
- if (structureCreator != null && ppath != null) {
- // extract sub element from edition
- pair= createPair(structureCreator, ppath, edition);
- } else {
- pair= new Pair(null, edition);
- }
-
- if (pair != null && pair.fHasError)
- return null;
-
- if (pair != null && !fTargetPair.equals(pair)) {
- return pair.fItem;
- }
- }
-
- // nothing found
- return null;
- }
-
- /**
- * Presents this modal dialog with the functionality described in the class comment above.
- *
- * @param target the input object against which the editions are compared; must not be <code>null</code>
- * @param editions the list of editions (element type: <code>ITypedElement</code>s)
- * @param path If <code>null</code> dialog shows full input; if non <code>null</code> it extracts a subsection
- * @return returns the selected edition or <code>null</code> if dialog was cancelled.
- * The returned <code>ITypedElement</code> is one of the original editions
- * if <code>path</code> was <code>null</code>; otherwise
- * it is an <code>ITypedElement</code> returned from <code>IStructureCreator.locate(path, item)</code>
- */
- public ITypedElement selectEdition(final ITypedElement target, ITypedElement[] inputEditions, Object ppath) {
-
- Assert.isNotNull(target);
- fTargetPair= new Pair(null, target);
-
- // sort input editions
- final int count= inputEditions.length;
- final IModificationDate[] editions= new IModificationDate[count];
- for (int i= 0; i < count; i++)
- editions[i]= (IModificationDate) inputEditions[i];
- if (count > 1)
- internalSort(editions, 0, count-1);
-
- // find StructureCreator if ppath is not null
- IStructureCreator structureCreator= null;
- if (ppath != null) {
- String type= target.getType();
- IStructureCreatorDescriptor scd= CompareUIPlugin.getStructureCreator(type);
- if (scd != null)
- structureCreator= scd.createStructureCreator();
- }
-
- if (!fAddMode) {
- // replace mode
-
- if (structureCreator != null) {
- Pair pair= createPair(structureCreator, ppath, target);
- if (pair != null)
- fTargetPair= pair;
- else
- ppath= null; // couldn't extract item because of error
- }
-
- // set the left and right labels for the compare viewer
- String targetLabel= getTargetLabel(target, fTargetPair.getItem());
- if (fTargetIsRight)
- fCompareConfiguration.setRightLabel(targetLabel);
- else
- fCompareConfiguration.setLeftLabel(targetLabel);
-
- if (structureCreator != null && ppath != null) { // extract sub element
-
- final IStructureCreator sc= structureCreator;
- final Object path= ppath;
-
- // construct the comparer thread
- // and perform the background extract
- fThread= new Thread() {
- public void run() {
-
- // from front (newest) to back (oldest)
- for (int i= 0; i < count; i++) {
-
- if (fEditionTree == null || fEditionTree.isDisposed())
- break;
- ITypedElement edition= (ITypedElement) editions[i];
-
- // extract sub element from edition
- Pair pair= createPair(sc, path, edition);
- if (pair != null)
- sendPair(pair);
- }
- sendPair(null);
- }
- };
- } else {
- // create tree widget
- create();
-
- // from front (newest) to back (oldest)
- for (int i= 0; i < count; i++)
- addMemberEdition(new Pair(null, (ITypedElement) editions[i]));
- }
-
- } else {
- // add mode
- final Object container= ppath;
- Assert.isNotNull(container);
-
- if (structureCreator == null)
- return null; // error
-
- // extract all elements of container
- final HashSet current= new HashSet();
- IStructureComparator sco= structureCreator.locate(container, target);
- if (sco != null) {
- Object[] children= sco.getChildren();
- if (children != null)
- for (int i= 0; i < children.length; i++)
- current.add(children[i]);
- }
-
- final IStructureCreator sc= structureCreator;
-
- // construct the comparer thread
- // and perform the background extract
- fThread= new Thread() {
- public void run() {
-
- // from front (newest) to back (oldest)
- for (int i= 0; i < count; i++) {
-
- if (fEditionTree == null || fEditionTree.isDisposed())
- break;
- ITypedElement edition= (ITypedElement) editions[i];
-
- IStructureComparator sco2= sc.locate(container, edition);
- if (sco2 != null) {
- Object[] children= sco2.getChildren();
- if (children != null) {
- for (int i2= 0; i2 < children.length; i2++) {
- ITypedElement child= (ITypedElement) children[i2];
- if (!current.contains(child))
- sendPair(new Pair(sc, edition, child));
- }
- }
- }
- }
- sendPair(null);
- }
- };
- }
-
- open();
-
- if (getReturnCode() == OK)
- return fSelectedItem;
- return null;
- }
-
- private Pair createPair(IStructureCreator sc, Object path, ITypedElement input) {
- IStructureComparator scmp= sc.locate(path, input);
- if (scmp == null && sc.getStructure(input) == null) { // parse error
- Pair p= new Pair(sc, input);
- p.fHasError= true;
- return p;
- }
- if (scmp instanceof ITypedElement)
- return new Pair(sc, input, (ITypedElement) scmp);
- return null;
- }
-
- /**
- * Controls whether identical entries are shown or not (default).
- * This method must be called before <code>selectEdition</code>.
- *
- * @param hide if true identical entries are hidden; otherwise they are shown.
- */
- public void setHideIdenticalEntries(boolean hide) {
- fHideIdentical= hide;
- }
-
- /**
- * Controls whether workspace target is on the left (the default) or right hand side.
- *
- * @param isRight if true target is shown on right hand side.
- */
- public void setTargetIsRight(boolean isRight) {
- fTargetIsRight= isRight;
- }
-
- /**
- * Controls whether the EditionSelectionDialog is in 'add' mode
- * or 'replace' mode (the default).
- *
- * @param addMode if true dialog is in 'add' mode.
- */
- public void setAddMode(boolean addMode) {
- fAddMode= addMode;
- }
-
- /**
- * Controls whether the EditionSelectionDialog is in 'compare' mode
- * or 'add/replace' (the default) mode.
- *
- * @param addMode if true dialog is in 'add' mode.
- */
- public void setCompareMode(boolean compareMode) {
- fCompareMode= compareMode;
- fStructureCompare= fCompareMode && !fAddMode;
- }
-
- /**
- * Returns the input target that has been specified with the most recent call
- * to <code>selectEdition</code>. If a not <code>null</code> path was specified this method
- * returns a subsection of this target (<code>IStructureCreator.locate(path, target)</code>)
- * instead of the input target.
- * <p>
- * For example if the <code>target</code> is a Java compilation unit and <code>path</code> specifies
- * a method, the value returned from <code>getTarget</code> will be the method not the compilation unit.
- *
- * @return the last specified target or a subsection thereof.
- */
- public ITypedElement getTarget() {
- return fTargetPair.getItem();
- }
-
- /**
- * Returns a label for identifying the target side of a compare viewer.
- * This implementation extracts the value for the key "targetLabel" from the resource bundle
- * and passes it as the format argument to <code>MessageFormat.format</code>.
- * The single format argument for <code>MessageFormat.format</code> ("{0}" in the format string)
- * is the name of the given input element.
- * <p>
- * Subclasses may override to create their own label.
- * </p>
- *
- * @param target the target element for which a label must be returned
- * @param item if a path has been specified in <code>selectEdition</code> a sub element of the given target; otherwise the same as target
- * @return a label the target side of a compare viewer
- */
- protected String getTargetLabel(ITypedElement target, ITypedElement item) {
- String format= null;
- if (target instanceof ResourceNode)
- format= Utilities.getString(fBundle, "workspaceTargetLabel", null); //$NON-NLS-1$
- if (format == null)
- format= Utilities.getString(fBundle, "targetLabel"); //$NON-NLS-1$
- if (format == null)
- format= "x{0}"; //$NON-NLS-1$
-
- return MessageFormat.format(format, new Object[] { target.getName() });
- }
-
- /**
- * Returns a label for identifying the edition side of a compare viewer.
- * This implementation extracts the value for the key "editionLabel" from the resource bundle
- * and passes it as the format argument to <code>MessageFormat.format</code>.
- * The single format argument for <code>MessageFormat.format</code> ("{0}" in the format string)
- * is the formatted modification date of the given input element.
- * <p>
- * Subclasses may override to create their own label.
- * </p>
- *
- * @param selectedEdition the selected edition for which a label must be returned
- * @param item if a path has been specified in <code>selectEdition</code> a sub element of the given selectedEdition; otherwise the same as selectedEdition
- * @return a label the edition side of a compare viewer
- */
- protected String getEditionLabel(ITypedElement selectedEdition, ITypedElement item) {
- String format= null;
- if (selectedEdition instanceof ResourceNode)
- format= Utilities.getString(fBundle, "workspaceEditionLabel", null); //$NON-NLS-1$
- else if (selectedEdition instanceof HistoryItem)
- format= Utilities.getString(fBundle, "historyEditionLabel", null); //$NON-NLS-1$
- if (format == null)
- format= Utilities.getString(fBundle, "editionLabel"); //$NON-NLS-1$
- if (format == null)
- format= "x{0}"; //$NON-NLS-1$
-
-
- String date= ""; //$NON-NLS-1$
- if (selectedEdition instanceof IModificationDate) {
- long modDate= ((IModificationDate)selectedEdition).getModificationDate();
- date= DateFormat.getDateTimeInstance().format(new Date(modDate));
- }
-
- return MessageFormat.format(format, new Object[] { date });
- }
-
- protected String getShortEditionLabel(ITypedElement edition, ITypedElement item, Date date) {
- String format= null;
- if (edition instanceof ResourceNode)
- format= Utilities.getString(fBundle, "workspaceTreeFormat", null); //$NON-NLS-1$
- if (format == null)
- format= Utilities.getString(fBundle, "treeFormat", null); //$NON-NLS-1$
- if (format == null)
- format= "x{0}"; //$NON-NLS-1$
-
- String ds= DateFormat.getTimeInstance().format(date);
- return MessageFormat.format(format, new Object[] { ds });
- }
-
- /**
- * Returns an image for identifying the edition side of a compare viewer.
- * This implementation extracts the value for the key "editionLabel" from the resource bundle
- * and passes it as the format argument to <code>MessageFormat.format</code>.
- * The single format argument for <code>MessageFormat.format</code> ("{0}" in the format string)
- * is the formatted modification date of the given input element.
- * <p>
- * Subclasses may override to create their own label.
- * </p>
- *
- * @param selectedEdition the selected edition for which a label must be returned
- * @param item if a path has been specified in <code>selectEdition</code> a sub element of the given selectedEdition; otherwise the same as selectedEdition
- * @return a label the edition side of a compare viewer
- */
- protected Image getEditionImage(ITypedElement selectedEdition, ITypedElement item) {
- if (selectedEdition instanceof ResourceNode)
- return selectedEdition.getImage();
- if (selectedEdition instanceof HistoryItem)
- return fTimeImage;
- return null;
- }
-
- /* (non Javadoc)
- * Creates SWT control tree.
- */
- protected synchronized Control createDialogArea(Composite parent) {
-
- getShell().setText(Utilities.getString(fBundle, "title")); //$NON-NLS-1$
-
- Splitter vsplitter= new Splitter(parent, SWT.VERTICAL);
- vsplitter.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL
- | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_VERTICAL));
-
- vsplitter.addDisposeListener(
- new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- if (fDateImage != null)
- fDateImage.dispose();
- if (fTimeImage != null)
- fTimeImage.dispose();
- }
- }
- );
-
- if (fAddMode) {
- // we need two panes: the left for the elements, the right one for the editions
- Splitter hsplitter= new Splitter(vsplitter, SWT.HORIZONTAL);
-
- fMemberPane= new CompareViewerPane(hsplitter, SWT.BORDER | SWT.FLAT);
- fMemberPane.setText(Utilities.getString(fBundle, "memberPaneTitle")); //$NON-NLS-1$
- fMemberTable= new Table(fMemberPane, SWT.H_SCROLL + SWT.V_SCROLL);
- fMemberTable.addSelectionListener(
- new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleMemberSelect(e.item);
- }
- }
- );
-
- fMemberPane.setContent(fMemberTable);
-
- fEditionPane= new CompareViewerPane(hsplitter, SWT.BORDER | SWT.FLAT);
- } else {
- if (fStructureCompare) {
- // we need two panes: the left for the elements, the right one for the structured diff
- Splitter hsplitter= new Splitter(vsplitter, SWT.HORIZONTAL);
-
- fEditionPane= new CompareViewerPane(hsplitter, SWT.BORDER | SWT.FLAT);
- fStructuredComparePane= new CompareViewerSwitchingPane(hsplitter, SWT.BORDER | SWT.FLAT, true) {
- protected Viewer getViewer(Viewer oldViewer, Object input) {
- if (input instanceof ICompareInput)
- return CompareUIPlugin.findStructureViewer(oldViewer, (ICompareInput)input, this, fCompareConfiguration);
- return null;
- }
- };
- fStructuredComparePane.addSelectionChangedListener(
- new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent e) {
- feedInput2(e.getSelection());
- }
- }
- );
- } else {
- // only a single pane showing the editions
- fEditionPane= new CompareViewerPane(vsplitter, SWT.BORDER | SWT.FLAT);
- }
- if (fTitleArg == null)
- fTitleArg= fTargetPair.getItem().getName();
- String titleFormat= Utilities.getString(fBundle, "treeTitleFormat"); //$NON-NLS-1$
- String title= MessageFormat.format(titleFormat, new String[] { fTitleArg });
- fEditionPane.setText(title);
- if (fTitleImage != null)
- fEditionPane.setImage(fTitleImage);
- }
-
- fEditionTree= new Tree(fEditionPane, SWT.H_SCROLL + SWT.V_SCROLL);
- fEditionTree.addSelectionListener(
- new SelectionAdapter() {
-// public void widgetDefaultSelected(SelectionEvent e) {
-// handleDefaultSelected();
-// }
- public void widgetSelected(SelectionEvent e) {
- feedInput(e.item);
- }
- }
- );
- fEditionPane.setContent(fEditionTree);
-
- // now start the thread (and forget about it)
- if (fThread != null) {
- fThread.start();
- fThread= null;
- }
-
- fContentPane= new CompareViewerSwitchingPane(vsplitter, SWT.BORDER | SWT.FLAT) {
- protected Viewer getViewer(Viewer oldViewer, Object input) {
- return CompareUIPlugin.findContentViewer(oldViewer, input, this, fCompareConfiguration);
- }
- };
- vsplitter.setWeights(new int[] { 30, 70 });
-
- return vsplitter;
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected void createButtonsForButtonBar(Composite parent) {
- String buttonLabel= Utilities.getString(fBundle, "buttonLabel", IDialogConstants.OK_LABEL); //$NON-NLS-1$
- if (fCompareMode) {
- // only a 'Done' button
- createButton(parent, IDialogConstants.CANCEL_ID, buttonLabel, false);
- } else {
- // a 'Cancel' and a 'Add/Replace' button
- fCommitButton= createButton(parent, IDialogConstants.OK_ID, buttonLabel, true);
- fCommitButton.setEnabled(false);
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
- }
- }
-
- /**
- * Overidden to disable dismiss on double click in compare mode.
- */
- protected void okPressed() {
- if (fCompareMode)
- ; // don't dismiss dialog
- else
- super.okPressed();
- }
-
- //---- private stuff ----------------------------------------------------------------------------------------
-
- /**
- * Asynchroneously sends a Pair (or null) to the UI thread.
- */
- private void sendPair(final Pair pair) {
- if (fEditionTree != null && !fEditionTree.isDisposed()) {
- Display display= fEditionTree.getDisplay();
- display.asyncExec(
- new Runnable() {
- public void run() {
- addMemberEdition(pair);
- }
- }
- );
- }
- }
-
-// private void handleDefaultSelected() {
-// if (fSelectedItem != null)
-// okPressed();
-// }
-
- private static void internalSort(IModificationDate[] keys, int left, int right) {
-
- int original_left= left;
- int original_right= right;
-
- IModificationDate mid= keys[(left + right) / 2];
- do {
- while (keys[left].getModificationDate() > mid.getModificationDate())
- left++;
-
- while (mid.getModificationDate() > keys[right].getModificationDate())
- right--;
-
- if (left <= right) {
- IModificationDate tmp= keys[left];
- keys[left]= keys[right];
- keys[right]= tmp;
- left++;
- right--;
- }
- } while (left <= right);
-
- if (original_left < right)
- internalSort(keys, original_left, right);
-
- if (left < original_right)
- internalSort(keys, left, original_right);
- }
-
- /**
- * Adds the given Pair to the member editions.
- * If HIDE_IDENTICAL is true the new Pair is only added if its contents
- * is different from the preceeding Pair.
- * If the argument is <code>null</code> the message "No Editions found" is shown
- * in the member or edition viewer.
- */
- private void addMemberEdition(Pair pair) {
-
- if (pair == null) { // end of list of pairs
- if (fMemberTable != null) {
- if (!fMemberTable.isDisposed() && fMemberTable.getItemCount() == 0) {
- TableItem ti= new TableItem(fMemberTable, SWT.NONE);
- ti.setText(Utilities.getString(fBundle, "noAdditionalMembersMessage")); //$NON-NLS-1$
- }
- return;
- }
- if (fEditionTree != null && !fEditionTree.isDisposed() && fEditionTree.getItemCount() == 0) {
- TreeItem ti= new TreeItem(fEditionTree, SWT.NONE);
- ti.setText(Utilities.getString(fBundle, "notFoundInLocalHistoryMessage")); //$NON-NLS-1$
- }
- return;
- }
-
- if (fMemberEditions == null)
- fMemberEditions= new HashMap();
-
- ITypedElement item= pair.getItem();
- List editions= (List) fMemberEditions.get(item);
- if (editions == null) {
- editions= new ArrayList();
- fMemberEditions.put(item, editions);
- if (fMemberTable != null && !fMemberTable.isDisposed()) {
- ITypedElement te= (ITypedElement)item;
- String name= te.getName();
-
- // find position
- TableItem[] items= fMemberTable.getItems();
- int where= items.length;
- for (int i= 0; i < where; i++) {
- String n= items[i].getText();
- if (n.compareTo(name) > 0) {
- where= i;
- break;
- }
- }
-
- TableItem ti= new TableItem(fMemberTable, where, SWT.NULL);
- ti.setImage(te.getImage());
- ti.setText(name);
- ti.setData(editions);
- }
- }
- if (fHideIdentical) {
- Pair last= fTargetPair;
- int size= editions.size();
- if (size > 0)
- last= (Pair) editions.get(size-1);
- if (last != null && last.equals(pair))
- return; // don't add since the new one is equal to old
- }
- editions.add(pair);
-
- if (!fAddMode || editions == fCurrentEditions)
- addEdition(pair);
- }
-
- /**
- * Returns the number of s since Jan 1st, 1970.
- * The given date is converted to GMT and daylight saving is taken into account too.
- */
- private long dayNumber(long date) {
- int ONE_DAY_MS= 24*60*60 * 1000; // one day in milli seconds
-
- Calendar calendar= Calendar.getInstance();
- long localTimeOffset= calendar.get(Calendar.ZONE_OFFSET) + calendar.get(Calendar.DST_OFFSET);
-
- return (date + localTimeOffset) / ONE_DAY_MS;
- }
-
- /**
- * Adds the given Pair to the edition tree.
- * It takes care of creating tree nodes for different dates.
- */
- private void addEdition(Pair pair) {
- if (fEditionTree == null || fEditionTree.isDisposed())
- return;
-
- // find last day
- TreeItem[] days= fEditionTree.getItems();
- TreeItem lastDay= null;
- if (days.length > 0)
- lastDay= days[days.length-1];
-
- boolean first= lastDay == null;
-
- ITypedElement edition= pair.getEdition();
- ITypedElement item= pair.getItem();
-
- long ldate= ((IModificationDate)edition).getModificationDate();
- long day= dayNumber(ldate);
- Date date= new Date(ldate);
- if (lastDay == null || day != dayNumber(((Date)lastDay.getData()).getTime())) {
- lastDay= new TreeItem(fEditionTree, SWT.NONE);
- lastDay.setImage(fDateImage);
- String df= DateFormat.getDateInstance().format(date);
- long today= dayNumber(System.currentTimeMillis());
-
- String formatKey;
- if (day == today)
- formatKey= "todayFormat"; //$NON-NLS-1$
- else if (day == today-1)
- formatKey= "yesterdayFormat"; //$NON-NLS-1$
- else
- formatKey= "dayFormat"; //$NON-NLS-1$
- String pattern= Utilities.getString(fBundle, formatKey);
- if (pattern != null)
- df= MessageFormat.format(pattern, new String[] { df });
- lastDay.setText(df);
- lastDay.setData(date);
- }
- TreeItem ti= new TreeItem(lastDay, SWT.NONE);
- ti.setImage(getEditionImage(edition, item));
-
- String s= getShortEditionLabel(edition, item, date);
- if (pair.fHasError) {
- String pattern= Utilities.getString(fBundle, "parseErrorFormat"); //$NON-NLS-1$
- s= MessageFormat.format(pattern, new String[] { s } );
- }
- ti.setText(s);
-
- ti.setData(pair);
- if (first) {
- fEditionTree.setSelection(new TreeItem[] {ti});
- if (!fAddMode)
- fEditionTree.setFocus();
- feedInput(ti);
- }
- if (first) // expand first node
- lastDay.setExpanded(true);
- }
-
- /**
- * Feeds selection from member viewer to edition viewer.
- */
- private void handleMemberSelect(Widget w) {
- Object data= w.getData();
- if (data instanceof List) {
- List editions= (List) data;
- if (editions != fCurrentEditions) {
- fCurrentEditions= editions;
- fEditionTree.removeAll();
-
- String pattern= Utilities.getString(fBundle, "treeTitleFormat"); //$NON-NLS-1$
- String title= MessageFormat.format(pattern, new Object[] { ((Item)w).getText() });
- fEditionPane.setText(title);
-
- Iterator iter= editions.iterator();
- while (iter.hasNext()) {
- Object item= iter.next();
- if (item instanceof Pair)
- addEdition((Pair) item);
- }
- }
- }
- }
-
- private void setInput(Object input) {
- if (!fCompare && input instanceof ICompareInput) {
- ICompareInput ci= (ICompareInput) input;
- if (fTargetIsRight)
- input= ci.getLeft();
- else
- input= ci.getRight();
- }
- fContentPane.setInput(input);
- if (fStructuredComparePane != null)
- fStructuredComparePane.setInput(input);
- }
-
- /*
- * Feeds selection from edition viewer to content (and structure) viewer.
- */
- private void feedInput(Widget w) {
- Object input= w.getData();
- boolean isOK= false;
- if (input instanceof Pair) {
- Pair pair= (Pair) input;
- fSelectedItem= pair.getItem();
- isOK= !pair.fHasError;
-
- ITypedElement edition= pair.getEdition();
- String editionLabel= getEditionLabel(edition, fSelectedItem);
- Image editionImage= getEditionImage(edition, fSelectedItem);
-
- if (fAddMode) {
- setInput(fSelectedItem);
- fContentPane.setText(editionLabel);
- fContentPane.setImage(editionImage);
- } else {
- if (fTargetIsRight) {
- fCompareConfiguration.setLeftLabel(editionLabel);
- fCompareConfiguration.setLeftImage(editionImage);
- setInput(new DiffNode(fSelectedItem, fTargetPair.getItem()));
- } else {
- fCompareConfiguration.setRightLabel(editionLabel);
- fCompareConfiguration.setRightImage(editionImage);
- setInput(new DiffNode(fTargetPair.getItem(), fSelectedItem));
- }
- }
- } else {
- fSelectedItem= null;
- setInput(null);
- }
- if (fCommitButton != null)
- fCommitButton.setEnabled(isOK && fSelectedItem != null && fTargetPair.getItem() != fSelectedItem);
- }
-
- /*
- * Feeds selection from structure viewer to content viewer.
- */
- private void feedInput2(ISelection sel) {
- if (sel instanceof IStructuredSelection) {
- IStructuredSelection ss= (IStructuredSelection) sel;
- if (ss.size() == 1)
- fContentPane.setInput(ss.getFirstElement());
- }
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/HistoryItem.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/HistoryItem.java
deleted file mode 100644
index 98ddbb7e4..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/HistoryItem.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import java.io.InputStream;
-import java.io.BufferedInputStream;
-
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.core.resources.IFileState;
-import org.eclipse.core.runtime.CoreException;
-
-import org.eclipse.compare.*;
-
-/**
- * A combination <code>IFileState</code> and <code>ITypedElement</code> that can be used as
- * an input to a compare viewer or other places where an <code>IStreamContentAccessor</code>
- * is needed.
- * <p>
- * <p>
- * Clients may instantiate this class; it is not intended to be subclassed.
- * </p>
- */
-public class HistoryItem implements IStreamContentAccessor, ITypedElement, IModificationDate {
-
- private ITypedElement fBase;
- private IFileState fFileState;
-
- /**
- * Creates a <code>HistoryItem</code> object which combines the given <code>IFileState</code>
- * and <code>ITypedElement</code> into an object
- * which is suitable as input for a compare viewer or <code>ReplaceWithEditionDialog</code>.
- *
- * @param base the implementation of the <code>ITypedElement</code> interface delegates to this base <code>ITypedElement</code>
- * @param fileState the <code>IFileState</code> from which the streamable contents and the modification time is derived from
- */
- public HistoryItem(ITypedElement base, IFileState fileState) {
- fBase= base;
- fFileState= fileState;
- }
-
- /* (non-Javadoc)
- * see ITypedElement.getName
- */
- public String getName() {
- return fBase.getName();
- }
-
- /* (non-Javadoc)
- * see ITypedElement.getImage
- */
- public Image getImage() {
- return fBase.getImage();
- }
-
- /* (non-Javadoc)
- * see ITypedElement.getType
- */
- public String getType() {
- return fBase.getType();
- }
-
- /* (non-Javadoc)
- * see IModificationDate.getModificationDate
- */
- public long getModificationDate() {
- return fFileState.getModificationTime();
- }
-
- /* (non-Javadoc)
- * see IStreamContentAccessor.getContents
- */
- public InputStream getContents() throws CoreException {
- return new BufferedInputStream(fFileState.getContents());
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IContentChangeListener.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IContentChangeListener.java
deleted file mode 100644
index 095f52f37..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IContentChangeListener.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-/**
- * An <code>IContentChangeListener</code> is informed about content changes of a
- * <code>IContentChangeNotifier</code>.
- * <p>
- * Clients may implement this interface.
- * </p>
- *
- * @see IContentChangeNotifier
- */
-public interface IContentChangeListener {
-
- /**
- * Called whenever the content of the given source has changed.
- *
- * @param source the source whose contents has changed
- */
- void contentChanged(IContentChangeNotifier source);
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IContentChangeNotifier.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IContentChangeNotifier.java
deleted file mode 100644
index bc62b5af1..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IContentChangeNotifier.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-/**
- * Interface common to all objects that provide a means for registering
- * for content change notification.
- * <p>
- * Clients may implement this interface.
- * </p>
- *
- * @see IContentChangeListener
- */
-public interface IContentChangeNotifier {
-
- /**
- * Adds a content change listener to this notifier.
- * Has no effect if an identical listener is already registered.
- *
- * @param listener a content changed listener
- */
- void addContentChangeListener(IContentChangeListener listener);
-
- /**
- * Removes the given content changed listener from this notifier.
- * Has no effect if the listener is not registered.
- *
- * @param listener a content changed listener
- */
- void removeContentChangeListener(IContentChangeListener listener);
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IEditableContent.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IEditableContent.java
deleted file mode 100644
index 5e8d9d6de..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IEditableContent.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-/**
- * Common interface for objects with editable contents.
- * Typically it is implemented by objects that also implement
- * the <code>IStreamContentAccessor</code> interface.
- * <p>
- * Clients may implement this interface.
- * <p>
- * Note that implementing <code>IEditableContent</code> does not
- * automatically mean that it is editable. An object is only editable if
- * it implements <code>IEditableContent</code> and the <code>isEditable</code> method returns <code>true</code>.
- *
- * @see IStreamContentAccessor
- */
-public interface IEditableContent {
-
- /**
- * Returns <code>true</code> if this object can be modified.
- * If it returns <code>false</code> the other methods of this API must not be called.
- *
- * @return <code>true</code> if this object can be modified
- */
- boolean isEditable();
-
- /**
- * Replaces the current content with the given new bytes.
- *
- * @param newContent this new contents replaces the old contents
- */
- void setContent(byte[] newContent);
-
- /**
- * This method is called on a parent to
- * <UL>
- * <LI>
- * add a child,
- * <LI>
- * remove a child,
- * <LI>
- * copy the contents of a child
- * </UL>
- *
- * What to do is encoded in the two arguments as follows:
- * <TABLE>
- * <TR>
- * <TD>add:</TD>
- * <TD>child == null</TD>
- * <TD>other != null</TD>
- * </TR>
- * <TR>
- * <TD>remove:</TD>
- * <TD>child != null</TD>
- * <TD>other == null</TD>
- * </TR>
- * <TR>
- * <TD>copy:</TD>
- * <TD>child != null</TD>
- * <TD>other != null</TD>
- * </TR>
- * </TABLE>
- */
- ITypedElement replace(ITypedElement child, ITypedElement other);
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IModificationDate.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IModificationDate.java
deleted file mode 100644
index 98f9364dd..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IModificationDate.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-/**
- * Common interface for objects with a modification date. The modification date
- * can be used in the UI to give the user a general idea of how old an object is.
- * <p>
- * Clients may implement this interface.
- * </p>
- */
-public interface IModificationDate {
-
- /**
- * Returns the modification time of this object.
- * <p>
- * Note that this value should only be used to give the user a general idea of how
- * old the object is.
- *
- * @return the time of last modification, in milliseconds since January 1, 1970, 00:00:00 GMT
- */
- long getModificationDate();
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IPropertyChangeNotifier.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IPropertyChangeNotifier.java
deleted file mode 100644
index 447f227ce..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IPropertyChangeNotifier.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import org.eclipse.jface.util.IPropertyChangeListener;
-
-/**
- * Interface common to all objects that provide a means for registering
- * for property change notification.
- * <p>
- * Clients may implement this interface.
- * </p>
- *
- * @see org.eclipse.jface.util.IPropertyChangeListener
- */
-public interface IPropertyChangeNotifier {
-
- /**
- * Adds a listener for property changes to this notifier.
- * Has no effect if an identical listener is already registered.
- *
- * @param listener a property change listener
- */
- void addPropertyChangeListener(IPropertyChangeListener listener);
-
- /**
- * Removes the given content change listener from this notifier.
- * Has no effect if the identical listener is not registered.
- *
- * @param listener a property change listener
- */
- void removePropertyChangeListener(IPropertyChangeListener listener);
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IStreamContentAccessor.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IStreamContentAccessor.java
deleted file mode 100644
index fee4741df..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IStreamContentAccessor.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import java.io.InputStream;
-
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * An <code>IStreamContentAccessor</code> object represents a set of bytes which can be
- * accessed by means of a stream.
- * <p>
- * Clients may implement this interface, or use the standard implementation,
- * <code>BufferedContent</code>.
- *
- * @see BufferedContent
- */
-public interface IStreamContentAccessor {
- /**
- * Returns an open <code>InputStream</code> for this object which can be used to retrieve the object's content.
- * The client is responsible for closing the stream when finished.
- * Returns <code>null</code> if this object has no streamable contents.
- *
- * @return an input stream containing the contents of this object
- * @exception CoreException if the contents of this object could not be accessed
- */
- InputStream getContents() throws CoreException;
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/ITypedElement.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/ITypedElement.java
deleted file mode 100644
index e914a57dc..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/ITypedElement.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Interface for getting the name, image, and type for an object.
- * <p>
- * These methods are typically used to present an input object in the compare UI
- * (<code>getName</code> and <code>getImage</code>)
- * and for finding a viewer for a given input type (<code>getType</code>).
- * <p>
- * Clients may implement this interface.
- */
-public interface ITypedElement {
-
- /**
- * Type for a folder input. Folders are comparison
- * elements that have no contents, only a name and children.
- */
- public static final String FOLDER_TYPE= "FOLDER"; //$NON-NLS-1$
-
- /**
- * Type for an element whose actual type is text.
- */
- public static final String TEXT_TYPE= "txt"; //$NON-NLS-1$
-
- /**
- * Type for an element whose actual type could not
- * be determined.
- */
- public static final String UNKNOWN_TYPE= "???"; //$NON-NLS-1$
-
- /**
- * Returns the name of this object.
- * The name is used when displaying this object in the UI.
- *
- * @return the name of this object
- */
- String getName();
-
- /**
- * Returns an image for this object.
- * This image is used when displaying this object in the UI.
- *
- * @return the image of this object or <code>null</code> if this type of input has no image
- */
- Image getImage();
-
- /**
- * Returns the type of this object. For objects with a file name
- * this is typically the file extension. For folders its the constant
- * <code>FOLDER_TYPE</code>.
- * The type is used for determining a suitable viewer for this object.
- *
- * @return the type of this object
- */
- String getType();
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IViewerCreator.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IViewerCreator.java
deleted file mode 100644
index c6f60e72f..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IViewerCreator.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import org.eclipse.swt.widgets.Composite;
-
-import org.eclipse.jface.viewers.Viewer;
-
-/**
- * A factory object for <code>Viewer</code>.
- * <p>
- * This interface is only required when creating a <code>Viewer</code> from a plugin.xml file.
- * Since <code>Viewer</code>s have no default constructor they cannot be
- * instantiated directly with <code>Class.forName</code>.
- */
-public interface IViewerCreator {
-
- /**
- * Creates a new viewer under the given SWT parent control.
- *
- * @param parent the SWT parent control under which to create the viewer's SWT control
- * @param config a compare configuration the newly created viewer might want to use
- * @return a new viewer
- */
- Viewer createViewer(Composite parent, CompareConfiguration config);
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/NavigationAction.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/NavigationAction.java
deleted file mode 100644
index 684c65f74..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/NavigationAction.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import java.util.ResourceBundle;
-import org.eclipse.jface.action.Action;
-
-import org.eclipse.compare.internal.CompareNavigator;
-import org.eclipse.compare.internal.CompareUIPlugin;
-import org.eclipse.compare.internal.Utilities;
-
-/**
- * A <code>NavigationAction</code> is used to navigate through the individual
- * differences of a <code>CompareEditorInput</code>.
- * <p>
- * Clients may instantiate this class; it is not intended to be subclassed.
- * </p>
- * @since 2.0
- */
-public class NavigationAction extends Action {
-
- private boolean fNext;
- private CompareEditorInput fCompareEditorInput;
-
-
- /**
- * Creates a <code>NavigationAction</code>.
- *
- * @param next if <code>true</code> action goes to the next difference; otherwise to the previous difference.
- */
- public NavigationAction(boolean next) {
- this(CompareUIPlugin.getResourceBundle(), next);
- }
-
- /**
- * Creates a <code>NavigationAction</code> that initializes its attributes
- * from the given <code>ResourceBundle</code>.
- *
- * @param bundle is used to initialize the action
- * @param next if <code>true</code> action goes to the next difference; otherwise to the previous difference.
- */
- public NavigationAction(ResourceBundle bundle, boolean next) {
- Utilities.initAction(this, bundle, next ? "action.Next." : "action.Previous."); //$NON-NLS-2$ //$NON-NLS-1$
- fNext= next;
- }
-
- public void run() {
- if (fCompareEditorInput != null) {
- Object adapter= fCompareEditorInput.getAdapter(CompareNavigator.class);
- if (adapter instanceof CompareNavigator)
- ((CompareNavigator)adapter).selectChange(fNext);
- }
- }
-
- /**
- * Sets the <code>CompareEditorInput</code> on which this action operates.
- *
- * @param input the <code>CompareEditorInput</code> on which this action operates; if <code>null</code> action does nothing
- */
- public void setCompareEditorInput(CompareEditorInput input) {
- fCompareEditorInput= input;
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/ResourceNode.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/ResourceNode.java
deleted file mode 100644
index 6c488a159..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/ResourceNode.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import java.io.*;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.jface.util.Assert;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.compare.internal.Utilities;
-import org.eclipse.compare.structuremergeviewer.IStructureComparator;
-
-/**
- * A <code>ResourceNode</code> wrappers an <code>IResources</code> so that it can be used
- * as input for the differencing engine (interfaces <code>IStructureComparator</code> and <code>ITypedElement</code>)
- * and the <code>ReplaceWithEditionDialog</code> (interfaces <code>ITypedElement</code> and <code>IModificationDate</code>).
- * <p>
- * Clients may instantiate this class; it is not intended to be subclassed.
- * </p>
- *
- * @see EditionSelectionDialog
- */
-public class ResourceNode extends BufferedContent
- implements IStructureComparator, ITypedElement, IEditableContent, IModificationDate {
-
- private IResource fResource;
- private ArrayList fChildren;
-
-
- /**
- * Creates a <code>ResourceNode</code> for the given resource.
- *
- * @param resource the resource
- */
- public ResourceNode(IResource resource) {
- fResource= resource;
- Assert.isNotNull(resource);
- }
-
- /**
- * Returns the corresponding resource for this object.
- *
- * @return the corresponding resource
- */
- public IResource getResource() {
- return fResource;
- }
-
- /* (non Javadoc)
- * see IStreamContentAccessor.getContents
- */
- public InputStream getContents() throws CoreException {
- if (fResource instanceof IStorage)
- return super.getContents();
- return null;
- }
-
- /* (non Javadoc)
- * see IModificationDate.getModificationDate
- */
- public long getModificationDate() {
- IPath path= fResource.getLocation();
- File file= path.toFile();
- return file.lastModified();
- }
-
- /* (non Javadoc)
- * see ITypedElement.getName
- */
- public String getName() {
- if (fResource != null)
- return fResource.getName();
- return null;
- }
-
- /* (non Javadoc)
- * see ITypedElement.getType
- */
- public String getType() {
- if (fResource instanceof IContainer)
- return ITypedElement.FOLDER_TYPE;
- if (fResource != null) {
- String s= fResource.getFileExtension();
- if (s != null)
- return s;
- }
- return ITypedElement.UNKNOWN_TYPE;
- }
-
- /* (non Javadoc)
- * see ITypedElement.getImage
- */
- public Image getImage() {
- return CompareUI.getImage(fResource);
- }
-
- /**
- * Returns <code>true</code> if the other object is of type <code>ITypedElement</code>
- * and their names are identical. The content is not considered.
- */
- /* (non Javadoc)
- * see IStructureComparator.equals
- */
- public boolean equals(Object other) {
- if (other instanceof ITypedElement) {
- String otherName= ((ITypedElement)other).getName();
- return getName().equals(otherName);
- }
- return super.equals(other);
- }
-
- /**
- * Returns the hash code of the name.
- */
- /* (non Javadoc)
- * see IStructureComparator.hashCode
- */
- public int hashCode() {
- return getName().hashCode();
- }
-
- /* (non Javadoc)
- * see IStructureComparator.getChildren
- */
- public Object[] getChildren() {
- if (fChildren == null) {
- fChildren= new ArrayList();
- if (fResource instanceof IContainer) {
- try {
- IResource members[]= ((IContainer)fResource).members();
- for (int i= 0; i < members.length; i++) {
- IStructureComparator child= createChild(members[i]);
- if (child != null)
- fChildren.add(child);
- }
- } catch (CoreException ex) {
- }
- }
- }
- return fChildren.toArray();
- }
-
- /**
- * This hook method is called from <code>getChildren</code> once for every
- * member of a container resource. This implementation
- * creates a new <code>ResourceNode</code> for the given child resource.
- * Clients may override this method to create a different type of
- * <code>IStructureComparator</code> or to filter children by returning <code>null</code>.
- *
- * @param child the child resource for which a <code>IStructureComparator</code> must be returned
- * @return a <code>ResourceNode</code> for the given child or <code>null</code>
- */
- protected IStructureComparator createChild(IResource child) {
- return new ResourceNode(child);
- }
-
- /**
- * Returns an open stream if the corresponding resource implements the
- * <code>IStorage</code> interface. Otherwise the value <code>null</code> is returned.
- *
- * @return a buffered input stream containing the contents of this storage
- * @exception CoreException if the contents of this storage could not be accessed
- */
- protected InputStream createStream() throws CoreException {
- if (fResource instanceof IStorage)
- return new BufferedInputStream(((IStorage)fResource).getContents());
- return null;
- }
-
- /* (non Javadoc)
- * see IEditableContent.isEditable
- */
- public boolean isEditable() {
- return true;
- }
-
- /* (non Javadoc)
- * see IEditableContent.replace
- */
- public ITypedElement replace(ITypedElement child, ITypedElement other) {
- return child;
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/ZipFileStructureCreator.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/ZipFileStructureCreator.java
deleted file mode 100644
index 902d5dc4a..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/ZipFileStructureCreator.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare;
-
-import java.io.*;
-import java.util.Iterator;
-import java.util.HashMap;
-import java.util.zip.*;
-
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.util.Assert;
-
-import org.eclipse.core.runtime.CoreException;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.*;
-import org.eclipse.compare.internal.Utilities;
-
-
-public class ZipFileStructureCreator implements IStructureCreator {
-
- /**
- * Common base class for ZipFolder and ZipFile
- */
- static abstract class ZipResource implements IStructureComparator, ITypedElement {
-
- private String fName;
-
- ZipResource(String name) {
- fName= name;
- }
-
- public String getName() {
- return fName;
- }
-
- public Image getImage() {
- return CompareUI.getImage(getType());
- }
-
- /**
- * Returns true if other is ITypedElement and names are equal.
- * @see IComparator#equals
- */
- public boolean equals(Object other) {
- if (other instanceof ITypedElement)
- return fName.equals(((ITypedElement) other).getName());
- return super.equals(other);
- }
-
- public int hashCode() {
- return fName.hashCode();
- }
- }
-
- static class ZipFolder extends ZipResource {
-
- private HashMap fChildren= new HashMap(10);
-
- ZipFolder(String name) {
- super(name);
- }
-
- public String getType() {
- return ITypedElement.FOLDER_TYPE;
- }
-
- public Object[] getChildren() {
- Object[] children= new Object[fChildren.size()];
- Iterator iter= fChildren.values().iterator();
- for (int i= 0; iter.hasNext(); i++)
- children[i]= iter.next();
- return children;
- }
-
- ZipFile createContainer(String path) {
- String entry= path;
- int pos= path.indexOf('/');
- if (pos < 0)
- pos= path.indexOf('\\');
- if (pos >= 0) {
- entry= path.substring(0, pos);
- path= path.substring(pos + 1);
- } else if (entry.length() > 0) {
- ZipFile ze= new ZipFile(entry);
- fChildren.put(entry, ze);
- return ze;
- } else
- return null;
-
- ZipFolder folder= null;
- if (fChildren != null) {
- Object o= fChildren.get(entry);
- if (o instanceof ZipFolder)
- folder= (ZipFolder) o;
- }
-
- if (folder == null) {
- folder= new ZipFolder(entry);
- fChildren.put(entry, folder);
- }
-
- return folder.createContainer(path);
- }
- }
-
- static class ZipFile extends ZipResource implements IStreamContentAccessor {
-
- private byte[] fContents;
-
- ZipFile(String name) {
- super(name);
- }
-
- public String getType() {
- String s= this.getName();
- int pos= s.lastIndexOf('.');
- if (pos >= 0)
- return s.substring(pos + 1);
- return ITypedElement.UNKNOWN_TYPE;
- }
-
- public Object[] getChildren() {
- return null;
- }
-
- public InputStream getContents() {
- if (fContents == null)
- fContents= new byte[0];
- return new ByteArrayInputStream(fContents);
- }
-
- byte[] getBytes() {
- return fContents;
- }
-
- void setBytes(byte[] buffer) {
- fContents= buffer;
- }
-
- void appendBytes(byte[] buffer, int length) {
- if (length > 0) {
- int oldLen= 0;
- if (fContents != null)
- oldLen= fContents.length;
- byte[] newBuf= new byte[oldLen + length];
- if (oldLen > 0)
- System.arraycopy(fContents, 0, newBuf, 0, oldLen);
- System.arraycopy(buffer, 0, newBuf, oldLen, length);
- fContents= newBuf;
- }
- }
- }
-
- private String fTitle;
-
- public ZipFileStructureCreator() {
- this(Utilities.getString("ZipStructureCreator.name")); //$NON-NLS-1$
- }
-
- public ZipFileStructureCreator(String title) {
- fTitle= title;
- }
-
- public String getName() {
- return fTitle;
- }
-
- public IStructureComparator getStructure(Object input) {
-
- InputStream is= null;
-
- if (input instanceof IStreamContentAccessor) {
- IStreamContentAccessor sca= (IStreamContentAccessor) input;
- try {
- is= sca.getContents();
- } catch (CoreException ex) {
- }
- }
-
- if (is == null)
- return null;
-
- ZipInputStream zip= new ZipInputStream(is);
- ZipFolder root= new ZipFolder(""); //$NON-NLS-1$
- try {
- for (;;) {
- ZipEntry entry= zip.getNextEntry();
- if (entry == null)
- break;
-
- ZipFile ze= root.createContainer(entry.getName());
- if (ze != null) {
- int length= (int) entry.getSize();
- if (length >= 0) {
- byte[] buffer= new byte[length];
- int offset= 0;
-
- do {
- int n= zip.read(buffer, offset, length);
- offset += n;
- length -= n;
- } while (length > 0);
-
- ze.setBytes(buffer);
- } else {
- byte[] buffer= new byte[1024];
- int n;
- do {
- n= zip.read(buffer, 0, 1024);
- ze.appendBytes(buffer, n);
- } while (n >= 0);
- }
- }
- zip.closeEntry();
- }
- } catch (IOException ex) {
- return null;
- } finally {
- try {
- zip.close();
- } catch (IOException ex) {
- }
- }
-
- if (root.fChildren.size() == 1) {
- Iterator iter= root.fChildren.values().iterator();
- return (IStructureComparator) iter.next();
- }
- return root;
- }
-
- public String getContents(Object o, boolean ignoreWhitespace) {
- if (o instanceof ZipFile) {
- byte[] bytes= ((ZipFile)o).getBytes();
- if (bytes != null)
- return new String(bytes);
- return ""; //$NON-NLS-1$
- }
- return null;
- }
-
- /**
- * Returns <code>false</code> since we cannot update a zip archive.
- */
- public boolean canSave() {
- return false;
- }
-
- /**
- * Throws <code>AssertionFailedException</code> since we cannot update a zip archive.
- */
- public void save(IStructureComparator structure, Object input) {
- Assert.isTrue(false); // Cannot update zip archive
- }
-
- public IStructureComparator locate(Object path, Object source) {
- return null;
- }
-
- public boolean canRewriteTree() {
- return false;
- }
-
- public void rewriteTree(Differencer diff, IDiffContainer root) {
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java
deleted file mode 100644
index 7878ff22a..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java
+++ /dev/null
@@ -1,937 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.contentmergeviewer;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.custom.CLabel;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.CoreException;
-
-import org.eclipse.jface.util.*;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ContentViewer;
-import org.eclipse.jface.viewers.IContentProvider;
-import org.eclipse.jface.viewers.ISelection;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.*;
-import org.eclipse.compare.contentmergeviewer.IMergeViewerContentProvider;
-import org.eclipse.compare.contentmergeviewer.TextMergeViewer;
-import org.eclipse.compare.internal.*;
-
-/**
- * An abstract compare and merge viewer with two side-by-side content areas
- * and an optional content area for the ancestor. The implementation makes no
- * assumptions about the content type.
- * <p>
- * <code>ContentMergeViewer</code>
- * <ul>
- * <li>implements the overall layout and defines hooks so that subclasses
- * can easily provide an implementation for a specific content type,
- * <li>implements the UI for making the areas resizable,
- * <li>has an action for controlling whether the ancestor area is visible or not,
- * <li>has actions for copying one side of the input to the other side,
- * <li>tracks the dirty state of the left and right sides and send out notification
- * on state changes.
- * </ul>
- * A <code>ContentMergeViewer</code> accesses its
- * model by means of a content provider which must implement the
- * <code>IMergeViewerContentProvider</code> interface.
- * </p>
- * <p>
- * Clients may wish to use the standard concrete subclass <code>TextMergeViewer</code>,
- * or define their own subclass.
- *
- * @see IMergeViewerContentProvider
- * @see TextMergeViewer
- */
-public abstract class ContentMergeViewer extends ContentViewer
- implements IPropertyChangeNotifier, ISavable {
-
- class SaveAction extends MergeViewerAction {
-
- private boolean fLeft;
-
- SaveAction(boolean left) {
- super(true, false, false);
- Utilities.initAction(this, getResourceBundle(), "action.save."); //$NON-NLS-1$
- }
-
- public void run() {
- saveContent(getInput());
- }
- };
-
- /**
- * Property names.
- */
- private static final String ANCESTOR_ENABLED= ComparePreferencePage.INITIALLY_SHOW_ANCESTOR_PANE;
-
- /* package */ static final int HORIZONTAL= 1;
- /* package */ static final int VERTICAL= 2;
-
- static final double HSPLIT= 0.5;
- static final double VSPLIT= 0.3;
-
- private class ContentMergeViewerLayout extends Layout {
-
- public Point computeSize(Composite c, int w, int h, boolean force) {
- return new Point(100, 100);
- }
-
- public void layout(Composite composite, boolean force) {
-
- // determine some derived sizes
- int headerHeight= fLeftLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).y;
- Rectangle r= composite.getClientArea();
-
- int centerWidth= getCenterWidth();
- int width1= (int)((r.width-centerWidth)*fHSplit);
- int width2= r.width-width1-centerWidth;
-
- int height1= 0;
- int height2= 0;
- if (fAncestorEnabled && fShowAncestor) {
- height1= (int)((r.height-(2*headerHeight))*fVSplit);
- height2= r.height-(2*headerHeight)-height1;
- } else {
- height1= 0;
- height2= r.height-headerHeight;
- }
-
- int y= 0;
-
- if (fAncestorEnabled && fShowAncestor) {
- fAncestorLabel.setBounds(0, y, r.width, headerHeight);
- fAncestorLabel.setVisible(true);
- y+= headerHeight;
- handleResizeAncestor(0, y, r.width, height1);
- y+= height1;
- } else {
- fAncestorLabel.setVisible(false);
- handleResizeAncestor(0, 0, 0, 0);
- }
-
- fLeftLabel.getSize(); // without this resizing would not always work
-
- if (centerWidth > 3) {
- fLeftLabel.setBounds(0, y, width1+1, headerHeight);
- fDirectionLabel.setVisible(true);
- fDirectionLabel.setBounds(width1+1, y, centerWidth-1, headerHeight);
- fRightLabel.setBounds(width1+centerWidth, y, width2, headerHeight);
- } else {
- fLeftLabel.setBounds(0, y, width1, headerHeight);
- fDirectionLabel.setVisible(false);
- fRightLabel.setBounds(width1, y, r.width-width1, headerHeight);
- }
-
- y+= headerHeight;
-
- if (fCenter != null && !fCenter.isDisposed())
- fCenter.setBounds(width1, y, centerWidth, height2);
-
- handleResizeLeftRight(0, y, width1, centerWidth, width2, height2);
- }
- }
-
- class Resizer extends MouseAdapter implements MouseMoveListener {
-
- Control fControl;
- int fX, fY;
- int fWidth1, fWidth2;
- int fHeight1, fHeight2;
- int fDirection;
- boolean fLiveResize;
-
- public Resizer(Control c, int dir) {
- fDirection= dir;
- fControl= c;
- fControl.addMouseListener(this);
- fLiveResize= !(fControl instanceof Sash);
-
- fControl.addDisposeListener(
- new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- fControl= null;
- }
- }
- );
- }
-
- public void mouseDoubleClick(MouseEvent e) {
- if ((fDirection & HORIZONTAL) != 0)
- fHSplit= HSPLIT;
- if ((fDirection & VERTICAL) != 0)
- fVSplit= VSPLIT;
- fComposite.layout(true);
- }
-
- public void mouseDown(MouseEvent e) {
- Composite parent= fControl.getParent();
-
- Point s= parent.getSize();
- Point as= fAncestorLabel.getSize();
- Point ys= fLeftLabel.getSize();
- Point ms= fRightLabel.getSize();
-
- fWidth1= ys.x;
- fWidth2= ms.x;
- fHeight1= fLeftLabel.getLocation().y-as.y;
- fHeight2= s.y-(fLeftLabel.getLocation().y+ys.y);
-
- fX= e.x;
- fY= e.y;
- fControl.addMouseMoveListener(this);
- }
-
- public void mouseUp(MouseEvent e) {
- fControl.removeMouseMoveListener(this);
- if (!fLiveResize)
- resize(e);
- }
-
- public void mouseMove(MouseEvent e) {
- if (fLiveResize)
- resize(e);
- }
-
- private void resize(MouseEvent e) {
- int dx= e.x-fX;
- int dy= e.y-fY;
-
- int centerWidth= fCenter.getSize().x;
-
- if (fWidth1 + dx > centerWidth && fWidth2 - dx > centerWidth) {
- fWidth1+= dx;
- fWidth2-= dx;
- if ((fDirection & HORIZONTAL) != 0)
- fHSplit= (double)fWidth1/(double)(fWidth1+fWidth2);
- }
- if (fHeight1 + dy > centerWidth && fHeight2 - dy > centerWidth) {
- fHeight1+= dy;
- fHeight2-= dy;
- if ((fDirection & VERTICAL) != 0)
- fVSplit= (double)fHeight1/(double)(fHeight1+fHeight2);
- }
-
- fComposite.layout(true);
- fControl.getDisplay().update();
- }
- };
-
- /** Style bits for top level composite */
- private int fStyles;
- private ResourceBundle fBundle;
- private CompareConfiguration fCompareConfiguration;
- private IPropertyChangeListener fPropertyChangeListener;
- private ICompareInputChangeListener fCompareInputChangeListener;
- private ListenerList fListenerList;
- boolean fConfirmSave= true;
-
- private double fHSplit= HSPLIT; // width ratio of left and right panes
- private double fVSplit= VSPLIT; // height ratio of ancestor and bottom panes
-
- private boolean fAncestorEnabled= true; // show ancestor in case of conflicts
- /* package */ boolean fShowAncestor= false; // if current input has conflicts
- private boolean fIsThreeWay= false;
- private ActionContributionItem fAncestorItem;
-
- private Action fCopyLeftToRightAction; // copy from left to right
- private Action fCopyRightToLeftAction; // copy from right to left
-
- MergeViewerAction fLeftSaveAction;
- MergeViewerAction fRightSaveAction;
-
- // SWT widgets
- /* package */ Composite fComposite;
- private CLabel fAncestorLabel;
- private CLabel fLeftLabel;
- private CLabel fRightLabel;
- /* package */ CLabel fDirectionLabel;
- /* package */ Control fCenter;
-
- //---- SWT resources to be disposed
- private Image fRightArrow;
- private Image fLeftArrow;
- private Image fBothArrow;
- //---- end
-
- /**
- * Creates a new content merge viewer and initializes with a resource bundle and a
- * configuration.
- *
- * @param bundle the resource bundle
- * @param cc the configuration object
- */
- protected ContentMergeViewer(int style, ResourceBundle bundle, CompareConfiguration cc) {
- fStyles= style;
- fBundle= bundle;
-
- fAncestorEnabled= Utilities.getBoolean(cc, ANCESTOR_ENABLED, fAncestorEnabled);
- fConfirmSave= Utilities.getBoolean(cc, CompareEditor.CONFIRM_SAVE_PROPERTY, fConfirmSave);
-
- setContentProvider(new MergeViewerContentProvider(cc));
-
- fCompareInputChangeListener= new ICompareInputChangeListener() {
- public void compareInputChanged(ICompareInput input) {
- ContentMergeViewer.this.internalRefresh(input);
- }
- };
-
- fCompareConfiguration= cc;
- if (fCompareConfiguration != null) {
- fPropertyChangeListener= new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- ContentMergeViewer.this.propertyChange(event);
- }
- };
- fCompareConfiguration.addPropertyChangeListener(fPropertyChangeListener);
- }
-
- fLeftSaveAction= new SaveAction(true);
- fLeftSaveAction.setEnabled(false);
- fRightSaveAction= new SaveAction(false);
- fRightSaveAction.setEnabled(false);
- }
-
- //---- hooks ---------------------
-
- /**
- * Returns the viewer's name.
- *
- * @return the viewer's name
- */
- public String getTitle() {
- return Utilities.getString(getResourceBundle(), "title"); //$NON-NLS-1$
- }
-
- /**
- * Creates the SWT controls for the ancestor, left, and right
- * content areas of this compare viewer.
- * Implementations typically hold onto the controls
- * so that they can be initialized with the input objects in method
- * <code>updateContent</code>.
- *
- * @param composite the container for the three areas
- */
- abstract protected void createControls(Composite composite);
-
- /**
- * Lays out the ancestor area of the compare viewer.
- * It is called whenever the viewer is resized or when the sashes between
- * the areas are moved to adjust the size of the areas.
- *
- * @param x the horizontal position of the ancestor area within its container
- * @param y the vertical position of the ancestor area within its container
- * @param width the width of the ancestor area
- * @param height the height of the ancestor area
- */
- abstract protected void handleResizeAncestor(int x, int y, int width, int height);
-
- /**
- * Lays out the left and right areas of the compare viewer.
- * It is called whenever the viewer is resized or when the sashes between
- * the areas are moved to adjust the size of the areas.
- *
- * @param x the horizontal position of the left area within its container
- * @param y the vertical position of the left and right area within its container
- * @param leftWidth the width of the left area
- * @param centerWidth the width of the gap between the left and right areas
- * @param rightWidth the width of the right area
- * @param height the height of the left and right areas
- */
- abstract protected void handleResizeLeftRight(int x, int y, int leftWidth, int centerWidth,
- int rightWidth, int height);
-
- /**
- * Contributes items to the given <code>ToolBarManager</code>.
- * It is called when this viewer is installed in its container and if the container
- * has a <code>ToolBarManager</code>.
- * The <code>ContentMergeViewer</code> implementation of this method does nothing.
- * Subclasses may reimplement.
- *
- * @param toolBarManager the toolbar manager to contribute to
- */
- protected void createToolItems(ToolBarManager toolBarManager) {
- }
-
- /**
- * Initializes the controls of the three content areas with the given input objects.
- *
- * @param ancestor the input for the ancestor area
- * @param left the input for the left area
- * @param right the input for the right area
- */
- abstract protected void updateContent(Object ancestor, Object left, Object right);
-
- /**
- * Copies the content of one side to the other side.
- * Called from the (internal) actions for copying the sides of the viewer's input object.
- *
- * @param leftToRight if <code>true</code>, the left side is copied to the right side;
- * if <code>false</code>, the right side is copied to the left side
- */
- abstract protected void copy(boolean leftToRight);
-
- /**
- * Returns the byte contents of the left or right side. If the viewer
- * has no editable content <code>null</code> can be returned.
- *
- * @param left if <code>true</code>, the byte contents of the left area is returned;
- * if <code>false</code>, the byte contents of the right area
- * @return the content as an array of bytes, or <code>null</code>
- */
- abstract protected byte[] getContents(boolean left);
-
- //----------------------------
-
- /**
- * Returns the resource bundle of this viewer.
- *
- * @return the resource bundle
- */
- protected ResourceBundle getResourceBundle() {
- return fBundle;
- }
-
- /**
- * Returns the compare configuration of this viewer,
- * or <code>null</code> if this viewer does not yet have a configuration.
- *
- * @return the compare configuration, or <code>null</code> if none
- */
- protected CompareConfiguration getCompareConfiguration() {
- return fCompareConfiguration;
- }
-
- /**
- * The <code>ContentMergeViewer</code> implementation of this
- * <code>ContentViewer</code> method
- * checks to ensure that the content provider is an <code>IMergeViewerContentProvider</code>.
- */
- public void setContentProvider(IContentProvider contentProvider) {
- Assert.isTrue(contentProvider instanceof IMergeViewerContentProvider);
- super.setContentProvider(contentProvider);
- }
-
- /* package */ IMergeViewerContentProvider getMergeContentProvider() {
- return (IMergeViewerContentProvider) getContentProvider();
- }
-
- /**
- * The <code>ContentMergeViewer</code> implementation of this
- * <code>Viewer</code> method returns the empty selection. Subclasses may override.
- */
- public ISelection getSelection() {
- return new ISelection() {
- public boolean isEmpty() {
- return true;
- }
- };
- }
-
- /**
- * The <code>ContentMergeViewer</code> implementation of this
- * <code>Viewer</code> method does nothing. Subclasses may reimplement.
- */
- public void setSelection(ISelection s, boolean reveal) {
- }
-
- /* package */ void propertyChange(PropertyChangeEvent event) {
-
- String key= event.getProperty();
-
- if (key.equals(ANCESTOR_ENABLED)) {
- fAncestorEnabled= Utilities.getBoolean(getCompareConfiguration(), ANCESTOR_ENABLED, fAncestorEnabled);
- fComposite.layout(true);
- return;
- }
- }
-
- void setAncestorVisibility(boolean visible, boolean enabled) {
- if (fAncestorItem != null) {
- Action action= (Action) fAncestorItem.getAction();
- if (action != null) {
- action.setChecked(visible);
- action.setEnabled(enabled);
- }
- }
- if (fCompareConfiguration != null)
- fCompareConfiguration.setProperty(ANCESTOR_ENABLED, new Boolean(visible));
- }
-
- //---- input
-
- /* package */ boolean isThreeWay() {
- return fIsThreeWay;
- }
-
- /**
- * Internal hook method called when the input to this viewer is
- * initially set or subsequently changed.
- * <p>
- * The <code>ContentMergeViewer</code> implementation of this <code>Viewer</code>
- * method retrieves the content from the three sides by calling the methods
- * <code>getAncestorContent</code>, <code>getLeftContent</code>,
- * and <code>getRightContent</code> on the content provider.
- * The values returned from these calls are passed to the hook method <code>updateContent</code>.
- * </p>
- *
- * @param input the new input of this viewer, or <code>null</code> if none
- * @param oldInput the old input element, or <code>null</code> if there
- * was previously no input
- */
- protected final void inputChanged(Object input, Object oldInput) {
-
- if (input != oldInput)
- if (oldInput instanceof ICompareInput)
- ((ICompareInput)oldInput).removeCompareInputChangeListener(fCompareInputChangeListener);
-
- boolean success= doSave(input, oldInput);
-
- if (input != oldInput)
- if (input instanceof ICompareInput)
- ((ICompareInput)input).addCompareInputChangeListener(fCompareInputChangeListener);
-
- if (success) {
- setLeftDirty(false);
- setRightDirty(false);
- }
-
- if (input != oldInput)
- internalRefresh(input);
- }
-
- protected boolean doSave(Object newInput, Object oldInput) {
-
- // before setting the new input we have to save the old
- if (fLeftSaveAction.isEnabled() || fRightSaveAction.isEnabled()) {
-
- // post alert
- if (fConfirmSave) {
- Shell shell= fComposite.getShell();
-
- MessageDialog dialog= new MessageDialog(shell,
- Utilities.getString(getResourceBundle(), "saveDialog.title"), //$NON-NLS-1$
- null, // accept the default window icon
- Utilities.getString(getResourceBundle(), "saveDialog.message"), //$NON-NLS-1$
- MessageDialog.QUESTION,
- new String[] {
- IDialogConstants.YES_LABEL,
- IDialogConstants.NO_LABEL,
-// IDialogConstants.CANCEL_LABEL
- },
- 0); // default button index
-
- switch (dialog.open()) { // open returns index of pressed button
- case 0:
- saveContent(oldInput);
- break;
- case 1:
- setLeftDirty(false);
- setRightDirty(false);
- break;
- case 2:
- throw new ViewerSwitchingCancelled();
- }
- } else
- saveContent(oldInput);
- return true;
- }
- return false;
- }
-
- public void setConfirmSave(boolean enable) {
- fConfirmSave= enable;
- }
-
- /* (non Javadoc)
- * see Viewer.refresh
- */
- public void refresh() {
- internalRefresh(getInput());
- }
-
- private void internalRefresh(Object input) {
-
- IMergeViewerContentProvider content= getMergeContentProvider();
- if (content != null) {
- Object ancestor= content.getAncestorContent(input);
- if (input instanceof ICompareInput)
- fIsThreeWay= (((ICompareInput)input).getKind() & Differencer.DIRECTION_MASK) != 0;
- else
- fIsThreeWay= ancestor != null;
-
- if (fAncestorItem != null)
- fAncestorItem.setVisible(fIsThreeWay);
-
- boolean oldFlag= fShowAncestor;
- fShowAncestor= fIsThreeWay && content.showAncestor(input);
-
- if (fAncestorEnabled && oldFlag != fShowAncestor)
- fComposite.layout(true);
-
- ToolBarManager tbm= CompareViewerSwitchingPane.getToolBarManager(fComposite.getParent());
- if (tbm != null) {
- updateToolItems();
- tbm.update(true);
- tbm.getControl().getParent().layout(true);
- }
-
- updateHeader();
-
- Object left= content.getLeftContent(input);
- Object right= content.getRightContent(input);
- updateContent(ancestor, left, right);
- }
- }
-
- //---- layout & SWT control creation
-
- /**
- * Builds the SWT controls for the three areas of a compare/merge viewer.
- * <p>
- * Calls the hooks <code>createControls</code> and <code>createToolItems</code>
- * to let subclasses build the specific content areas and to add items to
- * an enclosing toolbar.
- * <p>
- * This method must only be called in the constructor of subclasses.
- *
- * @param parent the parent control
- * @return the new control
- */
- protected final Control buildControl(Composite parent) {
-
- fComposite= new Composite(parent, fStyles) {
- public boolean setFocus() {
- return internalSetFocus();
- }
- };
- fComposite.setData(CompareUI.COMPARE_VIEWER_TITLE, getTitle());
-
- hookControl(fComposite); // hook help & dispose listener
-
- fComposite.setLayout(new ContentMergeViewerLayout());
-
- int style= SWT.SHADOW_OUT;
- fAncestorLabel= new CLabel(fComposite, style);
-
- fLeftLabel= new CLabel(fComposite, style);
- new Resizer(fLeftLabel, VERTICAL);
-
- fDirectionLabel= new CLabel(fComposite, style);
- fDirectionLabel.setAlignment(SWT.CENTER);
- new Resizer(fDirectionLabel, HORIZONTAL | VERTICAL);
-
- fRightLabel= new CLabel(fComposite, style);
- new Resizer(fRightLabel, VERTICAL);
-
- if (fCenter == null || fCenter.isDisposed())
- fCenter= createCenter(fComposite);
-
- createControls(fComposite);
-
- ToolBarManager tbm= CompareViewerSwitchingPane.getToolBarManager(parent);
- if (tbm != null) {
- tbm.removeAll();
-
- // define groups
- tbm.add(new Separator("modes")); //$NON-NLS-1$
- tbm.add(new Separator("merge")); //$NON-NLS-1$
- tbm.add(new Separator("navigation")); //$NON-NLS-1$
-
- CompareConfiguration cc= getCompareConfiguration();
-
- if (cc.isRightEditable()) {
- fCopyLeftToRightAction=
- new Action() {
- public void run() {
- copy(true);
- }
- };
- Utilities.initAction(fCopyLeftToRightAction, getResourceBundle(), "action.CopyLeftToRight."); //$NON-NLS-1$
- tbm.appendToGroup("merge", fCopyLeftToRightAction); //$NON-NLS-1$
- }
-
- if (cc.isLeftEditable()) {
- fCopyRightToLeftAction=
- new Action() {
- public void run() {
- copy(false);
- }
- };
- Utilities.initAction(fCopyRightToLeftAction, getResourceBundle(), "action.CopyRightToLeft."); //$NON-NLS-1$
- tbm.appendToGroup("merge", fCopyRightToLeftAction); //$NON-NLS-1$
- }
-
- Action a= new ChangePropertyAction(fBundle, fCompareConfiguration, "action.EnableAncestor.", ANCESTOR_ENABLED); //$NON-NLS-1$
- a.setChecked(fAncestorEnabled);
- fAncestorItem= new ActionContributionItem(a);
- fAncestorItem.setVisible(false);
- tbm.appendToGroup("modes", fAncestorItem); //$NON-NLS-1$
-
- createToolItems(tbm);
- updateToolItems();
-
- tbm.update(true);
- }
-
- return fComposite;
- }
-
- /* package */ boolean internalSetFocus() {
- return false;
- }
-
- /* package */ int getCenterWidth() {
- return 3;
- }
-
- /* package */ boolean getAncestorEnabled() {
- return fAncestorEnabled;
- }
-
- /* package */ Control createCenter(Composite parent) {
- Sash sash= new Sash(parent, SWT.VERTICAL);
- new Resizer(sash, HORIZONTAL);
- return sash;
- }
-
- /* package */ Control getCenter() {
- return fCenter;
- }
-
- /*
- * @see Viewer.getControl()
- */
- public Control getControl() {
- return fComposite;
- }
-
- /**
- * Called on the viewer disposal.
- * Unregisters from the compare configuration.
- * Clients may extend if they have to do additional cleanup.
- */
- protected void handleDispose(DisposeEvent event) {
-
- Object input= getInput();
- if (input instanceof ICompareInput)
- ((ICompareInput)input).removeCompareInputChangeListener(fCompareInputChangeListener);
-
- if (fCompareConfiguration != null && fPropertyChangeListener != null) {
- fCompareConfiguration.removePropertyChangeListener(fPropertyChangeListener);
- fPropertyChangeListener= null;
- }
-
- fAncestorLabel= null;
- fLeftLabel= null;
- fDirectionLabel= null;
- fRightLabel= null;
- fCenter= null;
-
- if (fRightArrow != null) {
- fRightArrow.dispose();
- fRightArrow= null;
- }
- if (fLeftArrow != null) {
- fLeftArrow.dispose();
- fLeftArrow= null;
- }
- if (fBothArrow != null) {
- fBothArrow.dispose();
- fBothArrow= null;
- }
-
- super.handleDispose(event);
- }
-
- /**
- * Updates the enabled state of the toolbar items.
- * <p>
- * This method is called whenever the state of the items needs updating.
- * <p>
- * Subclasses may extend this method, although this is generally not required.
- */
- protected void updateToolItems() {
-
- IMergeViewerContentProvider content= getMergeContentProvider();
-
- Object input= getInput();
-
- if (fCopyLeftToRightAction != null) {
- boolean enable= content.isRightEditable(input);
-// if (enable && input instanceof ICompareInput) {
-// ITypedElement e= ((ICompareInput) input).getLeft();
-// if (e == null)
-// enable= false;
-// }
- fCopyLeftToRightAction.setEnabled(enable);
- }
-
- if (fCopyRightToLeftAction != null) {
- boolean enable= content.isLeftEditable(input);
-// if (enable && input instanceof ICompareInput) {
-// ITypedElement e= ((ICompareInput) input).getRight();
-// if (e == null)
-// enable= false;
-// }
- fCopyRightToLeftAction.setEnabled(enable);
- }
- }
-
- /**
- * Updates the headers of the three areas
- * by querying the content provider for a name and image for
- * the three sides of the input object.
- * <p>
- * This method is called whenever the header must be updated.
- * <p>
- * Subclasses may extend this method, although this is generally not required.
- */
- protected void updateHeader() {
-
- IMergeViewerContentProvider content= getMergeContentProvider();
- Object input= getInput();
-
- if (fAncestorLabel != null) {
- fAncestorLabel.setImage(content.getAncestorImage(input));
- fAncestorLabel.setText(content.getAncestorLabel(input));
- }
- if (fLeftLabel != null) {
- fLeftLabel.setImage(content.getLeftImage(input));
- fLeftLabel.setText(content.getLeftLabel(input));
- }
- if (fRightLabel != null) {
- fRightLabel.setImage(content.getRightImage(input));
- fRightLabel.setText(content.getRightLabel(input));
- }
- }
-
- private Image loadImage(String name) {
- ImageDescriptor id= ImageDescriptor.createFromFile(ContentMergeViewer.class, name);
- if (id != null)
- return id.createImage();
- return null;
- }
-
- /**
- * Calculates the height of the header.
- */
- /* package */ int getHeaderHeight() {
- int headerHeight= fLeftLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).y;
- headerHeight= Math.max(headerHeight, fDirectionLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).y);
- return headerHeight;
- }
-
- //---- merge direction
-
- /**
- * Returns true if both sides are editable.
- */
- /* package */ boolean canToggleMergeDirection() {
- IMergeViewerContentProvider content= getMergeContentProvider();
- Object input= getInput();
- return content.isLeftEditable(input) && content.isRightEditable(input);
- }
-
- //---- dirty state & saving state
-
- /* (non Javadoc)
- * see IPropertyChangeNotifier.addPropertyChangeListener
- */
- public void addPropertyChangeListener(IPropertyChangeListener listener) {
- if (fListenerList == null)
- fListenerList= new ListenerList();
- fListenerList.add(listener);
- }
-
- /* (non Javadoc)
- * see IPropertyChangeNotifier.removePropertyChangeListener
- */
- public void removePropertyChangeListener(IPropertyChangeListener listener) {
- if (fListenerList != null) {
- fListenerList.remove(listener);
- if (fListenerList.isEmpty())
- fListenerList= null;
- }
- }
-
- /* package */ void fireDirtyState(boolean state) {
- Utilities.firePropertyChange(fListenerList, this, CompareEditorInput.DIRTY_STATE, null, new Boolean(state));
- }
-
- /**
- * Sets the dirty state of the left side of this viewer.
- * If the new value differs from the old
- * all registered listener are notified with
- * a <code>PropertyChangeEvent</code> with the
- * property name <code>CompareEditorInput.DIRTY_STATE</code>.
- *
- * @param dirty the state of the left side dirty flag
- */
- protected void setLeftDirty(boolean dirty) {
- if (fLeftSaveAction.isEnabled() != dirty) {
- fLeftSaveAction.setEnabled(dirty);
- fireDirtyState(dirty);
- }
- }
-
- /**
- * Sets the dirty state of the right side of this viewer.
- * If the new value differs from the old
- * all registered listener are notified with
- * a <code>PropertyChangeEvent</code> with the
- * property name <code>CompareEditorInput.DIRTY_STATE</code>.
- *
- * @param dirty the state of the right side dirty flag
- */
- protected void setRightDirty(boolean dirty) {
- if (fRightSaveAction.isEnabled() != dirty) {
- fRightSaveAction.setEnabled(dirty);
- fireDirtyState(dirty);
- }
- }
-
- public void save(IProgressMonitor pm) throws CoreException {
- saveContent(getInput());
- }
-
- /**
- * Save modified content back to input elements via the content provider.
- */
- /* package */ void saveContent(Object oldInput) {
-
- // write back modified contents
- IMergeViewerContentProvider content= (IMergeViewerContentProvider) getContentProvider();
-
- boolean leftEmpty= content.getLeftContent(oldInput) == null;
- boolean rightEmpty= content.getRightContent(oldInput) == null;
-
- if (fCompareConfiguration.isLeftEditable() && fLeftSaveAction.isEnabled()) {
- byte[] bytes= getContents(true);
- if (leftEmpty && bytes != null && bytes.length == 0)
- bytes= null;
- setLeftDirty(false);
- content.saveLeftContent(oldInput, bytes);
- }
-
- if (fCompareConfiguration.isRightEditable() && fRightSaveAction.isEnabled()) {
- byte[] bytes= getContents(false);
- if (rightEmpty && bytes != null && bytes.length == 0)
- bytes= null;
- setRightDirty(false);
- content.saveRightContent(oldInput, bytes);
- }
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/DelayedProgressMonitor.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/DelayedProgressMonitor.java
deleted file mode 100644
index 1f7d6d29f..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/DelayedProgressMonitor.java
+++ /dev/null
@@ -1,136 +0,0 @@
-package org.eclipse.compare.contentmergeviewer;
-
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.core.runtime.IProgressMonitor;
-import java.lang.reflect.InvocationTargetException;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.operation.ModalContext;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-
-
-class DelayedProgressMonitor implements IProgressMonitor {
-
- ProgressMonitorDialog fProgressDialog;
- IProgressMonitor fRealProgressMonitor;
- String fTaskName;
- String fSubTaskName;
- int fTotalWork;
- int fWorked;
- boolean fCancelable;
- Shell fShell;
- int fTime;
-
-
- DelayedProgressMonitor(Shell shell) {
- fShell= shell;
- }
-
- /*
- * @see IProgressMonitor#beginTask(String, int)
- */
- public void beginTask(String name, int totalWork) {
- fTaskName= name;
- fTotalWork= totalWork;
- fTime= 0;
- }
-
- /*
- * @see IProgressMonitor#done()
- */
- public void done() {
- if (fRealProgressMonitor != null)
- fRealProgressMonitor.done();
- }
-
- /*
- * @see IProgressMonitor#internalWorked(double)
- */
- public void internalWorked(double work) {
- if (fRealProgressMonitor != null) {
- fRealProgressMonitor.internalWorked(work);
- }
- }
-
- private void checkTimeout() {
- if (fRealProgressMonitor == null) {
-
- //if (fTime++ < 100)
- // return;
-
- fProgressDialog= new ProgressMonitorDialog(fShell);
- fProgressDialog.setCancelable(true);
- fProgressDialog.open();
- fRealProgressMonitor= fProgressDialog.getProgressMonitor();
- fRealProgressMonitor.beginTask(fTaskName, fTotalWork);
- if (fSubTaskName != null)
- fRealProgressMonitor.subTask(fSubTaskName);
- fRealProgressMonitor.worked(fWorked);
- }
- }
-
- /*
- * @see IProgressMonitor#isCanceled()
- */
- public boolean isCanceled() {
- checkTimeout();
- if (fRealProgressMonitor != null)
- return fRealProgressMonitor.isCanceled();
- return false;
- }
-
- /*
- * @see IProgressMonitor#setCanceled(boolean)
- */
- public void setCanceled(boolean value) {
- if (fRealProgressMonitor != null)
- fRealProgressMonitor.setCanceled(value);
- else
- fCancelable= value;
- }
-
- /*
- * @see IProgressMonitor#setTaskName(String)
- */
- public void setTaskName(String name) {
- if (fRealProgressMonitor != null)
- fRealProgressMonitor.setTaskName(name);
- else
- fTaskName= name;
- }
-
- /*
- * @see IProgressMonitor#subTask(String)
- */
- public void subTask(String name) {
- if (fRealProgressMonitor != null)
- fRealProgressMonitor.subTask(name);
- else
- fSubTaskName= name;
- }
-
- /*
- * @see IProgressMonitor#worked(int)
- */
- public void worked(int work) {
- if (fRealProgressMonitor != null)
- fRealProgressMonitor.internalWorked(work);
- else {
- fWorked+= work;
- checkTimeout();
- }
- }
-
- public static void run(Shell shell, boolean fork, boolean cancelable, IRunnableWithProgress runnable)
- throws InvocationTargetException, InterruptedException {
-
- DelayedProgressMonitor pm= new DelayedProgressMonitor(shell);
- pm.checkTimeout();
- try {
- ModalContext.run(runnable, fork, pm, shell.getDisplay());
- } finally {
- if (pm.fProgressDialog != null)
- pm.fProgressDialog.close();
- }
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/IDocumentRange.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/IDocumentRange.java
deleted file mode 100644
index a713fb44f..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/IDocumentRange.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.contentmergeviewer;
-
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.IDocument;
-
-
-/**
- * Defines a subrange in a document.
- * <p>
- * It is used by text viewers that can work on a subrange of a document. For example,
- * a text viewer for Java compilation units might use this to restrict the view
- * to a single method.
- * </p>
- * <p>
- * Clients may implement this interface.
- * </p>
- *
- * @see TextMergeViewer
- * @see org.eclipse.compare.structuremergeviewer.DocumentRangeNode
- */
-public interface IDocumentRange {
-
- public static final String RANGE_CATEGORY= "DocumentRangeCategory"; //$NON-NLS-1$
-
- /**
- * Returns the underlying document.
- *
- * @return the underlying document
- */
- IDocument getDocument();
-
- /**
- * Returns a position that specifies a subrange in the underlying document,
- * or <code>null</code> if this document range spans the whole underlying document.
- *
- * @return a position that specifies a subrange in the underlying document, or <code>null</code>
- */
- Position getRange();
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/IMergeViewerContentProvider.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/IMergeViewerContentProvider.java
deleted file mode 100644
index 2f75e9163..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/IMergeViewerContentProvider.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.contentmergeviewer;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.jface.viewers.IContentProvider;
-
-
-/**
- * A content provider that mediates between a <code>ContentMergeViewer</code>'s model
- * and the viewer itself.
- * <p>
- * Clients may implement this interface.
- * </p>
- *
- * @see ContentMergeViewer
- */
-public interface IMergeViewerContentProvider extends IContentProvider {
-
- //---- ancestor side
-
- /**
- * Returns the label for the ancestor side of a <code>ContentMergeViewer</code>.
- *
- * @param input the input object of the <code>ContentMergeViewer</code>
- * @return the label for the ancestor side of a <code>ContentMergeViewer</code>
- */
- String getAncestorLabel(Object input);
-
- /**
- * Returns an optional image for the ancestor side of a <code>ContentMergeViewer</code>.
- *
- * @param input the input object of the <code>ContentMergeViewer</code>
- * @return the image for the ancestor side of a <code>ContentMergeViewer</code>,
- * or <code>null</code> if none
- */
- Image getAncestorImage(Object input);
-
- /**
- * Returns the contents for the ancestor side of a <code>ContentMergeViewer</code>.
- * The interpretation of the returned object depends on the concrete <code>ContentMergeViewer</code>.
- *
- * @param input the input object of the <code>ContentMergeViewer</code>
- * @return the content for the ancestor side of a <code>ContentMergeViewer</code>,
- * or <code>null</code> if none
- */
- Object getAncestorContent(Object input);
-
- /**
- * Returns whether the ancestor side of the given input element should be shown.
- *
- * @return <code>true</code> if the ancestor side of the given input element should be shown
- */
- boolean showAncestor(Object input);
-
- //---- left side
-
- /**
- * Returns the label for the left side of a <code>ContentMergeViewer</code>.
- *
- * @param input the input object of the <code>ContentMergeViewer</code>
- * @return the label for the left side of a <code>ContentMergeViewer</code>
- */
- String getLeftLabel(Object input);
-
- /**
- * Returns an optional image for the left side of a <code>ContentMergeViewer</code>.
- *
- * @param input the input object of the <code>ContentMergeViewer</code>
- * @return the image for the left side of a <code>ContentMergeViewer</code>,
- * or <code>null</code> if none
- */
- Image getLeftImage(Object input);
-
- /**
- * Returns the contents for the left side of a <code>ContentMergeViewer</code>.
- * The interpretation of the returned object depends on the concrete <code>ContentMergeViewer</code>.
- *
- * @param input the input object of the <code>ContentMergeViewer</code>
- * @return the content for the left side of a <code>ContentMergeViewer</code>,
- * or <code>null</code> if none
- */
- Object getLeftContent(Object input);
-
- /**
- * Returns whether the left side is editable.
- *
- * @param input the input object of the <code>ContentMergeViewer</code>
- * @return <code>true</code> if the left side of a <code>ContentMergeViewer</code> is editable
- */
- boolean isLeftEditable(Object input);
-
- /**
- * Saves new contents for the left side of the <code>ContentMergeViewer</code>.
- *
- * @param input the input object of the <code>ContentMergeViewer</code>
- * @param bytes the new contents to save for the left side
- */
- void saveLeftContent(Object input, byte[] bytes);
-
- //---- right side
-
- /**
- * Returns the label for the right side of a <code>ContentMergeViewer</code>.
- *
- * @param input the input object of the <code>ContentMergeViewer</code>
- * @return the label for the right side of a <code>ContentMergeViewer</code>
- */
- String getRightLabel(Object input);
-
- /**
- * Returns an optional image for the right side of a <code>ContentMergeViewer</code>.
- *
- * @param input the input object of the <code>ContentMergeViewer</code>
- * @return the image for the right side of a <code>ContentMergeViewer</code>,
- * or <code>null</code> if none
- */
- Image getRightImage(Object input);
-
- /**
- * Returns the contents for the right side of a <code>ContentMergeViewer</code>.
- * The interpretation of the returned object depends on the concrete <code>ContentMergeViewer</code>.
- *
- * @param input the input object of the <code>ContentMergeViewer</code>
- * @return the content for the right side of a <code>ContentMergeViewer</code>,
- * or <code>null</code> if none
- */
- Object getRightContent(Object input);
-
- /**
- * Returns whether the right side is editable.
- *
- * @param input the input object of the <code>ContentMergeViewer</code>
- * @return <code>true</code> if the right side of a <code>ContentMergeViewer</code> is editable
- */
- boolean isRightEditable(Object input);
-
- /**
- * Saves new contents for the right side of the <code>ContentMergeViewer</code>.
- *
- * @param input the input object of the <code>ContentMergeViewer</code>
- * @param bytes the new contents to save for the right side
- */
- void saveRightContent(Object input, byte[] bytes);
-}
-
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ITokenComparator.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ITokenComparator.java
deleted file mode 100644
index 90358179d..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ITokenComparator.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.contentmergeviewer;
-
-import org.eclipse.compare.rangedifferencer.IRangeComparator;
-
-
-/**
- * For performing a so-called "token compare" on a line of text.
- * This interface extends the <code>IRangeComparator</code> interface
- * so that it can be used by the <code>TextMergeViewer</code>.
- * <p>
- * <code>TextMergeViewer</code> activates the token compare when navigating into
- * a range of differing lines. At first the lines are selected as a block.
- * When navigating into this block the token compare shows for every line
- * the differing token by selecting them.
- * <p>
- * <code>TextMergeViewer</code>'s default token comparator works on characters separated
- * by whitespace. If a different strategy is needed (for example, to use Java tokens in
- * a Java-aware merge viewer), clients may create their own token
- * comparators by implementing this interface (and overriding the
- * <code>TextMergeViewer.createTokenComparator</code> factory method).
- * </p>
- *
- * @see TextMergeViewer
- */
-public interface ITokenComparator extends IRangeComparator {
-
- /**
- * Returns the start character position of the token with the given index.
- * If the index is out of range (but not negative) the character position
- * behind the last character (the length of the input string) is returned.
- *
- * @param index index of the token for which to return the start position
- * @return the start position of the token with the given index
- * @throws java.lang.IndexOutOfBoundsException if index is negative
- */
- int getTokenStart(int index);
-
- /**
- * Returns the character length of the token with the given index.
- * If the index is out of range (but not negative) the value 0 is returned.
- *
- * @param index index of the token for which to return the start position
- * @return the character length of the token with the given index
- * @throws java.lang.IndexOutOfBoundsException if index is negative
- */
- int getTokenLength(int index);
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
deleted file mode 100644
index 56b46f456..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
+++ /dev/null
@@ -1,3537 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.contentmergeviewer;
-
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.ResourceBundle;
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.text.MessageFormat;
-
-import java.lang.reflect.InvocationTargetException;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.custom.*;
-
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.text.*;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.CoreException;
-
-import org.eclipse.ui.texteditor.IUpdate;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IWorkbenchActionConstants;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.internal.MergeSourceViewer;
-import org.eclipse.compare.internal.BufferedCanvas;
-import org.eclipse.compare.internal.Utilities;
-import org.eclipse.compare.internal.TokenComparator;
-import org.eclipse.compare.internal.ChangePropertyAction;
-import org.eclipse.compare.internal.CompareEditor;
-import org.eclipse.compare.internal.DocLineComparator;
-import org.eclipse.compare.internal.ComparePreferencePage;
-import org.eclipse.compare.internal.CompareUIPlugin;
-import org.eclipse.compare.internal.MergeViewerAction;
-import org.eclipse.compare.internal.INavigatable;
-import org.eclipse.compare.internal.CompareNavigator;
-import org.eclipse.compare.internal.TimeoutContext;
-import org.eclipse.compare.internal.DocumentManager;
-import org.eclipse.compare.internal.CompareMessages;
-import org.eclipse.compare.rangedifferencer.*;
-import org.eclipse.compare.structuremergeviewer.*;
-
-/**
- * A text merge viewer uses the <code>RangeDifferencer</code> to perform a
- * textual, line-by-line comparison of two (or three) input documents.
- * It is based on the <code>ContentMergeViewer</code> and uses <code>TextViewer</code>s
- * to implement the ancestor, left, and right content areas.
- * <p>
- * In the three-way compare case ranges of differing lines are highlighted and framed
- * with different colors to show whether the difference is an incoming, outgoing, or conflicting change.
- * The <code>TextMergeViewer</code> supports the notion of a current "differing range"
- * and provides toolbar buttons to navigate from one range to the next (or previous).
- * <p>
- * If there is a current "differing range" and the underlying document is editable
- * the <code>TextMergeViewer</code> enables actions in context menu and toolbar to
- * copy a range from one side to the other side, thereby performing a merge operation.
- * <p>
- * In addition to a line-by-line comparison the <code>TextMergeViewer</code>
- * uses a token based compare on differing lines.
- * The token compare is activated when navigating into
- * a range of differing lines. At first the lines are selected as a block.
- * When navigating into this block the token compare shows for every line
- * the differing token by selecting them.
- * <p>
- * The <code>TextMergeViewer</code>'s default token compare works on characters separated
- * by whitespace. If a different strategy is needed (for example, Java tokens in
- * a Java-aware merge viewer), clients can create their own token
- * comparators by implementing the <code>ITokenComparator</code> interface and overriding the
- * <code>TextMergeViewer.createTokenComparator</code> factory method).
- * <p>
- * Access to the <code>TextMergeViewer</code>'s model is by means of an
- * <code>IMergeViewerContentProvider</code>. Its <code>get<it>X</it></code>Content</code> methods must return
- * either an <code>IDocument</code>, an <code>IDocumentRange</code>, or an <code>IStreamContentAccessor</code>.
- * In the <code>IDocumentRange</code> case the <code>TextMergeViewer</code>
- * works on a subrange of a document. In the <code>IStreamContentAccessor</code> case
- * a document is created internally and initialized from the stream.
- * <p>
- * A <code>TextMergeViewer</code> can be used as is. However clients may subclass
- * to customize the behavior. For example a <code>MergeTextViewer</code> for Java would override
- * the <code>configureTextViewer</code> method to configure the <code>TextViewer</code> for Java source code,
- * the <code>createTokenComparator</code> method to create a Java specific tokenizer.
- *
- * @see org.eclipse.compare.rangedifferencer.RangeDifferencer
- * @see org.eclipse.jface.text.TextViewer
- * @see ITokenComparator
- * @see IDocumentRange
- * @see org.eclipse.compare.IStreamContentAccessor
- */
-public class TextMergeViewer extends ContentMergeViewer {
-
- private static final boolean DEBUG= false;
-
- private static final String[] GLOBAL_ACTIONS= {
- IWorkbenchActionConstants.UNDO,
- IWorkbenchActionConstants.REDO,
- IWorkbenchActionConstants.CUT,
- IWorkbenchActionConstants.COPY,
- IWorkbenchActionConstants.PASTE,
- IWorkbenchActionConstants.DELETE,
- IWorkbenchActionConstants.SELECT_ALL,
- IWorkbenchActionConstants.SAVE
- };
- private static final String[] TEXT_ACTIONS= {
- MergeSourceViewer.UNDO_ID,
- MergeSourceViewer.REDO_ID,
- MergeSourceViewer.CUT_ID,
- MergeSourceViewer.COPY_ID,
- MergeSourceViewer.PASTE_ID,
- MergeSourceViewer.DELETE_ID,
- MergeSourceViewer.SELECT_ALL_ID,
- MergeSourceViewer.SAVE_ID
- };
-
- private static final String SYNC_SCROLLING= "SYNC_SCROLLING"; //$NON-NLS-1$
-
- private static final String BUNDLE_NAME= "org.eclipse.compare.contentmergeviewer.TextMergeViewerResources"; //$NON-NLS-1$
-
- // constants
- /** Width of left and right vertical bar */
- private static final int MARGIN_WIDTH= 6;
- /** Width of center bar */
- private static final int CENTER_WIDTH= 34;
- /** Width of birds eye view */
- private static final int BIRDS_EYE_VIEW_WIDTH= 10;
- /** Width of birds eye view */
- private static final int BIRDS_EYE_VIEW_INSET= 1;
-
- /** line width of change borders */
- private static final int LW= 1;
- /** Provide more merge controls in CompareViewerPane toolbar */
- private static final boolean USE_MORE_CONTROLS= true;
- /** Selects between smartTokenDiff and mergingTokenDiff */
- private static final boolean USE_MERGING_TOKEN_DIFF= false;
- /** When calculating differences show Progress after this timeout (in milliseconds) */
- private static final int TIMEOUT= 2000;
-
- // determines whether a change between left and right is considered incoming or outgoing
- private boolean fLeftIsLocal;
- private boolean fShowCurrentOnly= false;
- private boolean fShowCurrentOnly2= false;
- private int fMarginWidth= MARGIN_WIDTH;
- private int fTopInset;
-
- // Colors
-
- private RGB fBackground;
- private RGB fForeground;
- private boolean fPollSystemForeground= true;
- private boolean fPollSystemBackground= true;
-
- private RGB SELECTED_INCOMING;
- private RGB INCOMING;
- private RGB INCOMING_FILL;
-
- private RGB SELECTED_CONFLICT;
- private RGB CONFLICT;
- private RGB CONFLICT_FILL;
-
- private RGB SELECTED_OUTGOING;
- private RGB OUTGOING;
- private RGB OUTGOING_FILL;
-
-
- private boolean fEndOfDocReached;
- private IDocumentListener fDocumentListener;
-
- private IPreferenceStore fPreferenceStore;
- private IPropertyChangeListener fPreferenceChangeListener;
-
- /** All diffs for calculating scrolling position (includes line ranges without changes) */
- private ArrayList fAllDiffs;
- /** Subset of above: just real differences. */
- private ArrayList fChangeDiffs;
- /** The current diff */
- private Diff fCurrentDiff;
-
- private HashMap fNewAncestorRanges= new HashMap();
- private HashMap fNewLeftRanges= new HashMap();
- private HashMap fNewRightRanges= new HashMap();
-
- private Object fAncestorInput;
- private Object fLeftInput;
- private Object fRightInput;
-
- private MergeSourceViewer fAncestor;
- private MergeSourceViewer fLeft;
- private MergeSourceViewer fRight;
-
- private int fLeftLineCount;
- private int fRightLineCount;
-
- private boolean fLeftContentsChanged;
- private boolean fRightContentsChanged;
-
- private boolean fInScrolling;
-
- private int fPts[]= new int[8]; // scratch area for polygon drawing
-
- private boolean fIgnoreAncestor= false;
- private ActionContributionItem fIgnoreAncestorItem;
- private boolean fHiglightRanges;
-
- private boolean fShowPseudoConflicts= false;
-
- private ActionContributionItem fNextItem; // goto next difference
- private ActionContributionItem fPreviousItem; // goto previous difference
- private ActionContributionItem fCopyDiffLeftToRightItem;
- private ActionContributionItem fCopyDiffRightToLeftItem;
-
- private boolean fSynchronizedScrolling= true;
- private boolean fShowMoreInfo= false;
-
- private MergeSourceViewer fFocusPart;
-
- private boolean fSubDoc= true;
- private IPositionUpdater fPositionUpdater;
- private boolean fIsMotif;
-
- // SWT widgets
- private BufferedCanvas fAncestorCanvas;
- private BufferedCanvas fLeftCanvas;
- private BufferedCanvas fRightCanvas;
- private Canvas fScrollCanvas;
- private ScrollBar fVScrollBar;
- private Canvas fBirdsEyeCanvas;
-
- // SWT resources to be disposed
- private Map fColors;
- private Font fFont;
- private Cursor fBirdsEyeCursor;
-
-
- /**
- * The position updater used to adapt the positions representing
- * the child document ranges to changes of the parent document.
- */
- class ChildPositionUpdater extends DefaultPositionUpdater {
-
- /**
- * Creates the position updated.
- */
- protected ChildPositionUpdater(String category) {
- super(category);
- }
-
- /**
- * Child document ranges cannot be deleted other then by calling
- * freeChildDocument.
- */
- protected boolean notDeleted() {
- return true;
- }
-
- /**
- * If an insertion happens at a child document's start offset, the
- * position is extended rather than shifted. Also, if something is added
- * right behind the end of the position, the position is extended rather
- * than kept stable.
- */
- protected void adaptToInsert() {
-
- if (fPosition == fLeft.getRegion() || fPosition == fRight.getRegion()) {
- int myStart= fPosition.offset;
- int myEnd= fPosition.offset + fPosition.length;
- myEnd= Math.max(myStart, myEnd);
-
- int yoursStart= fOffset;
- int yoursEnd= fOffset + fReplaceLength -1;
- yoursEnd= Math.max(yoursStart, yoursEnd);
-
- if (myEnd < yoursStart)
- return;
-
- if (myStart <= yoursStart)
- fPosition.length += fReplaceLength;
- else
- fPosition.offset += fReplaceLength;
- } else {
- super.adaptToInsert();
- }
- }
- }
-
- /**
- * A Diff represents synchronized character ranges in two or three Documents.
- * The MergeTextViewer uses Diffs to find differences in line and token ranges.
- */
- /* package */ class Diff {
- /** character range in ancestor document */
- Position fAncestorPos;
- /** character range in left document */
- Position fLeftPos;
- /** character range in right document */
- Position fRightPos;
- /** if this is a TokenDiff fParent points to the enclosing LineDiff */
- Diff fParent;
- /** if Diff has been resolved */
- boolean fResolved;
- int fDirection;
- boolean fIsToken= false;
- /** child token diffs */
- ArrayList fDiffs;
- boolean fIsWhitespace= false;
-
- /**
- * Create Diff from two ranges and an optional parent diff.
- */
- Diff(Diff parent, int dir, IDocument ancestorDoc, Position aRange, int ancestorStart, int ancestorEnd,
- IDocument leftDoc, Position lRange, int leftStart, int leftEnd,
- IDocument rightDoc, Position rRange, int rightStart, int rightEnd) {
- fParent= parent != null ? parent : this;
- fDirection= dir;
-
- fLeftPos= createPosition(leftDoc, lRange, leftStart, leftEnd);
- fRightPos= createPosition(rightDoc, rRange, rightStart, rightEnd);
- if (ancestorDoc != null)
- fAncestorPos= createPosition(ancestorDoc, aRange, ancestorStart, ancestorEnd);
- }
-
- Position getPosition(char type) {
- switch (type) {
- case 'A':
- return fAncestorPos;
- case 'L':
- return fLeftPos;
- case 'R':
- return fRightPos;
- }
- return null;
- }
-
- boolean isInRange(char type, int pos) {
- Position p= getPosition(type);
- return (pos >= p.offset) && (pos < (p.offset+p.length));
- }
-
- String changeType() {
- boolean leftEmpty= fLeftPos.length == 0;
- boolean rightEmpty= fRightPos.length == 0;
-
- if (fDirection == RangeDifference.LEFT) {
- if (!leftEmpty && rightEmpty)
- return CompareMessages.getString("TextMergeViewer.changeType.addition"); //$NON-NLS-1$
- if (leftEmpty && !rightEmpty)
- return CompareMessages.getString("TextMergeViewer.changeType.deletion"); //$NON-NLS-1$
- } else {
- if (leftEmpty && !rightEmpty)
- return CompareMessages.getString("TextMergeViewer.changeType.addition"); //$NON-NLS-1$
- if (!leftEmpty && rightEmpty)
- return CompareMessages.getString("TextMergeViewer.changeType.deletion"); //$NON-NLS-1$
- }
- return CompareMessages.getString("TextMergeViewer.changeType.change"); //$NON-NLS-1$
- }
-
- Image getImage() {
- int code= Differencer.CHANGE;
- switch (fDirection) {
- case RangeDifference.RIGHT:
- code+= Differencer.LEFT;
- break;
- case RangeDifference.LEFT:
- code+= Differencer.RIGHT;
- break;
- case RangeDifference.ANCESTOR:
- case RangeDifference.CONFLICT:
- code+= Differencer.CONFLICTING;
- break;
- }
- if (code != 0)
- return getCompareConfiguration().getImage(code);
- return null;
- }
-
- Position createPosition(IDocument doc, Position range, int start, int end) {
- try {
- int l= end-start;
- if (range != null) {
- int dl= range.length;
- if (l > dl)
- l= dl;
- } else {
- int dl= doc.getLength();
- if (start+l > dl)
- l= dl-start;
- }
-
- Position p= null;
- try {
- p= new Position(start, l);
- } catch (RuntimeException ex) {
- //System.out.println("Diff.createPosition: " + start + " " + l);
- }
-
- try {
- doc.addPosition(IDocumentRange.RANGE_CATEGORY, p);
- } catch (BadPositionCategoryException ex) {
- }
- return p;
- } catch (BadLocationException ee) {
- //System.out.println("Diff.createPosition: " + start + " " + end);
- }
- return null;
- }
-
- void add(Diff d) {
- if (fDiffs == null)
- fDiffs= new ArrayList();
- fDiffs.add(d);
- }
-
- boolean isDeleted() {
- if (fAncestorPos != null && fAncestorPos.isDeleted())
- return true;
- return fLeftPos.isDeleted() || fRightPos.isDeleted();
- }
-
- void setResolved(boolean r) {
- fResolved= r;
- if (r)
- fDiffs= null;
- }
-
- boolean isResolved() {
- if (!fResolved && fDiffs != null) {
- Iterator e= fDiffs.iterator();
- while (e.hasNext()) {
- Diff d= (Diff) e.next();
- if (!d.isResolved())
- return false;
- }
- return true;
- }
- return fResolved;
- }
-
- Position getPosition(MergeSourceViewer w) {
- if (w == fLeft)
- return fLeftPos;
- if (w == fRight)
- return fRightPos;
- if (w == fAncestor)
- return fAncestorPos;
- return null;
- }
-
- /**
- * Returns true if given character range overlaps with this Diff.
- */
- boolean contains(MergeSourceViewer w, int start, int end) {
- Position h= getPosition(w);
- if (h != null) {
- int offset= h.getOffset();
- if (start >= offset) {
- int endPos= offset+h.getLength();
- if (end < endPos)
- return true;
- if (endPos == w.getDocument().getLength())
- return true;
- }
- }
- return false;
- }
-
- int getMaxDiffHeight(boolean withAncestor) {
- Point region= new Point(0, 0);
- int h= fLeft.getLineRange(fLeftPos, region).y;
- if (withAncestor)
- h= Math.max(h, fAncestor.getLineRange(fAncestorPos, region).y);
- return Math.max(h, fRight.getLineRange(fRightPos, region).y);
- }
-
- int getAncestorHeight() {
- Point region= new Point(0, 0);
- return fAncestor.getLineRange(fAncestorPos, region).y;
- }
-
- int getLeftHeight() {
- Point region= new Point(0, 0);
- return fLeft.getLineRange(fLeftPos, region).y;
- }
-
- int getRightHeight() {
- Point region= new Point(0, 0);
- return fRight.getLineRange(fRightPos, region).y;
- }
- }
-
- //---- MergeTextViewer
-
- /**
- * Creates a text merge viewer under the given parent control.
- *
- * @param parent the parent control
- * @param configuration the configuration object
- */
- public TextMergeViewer(Composite parent, CompareConfiguration configuration) {
- this(parent, SWT.NULL, configuration);
- }
-
- /**
- * Creates a text merge viewer under the given parent control.
- *
- * @param parent the parent control
- * @param style SWT style bits for top level composite of this viewer
- * @param configuration the configuration object
- */
- public TextMergeViewer(Composite parent, int style, CompareConfiguration configuration) {
- super(style, ResourceBundle.getBundle(BUNDLE_NAME), configuration);
-
- String platform= SWT.getPlatform();
- fIsMotif= "motif".equals(platform); //$NON-NLS-1$
-
- if (fIsMotif)
- fMarginWidth= 0;
-
- fPreferenceStore= configuration.getPreferenceStore();
- if (fPreferenceStore != null) {
- fPreferenceChangeListener= new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- TextMergeViewer.this.propertyChange(event);
- }
- };
- fPreferenceStore.addPropertyChangeListener(fPreferenceChangeListener);
-
- Display display= parent.getDisplay();
- updateFont(fPreferenceStore, display);
- checkForColorUpdate(display);
-
- fLeftIsLocal= Utilities.getBoolean(configuration, "LEFT_IS_LOCAL", false); //$NON-NLS-1$
- fSynchronizedScrolling= fPreferenceStore.getBoolean(ComparePreferencePage.SYNCHRONIZE_SCROLLING);
- fShowMoreInfo= fPreferenceStore.getBoolean(ComparePreferencePage.SHOW_MORE_INFO);
- fShowPseudoConflicts= fPreferenceStore.getBoolean(ComparePreferencePage.SHOW_PSEUDO_CONFLICTS);
- }
-
- fDocumentListener= new IDocumentListener() {
-
- public void documentAboutToBeChanged(DocumentEvent e) {
- }
-
- public void documentChanged(DocumentEvent e) {
- TextMergeViewer.this.documentChanged(e);
- }
- };
-
- buildControl(parent);
-
- INavigatable nav= new INavigatable() {
- public boolean gotoDifference(boolean next) {
- return navigate(next, false, false);
- }
- };
- fComposite.setData(INavigatable.NAVIGATOR_PROPERTY, nav);
-
- fBirdsEyeCursor= new Cursor(parent.getDisplay(), SWT.CURSOR_HAND);
- }
-
- private void updateFont(IPreferenceStore ps, Display display) {
-
- Font oldFont= fFont;
-
- FontData fontData= null;
- if (ps.contains(ComparePreferencePage.TEXT_FONT)
- && !ps.isDefault(ComparePreferencePage.TEXT_FONT))
- fontData= PreferenceConverter.getFontData(ps, ComparePreferencePage.TEXT_FONT);
- else
- fontData= PreferenceConverter.getDefaultFontData(ps, ComparePreferencePage.TEXT_FONT);
- if (fontData != null) {
- fFont= new Font(display, fontData);
-
- if (fAncestor != null)
- fAncestor.setFont(fFont);
- if (fLeft != null)
- fLeft.setFont(fFont);
- if (fRight != null)
- fRight.setFont(fFont);
-
- if (oldFont != null)
- oldFont.dispose();
- }
- }
-
- private void checkForColorUpdate(Display display) {
- if (fPollSystemForeground) {
- RGB fg= display.getSystemColor(SWT.COLOR_LIST_FOREGROUND).getRGB();
- if (fForeground == null || !fg.equals(fForeground)) {
- fForeground= fg;
- updateColors(display);
- }
- }
- if (fPollSystemBackground) {
- RGB bg= display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).getRGB();
- if (fBackground == null || !bg.equals(fBackground)) {
- fBackground= bg;
- updateColors(display);
- }
- }
- }
-
- public void setBackgroundColor(RGB background) {
- fPollSystemBackground= (background == null);
- fBackground= background;
- updateColors(null);
- }
-
- private RGB getBackground(Display display) {
- if (fBackground != null)
- return fBackground;
- if (display == null)
- display= fComposite.getDisplay();
- return display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).getRGB();
- }
-
- public void setForegroundColor(RGB foreground) {
- fPollSystemForeground= (foreground == null);
- fForeground= foreground;
- updateColors(null);
- }
-
- private RGB getForeground(Display display) {
- if (fForeground != null)
- return fForeground;
- if (display == null)
- display= fComposite.getDisplay();
- return display.getSystemColor(SWT.COLOR_LIST_FOREGROUND).getRGB();
- }
-
- private void updateColors(Display display) {
-
- if (display == null)
- display= fComposite.getDisplay();
-
- Color color= null;
- if (fBackground != null)
- color= getColor(display, fBackground);
-
- if (fAncestor != null)
- fAncestor.setBackgroundColor(color);
- if (fLeft != null)
- fLeft.setBackgroundColor(color);
- if (fRight != null)
- fRight.setBackgroundColor(color);
-
- RGB bg= getBackground(display);
- SELECTED_INCOMING= new RGB(0, 0, 255);
- INCOMING= interpolate(SELECTED_INCOMING, bg, 0.6);
- INCOMING_FILL= interpolate(SELECTED_INCOMING, bg, 0.97);
-
- SELECTED_CONFLICT= new RGB(255, 0, 0);
- CONFLICT= interpolate(SELECTED_CONFLICT, bg, 0.6);
- CONFLICT_FILL= interpolate(SELECTED_CONFLICT, bg, 0.97);
-
- SELECTED_OUTGOING= getForeground(display);
- OUTGOING= interpolate(SELECTED_OUTGOING, bg, 0.6);
- OUTGOING_FILL= interpolate(SELECTED_OUTGOING, bg, 0.97);
-
- // invalidate color cache
- fColors= null;
-
- refreshBirdsEyeView();
- invalidateLines();
-
- updateAllDiffBackgrounds(display);
- }
-
- public void invalidateTextPresentation() {
- if (fAncestor != null)
- fAncestor.invalidateTextPresentation();
- if (fLeft != null)
- fLeft.invalidateTextPresentation();
- if (fRight != null)
- fRight.invalidateTextPresentation();
- }
-
- /**
- * Configures the passed text viewer.
- * This method is called after the three text viewers have been created for the
- * content areas.
- * The <code>TextMergeViewer</code> implementation of this method does nothing.
- * Subclasses may reimplement to provide a specific configuration for the text viewer.
- *
- * @param textViewer the text viewer to configure
- */
- protected void configureTextViewer(TextViewer textViewer) {
- }
-
- /**
- * Creates an <code>ITokenComparator</code> which is used to show the
- * intra line differences.
- * The <code>TextMergeViewer</code> implementation of this method returns a
- * tokenizer that breaks a line into words separated by whitespace.
- * Subclasses may reimplement to provide a specific tokenizer.
- *
- * @return a ITokenComparator which is used for a second level token compare.
- */
- protected ITokenComparator createTokenComparator(String s) {
- return new TokenComparator(s);
- }
-
- /**
- * Returns a document partitioner which is suitable for the underlying content type.
- * This method is only called if the input provided by the content provider is a
- * <code>IStreamContentAccessor</code> and an internal document must be created. This
- * document is initialized with the partitioner returned from this method.
- * <p>
- * The <code>TextMergeViewer</code> implementation of this method returns
- * <code>null</code>. Subclasses may reimplement to create a partitioner for a
- * specific content type.
- *
- * @return a document partitioner, or <code>null</code>
- */
- protected IDocumentPartitioner getDocumentPartitioner() {
- return null;
- }
-
- /**
- * Called on the viewer disposal.
- * Unregisters from the compare configuration.
- * Clients may extend if they have to do additional cleanup.
- */
- protected void handleDispose(DisposeEvent event) {
-
- Object input= getInput();
- DocumentManager.remove(getDocument2('A', input));
- DocumentManager.remove(getDocument2('L', input));
- DocumentManager.remove(getDocument2('R', input));
-
- if (DEBUG)
- DocumentManager.dump();
-
- if (fPreferenceChangeListener != null) {
- if (fPreferenceStore != null)
- fPreferenceStore.removePropertyChangeListener(fPreferenceChangeListener);
- fPreferenceChangeListener= null;
- }
-
- fLeftCanvas= null;
- fRightCanvas= null;
- fVScrollBar= null;
- fBirdsEyeCanvas= null;
-
- unsetDocument(fAncestor);
- unsetDocument(fLeft);
- unsetDocument(fRight);
-
- if (fColors != null) {
- Iterator i= fColors.values().iterator();
- while (i.hasNext()) {
- Color color= (Color) i.next();
- if (!color.isDisposed())
- color.dispose();
- }
- }
-
- if (fFont != null) {
- fFont.dispose();
- fFont= null;
- }
- if (fBirdsEyeCursor != null) {
- fBirdsEyeCursor.dispose();
- fBirdsEyeCursor= null;
- }
-
- super.handleDispose(event);
- }
-
- //-------------------------------------------------------------------------------------------------------------
- //--- internal ------------------------------------------------------------------------------------------------
- //-------------------------------------------------------------------------------------------------------------
-
- /**
- * Creates the specific SWT controls for the content areas.
- * Clients must not call or override this method.
- */
- protected void createControls(Composite composite) {
-
- // 1st row
- if (fMarginWidth > 0) {
- fAncestorCanvas= new BufferedCanvas(composite, SWT.NONE) {
- public void doPaint(GC gc) {
- paintSides(gc, fAncestor, fAncestorCanvas, false);
- }
- };
- }
-
- fAncestor= createPart(composite);
- fAncestor.setEditable(false);
-
- // 2nd row
- if (fMarginWidth > 0) {
- fLeftCanvas= new BufferedCanvas(composite, SWT.NONE) {
- public void doPaint(GC gc) {
- paintSides(gc, fLeft, fLeftCanvas, false);
- }
- };
- }
-
- fLeft= createPart(composite);
- fLeft.getTextWidget().getVerticalBar().setVisible(!fSynchronizedScrolling);
- fLeft.addAction(MergeSourceViewer.SAVE_ID, fLeftSaveAction);
-
- fRight= createPart(composite);
- fRight.getTextWidget().getVerticalBar().setVisible(!fSynchronizedScrolling);
- fRight.addAction(MergeSourceViewer.SAVE_ID, fRightSaveAction);
-
- if (fMarginWidth > 0) {
- fRightCanvas= new BufferedCanvas(composite, SWT.NONE) {
- public void doPaint(GC gc) {
- paintSides(gc, fRight, fRightCanvas, fSynchronizedScrolling);
- }
- };
- }
-
- fScrollCanvas= new Canvas(composite, SWT.V_SCROLL);
- Rectangle trim= fScrollCanvas.computeTrim(0, 0, 0, 0);
- fTopInset= trim.y;
-
- fVScrollBar= fScrollCanvas.getVerticalBar();
- fVScrollBar.setIncrement(1);
- fVScrollBar.setVisible(true);
- fVScrollBar.addListener(SWT.Selection,
- new Listener() {
- public void handleEvent(Event e) {
- int vpos= ((ScrollBar)e.widget).getSelection();
- scrollVertical(vpos, vpos, vpos, null);
- }
- }
- );
-
- fBirdsEyeCanvas= new BufferedCanvas(composite, SWT.NONE) {
- public void doPaint(GC gc) {
- paintBirdsEyeView(this, gc);
- }
- };
- fBirdsEyeCanvas.addMouseListener(
- new MouseAdapter() {
- public void mouseDown(MouseEvent e) {
- Diff diff= handlemouseInBirdsEyeView(fBirdsEyeCanvas, e.y);
- if (diff != null && diff.fDirection != Differencer.NO_CHANGE) {
- //fCurrentDiff= null;
- setCurrentDiff(diff, true);
- }
- }
- }
- );
- fBirdsEyeCanvas.addMouseMoveListener(
- new MouseMoveListener() {
-
- private Cursor fLastCursor;
-
- public void mouseMove(MouseEvent e) {
- Cursor cursor= null;
- Diff diff= handlemouseInBirdsEyeView(fBirdsEyeCanvas, e.y);
- if (diff != null && diff.fDirection != Differencer.NO_CHANGE)
- cursor= fBirdsEyeCursor;
- if (fLastCursor != cursor) {
- fBirdsEyeCanvas.setCursor(cursor);
- fLastCursor= cursor;
- }
- }
- }
- );
- }
-
- private Diff handlemouseInBirdsEyeView(Canvas canvas, int my) {
- int yy, hh;
-
- Point size= canvas.getSize();
-
- int virtualHeight= fSynchronizedScrolling ? getVirtualHeight() : getRightHeight();
- if (virtualHeight < getViewportHeight())
- return null;
-
- int y= 0;
- if (fAllDiffs != null) {
- Iterator e= fAllDiffs.iterator();
- for (int i= 0; e.hasNext(); i++) {
- Diff diff= (Diff) e.next();
- int h= fSynchronizedScrolling ? diff.getMaxDiffHeight(fShowAncestor)
- : diff.getRightHeight();
- if (useChange(diff.fDirection) && !diff.fIsWhitespace) {
-
- yy= (y*size.y)/virtualHeight;
- hh= (h*size.y)/virtualHeight;
- if (hh < 3)
- hh= 3;
-
- if (my >= yy && my < yy+hh)
- return diff;
- }
- y+= h;
- }
- }
- return null;
- }
-
- private void paintBirdsEyeView(Canvas canvas, GC gc) {
-
- Color c;
- Rectangle r= new Rectangle(0, 0, 0, 0);
- int yy, hh;
-
- Point size= canvas.getSize();
-
- int virtualHeight= fSynchronizedScrolling ? getVirtualHeight() : getRightHeight();
- if (virtualHeight < getViewportHeight())
- return;
-
- Display display= canvas.getDisplay();
- int y= 0;
- if (fAllDiffs != null) {
- Iterator e= fAllDiffs.iterator();
- for (int i= 0; e.hasNext(); i++) {
- Diff diff= (Diff) e.next();
- int h= fSynchronizedScrolling ? diff.getMaxDiffHeight(fShowAncestor)
- : diff.getRightHeight();
-
- if (useChange(diff.fDirection) && !diff.fIsWhitespace) {
- yy= (y*size.y)/virtualHeight;
- hh= (h*size.y)/virtualHeight;
- if (hh < 3)
- hh= 3;
-
- c= getColor(display, getFillColor(diff));
- if (c != null) {
- gc.setBackground(c);
- gc.fillRectangle(BIRDS_EYE_VIEW_INSET, yy, size.x-(2*BIRDS_EYE_VIEW_INSET),hh);
- }
- c= getColor(display, getStrokeColor(diff));
- if (c != null) {
- gc.setForeground(c);
- r.x= BIRDS_EYE_VIEW_INSET;
- r.y= yy;
- r.width= size.x-(2*BIRDS_EYE_VIEW_INSET)-1;
- r.height= hh;
- if (diff == fCurrentDiff ||
- (fCurrentDiff != null && diff == fCurrentDiff.fParent)) {
- gc.setLineWidth(2);
- r.x++;
- r.y++;
- r.width--;
- r.height--;
- } else {
- gc.setLineWidth(1);
- }
- gc.drawRectangle(r);
- }
- }
-
- y+= h;
- }
- }
- }
-
- private void refreshBirdsEyeView() {
- if (fBirdsEyeCanvas != null)
- fBirdsEyeCanvas.redraw();
- }
-
- /**
- * Called whenever setFocus() is called on the ContentViewer's top level SWT Composite.
- * This implementation sets the focus to the first enabled text widget.
- */
- /* package */ boolean internalSetFocus() {
- if (fFocusPart == null) {
- if (fLeft != null && fLeft.getEnabled()) {
- fFocusPart= fLeft;
- } else if (fRight != null && fRight.getEnabled()) {
- fFocusPart= fRight;
- } else if (fAncestor != null && fAncestor.getEnabled()) {
- fFocusPart= fAncestor;
- }
- }
- if (fFocusPart != null) {
- StyledText st= fFocusPart.getTextWidget();
- if (st != null)
- return st.setFocus();
- }
- return false; // could not set focus
- }
-
- /**
- * Creates the central Canvas.
- * Called from ContentMergeViewer.
- */
- /* package */ Control createCenter(Composite parent) {
- if (fSynchronizedScrolling) {
- final Canvas canvas= new BufferedCanvas(parent, SWT.NONE) {
- public void doPaint(GC gc) {
- paintCenter(this, gc);
- }
- };
- new Resizer(canvas, HORIZONTAL);
- return canvas;
- }
- return super.createCenter(parent);
- }
-
- /**
- * Returns width of central canvas.
- * Overridden from ContentMergeViewer.
- */
- /* package */ int getCenterWidth() {
- if (fSynchronizedScrolling)
- return CENTER_WIDTH;
- return super.getCenterWidth();
- }
-
- /**
- * Creates and initializes a text part.
- */
- private MergeSourceViewer createPart(Composite parent) {
-
- final MergeSourceViewer part= new MergeSourceViewer(parent, getResourceBundle());
- final StyledText te= part.getTextWidget();
-
- if (!fConfirmSave)
- part.hideSaveAction();
-
- te.addPaintListener(
- new PaintListener() {
- public void paintControl(PaintEvent e) {
- paint(e, part);
- }
- }
- );
- te.addKeyListener(
- new KeyAdapter() {
- public void keyPressed(KeyEvent e) {
- handleSelectionChanged(part);
- }
- }
- );
- te.addMouseListener(
- new MouseAdapter() {
- public void mouseDown(MouseEvent e) {
- //syncViewport(part);
- handleSelectionChanged(part);
- }
- }
- );
-
- te.addFocusListener(
- new FocusAdapter() {
- public void focusGained(FocusEvent fe) {
- fFocusPart= part;
- connectGlobalActions(fFocusPart);
- }
- public void focusLost(FocusEvent fe) {
- connectGlobalActions(null);
- }
- }
- );
-
- part.addViewportListener(
- new IViewportListener() {
- public void viewportChanged(int verticalPosition) {
- syncViewport(part);
- }
- }
- );
-
- if (fFont != null)
- te.setFont(fFont);
-
- if (fBackground != null) // not default
- te.setBackground(getColor(parent.getDisplay(), fBackground));
-
- configureTextViewer(part);
-
- return part;
- }
-
- private void connectGlobalActions(MergeSourceViewer part) {
- IActionBars actionBars= Utilities.findActionBars(fComposite);
- if (actionBars != null) {
- for (int i= 0; i < GLOBAL_ACTIONS.length; i++) {
- IAction action= null;
- if (part != null) {
- action= part.getAction(TEXT_ACTIONS[i]);
- if (action == null && TEXT_ACTIONS[i].equals(MergeSourceViewer.SAVE_ID)) {
- if (part == fLeft)
- action= fLeftSaveAction;
- else
- action= fRightSaveAction;
- }
- }
- actionBars.setGlobalActionHandler(GLOBAL_ACTIONS[i], action);
- }
- actionBars.updateActionBars();
- }
- }
-
- ITypedElement getLeg(char type, Object input) {
- if (input instanceof ICompareInput) {
- switch (type) {
- case 'A':
- return ((ICompareInput)input).getAncestor();
- case 'L':
- return ((ICompareInput)input).getLeft();
- case 'R':
- return ((ICompareInput)input).getRight();
- }
- }
- return null;
- }
-
- IDocument getDocument(char type, Object input) {
- ITypedElement te= getLeg(type, input);
- if (te instanceof IDocument)
- return (IDocument) te;
- if (te instanceof IDocumentRange)
- return ((IDocumentRange) te).getDocument();
- if (te instanceof IStreamContentAccessor)
- return DocumentManager.get(te);
- return null;
- }
-
- IDocument getDocument2(char type, Object input) {
- IDocument doc= getDocument(type, input);
- if (doc != null)
- return doc;
-
- if (input instanceof IDiffElement) {
- IDiffContainer parent= ((IDiffElement)input).getParent();
- return getDocument(type, parent);
- }
- return null;
- }
-
- /**
- * Returns true if the given inputs map to the same documents
- */
- boolean sameDoc(char type, Object newInput, Object oldInput) {
- IDocument newDoc= getDocument2(type, newInput);
- IDocument oldDoc= getDocument2(type, oldInput);
- return newDoc == oldDoc;
- }
-
- /**
- * Overridden to prevent save confirmation if new input is sub document of current input.
- */
- protected boolean doSave(Object newInput, Object oldInput) {
-
- if (oldInput != null && newInput != null) {
- // check whether underlying documents have changed.
- if (sameDoc('A', newInput, oldInput) &&
- sameDoc('L', newInput, oldInput) &&
- sameDoc('R', newInput, oldInput)) {
- if (DEBUG) System.out.println("----- Same docs !!!!"); //$NON-NLS-1$
- return false;
- }
- }
-
- if (DEBUG) System.out.println("***** New docs !!!!"); //$NON-NLS-1$
-
- IDocument aDoc= getDocument2('A', oldInput);
- DocumentManager.remove(aDoc);
- IDocument lDoc= getDocument2('L', oldInput);
- DocumentManager.remove(lDoc);
- IDocument rDoc= getDocument2('R', oldInput);
- DocumentManager.remove(rDoc);
-
- if (DEBUG)
- DocumentManager.dump();
-
- return super.doSave(newInput, oldInput);
- }
-
- private ITypedElement getParent(char type) {
- Object input= getInput();
- if (input instanceof IDiffElement) {
- IDiffContainer parent= ((IDiffElement)input).getParent();
- return getLeg(type, parent);
- }
- return null;
- }
-
- /**
- * Initializes the text viewers of the three content areas with the given input objects.
- * Subclasses may extend.
- */
- protected void updateContent(Object ancestor, Object left, Object right) {
-
- boolean emptyInput= (ancestor == null && left == null && right == null);
-
- int n= 0;
- if (left != null)
- n++;
- if (right != null)
- n++;
- fHiglightRanges= n > 1;
-
- // clear stuff
- fCurrentDiff= null;
- fChangeDiffs= null;
- fAllDiffs= null;
- fEndOfDocReached= false;
-
- fLeftContentsChanged= false;
- fRightContentsChanged= false;
-
- CompareConfiguration cc= getCompareConfiguration();
- IMergeViewerContentProvider cp= getMergeContentProvider();
-
- boolean rightEditable= cc.isRightEditable() && cp.isRightEditable(getInput());
- boolean leftEditable= cc.isLeftEditable() && cp.isLeftEditable(getInput());
-
- fRight.setEditable(rightEditable);
- fLeft.setEditable(leftEditable);
-
- // set new documents
- fLeftInput= left;
- setDocument(fLeft, 'L', left);
- fLeftLineCount= fLeft.getLineCount();
-
- fRightInput= right;
- setDocument(fRight, 'R', right);
- fRightLineCount= fRight.getLineCount();
-
- fAncestorInput= ancestor;
- setDocument(fAncestor, 'A', ancestor);
-
- doDiff();
-
- invalidateLines();
- updateVScrollBar();
- refreshBirdsEyeView();
-
- if (!emptyInput && !fComposite.isDisposed()) {
- // delay so that StyledText widget gets a chance to resize itself
- // (otherwise selectFirstDiff would not know its visible area)
- fComposite.getDisplay().asyncExec(
- new Runnable() {
- public void run() {
- selectFirstDiff();
- }
- }
- );
- }
- }
-
- private void updateDiffBackground(Diff diff) {
-
- if (! fHiglightRanges)
- return;
-
- if (diff == null || diff.fIsToken)
- return;
-
- if (fShowCurrentOnly && !isCurrentDiff(diff))
- return;
-
- Color c= getColor(null, getFillColor(diff));
- if (c == null)
- return;
-
- if (isThreeWay())
- fAncestor.setLineBackground(diff.fAncestorPos, c);
- fLeft.setLineBackground(diff.fLeftPos, c);
- fRight.setLineBackground(diff.fRightPos, c);
- }
-
- private void updateAllDiffBackgrounds(Display display) {
- if (fChangeDiffs != null) {
- boolean threeWay= isThreeWay();
- Iterator iter= fChangeDiffs.iterator();
- while (iter.hasNext()) {
- Diff diff= (Diff) iter.next();
- Color c= getColor(display, getFillColor(diff));
- if (threeWay)
- fAncestor.setLineBackground(diff.fAncestorPos, c);
- fLeft.setLineBackground(diff.fLeftPos, c);
- fRight.setLineBackground(diff.fRightPos, c);
- }
- }
- }
-
- boolean isCurrentDiff(Diff diff) {
- if (diff == null)
- return false;
- if (diff == fCurrentDiff)
- return true;
- if (fCurrentDiff != null && fCurrentDiff.fParent == diff)
- return true;
- return false;
- }
-
- /**
- * Called whenver one of the documents changes.
- * Sets the dirty state of this viewer and updates the lines.
- * Implements IDocumentListener.
- */
- private void documentChanged(DocumentEvent e) {
-
- IDocument doc= e.getDocument();
-
- if (doc == fLeft.getDocument()) {
- fLeftContentsChanged= true;
- setLeftDirty(true);
- } else if (doc == fRight.getDocument()) {
- setRightDirty(true);
- fRightContentsChanged= true;
- }
-
- updateLines(doc);
- }
-
- private static ITypedElement getLeg(ICompareInput input, char type) {
- switch (type) {
- case 'A':
- return input.getAncestor();
- case 'L':
- return input.getLeft();
- case 'R':
- return input.getRight();
- }
- return null;
- }
-
- protected int findInsertionPosition(char type, ICompareInput input) {
-
- ITypedElement other= null;
- char otherType= 0;
-
- switch (type) {
- case 'A':
- other= input.getLeft();
- otherType= 'L';
- if (other == null) {
- other= input.getRight();
- otherType= 'R';
- }
- break;
- case 'L':
- other= input.getRight();
- otherType= 'R';
- if (other == null) {
- other= input.getAncestor();
- otherType= 'A';
- }
- break;
- case 'R':
- other= input.getLeft();
- otherType= 'L';
- if (other == null) {
- other= input.getAncestor();
- otherType= 'A';
- }
- break;
- }
-
- if (other instanceof IDocumentRange) {
- IDocumentRange dr= (IDocumentRange) other;
- Position p= dr.getRange();
- Diff diff= findDiff(otherType, p.offset);
- if (diff != null) {
- switch (type) {
- case 'A':
- if (diff.fAncestorPos != null)
- return diff.fAncestorPos.offset;
- break;
- case 'L':
- if (diff.fLeftPos != null)
- return diff.fLeftPos.offset;
- break;
- case 'R':
- if (diff.fRightPos != null)
- return diff.fRightPos.offset;
- break;
- }
- }
- }
- return 0;
- }
-
- /**
- * Returns true if a new Document could be installed.
- */
- private boolean setDocument(MergeSourceViewer tp, char type, Object o) {
-
- if (tp == null)
- return false;
-
- IDocument newDoc= null;
- Position range= null;
-
- if (o instanceof IDocumentRange) {
- newDoc= ((IDocumentRange)o).getDocument();
- range= ((IDocumentRange)o).getRange();
-
- } else if (o instanceof IDocument) {
- newDoc= (IDocument) o;
-
- } else if (o instanceof IStreamContentAccessor) {
-
- newDoc= DocumentManager.get(o);
- if (newDoc == null) {
- IStreamContentAccessor sca= (IStreamContentAccessor) o;
- String s= null;
-
- try {
- s= Utilities.readString(sca.getContents());
- } catch (CoreException ex) {
- }
-
- newDoc= new Document(s != null ? s : ""); //$NON-NLS-1$
- DocumentManager.put(o, newDoc);
- IDocumentPartitioner partitioner= getDocumentPartitioner();
- if (partitioner != null) {
- newDoc.setDocumentPartitioner(partitioner);
- partitioner.connect(newDoc);
- }
- }
- } else if (o == null) { // deletion on one side
-
- ITypedElement parent= getParent(type); // we try to find an insertion position within the deletion's parent
-
- if (parent instanceof IDocumentRange) {
- newDoc= ((IDocumentRange)parent).getDocument();
- newDoc.addPositionCategory(IDocumentRange.RANGE_CATEGORY);
- Object input= getInput();
- range= getNewRange(type, input);
- if (range == null) {
- int pos= 0;
- if (input instanceof ICompareInput)
- pos= findInsertionPosition(type, (ICompareInput)input);
- range= new Position(pos, 0);
- try {
- newDoc.addPosition(IDocumentRange.RANGE_CATEGORY, range);
- } catch (BadPositionCategoryException ex) {
- if (DEBUG) System.out.println("BadPositionCategoryException: " + ex); //$NON-NLS-1$
- } catch (BadLocationException ex) {
- if (DEBUG) System.out.println("BadLocationException: " + ex); //$NON-NLS-1$
- }
- addNewRange(type, input, range);
- }
- } else if (parent instanceof IDocument) {
- newDoc= ((IDocumentRange)o).getDocument();
- }
- }
-
- boolean enabled= true;
- if (newDoc == null) {
- //System.out.println("setDocument: create new Document");
- newDoc= new Document(""); //$NON-NLS-1$
- enabled= false;
- }
-
- IDocument oldDoc= tp.getDocument();
-
- if (newDoc != oldDoc) {
-
- // got a new document
-
- unsetDocument(tp);
-
- if (newDoc != null) {
- newDoc.addPositionCategory(IDocumentRange.RANGE_CATEGORY);
- if (fPositionUpdater == null)
- fPositionUpdater= new ChildPositionUpdater(IDocumentRange.RANGE_CATEGORY);
- else
- newDoc.removePositionUpdater(fPositionUpdater);
- newDoc.addPositionUpdater(fPositionUpdater);
- }
-
- // install new document
- if (newDoc != null) {
-
- tp.setRegion(range);
- if (fSubDoc) {
- if (range != null) {
- IRegion r= normalizeDocumentRegion(newDoc, toRegion(range));
- tp.setDocument(newDoc, r.getOffset(), r.getLength());
- } else
- tp.setDocument(newDoc);
- } else
- tp.setDocument(newDoc);
-
- newDoc.addDocumentListener(fDocumentListener);
- }
-
- } else { // same document but different range
-
- tp.setRegion(range);
- if (fSubDoc) {
- if (range != null) {
- IRegion r= normalizeDocumentRegion(newDoc, toRegion(range));
- tp.setVisibleRegion(r.getOffset(), r.getLength());
- } else
- tp.resetVisibleRegion();
- } else
- tp.resetVisibleRegion();
- }
-
- tp.setEnabled(enabled);
-
- return enabled;
- }
-
- private Position getNewRange(char type, Object input) {
- switch (type) {
- case 'A':
- return (Position) fNewAncestorRanges.get(input);
- case 'L':
- return (Position) fNewLeftRanges.get(input);
- case 'R':
- return (Position) fNewRightRanges.get(input);
- }
- return null;
- }
-
- private void addNewRange(char type, Object input, Position range) {
- switch (type) {
- case 'A':
- fNewAncestorRanges.put(input, range);
- break;
- case 'L':
- fNewLeftRanges.put(input, range);
- break;
- case 'R':
- fNewRightRanges.put(input, range);
- break;
- }
- }
-
- private void unsetDocument(MergeSourceViewer tp) {
- IDocument oldDoc= tp.getDocument();
- if (oldDoc != null) {
- // deinstall old positions
- if (fPositionUpdater != null)
- oldDoc.removePositionUpdater(fPositionUpdater);
- try {
- oldDoc.removePositionCategory(IDocumentRange.RANGE_CATEGORY);
- } catch (BadPositionCategoryException ex) {
- }
-
- oldDoc.removeDocumentListener(fDocumentListener);
- }
- }
-
- /**
- * Returns the contents of the underlying document as an array of bytes.
- *
- * @param left if <code>true</code> the contents of the left side is returned; otherwise the right side
- * @return the contents of the left or right document or null
- */
- protected byte[] getContents(boolean left) {
- MergeSourceViewer v= left ? fLeft : fRight;
- if (v != null) {
- IDocument d= v.getDocument();
- if (d != null) {
- String contents= d.get();
- if (contents != null) {
- byte[] bytes;
- try {
- bytes= contents.getBytes(ResourcesPlugin.getEncoding());
- } catch(UnsupportedEncodingException ex) {
- // use default encoding
- bytes= contents.getBytes();
- }
- return bytes;
- }
- }
- }
- return null;
- }
-
- private IRegion normalizeDocumentRegion(IDocument doc, IRegion region) {
-
- if (region == null || doc == null)
- return region;
-
- int maxLength= doc.getLength();
-
- int start= region.getOffset();
- if (start < 0)
- start= 0;
- else if (start > maxLength)
- start= maxLength;
-
- int length= region.getLength();
- if (length < 0)
- length= 0;
- else if (start + length > maxLength)
- length= maxLength - start;
-
- return new Region(start, length);
- }
-
- protected final void handleResizeAncestor(int x, int y, int width, int height) {
- if (width > 0) {
- Rectangle trim= fLeft.getTextWidget().computeTrim(0, 0, 0, 0);
- int scrollbarHeight= trim.height;
- if (Utilities.okToUse(fAncestorCanvas))
- fAncestorCanvas.setVisible(true);
- if (fAncestor.isControlOkToUse())
- fAncestor.getTextWidget().setVisible(true);
-
- if (fAncestorCanvas != null) {
- fAncestorCanvas.setBounds(x, y, fMarginWidth, height-scrollbarHeight);
- x+= fMarginWidth;
- width-= fMarginWidth;
- }
- fAncestor.getTextWidget().setBounds(x, y, width, height);
- } else {
- if (Utilities.okToUse(fAncestorCanvas))
- fAncestorCanvas.setVisible(false);
- if (fAncestor.isControlOkToUse()) {
- StyledText t= fAncestor.getTextWidget();
- t.setVisible(false);
- t.setBounds(0, 0, 0, 0);
- if (fFocusPart == fAncestor) {
- fFocusPart= fLeft;
- fFocusPart.getTextWidget().setFocus();
- }
- }
- }
- }
-
- /**
- * Lays out everything.
- */
- protected final void handleResizeLeftRight(int x, int y, int width1, int centerWidth, int width2, int height) {
-
- if (fBirdsEyeCanvas != null)
- width2-= BIRDS_EYE_VIEW_WIDTH;
-
- Rectangle trim= fLeft.getTextWidget().computeTrim(0, 0, 0, 0);
- int scrollbarHeight= trim.height;
- Composite composite= (Composite) getControl();
-
- int leftTextWidth= width1;
- if (fLeftCanvas != null) {
- fLeftCanvas.setBounds(x, y, fMarginWidth, height-scrollbarHeight);
- x+= fMarginWidth;
- leftTextWidth-= fMarginWidth;
- }
-
- fLeft.getTextWidget().setBounds(x, y, leftTextWidth, height);
- x+= leftTextWidth;
-
- if (fCenter == null || fCenter.isDisposed())
- fCenter= createCenter(composite);
- fCenter.setBounds(x, y, centerWidth, height-scrollbarHeight);
- x+= centerWidth;
-
- if (!fSynchronizedScrolling) { // canvas is to the left of text
- if (fRightCanvas != null) {
- fRightCanvas.setBounds(x, y, fMarginWidth, height-scrollbarHeight);
- fRightCanvas.redraw();
- x+= fMarginWidth;
- }
- // we draw the canvas to the left of the text widget
- }
-
- int scrollbarWidth= 0;
- if (fSynchronizedScrolling && fScrollCanvas != null)
- scrollbarWidth= fScrollCanvas.computeTrim(0, 0, 0, 0).width;
- int rightTextWidth= width2-scrollbarWidth;
- if (fRightCanvas != null)
- rightTextWidth-= fMarginWidth;
- fRight.getTextWidget().setBounds(x, y, rightTextWidth, height);
- x+= rightTextWidth;
-
- if (fSynchronizedScrolling) {
- if (fRightCanvas != null) { // canvas is to the right of the text
- fRightCanvas.setBounds(x, y, fMarginWidth, height-scrollbarHeight);
- x+= fMarginWidth;
- }
- if (fScrollCanvas != null)
- fScrollCanvas.setBounds(x, y, scrollbarWidth, height-scrollbarHeight);
- }
-
- if (fBirdsEyeCanvas != null) {
- y+= scrollbarHeight;
- fBirdsEyeCanvas.setBounds(x+scrollbarWidth, y, BIRDS_EYE_VIEW_WIDTH, height-(3*scrollbarHeight));
- }
-
- // doesn't work since TextEditors don't have their correct size yet.
- updateVScrollBar();
- refreshBirdsEyeView();
- }
-
- /**
- * Track selection changes to update the current Diff.
- */
- private void handleSelectionChanged(MergeSourceViewer tw) {
- Point p= tw.getSelectedRange();
- Diff d= findDiff(tw, p.x, p.x+p.y);
- updateStatus(d);
- setCurrentDiff(d, false); // don't select or reveal
- }
-
- private static IRegion toRegion(Position position) {
- if (position != null)
- return new Region(position.getOffset(), position.getLength());
- return null;
- }
-
- //---- the differencing
-
- private static int maxWork(IRangeComparator a, IRangeComparator l, IRangeComparator r) {
- int ln= l.getRangeCount();
- int rn= r.getRangeCount();
- if (a != null) {
- int an= a.getRangeCount();
- return (2 * Math.max(an, ln)) + (2 * Math.max(an, rn));
- }
- return 2 * Math.max(ln, rn);
- }
-
- /**
- * Perform a two level 2- or 3-way diff.
- * The first level is based on line comparison, the second level on token comparison.
- */
- private void doDiff() {
-
- fAllDiffs= new ArrayList();
- fChangeDiffs= new ArrayList();
- fCurrentDiff= null;
-
- IDocument aDoc= null;
- IDocument lDoc= fLeft.getDocument();
- IDocument rDoc= fRight.getDocument();
- if (lDoc == null || rDoc == null)
- return;
-
- Position aRegion= null;
- Position lRegion= fLeft.getRegion();
- Position rRegion= fRight.getRegion();
-
- boolean threeWay= isThreeWay();
-
- if (threeWay && !fIgnoreAncestor) {
- aDoc= fAncestor.getDocument();
- aRegion= fAncestor.getRegion();
- }
-
- fAncestor.resetLineBackground();
- fLeft.resetLineBackground();
- fRight.resetLineBackground();
-
- boolean ignoreWhiteSpace= Utilities.getBoolean(getCompareConfiguration(), CompareConfiguration.IGNORE_WHITESPACE, false);
-
- DocLineComparator sright= new DocLineComparator(rDoc, toRegion(rRegion), ignoreWhiteSpace);
- DocLineComparator sleft= new DocLineComparator(lDoc, toRegion(lRegion), ignoreWhiteSpace);
- DocLineComparator sancestor= null;
- if (aDoc != null)
- sancestor= new DocLineComparator(aDoc, toRegion(aRegion), ignoreWhiteSpace);
-
- if (!fSubDoc && rRegion != null && lRegion != null) {
- // we have to add a diff for the ignored lines
-
- int astart= 0;
- int as= 0;
- if (aRegion != null) {
- astart= aRegion.getOffset();
- as= Math.max(0, astart-1);
- }
- int ys= Math.max(0, lRegion.getOffset()-1);
- int ms= Math.max(0, rRegion.getOffset()-1);
-
- if (as > 0 || ys > 0 || ms > 0) {
- Diff diff= new Diff(null, RangeDifference.NOCHANGE,
- aDoc, aRegion, 0, astart,
- lDoc, lRegion, 0, lRegion.getOffset(),
- rDoc, rRegion, 0, rRegion.getOffset());
- fAllDiffs.add(diff);
- }
- }
-
- final ResourceBundle bundle= getResourceBundle();
-
- final Object[] result= new Object[1];
- final DocLineComparator sa= sancestor, sl= sleft, sr= sright;
- IRunnableWithProgress runnable= new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- String progressTitle= Utilities.getString(bundle, "compareProgressTask.title"); //$NON-NLS-1$
- monitor.beginTask(progressTitle, maxWork(sa, sl, sr));
- try {
- result[0]= RangeDifferencer.findRanges(monitor, sa, sl, sr);
- } catch (OutOfMemoryError ex) {
- System.gc();
- throw new InvocationTargetException(ex);
- }
- if (monitor.isCanceled()) { // cancelled
- throw new InterruptedException();
- }
- monitor.done();
- }
- };
-
- RangeDifference[] e= null;
- try {
- TimeoutContext.run(true, TIMEOUT, getControl().getShell(), runnable);
- e= (RangeDifference[]) result[0];
- } catch (InvocationTargetException ex) {
- String title= Utilities.getString(bundle, "tooComplexError.title"); //$NON-NLS-1$
- String format= Utilities.getString(bundle, "tooComplexError.format"); //$NON-NLS-1$
- String msg= MessageFormat.format(format, new Object[] { Integer.toString(TIMEOUT/1000) } );
- MessageDialog.openError(fComposite.getShell(), title, msg);
- e= null;
- } catch (InterruptedException ex) {
- //
- }
-
- if (e == null) {
- // we create a NOCHANGE range for the whole document
- Diff diff= new Diff(null, RangeDifference.NOCHANGE,
- aDoc, aRegion, 0, aDoc != null ? aDoc.getLength() : 0,
- lDoc, lRegion, 0, lDoc.getLength(),
- rDoc, rRegion, 0, rDoc.getLength());
-
- fAllDiffs.add(diff);
- } else {
- for (int i= 0; i < e.length; i++) {
- String a= null, s= null, d= null;
- RangeDifference es= e[i];
-
- int kind= es.kind();
-
- int ancestorStart= 0;
- int ancestorEnd= 0;
- if (sancestor != null) {
- ancestorStart= sancestor.getTokenStart(es.ancestorStart());
- ancestorEnd= getTokenEnd2(sancestor, es.ancestorStart(), es.ancestorLength());
- }
-
- int leftStart= sleft.getTokenStart(es.leftStart());
- int leftEnd= getTokenEnd2(sleft, es.leftStart(), es.leftLength());
-
- int rightStart= sright.getTokenStart(es.rightStart());
- int rightEnd= getTokenEnd2(sright, es.rightStart(), es.rightLength());
-
- Diff diff= new Diff(null, kind,
- aDoc, aRegion, ancestorStart, ancestorEnd,
- lDoc, lRegion, leftStart, leftEnd,
- rDoc, rRegion, rightStart, rightEnd);
-
- fAllDiffs.add(diff); // remember all range diffs for scrolling
-
- if (ignoreWhiteSpace) {
- if (sancestor != null)
- a= extract2(aDoc, sancestor, es.ancestorStart(), es.ancestorLength());
- s= extract2(lDoc, sleft, es.leftStart(), es.leftLength());
- d= extract2(rDoc, sright, es.rightStart(), es.rightLength());
-
- if ((a == null || a.trim().length() == 0) && s.trim().length() == 0 && d.trim().length() == 0) {
- diff.fIsWhitespace= true;
- continue;
- }
- }
-
- if (useChange(kind)) {
- fChangeDiffs.add(diff); // here we remember only the real diffs
- updateDiffBackground(diff);
-
- if (s == null)
- s= extract2(lDoc, sleft, es.leftStart(), es.leftLength());
- if (d == null)
- d= extract2(rDoc, sright, es.rightStart(), es.rightLength());
-
- if (s.length() > 0 && d.length() > 0) {
- if (a == null && sancestor != null)
- a= extract2(aDoc, sancestor, es.ancestorStart(), es.ancestorLength());
- if (USE_MERGING_TOKEN_DIFF)
- mergingTokenDiff(diff, aDoc, a, rDoc, d, lDoc, s);
- else
- simpleTokenDiff(diff, aDoc, a, rDoc, d, lDoc, s);
- }
- }
- }
- }
-
- if (!fSubDoc && rRegion != null && lRegion != null) {
- // we have to add a diff for the ignored lines
-
- int aEnd= 0;
- int aLen= 0;
- if (aRegion != null && aDoc != null) {
- aEnd= aRegion.getOffset()+aRegion.getLength();
- aLen= aDoc.getLength();
- }
- Diff diff= new Diff(null, RangeDifference.NOCHANGE,
- aDoc, aRegion, aEnd, aLen,
- lDoc, lRegion, lRegion.getOffset()+lRegion.getLength(), lDoc.getLength(),
- rDoc, rRegion, rRegion.getOffset()+rRegion.getLength(), rDoc.getLength());
- fAllDiffs.add(diff);
- }
- }
-
- private Diff findDiff(char type, int pos) {
-
- IDocument aDoc= null;
- IDocument lDoc= fLeft.getDocument();
- IDocument rDoc= fRight.getDocument();
- if (lDoc == null || rDoc == null)
- return null;
-
- Position aRegion= null;
- Position lRegion= null;
- Position rRegion= null;
-
- boolean threeWay= isThreeWay();
-
- if (threeWay && !fIgnoreAncestor)
- aDoc= fAncestor.getDocument();
-
- boolean ignoreWhiteSpace= Utilities.getBoolean(getCompareConfiguration(), CompareConfiguration.IGNORE_WHITESPACE, false);
-
- DocLineComparator sright= new DocLineComparator(rDoc, toRegion(rRegion), ignoreWhiteSpace);
- DocLineComparator sleft= new DocLineComparator(lDoc, toRegion(lRegion), ignoreWhiteSpace);
- DocLineComparator sancestor= null;
- if (aDoc != null)
- sancestor= new DocLineComparator(aDoc, toRegion(aRegion), ignoreWhiteSpace);
-
- final ResourceBundle bundle= getResourceBundle();
-
- final Object[] result= new Object[1];
- final DocLineComparator sa= sancestor, sl= sleft, sr= sright;
- IRunnableWithProgress runnable= new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- String progressTitle= Utilities.getString(bundle, "compareProgressTask.title"); //$NON-NLS-1$
- monitor.beginTask(progressTitle, maxWork(sa, sl, sr));
- try {
- result[0]= RangeDifferencer.findRanges(monitor, sa, sl, sr);
- } catch (OutOfMemoryError ex) {
- System.gc();
- throw new InvocationTargetException(ex);
- }
- if (monitor.isCanceled()) { // cancelled
- throw new InterruptedException();
- }
- monitor.done();
- }
- };
-
- RangeDifference[] e= null;
- try {
- TimeoutContext.run(true, TIMEOUT, getControl().getShell(), runnable);
- e= (RangeDifference[]) result[0];
- } catch (InvocationTargetException ex) {
- String title= Utilities.getString(bundle, "tooComplexError.title"); //$NON-NLS-1$
- String format= Utilities.getString(bundle, "tooComplexError.format"); //$NON-NLS-1$
- String msg= MessageFormat.format(format, new Object[] { Integer.toString(TIMEOUT/1000) } );
- MessageDialog.openError(fComposite.getShell(), title, msg);
- e= null;
- } catch (InterruptedException ex) {
- //
- }
-
- if (e != null) {
- for (int i= 0; i < e.length; i++) {
- RangeDifference es= e[i];
-
- int kind= es.kind();
-
- int ancestorStart= 0;
- int ancestorEnd= 0;
- if (sancestor != null) {
- ancestorStart= sancestor.getTokenStart(es.ancestorStart());
- ancestorEnd= getTokenEnd2(sancestor, es.ancestorStart(), es.ancestorLength());
- }
-
- int leftStart= sleft.getTokenStart(es.leftStart());
- int leftEnd= getTokenEnd2(sleft, es.leftStart(), es.leftLength());
-
- int rightStart= sright.getTokenStart(es.rightStart());
- int rightEnd= getTokenEnd2(sright, es.rightStart(), es.rightLength());
-
- Diff diff= new Diff(null, kind,
- aDoc, aRegion, ancestorStart, ancestorEnd,
- lDoc, lRegion, leftStart, leftEnd,
- rDoc, rRegion, rightStart, rightEnd);
-
- if (diff.isInRange(type, pos))
- return diff;
- }
- }
-
- return null;
- }
-
- /**
- * Returns true if kind of change should be shown.
- */
- private boolean useChange(int kind) {
- if (kind == RangeDifference.NOCHANGE)
- return false;
- if (kind == RangeDifference.ANCESTOR)
- return fShowPseudoConflicts;
- return true;
- }
-
- private int getTokenEnd(ITokenComparator tc, int start, int count) {
- if (count <= 0)
- return tc.getTokenStart(start);
- int index= start + count - 1;
- return tc.getTokenStart(index) + tc.getTokenLength(index);
- }
-
- private static int getTokenEnd2(ITokenComparator tc, int start, int length) {
- return tc.getTokenStart(start + length);
- }
-
- /**
- * Returns the content of lines in the specified range as a String.
- * This includes the line separators.
- *
- * @param doc the document from which to extract the characters
- * @param start index of first line
- * @param length number of lines
- * @return the contents of the specified line range as a String
- */
- private String extract2(IDocument doc, ITokenComparator tc, int start, int length) {
- int count= tc.getRangeCount();
- if (length > 0 && count > 0) {
-
-//
-// int startPos= tc.getTokenStart(start);
-// int endPos= startPos;
-//
-// if (length > 1)
-// endPos= tc.getTokenStart(start + (length-1));
-// endPos+= tc.getTokenLength(start + (length-1));
-//
-
- int startPos= tc.getTokenStart(start);
- int endPos;
-
- if (length == 1) {
- endPos= startPos + tc.getTokenLength(start);
- } else {
- endPos= tc.getTokenStart(start + length);
- }
-
- try {
- return doc.get(startPos, endPos - startPos);
- } catch (BadLocationException e) {
- }
-
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Performs a token based 3-way diff on the character range specified by the given baseDiff.
- */
- private void simpleTokenDiff(final Diff baseDiff,
- IDocument ancestorDoc, String a,
- IDocument rightDoc, String d,
- IDocument leftDoc, String s) {
-
- int ancestorStart= 0;
- ITokenComparator sa= null;
- if (ancestorDoc != null) {
- ancestorStart= baseDiff.fAncestorPos.getOffset();
- sa= createTokenComparator(a);
- }
-
- int rightStart= baseDiff.fRightPos.getOffset();
- ITokenComparator sm= createTokenComparator(d);
-
- int leftStart= baseDiff.fLeftPos.getOffset();
- ITokenComparator sy= createTokenComparator(s);
-
- RangeDifference[] e= RangeDifferencer.findRanges(sa, sy, sm);
- for (int i= 0; i < e.length; i++) {
- RangeDifference es= e[i];
- int kind= es.kind();
- if (kind != RangeDifference.NOCHANGE) {
-
- int ancestorStart2= ancestorStart;
- int ancestorEnd2= ancestorStart;
- if (ancestorDoc != null) {
- ancestorStart2 += sa.getTokenStart(es.ancestorStart());
- ancestorEnd2 += getTokenEnd(sa, es.ancestorStart(), es.ancestorLength());
- }
-
- int leftStart2= leftStart + sy.getTokenStart(es.leftStart());
- int leftEnd2= leftStart + getTokenEnd(sy, es.leftStart(), es.leftLength());
-
- int rightStart2= rightStart + sm.getTokenStart(es.rightStart());
- int rightEnd2= rightStart + getTokenEnd(sm, es.rightStart(), es.rightLength());
-
- Diff diff= new Diff(baseDiff, kind,
- ancestorDoc, null, ancestorStart2, ancestorEnd2,
- leftDoc, null, leftStart2, leftEnd2,
- rightDoc, null, rightStart2, rightEnd2);
-
- // ensure that token diff is smaller than basediff
- int leftS= baseDiff.fLeftPos.offset;
- int leftE= baseDiff.fLeftPos.offset+baseDiff.fLeftPos.length;
- int rightS= baseDiff.fRightPos.offset;
- int rightE= baseDiff.fRightPos.offset+baseDiff.fRightPos.length;
- if (leftS != leftStart2 || leftE != leftEnd2 ||
- rightS != rightStart2 || rightE != rightEnd2) {
- diff.fIsToken= true;
- // add to base Diff
- baseDiff.add(diff);
- }
- }
- }
- }
-
- /**
- * Performs a "smart" token based 3-way diff on the character range specified by the given baseDiff.
- * It is "smart" because it tries to minimize the number of token diffs by merging them.
- */
- private void mergingTokenDiff(Diff baseDiff,
- IDocument ancestorDoc, String a,
- IDocument rightDoc, String d,
- IDocument leftDoc, String s) {
- ITokenComparator sa= null;
- int ancestorStart= 0;
- if (ancestorDoc != null) {
- sa= createTokenComparator(a);
- ancestorStart= baseDiff.fAncestorPos.getOffset();
- }
-
- int rightStart= baseDiff.fRightPos.getOffset();
- ITokenComparator sm= createTokenComparator(d);
-
- int leftStart= baseDiff.fLeftPos.getOffset();
- ITokenComparator sy= createTokenComparator(s);
-
- RangeDifference[] r= RangeDifferencer.findRanges(sa, sy, sm);
- for (int i= 0; i < r.length; i++) {
- RangeDifference es= r[i];
- // determine range of diffs in one line
- int start= i;
- int leftLine= -1;
- int rightLine= -1;
- try {
- leftLine= leftDoc.getLineOfOffset(leftStart+sy.getTokenStart(es.leftStart()));
- rightLine= rightDoc.getLineOfOffset(rightStart+sm.getTokenStart(es.rightStart()));
- } catch (BadLocationException e) {
- }
- i++;
- for (; i < r.length; i++) {
- es= r[i];
- try {
- if (leftLine != leftDoc.getLineOfOffset(leftStart+sy.getTokenStart(es.leftStart())))
- break;
- if (rightLine != rightDoc.getLineOfOffset(rightStart+sm.getTokenStart(es.rightStart())))
- break;
- } catch (BadLocationException e) {
- }
- }
- int end= i;
-
- // find first diff from left
- RangeDifference first= null;
- for (int ii= start; ii < end; ii++) {
- es= r[ii];
- if (useChange(es.kind())) {
- first= es;
- break;
- }
- }
-
- // find first diff from mine
- RangeDifference last= null;
- for (int ii= end-1; ii >= start; ii--) {
- es= r[ii];
- if (useChange(es.kind())) {
- last= es;
- break;
- }
- }
-
- if (first != null && last != null) {
-
- int ancestorStart2= 0;
- int ancestorEnd2= 0;
- if (ancestorDoc != null) {
- ancestorStart2= ancestorStart+sa.getTokenStart(first.ancestorStart());
- ancestorEnd2= ancestorStart+getTokenEnd(sa, last.ancestorStart(), last.ancestorLength());
- }
-
- int leftStart2= leftStart+sy.getTokenStart(first.leftStart());
- int leftEnd2= leftStart+getTokenEnd(sy, last.leftStart(), last.leftLength());
-
- int rightStart2= rightStart+sm.getTokenStart(first.rightStart());
- int rightEnd2= rightStart+getTokenEnd(sm, last.rightStart(), last.rightLength());
- Diff diff= new Diff(baseDiff, first.kind(),
- ancestorDoc, null, ancestorStart2, ancestorEnd2+1,
- leftDoc, null, leftStart2, leftEnd2+1,
- rightDoc, null, rightStart2, rightEnd2+1);
- diff.fIsToken= true;
- baseDiff.add(diff);
- }
- }
- }
-
- //---- update UI stuff
-
- private void updateControls() {
-
- boolean leftToRight= false;
- boolean rightToLeft= false;
-
- updateStatus(fCurrentDiff);
-
- if (fCurrentDiff != null) {
- IMergeViewerContentProvider cp= getMergeContentProvider();
- if (cp != null) {
- rightToLeft= cp.isLeftEditable(getInput());
- leftToRight= cp.isRightEditable(getInput());
- }
- }
-
- if (fDirectionLabel != null) {
- if (fHiglightRanges && fCurrentDiff != null && isThreeWay() && !fIgnoreAncestor) {
- fDirectionLabel.setImage(fCurrentDiff.getImage());
- } else {
- fDirectionLabel.setImage(null);
- }
- }
-
- if (fCopyDiffLeftToRightItem != null)
- ((Action)fCopyDiffLeftToRightItem.getAction()).setEnabled(leftToRight);
- if (fCopyDiffRightToLeftItem != null)
- ((Action)fCopyDiffRightToLeftItem.getAction()).setEnabled(rightToLeft);
-
- boolean enableNavigation= false;
- if (fCurrentDiff == null && fChangeDiffs != null && fChangeDiffs.size() > 0)
- enableNavigation= true;
- else if (fChangeDiffs != null && fChangeDiffs.size() > 1)
- enableNavigation= true;
- else if (fCurrentDiff != null && fCurrentDiff.fDiffs != null)
- enableNavigation= true;
- else if (fCurrentDiff != null && fCurrentDiff.fIsToken)
- enableNavigation= true;
-
- if (fNextItem != null) {
- IAction a= fNextItem.getAction();
- a.setEnabled(enableNavigation);
- }
- if (fPreviousItem != null) {
- IAction a= fPreviousItem.getAction();
- a.setEnabled(enableNavigation);
- }
- }
-
- private void updateStatus(Diff diff) {
-
- if (! fShowMoreInfo)
- return;
-
- IActionBars bars= Utilities.findActionBars(fComposite);
- if (bars == null)
- return;
- IStatusLineManager slm= bars.getStatusLineManager();
- if (slm == null)
- return;
-
- String diffDescription;
-
- if (diff == null) {
- diffDescription= CompareMessages.getString("TextMergeViewer.diffDescription.noDiff.format"); //$NON-NLS-1$
- } else {
-
- if (diff.fIsToken) // we don't show special info for token diffs
- diff= diff.fParent;
-
- String format= CompareMessages.getString("TextMergeViewer.diffDescription.diff.format"); //$NON-NLS-1$
- diffDescription= MessageFormat.format(format,
- new String[] {
- getDiffType(diff), // 0: diff type
- getDiffNumber(diff), // 1: diff number
- getDiffRange(fLeft, diff.fLeftPos), // 2: left start line
- getDiffRange(fRight, diff.fRightPos) // 3: left end line
- }
- );
- }
-
- String format= CompareMessages.getString("TextMergeViewer.statusLine.format"); //$NON-NLS-1$
- String s= MessageFormat.format(format,
- new String[] {
- getCursorPosition(fLeft), // 0: left column
- getCursorPosition(fRight), // 1: right column
- diffDescription // 2: diff description
- }
- );
-
- slm.setMessage(s);
- }
-
- private void clearStatus() {
-
- IActionBars bars= Utilities.findActionBars(fComposite);
- if (bars == null)
- return;
- IStatusLineManager slm= bars.getStatusLineManager();
- if (slm == null)
- return;
-
- slm.setMessage(null);
- }
-
- private String getDiffType(Diff diff) {
- String s= ""; //$NON-NLS-1$
- switch(diff.fDirection) {
- case RangeDifference.LEFT:
- s= CompareMessages.getString("TextMergeViewer.direction.outgoing"); //$NON-NLS-1$
- break;
- case RangeDifference.RIGHT:
- s= CompareMessages.getString("TextMergeViewer.direction.incoming"); //$NON-NLS-1$
- break;
- case RangeDifference.CONFLICT:
- s= CompareMessages.getString("TextMergeViewer.direction.conflicting"); //$NON-NLS-1$
- break;
- }
- String format= CompareMessages.getString("TextMergeViewer.diffType.format"); //$NON-NLS-1$
- return MessageFormat.format(format, new String[] { s, diff.changeType() } );
- }
-
- private String getDiffNumber(Diff diff) {
- // find the diff's number
- int diffNumber= 0;
- if (fChangeDiffs != null) {
- Iterator e= fChangeDiffs.iterator();
- while (e.hasNext()) {
- Diff d= (Diff) e.next();
- diffNumber++;
- if (d == diff)
- break;
- }
- }
- return Integer.toString(diffNumber);
- }
-
- private String getDiffRange(MergeSourceViewer v, Position pos) {
- Point p= v.getLineRange(pos, new Point(0, 0));
- int startLine= p.x+1;
- int endLine= p.x+p.y;
-
- String format;
- if (endLine < startLine)
- format= CompareMessages.getString("TextMergeViewer.beforeLine.format"); //$NON-NLS-1$
- else
- format= CompareMessages.getString("TextMergeViewer.range.format"); //$NON-NLS-1$
- return MessageFormat.format(format,
- new String[] { Integer.toString(startLine),
- Integer.toString(endLine) } );
- }
-
- /**
- * Returns a description of the cursor position.
- *
- * @return a description of the cursor position
- */
- private String getCursorPosition(MergeSourceViewer v) {
- if (v != null) {
- StyledText styledText= v.getTextWidget();
-
- IDocument document= v.getDocument();
- if (document != null) {
- int offset= v.getVisibleRegion().getOffset();
- int caret= offset + styledText.getCaretOffset();
-
- try {
-
- int line=document.getLineOfOffset(caret);
-
- int lineOffset= document.getLineOffset(line);
- int occurrences= 0;
- for (int i= lineOffset; i < caret; i++)
- if ('\t' == document.getChar(i))
- ++ occurrences;
-
- int tabWidth= styledText.getTabs();
- int column= caret - lineOffset + (tabWidth -1) * occurrences;
-
- String format= CompareMessages.getString("TextMergeViewer.cursorPosition.format"); //$NON-NLS-1$
- return MessageFormat.format(format,
- new String[] { Integer.toString(line + 1), Integer.toString(column + 1) } );
-
- } catch (BadLocationException x) {
- }
- }
- }
- return ""; //$NON-NLS-1$
- }
-
- protected void updateHeader() {
-
- super.updateHeader();
-
- updateControls();
- }
-
- /**
- * Creates the two items for copying a difference range from one side to the other
- * and adds them to the given toolbar manager.
- */
- protected void createToolItems(ToolBarManager tbm) {
-
- final String ignoreAncestorActionKey= "action.IgnoreAncestor."; //$NON-NLS-1$
- Action ignoreAncestorAction= new Action() {
- public void run() {
- setIgnoreAncestor(! fIgnoreAncestor);
- Utilities.initToggleAction(this, getResourceBundle(), ignoreAncestorActionKey, fIgnoreAncestor);
- }
- };
- ignoreAncestorAction.setChecked(fIgnoreAncestor);
- Utilities.initAction(ignoreAncestorAction, getResourceBundle(), ignoreAncestorActionKey);
- Utilities.initToggleAction(ignoreAncestorAction, getResourceBundle(), ignoreAncestorActionKey, fIgnoreAncestor);
-
- fIgnoreAncestorItem= new ActionContributionItem(ignoreAncestorAction);
- fIgnoreAncestorItem.setVisible(false);
- tbm.appendToGroup("modes", fIgnoreAncestorItem); //$NON-NLS-1$
-
- tbm.add(new Separator());
-
- Action a= new Action() {
- public void run() {
- navigate(true, true, true);
- }
- };
- Utilities.initAction(a, getResourceBundle(), "action.NextDiff."); //$NON-NLS-1$
- fNextItem= new ActionContributionItem(a);
- tbm.appendToGroup("navigation", fNextItem); //$NON-NLS-1$
-
- a= new Action() {
- public void run() {
- navigate(false, true, true);
- }
- };
- Utilities.initAction(a, getResourceBundle(), "action.PrevDiff."); //$NON-NLS-1$
- fPreviousItem= new ActionContributionItem(a);
- tbm.appendToGroup("navigation", fPreviousItem); //$NON-NLS-1$
-
-
- CompareConfiguration cc= getCompareConfiguration();
-
- if (cc.isRightEditable()) {
- a= new Action() {
- public void run() {
- copyDiffLeftToRight();
- }
- };
- Utilities.initAction(a, getResourceBundle(), "action.CopyDiffLeftToRight."); //$NON-NLS-1$
- fCopyDiffLeftToRightItem= new ActionContributionItem(a);
- tbm.appendToGroup("merge", fCopyDiffLeftToRightItem); //$NON-NLS-1$
- }
-
- if (cc.isLeftEditable()) {
- a= new Action() {
- public void run() {
- copyDiffRightToLeft();
- }
- };
- Utilities.initAction(a, getResourceBundle(), "action.CopyDiffRightToLeft."); //$NON-NLS-1$
- fCopyDiffRightToLeftItem= new ActionContributionItem(a);
- tbm.appendToGroup("merge", fCopyDiffRightToLeftItem); //$NON-NLS-1$
- }
- }
-
- /* package */ void propertyChange(PropertyChangeEvent event) {
-
- String key= event.getProperty();
-
- if (key.equals(CompareConfiguration.IGNORE_WHITESPACE)
- || key.equals(ComparePreferencePage.SHOW_PSEUDO_CONFLICTS)) {
-
- fShowPseudoConflicts= fPreferenceStore.getBoolean(ComparePreferencePage.SHOW_PSEUDO_CONFLICTS);
-
- // clear stuff
- fCurrentDiff= null;
- fChangeDiffs= null;
- fAllDiffs= null;
-
- doDiff();
-
- updateControls();
- invalidateLines();
- updateVScrollBar();
- refreshBirdsEyeView();
-
- selectFirstDiff();
-
- } else if (key.equals(ComparePreferencePage.TEXT_FONT)) {
- if (fPreferenceStore != null) {
- updateFont(fPreferenceStore, fComposite.getDisplay());
- invalidateLines();
- }
-
- } else if (key.equals(ComparePreferencePage.SYNCHRONIZE_SCROLLING)) {
-
- boolean b= fPreferenceStore.getBoolean(ComparePreferencePage.SYNCHRONIZE_SCROLLING);
- if (b != fSynchronizedScrolling)
- toggleSynchMode();
-
- } else if (key.equals(ComparePreferencePage.SHOW_MORE_INFO)) {
-
- boolean b= fPreferenceStore.getBoolean(ComparePreferencePage.SHOW_MORE_INFO);
- if (b != fShowMoreInfo) {
- fShowMoreInfo= b;
- if (fShowMoreInfo)
- updateStatus(fCurrentDiff);
- else
- clearStatus();
- }
-
- } else
- super.propertyChange(event);
- }
-
- private void setIgnoreAncestor(boolean ignore) {
- if (ignore != fIgnoreAncestor) {
- fIgnoreAncestor= ignore;
- setAncestorVisibility(false, !fIgnoreAncestor);
-
- // clear stuff
- fCurrentDiff= null;
- fChangeDiffs= null;
- fAllDiffs= null;
-
- doDiff();
-
- invalidateLines();
- updateVScrollBar();
- refreshBirdsEyeView();
-
- selectFirstDiff();
- }
- }
-
- private void selectFirstDiff() {
-
- if (fLeft == null || fRight == null) {
- return;
- }
- if (fLeft.getDocument() == null || fRight.getDocument() == null) {
- return;
- }
-
- Diff firstDiff= null;
- if (CompareNavigator.getDirection(fComposite))
- firstDiff= findNext(fRight, fChangeDiffs, -1, -1, false);
- else
- firstDiff= findPrev(fRight, fChangeDiffs, 9999999, 9999999, false);
- setCurrentDiff(firstDiff, true);
- }
-
- private void toggleSynchMode() {
- fSynchronizedScrolling= ! fSynchronizedScrolling;
-
- scrollVertical(0, 0, 0, null);
-
- // throw away central control (Sash or Canvas)
- Control center= getCenter();
- if (center != null && !center.isDisposed())
- center.dispose();
-
- fLeft.getTextWidget().getVerticalBar().setVisible(!fSynchronizedScrolling);
- fRight.getTextWidget().getVerticalBar().setVisible(!fSynchronizedScrolling);
-
- fComposite.layout(true);
- }
-
- protected void updateToolItems() {
-
- if (fIgnoreAncestorItem != null)
- fIgnoreAncestorItem.setVisible(isThreeWay());
-
- super.updateToolItems();
- }
-
- //---- painting lines
-
- /**
- *
- */
- private void updateLines(IDocument d) {
-
- boolean left= false;
- boolean right= false;
-
- // FIXME: this optimization is incorrect because
- // it doesn't take replace operations into account where
- // the old and new line count does not differ
- if (d == fLeft.getDocument()) {
- int l= fLeft.getLineCount();
- left= fLeftLineCount != l;
- fLeftLineCount= l;
- } else if (d == fRight.getDocument()) {
- int l= fRight.getLineCount();
- right= fRightLineCount != l;
- fRightLineCount= l;
- }
-
- if (left || right) {
-
- if (left) {
- if (fLeftCanvas != null)
- fLeftCanvas.redraw();
- } else {
- if (fRightCanvas != null)
- fRightCanvas.redraw();
- }
- Control center= getCenter();
- if (center != null)
- center.redraw();
-
- updateVScrollBar();
- refreshBirdsEyeView();
- }
- }
-
- private void invalidateLines() {
- if (isThreeWay()) {
- if (Utilities.okToUse(fAncestorCanvas))
- fAncestorCanvas.redraw();
- if (fAncestor != null && fAncestor.isControlOkToUse())
- fAncestor.getTextWidget().redraw();
- }
-
- if (Utilities.okToUse(fLeftCanvas))
- fLeftCanvas.redraw();
-
- if (fLeft != null && fLeft.isControlOkToUse())
- fLeft.getTextWidget().redraw();
-
- if (Utilities.okToUse(getCenter()))
- getCenter().redraw();
-
- if (fRight != null && fRight.isControlOkToUse())
- fRight.getTextWidget().redraw();
-
- if (Utilities.okToUse(fRightCanvas))
- fRightCanvas.redraw();
- }
-
- private void paintCenter(Canvas canvas, GC g) {
-
- Display display= canvas.getDisplay();
-
- checkForColorUpdate(display);
-
- if (! fSynchronizedScrolling)
- return;
-
- int lineHeight= fLeft.getTextWidget().getLineHeight();
- int visibleHeight= fRight.getViewportHeight();
-
- Point size= canvas.getSize();
- int x= 0;
- int w= size.x;
-
- g.setBackground(canvas.getBackground());
- g.fillRectangle(x+1, 0, w-2, size.y);
-
- if (!fIsMotif) {
- // draw thin line between center ruler and both texts
- g.setBackground(display.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW));
- g.fillRectangle(0, 0, 1, size.y);
- g.fillRectangle(w-1, 0, 1, size.y);
- }
-
- if (! fHiglightRanges)
- return;
-
- if (fChangeDiffs != null) {
- int lshift= fLeft.getVerticalScrollOffset();
- int rshift= fRight.getVerticalScrollOffset();
-
- Point region= new Point(0, 0);
-
- Iterator e= fChangeDiffs.iterator();
- while (e.hasNext()) {
- Diff diff= (Diff) e.next();
- if (diff.isDeleted())
- continue;
-
- if (fShowCurrentOnly2 && !isCurrentDiff(diff))
- continue;
-
- fLeft.getLineRange(diff.fLeftPos, region);
- int ly= (region.x * lineHeight) + lshift;
- int lh= region.y * lineHeight;
-
- fRight.getLineRange(diff.fRightPos, region);
- int ry= (region.x * lineHeight) + rshift;
- int rh= region.y * lineHeight;
-
- if (Math.max(ly+lh, ry+rh) < 0)
- continue;
- if (Math.min(ly, ry) >= visibleHeight)
- break;
-
- fPts[0]= x; fPts[1]= ly; fPts[2]= w; fPts[3]= ry;
- fPts[6]= x; fPts[7]= ly+lh; fPts[4]= w; fPts[5]= ry+rh;
-
- g.setBackground(getColor(display, getFillColor(diff)));
- g.fillPolygon(fPts);
-
- g.setLineWidth(LW);
- g.setForeground(getColor(display, getStrokeColor(diff)));
- g.drawLine(fPts[0], fPts[1], fPts[2], fPts[3]);
- g.drawLine(fPts[6], fPts[7], fPts[4], fPts[5]);
- }
- }
- }
-
- private void paintSides(GC g, MergeSourceViewer tp, Canvas canvas, boolean right) {
-
- Display display= canvas.getDisplay();
-
- int lineHeight= tp.getTextWidget().getLineHeight();
- int visibleHeight= tp.getViewportHeight();
-
- Point size= canvas.getSize();
- int x= 0;
- int w= fMarginWidth;
- int w2= w/2;
-
- g.setBackground(canvas.getBackground());
- g.fillRectangle(x, 0, w, size.y);
-
- if (!fIsMotif) {
- // draw thin line between ruler and text
- g.setBackground(display.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW));
- if (right)
- g.fillRectangle(0, 0, 1, size.y);
- else
- g.fillRectangle(size.x-1, 0, 1, size.y);
- }
-
- if (! fHiglightRanges)
- return;
-
- if (fChangeDiffs != null) {
- int shift= tp.getVerticalScrollOffset() + (2-LW);
-
- Point region= new Point(0, 0);
- Iterator e= fChangeDiffs.iterator();
- while (e.hasNext()) {
- Diff diff= (Diff) e.next();
- if (diff.isDeleted())
- continue;
-
- if (fShowCurrentOnly2 && !isCurrentDiff(diff))
- continue;
-
- tp.getLineRange(diff.getPosition(tp), region);
- int y= (region.x * lineHeight) + shift;
- int h= region.y * lineHeight;
-
- if (y+h < 0)
- continue;
- if (y >= visibleHeight)
- break;
-
- g.setBackground(getColor(display, getFillColor(diff)));
- if (right)
- g.fillRectangle(x, y, w2, h);
- else
- g.fillRectangle(x+w2, y, w2, h);
-
- g.setBackground(getColor(display, getStrokeColor(diff)));
- if (right) {
- g.fillRectangle(x, y-1, w2+1, LW);
- g.fillRectangle(x+w2, y, LW, h);
- g.fillRectangle(x, y+h-1, w2, LW);
- } else {
- g.fillRectangle(x+w2, y-1, w2, LW);
- g.fillRectangle(x+w2, y, LW, h);
- g.fillRectangle(x+w2, y+h-1, w2, LW);
- }
- }
- }
- }
-
- private void paint(PaintEvent event, MergeSourceViewer tp) {
-
- if (! fHiglightRanges)
- return;
- if (fChangeDiffs == null)
- return;
-
- Control canvas= (Control) event.widget;
- GC g= event.gc;
-
- Display display= canvas.getDisplay();
-
- int lineHeight= tp.getTextWidget().getLineHeight();
- int w= canvas.getSize().x;
- int shift= tp.getVerticalScrollOffset() + (2-LW);
- int maxh= event.y+event.height; // visibleHeight
-
- //if (fIsMotif)
- shift+= fTopInset;
-
- Point range= new Point(0, 0);
-
- Iterator e= fChangeDiffs.iterator();
- while (e.hasNext()) {
- Diff diff= (Diff) e.next();
- if (diff.isDeleted())
- continue;
-
- if (fShowCurrentOnly && !isCurrentDiff(diff))
- continue;
-
- tp.getLineRange(diff.getPosition(tp), range);
- int y= (range.x * lineHeight) + shift;
- int h= range.y * lineHeight;
-
- if (y+h < event.y)
- continue;
- if (y > maxh)
- break;
-
- g.setBackground(getColor(display, getStrokeColor(diff)));
- g.fillRectangle(0, y-1, w, LW);
- g.fillRectangle(0, y+h-1, w, LW);
- }
- }
-
- private RGB getFillColor(Diff diff) {
- boolean selected= fCurrentDiff != null && fCurrentDiff.fParent == diff;
-
- RGB selected_fill= getBackground(null);
-
- if (isThreeWay() && !fIgnoreAncestor) {
- switch (diff.fDirection) {
- case RangeDifference.RIGHT:
- if (fLeftIsLocal)
- return selected ? selected_fill : INCOMING_FILL;
- return selected ? selected_fill : OUTGOING_FILL;
- case RangeDifference.ANCESTOR:
- return selected ? selected_fill : CONFLICT_FILL;
- case RangeDifference.LEFT:
- if (fLeftIsLocal)
- return selected ? selected_fill : OUTGOING_FILL;
- return selected ? selected_fill : INCOMING_FILL;
- case RangeDifference.CONFLICT:
- return selected ? selected_fill : CONFLICT_FILL;
- }
- return null;
- }
- return selected ? selected_fill : OUTGOING_FILL;
- }
-
- private RGB getStrokeColor(Diff diff) {
- boolean selected= fCurrentDiff != null && fCurrentDiff.fParent == diff;
-
- if (isThreeWay() && !fIgnoreAncestor) {
- switch (diff.fDirection) {
- case RangeDifference.RIGHT:
- if (fLeftIsLocal)
- return selected ? SELECTED_INCOMING : INCOMING;
- return selected ? SELECTED_OUTGOING : OUTGOING;
- case RangeDifference.ANCESTOR:
- return selected ? SELECTED_CONFLICT : CONFLICT;
- case RangeDifference.LEFT:
- if (fLeftIsLocal)
- return selected ? SELECTED_OUTGOING : OUTGOING;
- return selected ? SELECTED_INCOMING : INCOMING;
- case RangeDifference.CONFLICT:
- return selected ? SELECTED_CONFLICT : CONFLICT;
- }
- return null;
- }
- return selected ? SELECTED_OUTGOING : OUTGOING;
- }
-
- private Color getColor(Display display, RGB rgb) {
- if (rgb == null)
- return null;
- if (fColors == null)
- fColors= new HashMap(20);
- Color c= (Color) fColors.get(rgb);
- if (c == null) {
- c= new Color(display, rgb);
- fColors.put(rgb, c);
- }
- return c;
- }
-
- static RGB interpolate(RGB fg, RGB bg, double scale) {
- return new RGB(
- (int)((1.0-scale) * fg.red + scale * bg.red),
- (int)((1.0-scale) * fg.green + scale * bg.green),
- (int)((1.0-scale) * fg.blue + scale * bg.blue)
- );
- }
-
- //---- Navigating and resolving Diffs
-
- /**
- * Returns true if end (or beginning) of document reached.
- */
- private boolean navigate(boolean down, boolean wrap, boolean deep) {
-
- Diff diff= null;
-
- for (;;) {
-
- if (fChangeDiffs != null) {
- MergeSourceViewer part= fFocusPart;
- if (part == null)
- part= fRight;
-
- if (part != null) {
- Point s= part.getSelectedRange();
- if (down)
- diff= findNext(part, fChangeDiffs, s.x, s.x+s.y, deep);
- else
- diff= findPrev(part, fChangeDiffs, s.x, s.x+s.y, deep);
- }
- }
-
- if (diff == null) { // at end or beginning
- if (wrap) {
- if (!fEndOfDocReached) {
- fEndOfDocReached= true;
- if (! endOfDocumentReached(down))
- return true;
- }
- fEndOfDocReached= false;
- if (fChangeDiffs != null && fChangeDiffs.size() > 0) {
- if (down)
- diff= (Diff) fChangeDiffs.get(0);
- else
- diff= (Diff) fChangeDiffs.get(fChangeDiffs.size()-1);
- }
- } else {
- fEndOfDocReached= false;
- return true;
- }
- }
-
- setCurrentDiff(diff, true);
-
- if (diff != null && diff.fDirection == RangeDifference.ANCESTOR
- && !getAncestorEnabled())
- continue;
-
- break;
- }
-
- return false;
- }
-
- private boolean endOfDocumentReached(boolean down) {
- Control c= getControl();
- if (Utilities.okToUse(c)) {
-
- c.getDisplay().beep();
-
- String key= down ? "atEnd" : "atBeginning"; //$NON-NLS-1$ //$NON-NLS-2$
- return MessageDialog.openQuestion(c.getShell(),
- CompareMessages.getString("TextMergeViewer."+key+".title"), //$NON-NLS-1$ //$NON-NLS-2$
- CompareMessages.getString("TextMergeViewer."+key+".message")); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return false;
- }
-
- /**
- * Find the Diff that overlaps with the given TextPart's text range.
- * If the range doesn't overlap with any range <code>null</code>
- * is returned.
- */
- private Diff findDiff(MergeSourceViewer tp, int rangeStart, int rangeEnd) {
- if (fChangeDiffs != null) {
- Iterator e= fChangeDiffs.iterator();
- while (e.hasNext()) {
- Diff diff= (Diff) e.next();
- if (diff.contains(tp, rangeStart, rangeEnd))
- return diff;
- }
- }
- return null;
- }
-
- private static Diff findNext(MergeSourceViewer tp, List v, int start, int end, boolean deep) {
- for (int i= 0; i < v.size(); i++) {
- Diff diff= (Diff) v.get(i);
- Position p= diff.getPosition(tp);
- if (p != null) {
- int startOffset= p.getOffset();
- if (end < startOffset) // <=
- return diff;
- if (deep && diff.fDiffs != null) {
- Diff d= null;
- int endOffset= startOffset + p.getLength();
- if (start == startOffset && (end == endOffset || end == endOffset-1)) {
- d= findNext(tp, diff.fDiffs, start-1, start-1, deep);
- } else if (end < endOffset) {
- d= findNext(tp, diff.fDiffs, start, end, deep);
- }
- if (d != null)
- return d;
- }
- }
- }
- return null;
- }
-
- private static Diff findPrev(MergeSourceViewer tp, List v, int start, int end, boolean deep) {
- for (int i= v.size()-1; i >= 0; i--) {
- Diff diff= (Diff) v.get(i);
- Position p= diff.getPosition(tp);
- if (p != null) {
- int startOffset= p.getOffset();
- int endOffset= startOffset + p.getLength();
- if (start > endOffset)
- return diff;
- if (deep && diff.fDiffs != null) {
- Diff d= null;
- if (start == startOffset && end == endOffset) {
- d= findPrev(tp, diff.fDiffs, end, end, deep);
- } else if (start >= startOffset) {
- d= findPrev(tp, diff.fDiffs, start, end, deep);
- }
- if (d != null)
- return d;
- }
- }
- }
- return null;
- }
-
- /*
- * Set the currently active Diff and update the toolbars controls and lines.
- * If <code>revealAndSelect</code> is <code>true</code> the Diff is revealed and
- * selected in both TextParts.
- */
- private void setCurrentDiff(Diff d, boolean revealAndSelect) {
-
-// if (d == fCurrentDiff)
-// return;
-
- fEndOfDocReached= false;
-
- Diff oldDiff= fCurrentDiff;
-
- if (d != null && revealAndSelect) {
-
- // before we set fCurrentDiff we change the selection
- // so that the paint code uses the old background colors
- // otherwise selection isn't drawn correctly
- if (isThreeWay() && !fIgnoreAncestor)
- fAncestor.setSelection(d.fAncestorPos);
- fLeft.setSelection(d.fLeftPos);
- fRight.setSelection(d.fRightPos);
-
- // now switch diffs
- fCurrentDiff= d;
- revealDiff(d, d.fIsToken);
- } else {
- fCurrentDiff= d;
- }
-
- Diff d1= oldDiff != null ? oldDiff.fParent : null;
- Diff d2= fCurrentDiff != null ? fCurrentDiff.fParent : null;
- if (d1 != d2) {
- updateDiffBackground(d1);
- updateDiffBackground(d2);
- }
-
- updateControls();
- invalidateLines();
- refreshBirdsEyeView();
- }
-
- /**
- * Smart determines whether
- */
- private void revealDiff(Diff d, boolean smart) {
-
- boolean ancestorIsVisible= false;
- boolean leftIsVisible= false;
- boolean rightIsVisible= false;
-
- if (smart) {
- Point region= new Point(0, 0);
- // find the starting line of the diff in all text widgets
- int ls= fLeft.getLineRange(d.fLeftPos, region).x;
- int rs= fRight.getLineRange(d.fRightPos, region).x;
-
- if (isThreeWay() && !fIgnoreAncestor) {
- int as= fAncestor.getLineRange(d.fAncestorPos, region).x;
- if (as >= fAncestor.getTopIndex() && as <= fAncestor.getBottomIndex())
- ancestorIsVisible= true;
- }
-
- if (ls >= fLeft.getTopIndex() && ls <= fLeft.getBottomIndex())
- leftIsVisible= true;
-
- if (rs >= fRight.getTopIndex() && rs <= fRight.getBottomIndex())
- rightIsVisible= true;
- }
-
- // vertical scrolling
- if (!leftIsVisible || !rightIsVisible) {
- int avpos= 0, lvpos= 0, rvpos= 0;
-
- MergeSourceViewer allButThis= null;
- if (leftIsVisible) {
- avpos= lvpos= rvpos= realToVirtualPosition(fLeft, fLeft.getTopIndex());
- allButThis= fLeft;
- } else if (rightIsVisible) {
- avpos= lvpos= rvpos= realToVirtualPosition(fRight, fRight.getTopIndex());
- allButThis= fRight;
- } else if (ancestorIsVisible) {
- avpos= lvpos= rvpos= realToVirtualPosition(fAncestor, fAncestor.getTopIndex());
- allButThis= fAncestor;
- } else {
- if (fAllDiffs != null) {
- int vpos= 0;
- Iterator e= fAllDiffs.iterator();
- for (int i= 0; e.hasNext(); i++) {
- Diff diff= (Diff) e.next();
- if (diff == d)
- break;
- if (fSynchronizedScrolling) {
- vpos+= diff.getMaxDiffHeight(fShowAncestor);
- } else {
- avpos+= diff.getAncestorHeight();
- lvpos+= diff.getLeftHeight();
- rvpos+= diff.getRightHeight();
- }
- }
- if (fSynchronizedScrolling)
- avpos= lvpos= rvpos= vpos;
- }
- int delta= fRight.getViewportLines()/4;
- avpos-= delta;
- if (avpos < 0)
- avpos= 0;
- lvpos-= delta;
- if (lvpos < 0)
- lvpos= 0;
- rvpos-= delta;
- if (rvpos < 0)
- rvpos= 0;
- }
-
- scrollVertical(avpos, lvpos, rvpos, allButThis);
-
- if (fVScrollBar != null)
- fVScrollBar.setSelection(avpos);
- }
-
- // horizontal scrolling
- if (d.fIsToken) {
- // we only scroll horizontally for token diffs
- reveal(fAncestor, d.fAncestorPos);
- reveal(fLeft, d.fLeftPos);
- reveal(fRight, d.fRightPos);
- } else {
- // in all other cases we reset the horizontal offset
- hscroll(fAncestor);
- hscroll(fLeft);
- hscroll(fRight);
- }
- }
-
- private static void reveal(MergeSourceViewer v, Position p) {
- if (v != null && p != null) {
- StyledText st= v.getTextWidget();
- if (st != null) {
- Rectangle r= st.getClientArea();
- if (!r.isEmpty()) // workaround for #7320: Next diff scrolls when going into current diff
- v.revealRange(p.offset, p.length);
- }
- }
- }
-
- private static void hscroll(MergeSourceViewer v) {
- if (v != null) {
- StyledText st= v.getTextWidget();
- if (st != null)
- st.setHorizontalIndex(0);
- }
- }
-
- //--------------------------------------------------------------------------------
-
- protected void copy(boolean leftToRight) {
- if (leftToRight) {
- if (fLeft.getEnabled()) {
- // copy text
- String text= fLeft.getTextWidget().getText();
- fRight.getTextWidget().setText(text);
- fRight.setEnabled(true);
- } else {
- // delete
- fRight.getTextWidget().setText(""); //$NON-NLS-1$
- fRight.setEnabled(false);
- }
- fRightLineCount= fRight.getLineCount();
- setRightDirty(true);
- fRightContentsChanged= false;
- } else {
- if (fRight.getEnabled()) {
- // copy text
- String text= fRight.getTextWidget().getText();
- fLeft.getTextWidget().setText(text);
- fLeft.setEnabled(true);
- } else {
- // delete
- fLeft.getTextWidget().setText(""); //$NON-NLS-1$
- fLeft.setEnabled(false);
- }
- fLeftLineCount= fLeft.getLineCount();
- setLeftDirty(true);
- fLeftContentsChanged= false;
- }
- doDiff();
- invalidateLines();
- updateVScrollBar();
- selectFirstDiff();
- refreshBirdsEyeView();
- }
-
- private void copyDiffLeftToRight() {
- copy(fCurrentDiff, true, false, false);
- }
-
- private void copyDiffRightToLeft() {
- copy(fCurrentDiff, false, false, false);
- }
-
- private void copy(Diff diff, boolean leftToRight, boolean both, boolean gotoNext) {
-
- if (diff != null && !diff.isResolved()) {
-
- Position fromPos= null;
- Position toPos= null;
- IDocument fromDoc= null;
- IDocument toDoc= null;
-
- if (leftToRight) {
- fRight.setEnabled(true);
- fromPos= diff.fLeftPos;
- toPos= diff.fRightPos;
- fromDoc= fLeft.getDocument();
- toDoc= fRight.getDocument();
- } else {
- fLeft.setEnabled(true);
- fromPos= diff.fRightPos;
- toPos= diff.fLeftPos;
- fromDoc= fRight.getDocument();
- toDoc= fLeft.getDocument();
- }
-
- if (fromDoc != null) {
-
- int fromStart= fromPos.getOffset();
- int fromLen= fromPos.getLength();
-
- int toStart= toPos.getOffset();
- int toLen= toPos.getLength();
-
- try {
- String s= null;
-
- switch (diff.fDirection) {
- case RangeDifference.RIGHT:
- case RangeDifference.LEFT:
- s= fromDoc.get(fromStart, fromLen);
- break;
- case RangeDifference.ANCESTOR:
- break;
- case RangeDifference.CONFLICT:
- s= fromDoc.get(fromStart, fromLen);
- if (both)
- s+= toDoc.get(toStart, toLen);
- break;
- }
- if (s != null) {
- toDoc.replace(toStart, toLen, s);
- toPos.setOffset(toStart);
- toPos.setLength(s.length());
- }
-
- } catch (BadLocationException e) {
- }
- }
-
- diff.setResolved(true);
-
- if (gotoNext) {
- navigate(true, true, true);
- } else {
- revealDiff(diff, true);
- updateControls();
- }
- }
- }
-
- //---- scrolling
-
- /**
- * Calculates virtual height (in lines) of views by adding the maximum of corresponding diffs.
- */
- private int getVirtualHeight() {
- int h= 1;
- if (fAllDiffs != null) {
- Iterator e= fAllDiffs.iterator();
- for (int i= 0; e.hasNext(); i++) {
- Diff diff= (Diff) e.next();
- h+= diff.getMaxDiffHeight(fShowAncestor);
- }
- }
- return h;
- }
-
- /**
- * Calculates height (in lines) of right view by adding the height of the right diffs.
- */
- private int getRightHeight() {
- int h= 1;
- if (fAllDiffs != null) {
- Iterator e= fAllDiffs.iterator();
- for (int i= 0; e.hasNext(); i++) {
- Diff diff= (Diff) e.next();
- h+= diff.getRightHeight();
- }
- }
- return h;
- }
-
- /**
- * The height of the TextEditors in lines.
- */
- private int getViewportHeight() {
- StyledText te= fLeft.getTextWidget();
-
- int vh= te.getClientArea().height;
- if (vh == 0) {
- Rectangle trim= te.computeTrim(0, 0, 0, 0);
- int scrollbarHeight= trim.height;
-
- int headerHeight= getHeaderHeight();
-
- Composite composite= (Composite) getControl();
- Rectangle r= composite.getClientArea();
-
- vh= r.height-headerHeight-scrollbarHeight;
- }
-
- return vh / te.getLineHeight();
- }
-
- /**
- * Returns the virtual position for the given view position.
- */
- private int realToVirtualPosition(MergeSourceViewer w, int vpos) {
-
- if (! fSynchronizedScrolling || fAllDiffs == null)
- return vpos;
-
- int viewPos= 0; // real view position
- int virtualPos= 0; // virtual position
- Point region= new Point(0, 0);
-
- Iterator e= fAllDiffs.iterator();
- while (e.hasNext()) {
- Diff diff= (Diff) e.next();
- Position pos= diff.getPosition(w);
- w.getLineRange(pos, region);
- int realHeight= region.y;
- int virtualHeight= diff.getMaxDiffHeight(fShowAncestor);
- if (vpos <= viewPos + realHeight) { // OK, found!
- vpos-= viewPos; // make relative to this slot
- // now scale position within this slot to virtual slot
- if (realHeight <= 0)
- vpos= 0;
- else
- vpos= (vpos*virtualHeight)/realHeight;
- return virtualPos+vpos;
- }
- viewPos+= realHeight;
- virtualPos+= virtualHeight;
- }
- return virtualPos;
- }
-
- private void scrollVertical(int avpos, int lvpos, int rvpos, MergeSourceViewer allBut) {
-
- int s= 0;
-
- if (fSynchronizedScrolling) {
- s= getVirtualHeight() - rvpos;
- int height= fRight.getViewportLines()/4;
- if (s < 0)
- s= 0;
- if (s > height)
- s= height;
- }
-
- fInScrolling= true;
-
- if (isThreeWay() && allBut != fAncestor) {
- if (fSynchronizedScrolling || allBut == null) {
- int y= virtualToRealPosition(fAncestor, avpos+s)-s;
- fAncestor.vscroll(y);
- }
- }
-
- if (allBut != fLeft) {
- if (fSynchronizedScrolling || allBut == null) {
- int y= virtualToRealPosition(fLeft, lvpos+s)-s;
- fLeft.vscroll(y);
- }
- }
-
- if (allBut != fRight) {
- if (fSynchronizedScrolling || allBut == null) {
- int y= virtualToRealPosition(fRight, rvpos+s)-s;
- fRight.vscroll(y);
- }
- }
-
- fInScrolling= false;
-
- if (isThreeWay() && fAncestorCanvas != null)
- fAncestorCanvas.repaint();
-
- if (fLeftCanvas != null)
- fLeftCanvas.repaint();
-
- Control center= getCenter();
- if (center instanceof BufferedCanvas)
- ((BufferedCanvas)center).repaint();
-
- if (fRightCanvas != null)
- fRightCanvas.repaint();
- }
-
- /**
- * Updates Scrollbars with viewports.
- */
- private void syncViewport(MergeSourceViewer w) {
-
- if (fInScrolling)
- return;
-
- int ix= w.getTopIndex();
- int ix2= w.getDocumentRegionOffset();
-
- int viewPosition= realToVirtualPosition(w, ix-ix2);
-
- scrollVertical(viewPosition, viewPosition, viewPosition, w); // scroll all but the given views
-
- if (fVScrollBar != null) {
- int value= Math.max(0, Math.min(viewPosition, getVirtualHeight() - getViewportHeight()));
- fVScrollBar.setSelection(value);
- //refreshBirdEyeView();
- }
- }
-
- /**
- */
- private void updateVScrollBar() {
-
- if (Utilities.okToUse(fVScrollBar) && fSynchronizedScrolling) {
- int virtualHeight= getVirtualHeight();
- int viewPortHeight= getViewportHeight();
- int pageIncrement= viewPortHeight-1;
- int thumb= (viewPortHeight > virtualHeight) ? virtualHeight : viewPortHeight;
-
- fVScrollBar.setPageIncrement(pageIncrement);
- fVScrollBar.setMaximum(virtualHeight);
- fVScrollBar.setThumb(thumb);
- }
- }
-
- /**
- * maps given virtual position into a real view position of this view.
- */
- private int virtualToRealPosition(MergeSourceViewer part, int v) {
-
- if (! fSynchronizedScrolling || fAllDiffs == null)
- return v;
-
- int virtualPos= 0;
- int viewPos= 0;
- Point region= new Point(0, 0);
-
- Iterator e= fAllDiffs.iterator();
- while (e.hasNext()) {
- Diff diff= (Diff) e.next();
- Position pos= diff.getPosition(part);
- int viewHeight= part.getLineRange(pos, region).y;
- int virtualHeight= diff.getMaxDiffHeight(fShowAncestor);
- if (v < (virtualPos + virtualHeight)) {
- v-= virtualPos; // make relative to this slot
- if (viewHeight <= 0) {
- v= 0;
- } else {
- v= (v*viewHeight)/virtualHeight;
- }
- return viewPos+v;
- }
- virtualPos+= virtualHeight;
- viewPos+= viewHeight;
- }
- return viewPos;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewerResources.properties b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewerResources.properties
deleted file mode 100644
index 9cabb43db..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewerResources.properties
+++ /dev/null
@@ -1,91 +0,0 @@
-# =====================================
-# (c) Copyright IBM Corp. 2000, 2001.
-# All Rights Reserved.
-# =====================================
-# @(#)TextMergeViewerResources.properties
-#
-# Resource strings for TextMergeViewer.java
-
-title= Text Compare
-
-saveDialog.title= Save Resource
-saveDialog.message= Resource has been modified. Save changes?
-
-compareProgressTask.title= Computing Differences...
-
-tooComplexError.title= Error
-tooComplexError.format= Too many differences. Try to turn on the ''Ignore White Space'' option or do a structure compare first.
-
-#####################################################
-# Toolbar actions
-#####################################################
-
-action.CopyLeftToRight.label=Copy Left to Right
-action.CopyLeftToRight.tooltip=Copy All from Left to Right
-action.CopyLeftToRight.image=copy_r_co.gif
-
-action.CopyRightToLeft.label=Copy Right to Left
-action.CopyRightToLeft.tooltip=Copy All from Right to Left
-action.CopyRightToLeft.image=copy_l_co.gif
-
-action.CopyDiffLeftToRight.label=Copy Current Diff
-action.CopyDiffLeftToRight.tooltip=Copy Current Change from Left to Right
-action.CopyDiffLeftToRight.image=copycont_r_co.gif
-
-action.CopyDiffRightToLeft.label=Copy Current Diff
-action.CopyDiffRightToLeft.tooltip=Copy Current Change from Right to Left
-action.CopyDiffRightToLeft.image=copycont_l_co.gif
-
-action.NextDiff.label=Next
-action.NextDiff.tooltip=Select Next Change
-action.NextDiff.image=next_nav.gif
-
-action.PrevDiff.label=Previous
-action.PrevDiff.tooltip=Select Previous Change
-action.PrevDiff.image=prev_nav.gif
-
-action.EnableAncestor.label=Enable Ancestor Pane
-action.EnableAncestor.tooltip.unchecked=Show Ancestor Pane
-action.EnableAncestor.tooltip.checked=Hide Ancestor Pane
-action.EnableAncestor.description.unchecked=Show Ancestor Pane
-action.EnableAncestor.description.checked=Hide Ancestor Pane
-action.EnableAncestor.image=ancestorpane_co.gif
-
-action.IgnoreAncestor.label=Ignore Ancestor
-action.IgnoreAncestor.tooltip.unchecked=Two-Way Compare (Ignore Ancestor)
-action.IgnoreAncestor.tooltip.checked=Three-Way Compare
-action.IgnoreAncestor.description.unchecked=Two-Way Compare (Ignore Ancestor)
-action.IgnoreAncestor.description.checked=Three-Way Compare
-action.IgnoreAncestor.image=twowaycompare_co.gif
-
-
-#####################################################
-# Context menu actions
-#####################################################
-
-action.undo.label=Undo@Ctrl+Z
-action.undo.tooltip=Undo Last Operation
-
-action.redo.label=Redo@Ctrl+Y
-action.redo.tooltip=Redo Last Operation
-
-action.cut.label=Cut@Ctrl+X
-action.cut.tooltip=Cut Text Selection to Clipboard
-
-action.copy.label=Copy@Ctrl+C
-action.copy.tooltip=Copy Text Selection to Clipboard
-
-action.paste.label=Paste@Ctrl+V
-action.paste.tooltip=Replace Text Selection with Clipboard
-
-action.delete.label=Delete
-action.delete.tooltip=Delete Current Text Selection
-
-action.find.label=Find...@Ctrl+F
-action.find.tooltip=Find Occurrence
-
-action.selectAll.label=Select All@Ctrl+A
-action.selectAll.tooltip=Select All Changes
-
-action.save.label=Save@Ctrl+S
-action.save.tooltip=Save Changes
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/package.html b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/package.html
deleted file mode 100644
index 28d91eedb..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/package.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Support for compare and merge viewers which show the
-content side-by-side.
-<h2>
-Package Specification</h2>
-The <tt>ContentMergeViewer</tt> is an abstract compare and merge viewer
-with two side-by-side content areas and an optional content area for a
-common ancestor (for three-way compare). Because the implementation makes
-no assumptions about the content type it is a subclass responsibility to
-deal with a specific type.
-<p>A <tt>ContentMergeViewer</tt> accesses its model by means of a content
-provider which must implement the
-<br><tt>IMergeViewerContentProvider</tt> interface.
-<p>The <tt>TextMergeViewer</tt> is the standard concrete subclass of <tt>ContentMergeViewer</tt>.
-A text merge viewer uses the <tt>RangeDifferencer</tt> to perform a textual,
-line-by-line comparison of two (or three) input documents. For text lines
-that differ the <tt>TextMergeViewer</tt> uses an <tt>ITokenComparator</tt>
-to find longest sequences of matching and non-matching tokens. The <tt>TextMergeViewer</tt>'s
-default token compare works on characters separated by whitespace. If a
-different strategy is needed (for example, Java tokens in a Java-aware
-merge viewer), clients can create their own token comparators by implementing
-the <tt>ITokenComparator</tt> interface.
-<p>The <tt>TextMergeViewer</tt> not only works on whole documents but on
-subranges of documents too. In this case the viewer's input must be an
-<tt>IDocumentRange</tt> instead of an <tt>IDocument</tt>.
-</body>
-</html>
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/AbstractViewer.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/AbstractViewer.java
deleted file mode 100644
index 85ffba16e..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/AbstractViewer.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.Viewer;
-
-
-public abstract class AbstractViewer extends Viewer {
-
- public void setInput(Object input) {
- }
-
- public Object getInput() {
- return null;
- }
-
- public ISelection getSelection() {
- return null;
- }
-
- public void setSelection(ISelection s, boolean reveal) {
- }
-
- public void refresh() {
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryAction.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryAction.java
deleted file mode 100644
index b9429f0d2..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryAction.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.util.ResourceBundle;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.swt.widgets.Shell;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-import org.eclipse.ui.IActionDelegate;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-
-
-public class AddFromHistoryAction implements IActionDelegate {
-
- private static final String BUNDLE_NAME= "org.eclipse.compare.internal.AddFromHistoryAction"; //$NON-NLS-1$
-
- private ISelection fSelection;
-
- public AddFromHistoryAction() {
- }
-
- public void selectionChanged(IAction a, ISelection s) {
- fSelection= s;
- }
-
- public void run(IAction action) {
-
- ResourceBundle bundle= ResourceBundle.getBundle(BUNDLE_NAME);
- String title= Utilities.getString(bundle, "title"); //$NON-NLS-1$
-
- Shell parentShell= CompareUIPlugin.getShell();
- AddFromHistoryDialog dialog= null;
-
- Object[] s= Utilities.getResources(fSelection);
-
- for (int i= 0; i < s.length; i++) {
- Object o= s[i];
- if (o instanceof IContainer) {
- IContainer container= (IContainer) o;
-
- ProgressMonitorDialog pmdialog= new ProgressMonitorDialog(parentShell);
- IProgressMonitor pm= pmdialog.getProgressMonitor();
- IFile[] states= null;
- try {
- states= container.findDeletedMembersWithHistory(IContainer.DEPTH_INFINITE, pm);
- } catch (CoreException ex) {
- pm.done();
- }
-
- if (states == null || states.length <= 0) {
- String msg= Utilities.getString(bundle, "noLocalHistoryError"); //$NON-NLS-1$
- MessageDialog.openInformation(parentShell, title, msg);
- return;
- }
-
- if (dialog == null)
- dialog= new AddFromHistoryDialog(parentShell, bundle);
-
- if (dialog.select(container, states)) {
-
- AddFromHistoryDialog.HistoryInput[] selected= dialog.getSelected();
-
- if (selected != null && selected.length > 0) {
- try {
- updateWorkspace(bundle, parentShell, selected);
-
- } catch (InterruptedException x) {
- // Do nothing. Operation has been canceled by user.
-
- } catch (InvocationTargetException x) {
- String reason= x.getTargetException().getMessage();
- MessageDialog.openError(parentShell, title, Utilities.getFormattedString(bundle, "replaceError", reason)); //$NON-NLS-1$
- }
- }
- }
- }
- }
- }
-
- private void createContainers(IResource resource) throws CoreException {
- IContainer container= resource.getParent();
- if (container instanceof IFolder) {
- IFolder parent= (IFolder) container;
- if (parent != null && !parent.exists()) {
- createContainers(parent);
- parent.create(false, true, null);
- }
- }
- }
-
- private void updateWorkspace(final ResourceBundle bundle, Shell shell,
- final AddFromHistoryDialog.HistoryInput[] selected)
- throws InvocationTargetException, InterruptedException {
-
- WorkspaceModifyOperation operation= new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor pm) throws InvocationTargetException {
- try {
- String taskName= Utilities.getString(bundle, "taskName"); //$NON-NLS-1$
- pm.beginTask(taskName, selected.length);
-
- for (int i= 0; i < selected.length; i++) {
- IFile file= selected[i].fFile;
- IFileState fileState= selected[i].fFileState;
- createContainers(file);
-
- SubProgressMonitor subMonitor= new SubProgressMonitor(pm, 1);
- try {
- file.create(fileState.getContents(), false, subMonitor);
- } finally {
- subMonitor.done();
- }
- }
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- pm.done();
- }
- }
- };
-
- ProgressMonitorDialog pmdialog= new ProgressMonitorDialog(shell);
- pmdialog.run(false, true, operation);
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryAction.properties b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryAction.properties
deleted file mode 100644
index 4c3e7dbcd..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryAction.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-# =====================================
-# (c) Copyright IBM Corp. 2000, 2001.
-# All Rights Reserved.
-# =====================================
-
-# @(#)AddFromHistoryAction.properties
-#
-# Resources for AddFromHistoryAction.java
-
-title= Restore from Local History
-
-memberPaneTitle= {0} - Available Files in Local History:
-
-treeTitleFormat= Local History of ''{0}''
-dateIcon= obj16/day_obj.gif
-timeIcon= obj16/resource_obj.gif
-
-memberDescription= Check files to restore from the local history:
-editionDescription= Select an edition of a file:
-
-treeFormat= {0}
-workspaceTreeFormat= {0} (Workspace File)
-parseErrorFormat= {0} (Parse Error)
-
-editionLabel= Local History ({0})
-workspaceEditionLabel= Workspace File
-
-targetLabel= {0}
-
-todayFormat= Today ({0})
-yesterdayFormat= Yesterday ({0})
-dayFormat= {0}
-
-buttonLabel= Restore
-
-noLocalHistoryError= No deleted resources in local history for selected container.
-replaceError=Can''t replace resource (reason: {0}).
-
-taskName=Restoring \ No newline at end of file
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryDialog.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryDialog.java
deleted file mode 100644
index b27427690..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryDialog.java
+++ /dev/null
@@ -1,449 +0,0 @@
-package org.eclipse.compare.internal;
-
-import java.io.*;
-import java.text.*;
-import java.util.*;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.Viewer;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-
-import org.eclipse.compare.*;
-
-
-public class AddFromHistoryDialog extends ResizableDialog {
-
- static class HistoryInput implements ITypedElement, IStreamContentAccessor, IModificationDate {
- IFile fFile;
- IFileState fFileState;
-
- HistoryInput(IFile file, IFileState fileState) {
- fFile= file;
- fFileState= fileState;
- }
- public InputStream getContents() throws CoreException {
- return new BufferedInputStream(fFileState.getContents());
- }
- public String getName() {
- return fFile.getName();
- }
- public String getType() {
- return fFile.getFileExtension();
- }
- public Image getImage() {
- return CompareUI.getImage(fFile);
- }
- public long getModificationDate() {
- return fFileState.getModificationTime();
- }
- }
-
- static class FileHistory {
- private IFile fFile;
- private IFileState[] fStates;
- private int fSelected;
-
- FileHistory(IFile file) {
- fFile= file;
- }
-
- IFile getFile() {
- return fFile;
- }
-
- IFileState[] getStates() {
- if (fStates == null) {
- try {
- fStates= fFile.getHistory(new NullProgressMonitor());
- } catch (CoreException ex) {
- }
- }
- return fStates;
- }
-
- IFileState getSelectedState() {
- return getStates()[fSelected];
- }
-
- void setSelected(IFileState state) {
- for (int i= 0; i < fStates.length; i++) {
- if (fStates[i] == state) {
- fSelected= i;
- return;
- }
- }
- }
-
- HistoryInput getHistoryInput() {
- return new HistoryInput(fFile, getSelectedState());
- }
-
- boolean isSelected(int index) {
- return index == fSelected;
- }
- }
-
- private CompareConfiguration fCompareConfiguration;
- private ArrayList fArrayList= new ArrayList();
- private FileHistory fCurrentFileHistory;
-
- // SWT controls
- private CompareViewerSwitchingPane fContentPane;
- private Button fCommitButton;
- private Table fMemberTable;
- private CompareViewerPane fMemberPane;
- private Tree fEditionTree;
- private CompareViewerPane fEditionPane;
- private Image fDateImage;
- private Image fTimeImage;
- private CompareViewerSwitchingPane fStructuredComparePane;
-
-
- public AddFromHistoryDialog(Shell parent, ResourceBundle bundle) {
- super(parent, bundle);
-
- String iconName= Utilities.getString(fBundle, "dateIcon", "obj16/day_obj.gif"); //$NON-NLS-2$ //$NON-NLS-1$
- ImageDescriptor id= CompareUIPlugin.getImageDescriptor(iconName);
- if (id != null)
- fDateImage= id.createImage();
- iconName= Utilities.getString(fBundle, "timeIcon", "obj16/resource_obj.gif"); //$NON-NLS-1$ //$NON-NLS-2$
- id= CompareUIPlugin.getImageDescriptor(iconName);
- if (id != null)
- fTimeImage= id.createImage();
- }
-
- public boolean select(IContainer root, IFile[] inputFiles) {
-
- create(); // create widgets
-
- String format= Utilities.getString(fBundle, "memberPaneTitle"); //$NON-NLS-1$
- String title= MessageFormat.format(format, new Object[] { root.getName() });
- fMemberPane.setImage(CompareUI.getImage(root));
- fMemberPane.setText(title);
-
- // sort input files
- final int count= inputFiles.length;
- final IFile[] files= new IFile[count];
- for (int i= 0; i < count; i++)
- files[i]= (IFile) inputFiles[i];
- if (count > 1)
- internalSort(files, 0, count-1);
-
-
- String prefix= root.getFullPath().toString();
-
- if (fMemberTable != null && !fMemberTable.isDisposed()) {
- for (int i= 0; i < files.length; i++) {
- IFile file= files[i];
- String path= file.getFullPath().toString();
- if (path.startsWith(prefix))
- path= path.substring(prefix.length()+1);
- TableItem ti= new TableItem(fMemberTable, SWT.NONE);
- ti.setImage(CompareUI.getImage(file));
- ti.setText(path);
- ti.setData(new FileHistory(file));
- }
- }
-
- open();
-
- return (getReturnCode() == OK) && (fArrayList.size() > 0);
- }
-
- HistoryInput[] getSelected() {
- HistoryInput[] selected= new HistoryInput[fArrayList.size()];
- Iterator iter= fArrayList.iterator();
- for (int i= 0; iter.hasNext(); i++) {
- FileHistory h= (FileHistory) iter.next();
- selected[i]= h.getHistoryInput();
- }
- return selected;
- }
-
- protected synchronized Control createDialogArea(Composite parent) {
-
- getShell().setText(Utilities.getString(fBundle, "title")); //$NON-NLS-1$
-
- Splitter vsplitter= new Splitter(parent, SWT.VERTICAL);
- vsplitter.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL
- | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_VERTICAL));
-
- vsplitter.addDisposeListener(
- new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- if (fDateImage != null)
- fDateImage.dispose();
- if (fTimeImage != null)
- fTimeImage.dispose();
- }
- }
- );
-
- // we need two panes: the left for the elements, the right one for the editions
- Splitter hsplitter= new Splitter(vsplitter, SWT.HORIZONTAL);
-
- Composite c= new Composite(hsplitter, SWT.NONE);
- GridLayout layout= new GridLayout();
- layout.marginWidth= 0;
- layout.marginHeight= 2;
- layout.verticalSpacing= 2;
- layout.numColumns= 1;
- c.setLayout(layout);
- Label l1= new Label(c, SWT.NONE);
- l1.setText(Utilities.getString(fBundle, "memberDescription")); //$NON-NLS-1$
- fMemberPane= new CompareViewerPane(c, SWT.BORDER | SWT.FLAT);
- GridData gd= new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
- fMemberPane.setLayoutData(gd);
-
- fMemberTable= new Table(fMemberPane, SWT.CHECK | SWT.H_SCROLL | SWT.V_SCROLL);
- fMemberTable.addSelectionListener(
- new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- if (e.detail == SWT.CHECK) {
- if (e.item instanceof TableItem) {
- TableItem ti= (TableItem) e.item;
- if (ti.getChecked())
- fArrayList.add(ti.getData());
- else
- fArrayList.remove(ti.getData());
-
- if (fCommitButton != null)
- fCommitButton.setEnabled(fArrayList.size() > 0);
- }
- } else {
- handleMemberSelect(e.item);
- }
- }
- }
- );
-
- fMemberPane.setContent(fMemberTable);
-
- c= new Composite(hsplitter, SWT.NONE);
- layout= new GridLayout();
- layout.marginWidth= 0;
- layout.marginHeight= 2;
- layout.verticalSpacing= 2;
- layout.numColumns= 1;
- c.setLayout(layout);
- Label l2= new Label(c, SWT.NONE);
- l2.setText(Utilities.getString(fBundle, "editionDescription")); //$NON-NLS-1$
- fEditionPane= new CompareViewerPane(c, SWT.BORDER | SWT.FLAT);
- gd= new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
- fEditionPane.setLayoutData(gd);
-
- fEditionTree= new Tree(fEditionPane, SWT.H_SCROLL | SWT.V_SCROLL);
- fEditionTree.addSelectionListener(
- new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- feedContent(e.item);
- }
- }
- );
- fEditionPane.setContent(fEditionTree);
-
- fContentPane= new CompareViewerSwitchingPane(vsplitter, SWT.BORDER | SWT.FLAT) {
- protected Viewer getViewer(Viewer oldViewer, Object input) {
- return CompareUIPlugin.findContentViewer(oldViewer, input, this, fCompareConfiguration);
- }
- };
- vsplitter.setWeights(new int[] { 30, 70 });
-
- return vsplitter;
- }
-
- /**
- * Feeds selection from member viewer to edition viewer.
- */
- private void handleMemberSelect(Widget w) {
- Object data= w.getData();
- if (data instanceof FileHistory) {
-
- FileHistory h= (FileHistory) data;
- fCurrentFileHistory= h;
-
- IFile file= h.getFile();
- IFileState[] states= h.getStates();
-
- fEditionPane.setImage(CompareUI.getImage(file));
- String pattern= Utilities.getString(fBundle, "treeTitleFormat"); //$NON-NLS-1$
- String title= MessageFormat.format(pattern, new Object[] { file.getName() });
- fEditionPane.setText(title);
-
- if (fEditionTree != null) {
- fEditionTree.setRedraw(false);
- fEditionTree.removeAll();
- for (int i= 0; i < states.length; i++) {
- addEdition(new HistoryInput(file, states[i]), h.isSelected(i));
- }
- fEditionTree.setRedraw(true);
- }
- } else
- fCurrentFileHistory= null;
- }
-
- /**
- * Adds the given Pair to the edition tree.
- * It takes care of creating tree nodes for different dates.
- */
- private void addEdition(HistoryInput input, boolean isSelected) {
- if (fEditionTree == null || fEditionTree.isDisposed())
- return;
-
- IFileState state= input.fFileState;
-
- // find last day
- TreeItem[] days= fEditionTree.getItems();
- TreeItem lastDay= null;
- if (days.length > 0)
- lastDay= days[days.length-1];
-
- long ldate= state.getModificationTime();
- long day= dayNumber(ldate);
- Date date= new Date(ldate);
- if (lastDay == null || day != dayNumber(((Date)lastDay.getData()).getTime())) {
- lastDay= new TreeItem(fEditionTree, SWT.NONE);
- lastDay.setImage(fDateImage);
- String df= DateFormat.getDateInstance().format(date);
- long today= dayNumber(System.currentTimeMillis());
-
- String formatKey;
- if (day == today)
- formatKey= "todayFormat"; //$NON-NLS-1$
- else if (day == today-1)
- formatKey= "yesterdayFormat"; //$NON-NLS-1$
- else
- formatKey= "dayFormat"; //$NON-NLS-1$
- String pattern= Utilities.getString(fBundle, formatKey);
- if (pattern != null)
- df= MessageFormat.format(pattern, new String[] { df });
- lastDay.setText(df);
- lastDay.setData(date);
- }
- TreeItem ti= new TreeItem(lastDay, SWT.NONE);
- ti.setImage(fTimeImage);
- ti.setText(DateFormat.getTimeInstance().format(date));
- ti.setData(input);
-
- if (isSelected) {
- lastDay.setExpanded(true);
- fEditionTree.setSelection(new TreeItem[] { ti });
- feedContent(ti);
- }
- }
-
- /**
- * Returns the number of s since Jan 1st, 1970.
- * The given date is converted to GMT and daylight saving is taken into account too.
- */
- private long dayNumber(long date) {
- int ONE_DAY_MS= 24*60*60 * 1000; // one day in milli seconds
-
- Calendar calendar= Calendar.getInstance();
- long localTimeOffset= calendar.get(Calendar.ZONE_OFFSET) + calendar.get(Calendar.DST_OFFSET);
-
- return (date + localTimeOffset) / ONE_DAY_MS;
- }
-
- /**
- * Feeds the tree viewer's selection to the contentviewer
- */
- private void feedContent(Widget w) {
- if (fContentPane != null && !fContentPane.isDisposed()) {
- Object o= w.getData();
- if (o instanceof HistoryInput) {
- HistoryInput selected= (HistoryInput) o;
- fContentPane.setInput(selected);
- fContentPane.setText(getEditionLabel(selected));
- fContentPane.setImage(fTimeImage);
-
- if (fCurrentFileHistory != null)
- fCurrentFileHistory.setSelected(selected.fFileState);
- } else {
- fContentPane.setInput(null);
- }
- }
- }
-
- protected String getEditionLabel(HistoryInput input) {
- String format= Utilities.getString(fBundle, "historyEditionLabel", null); //$NON-NLS-1$
- if (format == null)
- format= Utilities.getString(fBundle, "editionLabel"); //$NON-NLS-1$
- if (format == null)
- format= "x{0}"; //$NON-NLS-1$
-
- long modDate= input.getModificationDate();
- String date= DateFormat.getDateTimeInstance().format(new Date(modDate));
-
- return MessageFormat.format(format, new Object[] { date });
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected void createButtonsForButtonBar(Composite parent) {
- String buttonLabel= Utilities.getString(fBundle, "buttonLabel", IDialogConstants.OK_LABEL); //$NON-NLS-1$
- // a 'Cancel' and a 'Add' button
- fCommitButton= createButton(parent, IDialogConstants.OK_ID, buttonLabel, true);
- fCommitButton.setEnabled(false);
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
- }
-
- /**
- * Returns true if the pathname of f1 comes after f2
- */
- private static boolean greaterThan(IFile f1, IFile f2) {
- String[] ss1= f1.getFullPath().segments();
- String[] ss2= f2.getFullPath().segments();
- int l1= ss1.length;
- int l2= ss2.length;
- int n= Math.max(l1, l2);
-
- for (int i= 0; i < n; i++) {
- String s1= i < l1 ? ss1[i] : ""; //$NON-NLS-1$
- String s2= i < l2 ? ss2[i] : ""; //$NON-NLS-1$
- int rc= s1.compareToIgnoreCase(s2);
- if (rc != 0)
- return rc < 0;
- }
- return false;
- }
-
- private static void internalSort(IFile[] keys, int left, int right) {
-
- int original_left= left;
- int original_right= right;
-
- IFile mid= keys[(left + right) / 2];
- do {
- while (greaterThan(keys[left], mid))
- left++;
-
- while (greaterThan(mid, keys[right]))
- right--;
-
- if (left <= right) {
- IFile tmp= keys[left];
- keys[left]= keys[right];
- keys[right]= tmp;
- left++;
- right--;
- }
- } while (left <= right);
-
- if (original_left < right)
- internalSort(keys, original_left, right);
-
- if (left < original_right)
- internalSort(keys, left, original_right);
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewer.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewer.java
deleted file mode 100644
index c1ff3bda9..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewer.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.io.*;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ResourceBundle;
-import java.text.MessageFormat;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-
-/**
- * A simple compare viewer for binary files.
- * Shows the position of the first non-matching byte.
- */
-public class BinaryCompareViewer extends AbstractViewer {
-
- private static final String BUNDLE_NAME= "org.eclipse.compare.internal.BinaryCompareViewerResources"; //$NON-NLS-1$
-
- private static final int EOF= -1;
- private Text fControl;
- private ICompareInput fInput;
- private ResourceBundle fBundle;
- private boolean fLeftIsLocal;
-
-
- public BinaryCompareViewer(Composite parent, CompareConfiguration cc) {
-
- fBundle= ResourceBundle.getBundle(BUNDLE_NAME);
-
- fControl= new Text(parent, SWT.NONE);
- fControl.setEditable(false);
- fControl.setData(CompareUI.COMPARE_VIEWER_TITLE, Utilities.getString(fBundle, "title")); //$NON-NLS-1$
-
- fLeftIsLocal= Utilities.getBoolean(cc, "LEFT_IS_LOCAL", false); //$NON-NLS-1$
- }
-
- public Control getControl() {
- return fControl;
- }
-
- public void setInput(Object input) {
- if (fControl != null && input instanceof ICompareInput) {
- fInput= (ICompareInput) input;
-
- InputStream left= null;
- InputStream right= null;
-
- String message= null;
- try {
- left= getStream(fInput.getLeft());
- right= getStream(fInput.getRight());
-
- if (left != null && right != null) {
- int pos= 0;
- while (true) {
- int l= left.read();
- int r= right.read();
- if (l != r) {
- String format= Utilities.getString(fBundle, "diffMessageFormat"); //$NON-NLS-1$
- message= MessageFormat.format(format, new String[] { Integer.toString(pos) } );
- break;
- }
- if (l == EOF)
- break;
- pos++;
- }
- } else if (left == null && right == null) {
- message= Utilities.getString(fBundle, "deleteConflictMessage"); //$NON-NLS-1$
- } else if (left == null) {
- if (fLeftIsLocal)
- message= Utilities.getString(fBundle, "deletedMessage"); //$NON-NLS-1$
- else
- message= Utilities.getString(fBundle, "addedMessage"); //$NON-NLS-1$
- } else if (right == null) {
- if (fLeftIsLocal)
- message= Utilities.getString(fBundle, "addedMessage"); //$NON-NLS-1$
- else
- message= Utilities.getString(fBundle, "deletedMessage"); //$NON-NLS-1$
- }
- } catch (CoreException ex) {
- message= Utilities.getString(fBundle, "errorMessage"); //$NON-NLS-1$
- } catch (IOException ex) {
- message= Utilities.getString(fBundle, "errorMessage"); //$NON-NLS-1$
- } finally {
- if (left != null) {
- try {
- left.close();
- } catch (IOException ex) {
- }
- }
- if (right != null) {
- try {
- right.close();
- } catch (IOException ex) {
- }
- }
- }
- if (message != null)
- fControl.setText(message);
- }
- }
-
- public Object getInput() {
- return fInput;
- }
-
- private InputStream getStream(ITypedElement input) throws CoreException {
- if (input instanceof IStreamContentAccessor)
- return ((IStreamContentAccessor)input).getContents();
- return null;
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewerCreator.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewerCreator.java
deleted file mode 100644
index 364785dc8..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewerCreator.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.jface.viewers.Viewer;
-
-import org.eclipse.compare.*;
-
-/**
- * A factory object for the <code>BinaryCompareViewer</code>.
- * This indirection is necessary because only objects with a default
- * constructor can be created via an extension point
- * (this precludes Viewers).
- */
-public class BinaryCompareViewerCreator implements IViewerCreator {
-
- public Viewer createViewer(Composite parent, CompareConfiguration mp) {
- return new BinaryCompareViewer(parent, mp);
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewerResources.properties b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewerResources.properties
deleted file mode 100644
index 2900356a5..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewerResources.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-# =====================================
-# (c) Copyright IBM Corp. 2000, 2001.
-# All Rights Reserved.
-# =====================================
-
-# @(#)BinaryCompareViewerResources.properties
-#
-# Resource strings for BinaryCompareViewer.java
-
-title= Binary Compare
-
-diffMessageFormat= First bytes differ at position {0}
-deleteConflictMessage= Delete Conflict
-addedMessage= Added Resource
-deletedMessage= Removed Resource
-errorMessage= Internal Error
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/BufferedCanvas.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/BufferedCanvas.java
deleted file mode 100644
index 1a1bdd3e9..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/BufferedCanvas.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.events.*;
-
-/**
- * A Canvas which reduces flicker by drawing in an off screen buffer.
- */
-public abstract class BufferedCanvas extends Canvas {
-
- /** The drawable for double buffering */
- private Image fBuffer;
-
- public BufferedCanvas(Composite parent, int flags) {
- super(parent, flags + SWT.NO_BACKGROUND);
-
- addPaintListener(
- new PaintListener() {
- public void paintControl(PaintEvent event) {
- doubleBufferPaint(event.gc);
- }
- }
- );
-
- addDisposeListener(
- new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- if (fBuffer != null) {
- fBuffer.dispose();
- fBuffer= null;
- }
- }
- }
- );
- }
-
- public void repaint() {
- if (!isDisposed()) {
- GC gc= new GC(this);
- doubleBufferPaint(gc);
- gc.dispose();
- }
- }
-
- /**
- * Double buffer drawing.
- * @private
- */
- private void doubleBufferPaint(GC dest) {
-
- Point size= getSize();
-
- if (size.x <= 0 || size.y <= 0)
- return;
-
- if (fBuffer != null) {
- Rectangle r= fBuffer.getBounds();
- if (r.width != size.x || r.height != size.y) {
- fBuffer.dispose();
- fBuffer= null;
- }
- }
- if (fBuffer == null)
- fBuffer= new Image(getDisplay(), size.x, size.y);
-
- GC gc= new GC(fBuffer);
- try {
- gc.setBackground(getBackground());
- gc.fillRectangle(0, 0, size.x, size.y);
- doPaint(gc);
- } finally {
- gc.dispose();
- }
-
- dest.drawImage(fBuffer, 0, 0);
- }
-
- abstract public void doPaint(GC gc);
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/BufferedResourceNode.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/BufferedResourceNode.java
deleted file mode 100644
index 8e1b8018e..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/BufferedResourceNode.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.io.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.IStructureComparator;
-
-/**
- * A buffer for a workspace resource.
- */
-public class BufferedResourceNode extends ResourceNode {
-
- private boolean fDirty= false;
- private IFile fDeleteFile;
-
- /**
- * Creates a <code>ResourceNode</code> for the given resource.
- *
- * @param resource the resource
- */
- public BufferedResourceNode(IResource resource) {
- super(resource);
- }
-
- protected IStructureComparator createChild(IResource child) {
- return new BufferedResourceNode(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 {
- 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= Utilities.readBytes(is);
- if (bytes != null)
- dst.setContent(bytes);
- } catch (CoreException ex) {
- }
- }
- return child;
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ChangePropertyAction.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ChangePropertyAction.java
deleted file mode 100644
index 1e76626fa..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ChangePropertyAction.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.compare.CompareConfiguration;
-
-/**
- * Toggles a boolean property of an <code>ICompareConfiguration</code>.
- */
-public class ChangePropertyAction extends Action {
-
- private CompareConfiguration fCompareConfiguration;
- private String fPropertyKey;
- private ResourceBundle fBundle;
- private String fPrefix;
-
-
- public ChangePropertyAction(ResourceBundle bundle, CompareConfiguration cc, String rkey, String pkey) {
- fPropertyKey= pkey;
- fBundle= bundle;
- fPrefix= rkey;
- Utilities.initAction(this, fBundle, fPrefix);
- setCompareConfiguration(cc);
- }
-
- public void run() {
- boolean b= !Utilities.getBoolean(fCompareConfiguration, fPropertyKey, false);
- setChecked(b);
- if (fCompareConfiguration != null)
- fCompareConfiguration.setProperty(fPropertyKey, new Boolean(b));
- }
-
- public void setChecked(boolean state) {
- super.setChecked(state);
- Utilities.initToggleAction(this, fBundle, fPrefix, state);
- }
-
- public void setCompareConfiguration(CompareConfiguration cc) {
- fCompareConfiguration= cc;
- setChecked(Utilities.getBoolean(fCompareConfiguration, fPropertyKey, false));
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ColorEditor.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ColorEditor.java
deleted file mode 100644
index d3aea03f8..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ColorEditor.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.ColorDialog;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-
-import org.eclipse.jface.resource.JFaceResources;
-
-/**
- * A "button" of a certain color determined by the color picker.
- */
-public class ColorEditor {
-
- private Point fExtent;
- private Image fImage;
- private RGB fColorValue;
- private Color fColor;
- private Button fButton;
-
- public ColorEditor(Composite parent) {
-
- fButton= new Button(parent, SWT.PUSH);
- fExtent= computeImageSize(parent);
- fImage= new Image(parent.getDisplay(), fExtent.x, fExtent.y);
-
- GC gc= new GC(fImage);
- gc.setBackground(fButton.getBackground());
- gc.fillRectangle(0, 0, fExtent.x, fExtent.y);
- gc.dispose();
-
- fButton.setImage(fImage);
- fButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- ColorDialog colorDialog= new ColorDialog(fButton.getShell());
- colorDialog.setRGB(fColorValue);
- RGB newColor = colorDialog.open();
- if (newColor != null) {
- fColorValue= newColor;
- updateColorImage();
- }
- }
- });
-
- fButton.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent event) {
- if (fImage != null) {
- fImage.dispose();
- fImage= null;
- }
- if (fColor != null) {
- fColor.dispose();
- fColor= null;
- }
- }
- });
- }
-
- public RGB getColorValue() {
- return fColorValue;
- }
-
- public void setColorValue(RGB rgb) {
- fColorValue= rgb;
- updateColorImage();
- }
-
- public Button getButton() {
- return fButton;
- }
-
- protected void updateColorImage() {
-
- Display display= fButton.getDisplay();
-
- GC gc= new GC(fImage);
- gc.setForeground(display.getSystemColor(SWT.COLOR_BLACK));
- gc.drawRectangle(0, 2, fExtent.x - 1, fExtent.y - 4);
-
- if (fColor != null)
- fColor.dispose();
-
- fColor= new Color(display, fColorValue);
- gc.setBackground(fColor);
- gc.fillRectangle(1, 3, fExtent.x - 2, fExtent.y - 5);
- gc.dispose();
-
- fButton.setImage(fImage);
- }
-
- protected Point computeImageSize(Control window) {
- GC gc= new GC(window);
- Font f= JFaceResources.getFontRegistry().get(JFaceResources.DEFAULT_FONT);
- gc.setFont(f);
- int height= gc.getFontMetrics().getHeight();
- gc.dispose();
- Point p= new Point(height * 3 - 6, height);
- return p;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareAction.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareAction.java
deleted file mode 100644
index 4daf9e54f..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareAction.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-
-import org.eclipse.ui.IActionDelegate;
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.CompareUI;
-
-
-public class CompareAction implements IActionDelegate {
-
- private ResourceCompareInput fInput;
-
- public void run(IAction action) {
- if (fInput != null) {
- CompareUI.openCompareEditor(fInput);
- fInput= null; // don't reuse this input!
- }
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- if (fInput == null) {
- CompareConfiguration cc= new CompareConfiguration();
- // buffered merge mode: don't ask for confirmation
- // when switching between modified resources
- cc.setProperty(CompareEditor.CONFIRM_SAVE_PROPERTY, new Boolean(false));
-
- fInput= new ResourceCompareInput(cc);
- }
- action.setEnabled(fInput.setSelection(selection));
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareDialog.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareDialog.java
deleted file mode 100644
index 6b6c3c49f..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareDialog.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.CompareEditorInput;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.util.Assert;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-
-public class CompareDialog extends ResizableDialog implements IPropertyChangeListener {
-
- private CompareEditorInput fCompareEditorInput;
- private Button fCommitButton;
-
-
- CompareDialog(Shell shell, CompareEditorInput input) {
- super(shell, null);
-
- Assert.isNotNull(input);
- fCompareEditorInput= input;
- fCompareEditorInput.addPropertyChangeListener(this);
- }
-
- public boolean close() {
- if (super.close()) {
- if (fCompareEditorInput != null)
- fCompareEditorInput.addPropertyChangeListener(this);
- return true;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected void createButtonsForButtonBar(Composite parent) {
- fCommitButton= createButton(parent, IDialogConstants.OK_ID, Utilities.getString("CompareDialog.commitAction.label"), true); //$NON-NLS-1$
- fCommitButton.setEnabled(false);
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
- }
-
- public void propertyChange(PropertyChangeEvent event) {
- if (fCommitButton != null && fCompareEditorInput != null)
- fCommitButton.setEnabled(fCompareEditorInput.isSaveNeeded());
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected Control createDialogArea(Composite parent) {
-
- Control c= fCompareEditorInput.createContents(parent);
- c.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Shell shell= c.getShell();
- shell.setText(fCompareEditorInput.getTitle());
- shell.setImage(fCompareEditorInput.getTitleImage());
-
- return c;
- }
-
- /* (non-Javadoc)
- * Method declared on Window.
- */
- public int open() {
-
- int rc= super.open();
-
- if (rc == OK && fCompareEditorInput.isSaveNeeded()) {
-
- WorkspaceModifyOperation operation= new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor pm) throws CoreException {
- fCompareEditorInput.saveChanges(pm);
- }
- };
-
- Shell shell= getParentShell();
- ProgressMonitorDialog pmd= new ProgressMonitorDialog(shell);
- try {
- operation.run(pmd.getProgressMonitor());
-
- } catch (InterruptedException x) {
- } catch (OperationCanceledException x) {
- } catch (InvocationTargetException x) {
- String title= Utilities.getString("CompareDialog.saveErrorTitle"); //$NON-NLS-1$
- String msg= Utilities.getString("CompareDialog.saveErrorMessage"); //$NON-NLS-1$
- MessageDialog.openError(shell, title, msg + x.getTargetException().getMessage());
- }
- }
-
- return rc;
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java
deleted file mode 100644
index 215309b76..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.util.*;
-
-import org.eclipse.ui.*;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-import org.eclipse.ui.part.EditorPart;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.*;
-
-import org.eclipse.compare.*;
-
-
-/**
- * A CompareEditor takes a ICompareEditorInput as input.
- * Most functionality is delegated to the ICompareEditorInput.
- */
-public class CompareEditor extends EditorPart implements IPropertyChangeListener {
-
- public final static String CONFIRM_SAVE_PROPERTY= "org.eclipse.compare.internal.CONFIRM_SAVE_PROPERTY"; //$NON-NLS-1$
-
- private IActionBars fActionBars;
-
-
- public CompareEditor() {
- }
-
- /* package */ CompareConfiguration getCompareConfiguration() {
- IEditorInput input= getEditorInput();
- if (input instanceof CompareEditorInput)
- return ((CompareEditorInput)input).getCompareConfiguration();
- return null;
- }
-
- public void init(IEditorSite site, IEditorInput input) throws PartInitException {
-
- if (!(input instanceof CompareEditorInput))
- throw new PartInitException(Utilities.getString("CompareEditor.invalidInput")); //$NON-NLS-1$
-
- CompareEditorInput cei= (CompareEditorInput) input;
-
- setSite(site);
- setInput(input);
-
- setTitleImage(cei.getTitleImage());
- setTitle(cei.getTitle());
-
- if (input instanceof IPropertyChangeNotifier)
- ((IPropertyChangeNotifier)input).addPropertyChangeListener(this);
- }
-
- public IActionBars getActionBars() {
- return fActionBars;
- }
-
- public void setActionBars(IActionBars actionBars) {
- fActionBars= actionBars;
- }
-
- /*
- * @see IDesktopPart#createPartControl(Composite)
- */
- public void createPartControl(Composite parent) {
- parent.setData(this);
-
- IEditorInput input= getEditorInput();
- if (input instanceof CompareEditorInput)
- ((CompareEditorInput) input).createContents(parent);
- }
-
- /*
- * @see DesktopPart#dispose
- */
- public void dispose() {
-
- IEditorInput input= getEditorInput();
- if (input instanceof IPropertyChangeNotifier)
- ((IPropertyChangeNotifier)input).removePropertyChangeListener(this);
-
- super.dispose();
- }
-
- /*
- * @see IDesktopPart#setFocus
- */
- public void setFocus() {
- IEditorInput input= getEditorInput();
- if (input instanceof CompareEditorInput)
- ((CompareEditorInput)input).setFocus();
- }
-
- /**
- * Returns false because the editor doesn't support "Save As...".
- */
- public boolean isSaveAsAllowed() {
- return false;
- }
-
- public void gotoMarker(IMarker marker) {
- }
-
- /**
- * Always throws an AssertionFailedException.
- */
- /*
- * @see IEditorPart#doSaveAs()
- */
- public void doSaveAs() {
- Assert.isTrue(false); // Save As not supported for CompareEditor
- }
-
- /*
- * @see IEditorPart#doSave()
- */
- public void doSave(IProgressMonitor progressMonitor) {
-
- final IEditorInput input= getEditorInput();
-
- WorkspaceModifyOperation operation= new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor pm) throws CoreException {
- if (input instanceof CompareEditorInput)
- ((CompareEditorInput)input).saveChanges(pm);
- }
- };
-
- Shell shell= getSite().getShell();
-
- try {
-
- operation.run(progressMonitor);
-
- firePropertyChange(PROP_DIRTY);
-
- } catch (InterruptedException x) {
- } catch (OperationCanceledException x) {
- } catch (InvocationTargetException x) {
- String title= Utilities.getString("CompareEditor.saveError.title"); //$NON-NLS-1$
- String reason= x.getTargetException().getMessage();
- MessageDialog.openError(shell, title, Utilities.getFormattedString("CompareEditor.cantSaveError", reason)); //$NON-NLS-1$
- }
- }
-
- /*
- * @see IEditorPart#isDirty()
- */
- public boolean isDirty() {
- IEditorInput input= getEditorInput();
- if (input instanceof CompareEditorInput)
- return ((CompareEditorInput)input).isSaveNeeded();
- return false;
- }
-
- public void propertyChange(PropertyChangeEvent event) {
- if (isDirty())
- firePropertyChange(PROP_DIRTY);
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorContributor.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorContributor.java
deleted file mode 100644
index 186006516..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorContributor.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.jface.action.*;
-
-import org.eclipse.ui.*;
-import org.eclipse.ui.part.EditorActionBarContributor;
-
-import org.eclipse.compare.*;
-
-
-public class CompareEditorContributor extends EditorActionBarContributor {
-
- private IEditorPart fActiveEditorPart= null;
-
- private IgnoreWhiteSpaceAction fIgnoreWhitespace;
- private NavigationAction fNext;
- private NavigationAction fPrevious;
-
- private NavigationAction fToolbarNext;
- private NavigationAction fToolbarPrevious;
-
-
- public CompareEditorContributor() {
- ResourceBundle bundle= CompareUIPlugin.getResourceBundle();
- fIgnoreWhitespace= new IgnoreWhiteSpaceAction(bundle, null);
- fNext= new NavigationAction(bundle, true);
- fPrevious= new NavigationAction(bundle, false);
- fToolbarNext= new NavigationAction(bundle, true);
- fToolbarPrevious= new NavigationAction(bundle, false);
- }
-
- /*
- * @see EditorActionBarContributor#contributeToToolBar(IToolBarManager)
- */
- public void contributeToToolBar(IToolBarManager tbm) {
- tbm.add(new Separator());
- tbm.add(fIgnoreWhitespace);
- tbm.add(fToolbarNext);
- tbm.add(fToolbarPrevious);
- }
-
- /*
- * @see EditorActionBarContributor#contributeToMenu(IMenuManager)
- */
- public void contributeToMenu(IMenuManager menuManager) {
- }
-
- public void setActiveEditor(IEditorPart targetEditor) {
-
- if (fActiveEditorPart == targetEditor)
- return;
-
- fActiveEditorPart= targetEditor;
-
- if (fActiveEditorPart != null) {
- IEditorInput input= fActiveEditorPart.getEditorInput();
- if (input instanceof CompareEditorInput) {
- CompareEditorInput compareInput= (CompareEditorInput) input;
- fNext.setCompareEditorInput(compareInput);
- fPrevious.setCompareEditorInput(compareInput);
- }
- }
-
- if (targetEditor instanceof CompareEditor) {
- IActionBars actionBars= getActionBars();
-
- CompareEditor editor= (CompareEditor) targetEditor;
- editor.setActionBars(actionBars);
-
- actionBars.setGlobalActionHandler(IWorkbenchActionConstants.NEXT, fNext);
- actionBars.setGlobalActionHandler(IWorkbenchActionConstants.PREVIOUS, fPrevious);
-
- CompareConfiguration cc= editor.getCompareConfiguration();
- fIgnoreWhitespace.setCompareConfiguration(cc);
- }
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.java
deleted file mode 100644
index 96b7c0407..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2002.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class CompareMessages {
-
- private static final String RESOURCE_BUNDLE= "org.eclipse.compare.internal.CompareMessages";//$NON-NLS-1$
-
- private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
-
- private CompareMessages() {
- }
-
- public static String getString(String key) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
- }
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.properties b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.properties
deleted file mode 100644
index 7c7e50a81..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.properties
+++ /dev/null
@@ -1,52 +0,0 @@
-# =====================================
-# (c) Copyright IBM Corp. 2002.
-# All Rights Reserved.
-# =====================================
-
-ComparePlugin.internal_error= Internal Error
-ExceptionDialog.seeErrorLogMessage= See error log for more details.
-
-#
-# Title format for CompareViewerSwitchingPane
-#
-CompareViewerSwitchingPane.Titleformat= {0} ({1})
-
-#
-# Title message for StructureDiffViewer if no structural differences could be found
-#
-StructureDiffViewer.NoStructuralDifferences= No Structural Differences
-StructureDiffViewer.StructureError= Can't Compare Structures
-
-#
-# TextMergeViewer
-#
-TextMergeViewer.cursorPosition.format= {0} : {1}
-
-TextMergeViewer.beforeLine.format= before line {0}
-TextMergeViewer.range.format= {0} : {1}
-
-TextMergeViewer.changeType.addition= addition
-TextMergeViewer.changeType.deletion= deletion
-TextMergeViewer.changeType.change= change
-
-TextMergeViewer.direction.outgoing= outgoing
-TextMergeViewer.direction.incoming= incoming
-TextMergeViewer.direction.conflicting= conflicting
-
-TextMergeViewer.diffType.format= {0} {1}
-
-TextMergeViewer.diffDescription.noDiff.format= no diff
-TextMergeViewer.diffDescription.diff.format= {0} #{1} (Left: {2}, Right: {3})
-TextMergeViewer.statusLine.format= Left: {0}, Right: {1}, {2}
-
-TextMergeViewer.atEnd.title= Go to Next Difference
-TextMergeViewer.atEnd.message= End of document reached. Continue at beginning?
-
-TextMergeViewer.atBeginning.title= Go to Previous Difference
-TextMergeViewer.atBeginning.message= Beginning of document reached. Continue at end?
-
-CompareNavigator.atEnd.title= Go to Next Difference
-CompareNavigator.atEnd.message= Last difference reached.
-
-CompareNavigator.atBeginning.title= Go to Previous Difference
-CompareNavigator.atBeginning.message= First difference reached.
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareNavigator.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareNavigator.java
deleted file mode 100644
index 6255c805a..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareNavigator.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.dialogs.MessageDialog;
-
-import org.eclipse.compare.CompareEditorInput;
-import org.eclipse.compare.*;
-
-/**
- * Supports cross-pane navigation through differences.
- * XXX: Design is as it is because the feature had to be added without touching API.
- */
-public class CompareNavigator {
-
- private boolean fLastDirection= true;
- private CompareViewerSwitchingPane[] fPanes;
-
- public CompareNavigator(CompareViewerSwitchingPane[] panes) {
- fPanes= panes;
- }
-
- public CompareViewerSwitchingPane[] getPanes() {
- return fPanes;
- }
-
- public void selectChange(boolean next) {
-
- fLastDirection= next;
-
- // 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;
- }
- // beep
- if (fPanes[0] != null) {
- Control c= fPanes[0].getContent();
- if (c != null) {
- Display display= c.getDisplay();
- if (display != null)
- display.beep();
-
- String title;
- String message;
- if (next) {
- title= CompareMessages.getString("CompareNavigator.atEnd.title"); //$NON-NLS-1$
- message= CompareMessages.getString("CompareNavigator.atEnd.message"); //$NON-NLS-1$
- } else {
- title= CompareMessages.getString("CompareNavigator.atBeginning.title"); //$NON-NLS-1$
- message= CompareMessages.getString("CompareNavigator.atBeginning.message"); //$NON-NLS-1$
- }
- MessageDialog.openInformation(c.getShell(), title, message);
- }
- }
- }
-
- private static INavigatable getNavigator(CompareViewerSwitchingPane pane) {
- 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(INavigatable.NAVIGATOR_PROPERTY);
- if (data instanceof INavigatable)
- return (INavigatable) data;
- 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;
- }
-
- public static boolean getDirection(Control c) {
- CompareNavigator nav= findNavigator(c);
- if (nav != null)
- return nav.resetDirection();
- return true;
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferencePage.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferencePage.java
deleted file mode 100644
index e4dd22515..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferencePage.java
+++ /dev/null
@@ -1,358 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.util.*;
-import java.io.*;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-
-import org.eclipse.jface.preference.*;
-import org.eclipse.jface.util.*;
-
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.texteditor.WorkbenchChainedTextFontFieldEditor;
-import org.eclipse.ui.texteditor.AbstractTextEditor;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.contentmergeviewer.TextMergeViewer;
-import org.eclipse.compare.structuremergeviewer.*;
-
-
-public class ComparePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
-
- class FakeInput implements ITypedElement, IStreamContentAccessor {
- String fContent;
-
- FakeInput(String name) {
- fContent= loadPreviewContentFromFile(name);
- }
- public Image getImage() {
- return null;
- }
- public String getName() {
- return "no name"; //$NON-NLS-1$
- }
- public String getType() {
- return "no type"; //$NON-NLS-1$
- }
- public InputStream getContents() {
- return new ByteArrayInputStream(fContent.getBytes());
- }
- };
-
- private static final String PREFIX= CompareUIPlugin.PLUGIN_ID + "."; //$NON-NLS-1$
- public static final String OPEN_STRUCTURE_COMPARE= PREFIX + "OpenStructureCompare"; //$NON-NLS-1$
- public static final String SYNCHRONIZE_SCROLLING= PREFIX + "SynchronizeScrolling"; //$NON-NLS-1$
- public static final String SHOW_PSEUDO_CONFLICTS= PREFIX + "ShowPseudoConflicts"; //$NON-NLS-1$
- public static final String INITIALLY_SHOW_ANCESTOR_PANE= PREFIX + "InitiallyShowAncestorPane"; //$NON-NLS-1$
- public static final String PREF_SAVE_ALL_EDITORS= PREFIX + "SaveAllEditors"; //$NON-NLS-1$
- public static final String SHOW_MORE_INFO= PREFIX + "ShowMoreInfo"; //$NON-NLS-1$
- public static final String TEXT_FONT= PREFIX + "TextFont"; //$NON-NLS-1$
- public static final String IGNORE_WHITESPACE= PREFIX + "IgnoreWhitespace"; //$NON-NLS-1$
-
- private WorkbenchChainedTextFontFieldEditor fFontEditor;
- private TextMergeViewer fPreviewViewer;
- private IPropertyChangeListener fPreferenceChangeListener;
- private CompareConfiguration fCompareConfiguration;
- private OverlayPreferenceStore fOverlayStore;
- private Map fCheckBoxes= new HashMap();
- private SelectionListener fCheckBoxListener;
-
-
- public final OverlayPreferenceStore.OverlayKey[] fKeys= new OverlayPreferenceStore.OverlayKey[] {
- new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, OPEN_STRUCTURE_COMPARE),
- new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, SYNCHRONIZE_SCROLLING),
- new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, SHOW_PSEUDO_CONFLICTS),
- new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, INITIALLY_SHOW_ANCESTOR_PANE),
- new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, SHOW_MORE_INFO),
- new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, TEXT_FONT),
- new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IGNORE_WHITESPACE),
-
- new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND),
- new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT)
- };
-
-
- public static void initDefaults(IPreferenceStore store) {
- store.setDefault(OPEN_STRUCTURE_COMPARE, true);
- store.setDefault(SYNCHRONIZE_SCROLLING, true);
- store.setDefault(SHOW_PSEUDO_CONFLICTS, false);
- store.setDefault(INITIALLY_SHOW_ANCESTOR_PANE, false);
- store.setDefault(SHOW_MORE_INFO, false);
- store.setDefault(IGNORE_WHITESPACE, false);
-
- Display display= Display.getDefault();
- Color color= display.getSystemColor(SWT.COLOR_LIST_BACKGROUND);
- PreferenceConverter.setDefault(store, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND, color.getRGB());
- store.setDefault(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT, true);
-
- WorkbenchChainedTextFontFieldEditor.startPropagate(store, TEXT_FONT);
- }
-
- public ComparePreferencePage() {
-
- //setDescription(Utilities.getString("ComparePreferencePage.description")); //$NON-NLS-1$
-
- setPreferenceStore(CompareUIPlugin.getDefault().getPreferenceStore());
-
- fOverlayStore= new OverlayPreferenceStore(getPreferenceStore(), fKeys);
- fPreferenceChangeListener= new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- String key= event.getProperty();
- if (key.equals(INITIALLY_SHOW_ANCESTOR_PANE)) {
- boolean b= fOverlayStore.getBoolean(INITIALLY_SHOW_ANCESTOR_PANE);
- if (fCompareConfiguration != null) {
- fCompareConfiguration.setProperty(INITIALLY_SHOW_ANCESTOR_PANE, new Boolean(b));
- }
- }
- }
- };
- fOverlayStore.addPropertyChangeListener(fPreferenceChangeListener);
- }
-
- /*
- * @see IWorkbenchPreferencePage#init()
- */
- public void init(IWorkbench workbench) {
- }
-
- /*
- * @see PreferencePage#performOk()
- */
- public boolean performOk() {
- fFontEditor.store();
- fOverlayStore.propagate();
- return true;
- }
-
- /*
- * @see PreferencePage#performDefaults()
- */
- protected void performDefaults() {
-
- fFontEditor.loadDefault();
-
- fOverlayStore.loadDefaults();
- initializeFields();
-
- super.performDefaults();
- }
-
- /*
- * @see DialogPage#dispose()
- */
- public void dispose() {
-
- fFontEditor.setPreferencePage(null);
- fFontEditor.setPreferenceStore(null);
-
- if (fOverlayStore != null) {
- if (fPreferenceChangeListener != null) {
- fOverlayStore.removePropertyChangeListener(fPreferenceChangeListener);
- fPreferenceChangeListener= null;
- }
- fOverlayStore.stop();
- fOverlayStore= null;
- }
-
- super.dispose();
- }
-
- static public boolean getSaveAllEditors() {
- IPreferenceStore store= CompareUIPlugin.getDefault().getPreferenceStore();
- return store.getBoolean(PREF_SAVE_ALL_EDITORS);
- }
-
- static public void setSaveAllEditors(boolean value) {
- IPreferenceStore store= CompareUIPlugin.getDefault().getPreferenceStore();
- store.setValue(PREF_SAVE_ALL_EDITORS, value);
- }
-
- /*
- * @see PreferencePage#createContents(Composite)
- */
- protected Control createContents(Composite parent) {
-
- fOverlayStore.load();
- fOverlayStore.start();
-
- TabFolder folder= new TabFolder(parent, SWT.NONE);
- folder.setLayout(new TabFolderLayout());
- folder.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- TabItem item= new TabItem(folder, SWT.NONE);
- item.setText(Utilities.getString("ComparePreferencePage.generalTab.label")); //$NON-NLS-1$
- //item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE));
- item.setControl(createGeneralPage(folder));
-
- item= new TabItem(folder, SWT.NONE);
- item.setText(Utilities.getString("ComparePreferencePage.textCompareTab.label")); //$NON-NLS-1$
- //item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE));
- item.setControl(createTextComparePage(folder));
-
- initializeFields();
-
- return folder;
- }
-
- private Control createGeneralPage(Composite parent) {
- Composite composite= new Composite(parent, SWT.NULL);
- GridLayout layout= new GridLayout();
- layout.numColumns= 1;
- composite.setLayout(layout);
-
- addCheckBox(composite, "ComparePreferencePage.structureCompare.label", OPEN_STRUCTURE_COMPARE, 0); //$NON-NLS-1$
-
- addCheckBox(composite, "ComparePreferencePage.showMoreInfo.label", SHOW_MORE_INFO, 0); //$NON-NLS-1$
-
- addCheckBox(composite, "ComparePreferencePage.ignoreWhitespace.label", IGNORE_WHITESPACE, 0); //$NON-NLS-1$
-
- return composite;
- }
-
- private Control createTextComparePage(Composite parent) {
-
- Composite composite= new Composite(parent, SWT.NULL);
- GridLayout layout= new GridLayout();
- layout.numColumns= 1;
- composite.setLayout(layout);
-
- addCheckBox(composite, "ComparePreferencePage.synchronizeScrolling.label", SYNCHRONIZE_SCROLLING, 0); //$NON-NLS-1$
-
- addCheckBox(composite, "ComparePreferencePage.initiallyShowAncestorPane.label", INITIALLY_SHOW_ANCESTOR_PANE, 0); //$NON-NLS-1$
-
- addCheckBox(composite, "ComparePreferencePage.showPseudoConflicts.label", SHOW_PSEUDO_CONFLICTS, 0); //$NON-NLS-1$
-
- fFontEditor= addTextFontEditor(composite, "ComparePreferencePage.textFont.label", TEXT_FONT); //$NON-NLS-1$
- fFontEditor.setPreferenceStore(getPreferenceStore());
- fFontEditor.setPreferencePage(this);
- fFontEditor.load();
-
- Label previewLabel= new Label(composite, SWT.NULL);
- previewLabel.setText(Utilities.getString("ComparePreferencePage.preview.label")); //$NON-NLS-1$
-
- Control previewer= createPreviewer(composite);
- GridData gd= new GridData(GridData.FILL_BOTH);
- gd.widthHint= convertWidthInCharsToPixels(80);
- gd.heightHint= convertHeightInCharsToPixels(15);
- previewer.setLayoutData(gd);
-
- return composite;
- }
-
- private Control createPreviewer(Composite parent) {
-
- fCompareConfiguration= new CompareConfiguration(fOverlayStore);
- fCompareConfiguration.setAncestorLabel(Utilities.getString("ComparePreferencePage.ancestor.label")); //$NON-NLS-1$
-
- fCompareConfiguration.setLeftLabel(Utilities.getString("ComparePreferencePage.left.label")); //$NON-NLS-1$
- fCompareConfiguration.setLeftEditable(false);
-
- fCompareConfiguration.setRightLabel(Utilities.getString("ComparePreferencePage.right.label")); //$NON-NLS-1$
- fCompareConfiguration.setRightEditable(false);
-
- fPreviewViewer= new TextMergeViewer(parent, SWT.BORDER, fCompareConfiguration);
-
- fPreviewViewer.setInput(
- new DiffNode(Differencer.CONFLICTING,
- new FakeInput("previewAncestor.txt"), //$NON-NLS-1$
- new FakeInput("previewLeft.txt"), //$NON-NLS-1$
- new FakeInput("previewRight.txt") //$NON-NLS-1$
- )
- );
-
- return fPreviewViewer.getControl();
- }
-
- private void initializeFields() {
-
- Iterator e= fCheckBoxes.keySet().iterator();
- while (e.hasNext()) {
- Button b= (Button) e.next();
- String key= (String) fCheckBoxes.get(b);
- b.setSelection(fOverlayStore.getBoolean(key));
- }
- }
-
- // overlay stuff
-
- private WorkbenchChainedTextFontFieldEditor addTextFontEditor(Composite parent, String labelKey, String key) {
-
- String label= Utilities.getString(labelKey);
-
- Group group= new Group(parent, SWT.NULL);
- group.setText(label);
- GridLayout layout= new GridLayout();
- layout.numColumns= 3;
- layout.marginWidth+= 3;
- group.setLayout(layout);
- WorkbenchChainedTextFontFieldEditor fe= new WorkbenchChainedTextFontFieldEditor(key, "", group); //$NON-NLS-1$
-
- GridData gd= new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan= 2;
- group.setLayoutData(gd);
-
- return fe;
- }
-
- private Button addCheckBox(Composite parent, String labelKey, String key, int indentation) {
-
- String label= Utilities.getString(labelKey);
-
- Button checkBox= new Button(parent, SWT.CHECK);
- checkBox.setText(label);
-
- GridData gd= new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalIndent= indentation;
- gd.horizontalSpan= 2;
- checkBox.setLayoutData(gd);
-
- if (fCheckBoxListener == null) {
- fCheckBoxListener= new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Button button= (Button) e.widget;
- fOverlayStore.setValue((String) fCheckBoxes.get(button), button.getSelection());
- }
- };
- }
- checkBox.addSelectionListener(fCheckBoxListener);
-
- fCheckBoxes.put(checkBox, key);
-
- return checkBox;
- }
-
- private String loadPreviewContentFromFile(String filename) {
- String separator= System.getProperty("line.separator"); //$NON-NLS-1$
- StringBuffer buffer= new StringBuffer(512);
- BufferedReader reader= null;
- try {
- reader= new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(filename)));
- String line;
- while ((line= reader.readLine()) != null) {
- buffer.append(line);
- buffer.append(separator);
- }
- } catch (IOException io) {
- CompareUIPlugin.log(io);
- } finally {
- if (reader != null) {
- try {
- reader.close();
- } catch (IOException e) {
- }
- }
- }
- return buffer.toString();
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java
deleted file mode 100644
index a55ff322c..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java
+++ /dev/null
@@ -1,862 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-
-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.jface.viewers.Viewer;
-import org.eclipse.jface.util.Assert;
-import org.eclipse.jface.preference.IPreferenceStore;
-
-import org.eclipse.ui.internal.SharedImages;
-import org.eclipse.core.runtime.*;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.ui.*;
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.*;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-
-/**
- * The Compare UI plug-in defines the entry point to initiate a configurable
- * compare operation on arbitrary resources. The result of the compare
- * is opened into a compare editor where the details can be browsed and
- * edited in dynamically selected structure and content viewers.
- * <p>
- * The Compare UI provides a registry for content and structure compare viewers,
- * which is initialized from extensions contributed to extension points
- * declared by this plug-in.
- * <p>
- * This class is the plug-in runtime class for the
- * <code>"org.eclipse.compare"</code> plug-in.
- * </p>
- */
-public final class CompareUIPlugin extends AbstractUIPlugin {
-
- public static final String DTOOL_NEXT= "dlcl16/next_nav.gif"; //$NON-NLS-1$
- public static final String CTOOL_NEXT= "clcl16/next_nav.gif"; //$NON-NLS-1$
- public static final String ETOOL_NEXT= "elcl16/next_nav.gif"; //$NON-NLS-1$
-
- public static final String DTOOL_PREV= "dlcl16/prev_nav.gif"; //$NON-NLS-1$
- public static final String CTOOL_PREV= "clcl16/prev_nav.gif"; //$NON-NLS-1$
- public static final String ETOOL_PREV= "elcl16/prev_nav.gif"; //$NON-NLS-1$
-
- /** Status code describing an internal error */
- public static final int INTERNAL_ERROR= 1;
-
- private static boolean NORMALIZE_CASE= true;
-
- private final static String CLASS_ATTRIBUTE= "class"; //$NON-NLS-1$
- private final static String EXTENSIONS_ATTRIBUTE= "extensions"; //$NON-NLS-1$
-
- public static final String PLUGIN_ID= "org.eclipse.compare"; //$NON-NLS-1$
-
- private static final String STRUCTURE_CREATOR_EXTENSION_POINT= "structureCreators"; //$NON-NLS-1$
- private static final String STRUCTURE_MERGEVIEWER_EXTENSION_POINT= "structureMergeViewers"; //$NON-NLS-1$
- private static final String CONTENT_MERGEVIEWER_EXTENSION_POINT= "contentMergeViewers"; //$NON-NLS-1$
- private static final String CONTENT_VIEWER_EXTENSION_POINT= "contentViewers"; //$NON-NLS-1$
-
- private static final String COMPARE_EDITOR= PLUGIN_ID + ".CompareEditor"; //$NON-NLS-1$
-
- private static final String STRUCTUREVIEWER_ALIASES_PREFERENCE_NAME= "StructureViewerAliases"; //$NON-NLS-1$
-
- /** Maps type to icons */
- private static Map fgImages= new Hashtable(10);
- /** Maps type to ImageDescriptors */
- private static Map fgImageDescriptors= new Hashtable(10);
- /** Maps ImageDescriptors to Images */
- private static Map fgImages2= new Hashtable(10);
-
- private static Map fgStructureCreators= new Hashtable(10);
- private static Map fgStructureViewerDescriptors= new Hashtable(10);
- private static Map fgStructureViewerAliases= new Hashtable(10);
- private static Map fgContentViewerDescriptors= new Hashtable(10);
- private static Map fgContentMergeViewerDescriptors= new Hashtable(10);
-
- private static List fgDisposeOnShutdownImages= new ArrayList();
-
- private static ResourceBundle fgResourceBundle;
-
- private static CompareUIPlugin fgComparePlugin;
-
- /**
- * Creates the <code>CompareUIPlugin</code> object and registers all
- * structure creators, content merge viewers, and structure merge viewers
- * contributed to this plug-in's extension points.
- * <p>
- * Note that instances of plug-in runtime classes are automatically created
- * by the platform in the course of plug-in activation.
- * </p>
- *
- * @param descriptor the plug-in descriptor
- */
- public CompareUIPlugin(IPluginDescriptor descriptor) {
- super(descriptor);
-
- fgComparePlugin= this;
-
- fgResourceBundle= descriptor.getResourceBundle();
-
- registerExtensions();
-
- initPreferenceStore();
- }
-
- /**
- * @see AbstractUIPlugin#initializeDefaultPreferences
- */
- protected void initializeDefaultPreferences(IPreferenceStore store) {
- super.initializeDefaultPreferences(store);
-
- ComparePreferencePage.initDefaults(store);
- }
-
- /**
- * Registers all structure creators, content merge viewers, and structure merge viewers
- * that are found in the XML plugin files.
- */
- private void registerExtensions() {
- IPluginRegistry registry= Platform.getPluginRegistry();
-
- // collect all IStructureCreators
- IConfigurationElement[] elements= registry.getConfigurationElementsFor(PLUGIN_ID, STRUCTURE_CREATOR_EXTENSION_POINT);
- for (int i= 0; i < elements.length; i++) {
- final IConfigurationElement conf= elements[i];
- String extensions= conf.getAttribute(EXTENSIONS_ATTRIBUTE);
- registerStructureCreator(extensions,
- new IStructureCreatorDescriptor() {
- public IStructureCreator createStructureCreator() {
- try {
- return (IStructureCreator) conf.createExecutableExtension(CLASS_ATTRIBUTE);
- } catch (CoreException ex) {
- }
- return null;
- }
- }
- );
- }
-
- // collect all viewers which define the structure mergeviewer extension point
- elements= registry.getConfigurationElementsFor(PLUGIN_ID, STRUCTURE_MERGEVIEWER_EXTENSION_POINT);
- for (int i= 0; i < elements.length; i++) {
- ViewerDescriptor desc= new ViewerDescriptor(elements[i]);
- String ext= desc.getExtension();
- if (ext != null)
- registerStructureViewerDescriptor(desc.getExtension(), desc);
- }
-
- // collect all viewers which define the content mergeviewer extension point
- elements= registry.getConfigurationElementsFor(PLUGIN_ID, CONTENT_MERGEVIEWER_EXTENSION_POINT);
- for (int i= 0; i < elements.length; i++) {
- ViewerDescriptor desc= new ViewerDescriptor(elements[i]);
- String ext= desc.getExtension();
- if (ext != null)
- registerContentMergeViewerDescriptor(desc.getExtension(), desc);
- }
-
- // collect all viewers which define the content viewer extension point
- elements= registry.getConfigurationElementsFor(PLUGIN_ID, CONTENT_VIEWER_EXTENSION_POINT);
- for (int i= 0; i < elements.length; i++) {
- ViewerDescriptor desc= new ViewerDescriptor(elements[i]);
- String ext= desc.getExtension();
- if (ext != null)
- registerContentViewerDescriptor(desc.getExtension(), desc);
- }
- }
-
- /**
- * Returns the singleton instance of this plug-in runtime class.
- *
- * @return the compare plug-in instance
- */
- public static CompareUIPlugin getDefault() {
- return fgComparePlugin;
- }
-
- /**
- * Returns this plug-in's resource bundle.
- *
- * @return the plugin's resource bundle
- */
- public static ResourceBundle getResourceBundle() {
- return fgResourceBundle;
- }
-
- public static IWorkbench getActiveWorkbench() {
- CompareUIPlugin plugin= getDefault();
- if (plugin == null)
- return null;
- return plugin.getWorkbench();
- }
-
- public static IWorkbenchWindow getActiveWorkbenchWindow() {
- IWorkbench workbench= getActiveWorkbench();
- if (workbench == null)
- return null;
- return workbench.getActiveWorkbenchWindow();
- }
-
- /**
- * Returns the active workkbench page or <code>null</code> if
- * no active workkbench page can be determined.
- *
- * @return the active workkbench page or <code>null</code> if
- * no active workkbench page can be determined
- */
- private static IWorkbenchPage getActivePage() {
- IWorkbenchWindow window= getActiveWorkbenchWindow();
- if (window == null)
- return null;
- return window.getActivePage();
- }
-
- /**
- * Returns the SWT Shell of the active workbench window or <code>null</code> if
- * no workbench window is active.
- *
- * @return the SWT Shell of the active workbench window, or <code>null</code> if
- * no workbench window is active
- */
- public static Shell getShell() {
- IWorkbenchWindow window= getActiveWorkbenchWindow();
- if (window == null)
- return null;
- return window.getShell();
- }
-
- /**
- * Registers the given image for being disposed when this plug-in is shutdown.
- *
- * @param image the image to register for disposal
- */
- public static void disposeOnShutdown(Image image) {
- if (image != null)
- fgDisposeOnShutdownImages.add(image);
- }
-
- /* (non-Javadoc)
- * Method declared on Plugin.
- * Frees all resources of the compare plug-in.
- */
- public void shutdown() throws CoreException {
-
- /*
- * Converts the aliases into a single string before they are stored
- * in the preference store.
- * The format is:
- * <key> '.' <alias> ' ' <key> '.' <alias> ...
- */
- IPreferenceStore ps= getPreferenceStore();
- if (ps != null) {
- StringBuffer sb= new StringBuffer();
- Iterator iter= fgStructureViewerAliases.keySet().iterator();
- while (iter.hasNext()) {
- String key= (String) iter.next();
- String alias= (String) fgStructureViewerAliases.get(key);
- sb.append(key);
- sb.append('.');
- sb.append(alias);
- sb.append(' ');
- }
- ps.setValue(STRUCTUREVIEWER_ALIASES_PREFERENCE_NAME, sb.toString());
- }
-
- super.shutdown();
-
- if (fgDisposeOnShutdownImages != null) {
- Iterator i= fgDisposeOnShutdownImages.iterator();
- while (i.hasNext()) {
- Image img= (Image) i.next();
- if (!img.isDisposed())
- img.dispose();
- }
- fgImages= null;
- }
- }
-
- /**
- * Performs the comparison described by the given input and opens a
- * compare editor on the result.
- *
- * @param input the input on which to open the compare editor
- * @see CompareEditorInput
- */
- public void openCompareEditor(CompareEditorInput input) {
-
- if (compareResultOK(input)) {
- IWorkbenchPage activePage= getActivePage();
- if (activePage != null) {
- try {
- activePage.openEditor(input, COMPARE_EDITOR);
- } catch (PartInitException e) {
- MessageDialog.openError(getShell(), Utilities.getString("CompareUIPlugin.openEditorError"), e.getMessage()); //$NON-NLS-1$
- }
- } else {
- MessageDialog.openError(getShell(),
- Utilities.getString("CompareUIPlugin.openEditorError"), //$NON-NLS-1$
- Utilities.getString("CompareUIPlugin.noActiveWorkbenchPage")); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Performs the comparison described by the given input and opens a
- * compare dialog on the result.
- *
- * @param input the input on which to open the compare editor
- * @see CompareEditorInput
- */
- public void openCompareDialog(final CompareEditorInput input) {
-
- if (compareResultOK(input)) {
- CompareDialog dialog= new CompareDialog(getShell(), input);
- dialog.open();
- }
- }
-
- /**
- * @return <code>true</code> if compare result is OK to show, <code>false</code> otherwise
- */
- private boolean compareResultOK(CompareEditorInput input) {
- final Shell shell= getShell();
- try {
-
- // run operation in separate thread and make it canceable
- new ProgressMonitorDialog(shell).run(true, true, input);
-
- String message= input.getMessage();
- if (message != null) {
- MessageDialog.openError(shell, Utilities.getString("CompareUIPlugin.compareFailed"), message); //$NON-NLS-1$
- return false;
- }
-
- if (input.getCompareResult() == null) {
- MessageDialog.openInformation(shell, Utilities.getString("CompareUIPlugin.dialogTitle"), Utilities.getString("CompareUIPlugin.noDifferences")); //$NON-NLS-2$ //$NON-NLS-1$
- return false;
- }
-
- return true;
-
- } catch (InterruptedException x) {
- // cancelled by user
- } catch (InvocationTargetException x) {
- MessageDialog.openError(shell, Utilities.getString("CompareUIPlugin.compareFailed"), x.getTargetException().getMessage()); //$NON-NLS-1$
- }
- return false;
- }
-
- /**
- * Registers an image for the given type.
- */
- private static void registerImage(String type, Image image, boolean dispose) {
- fgImages.put(normalizeCase(type), image);
- if (image != null && dispose) {
- fgDisposeOnShutdownImages.add(image);
- }
- }
-
- /**
- * Registers an image descriptor for the given type.
- *
- * @param type the type
- * @param descriptor the image descriptor
- */
- public static void registerImageDescriptor(String type, ImageDescriptor descriptor) {
- fgImageDescriptors.put(normalizeCase(type), descriptor);
- }
-
- public static ImageDescriptor getImageDescriptor(String relativePath) {
-
- URL installURL= null;
- if (fgComparePlugin != null)
- installURL= fgComparePlugin.getDescriptor().getInstallURL();
-
- if (installURL != null) {
- try {
- URL url= new URL(installURL, Utilities.getIconPath(null) + relativePath);
- return ImageDescriptor.createFromURL(url);
- } catch (MalformedURLException e) {
- Assert.isTrue(false);
- }
- }
- return null;
- }
-
- /**
- * Returns a shared image for the given type, or a generic image if none
- * has been registered for the given type.
- * <p>
- * Note: Images returned from this method will be automitically disposed
- * of when this plug-in shuts down. Callers must not dispose of these
- * images themselves.
- * </p>
- *
- * @param type the type
- * @return the image
- */
- public static Image getImage(String type) {
-
- type= normalizeCase(type);
-
- boolean dispose= false;
- Image image= null;
- if (type != null)
- image= (Image) fgImages.get(type);
- if (image == null) {
- ImageDescriptor id= (ImageDescriptor) fgImageDescriptors.get(type);
- if (id != null) {
- image= id.createImage();
- dispose= true;
- }
-
- if (image == null) {
- if (fgComparePlugin != null) {
- if (ITypedElement.FOLDER_TYPE.equals(type)) {
- image= getDefault().getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER);
- //image= SharedImages.getImage(ISharedImages.IMG_OBJ_FOLDER);
- } else {
- image= createWorkbenchImage(type);
- dispose= true;
- }
- } else {
- id= (ImageDescriptor) fgImageDescriptors.get(normalizeCase("file")); //$NON-NLS-1$
- image= id.createImage();
- dispose= true;
- }
- }
- if (image != null)
- registerImage(type, image, dispose);
- }
- return image;
- }
-
- /**
- * Returns a shared image for the given adaptable.
- * This convenience method queries the given adaptable
- * for its <code>IWorkbenchAdapter.getImageDescriptor</code>, which it
- * uses to create an image if it does not already have one.
- * <p>
- * Note: Images returned from this method will be automitically disposed
- * of when this plug-in shuts down. Callers must not dispose of these
- * images themselves.
- * </p>
- *
- * @param adaptable the adaptable for which to find an image
- * @return an image
- */
- public static Image getImage(IAdaptable adaptable) {
- if (adaptable != null) {
- Object o= adaptable.getAdapter(IWorkbenchAdapter.class);
- if (o instanceof IWorkbenchAdapter) {
- ImageDescriptor id= ((IWorkbenchAdapter) o).getImageDescriptor(adaptable);
- if (id != null) {
- Image image= (Image)fgImages2.get(id);
- if (image == null) {
- image= id.createImage();
- try {
- fgImages2.put(id, image);
- } catch (NullPointerException ex) {
- }
- fgDisposeOnShutdownImages.add(image);
-
- }
- return image;
- }
- }
- }
- return null;
- }
-
- private static Image createWorkbenchImage(String type) {
- IEditorRegistry er= getDefault().getWorkbench().getEditorRegistry();
- ImageDescriptor id= er.getImageDescriptor("foo." + type); //$NON-NLS-1$
- return id.createImage();
- }
-
- /**
- * Registers the given structure creator descriptor for one or more types.
- *
- * @param types one or more types separated by commas and whitespace
- * @param descriptor the descriptor to register
- */
- public static void registerStructureCreator(String types, IStructureCreatorDescriptor descriptor) {
- if (types != null) {
- StringTokenizer tokenizer= new StringTokenizer(types, ","); //$NON-NLS-1$
- while (tokenizer.hasMoreElements()) {
- String extension= tokenizer.nextToken().trim();
- fgStructureCreators.put(normalizeCase(extension), descriptor);
- }
- }
- }
-
- /**
- * Returns an structure creator descriptor for the given type.
- *
- * @param type the type for which to find a descriptor
- * @return a descriptor for the given type, or <code>null</code> if no
- * descriptor has been registered
- */
- public static IStructureCreatorDescriptor getStructureCreator(String type) {
- return (IStructureCreatorDescriptor) fgStructureCreators.get(normalizeCase(type));
- }
-
- /**
- * Registers the given structure viewer descriptor for one or more types.
- *
- * @param types one or more types separated by commas and whitespace
- * @param the descriptor to register
- */
- public static void registerStructureViewerDescriptor(String types, IViewerDescriptor descriptor) {
- StringTokenizer tokenizer= new StringTokenizer(types, ","); //$NON-NLS-1$
- while (tokenizer.hasMoreElements()) {
- String extension= tokenizer.nextToken().trim();
- fgStructureViewerDescriptors.put(normalizeCase(extension), descriptor);
- }
- }
-
- /**
- * Registers the given content merge viewer descriptor for one or more types.
- *
- * @param types one or more types separated by commas and whitespace
- * @param descriptor the descriptor to register
- */
- public static void registerContentMergeViewerDescriptor(String types, IViewerDescriptor descriptor) {
- StringTokenizer tokenizer= new StringTokenizer(types, ","); //$NON-NLS-1$
- while (tokenizer.hasMoreElements()) {
- String extension= tokenizer.nextToken().trim();
- fgContentMergeViewerDescriptors.put(normalizeCase(extension), descriptor);
- }
- }
-
- /**
- * Registers the given content viewer descriptor for one or more types.
- *
- * @param types one or more types separated by commas and whitespace
- * @param descriptor the descriptor to register
- */
- public static void registerContentViewerDescriptor(String types, IViewerDescriptor descriptor) {
- StringTokenizer tokenizer= new StringTokenizer(types, ","); //$NON-NLS-1$
- while (tokenizer.hasMoreElements()) {
- String extension= tokenizer.nextToken().trim();
- fgContentViewerDescriptors.put(normalizeCase(extension), descriptor);
- }
- }
-
- /**
- * Returns a structure compare viewer based on an old viewer and an input object.
- * If the old viewer is suitable for showing the input, the old viewer
- * is returned. Otherwise, the input's type is used to find a viewer descriptor in the registry
- * which in turn is used to create a structure compare viewer under the given parent composite.
- * If no viewer descriptor can be found <code>null</code> is returned.
- *
- * @param oldViewer a new viewer is only created if this old viewer cannot show the given input
- * @param input the input object for which to find a structure viewer
- * @param parent the SWT parent composite under which the new viewer is created
- * @param configuration a configuration which is passed to a newly created viewer
- * @return the compare viewer which is suitable for the given input object or <code>null</code>
- */
- public static Viewer findStructureViewer(Viewer oldViewer, ICompareInput input, Composite parent,
- CompareConfiguration configuration) {
-
- if (input.getLeft() == null || input.getRight() == null) // we don't show the structure of additions or deletions
- return null;
-
- String type= getType(input);
- if (type == null)
- return null;
-
- type= normalizeCase(type);
-
- IViewerDescriptor vd= (IViewerDescriptor) fgStructureViewerDescriptors.get(type);
- if (vd == null) {
- String alias= (String) fgStructureViewerAliases.get(type);
- if (alias != null)
- vd= (IViewerDescriptor) fgStructureViewerDescriptors.get(alias);
- }
- if (vd != null)
- return vd.createViewer(oldViewer, parent, configuration);
-
- IStructureCreatorDescriptor scc= getStructureCreator(type);
- if (scc != null) {
- IStructureCreator sc= scc.createStructureCreator();
- if (sc != null) {
- StructureDiffViewer sdv= new StructureDiffViewer(parent, configuration);
- sdv.setStructureCreator(sc);
- return sdv;
- }
- }
- return null;
- }
-
- /**
- * Returns a content compare viewer based on an old viewer and an input object.
- * If the old viewer is suitable for showing the input the old viewer
- * is returned. Otherwise the input's type is used to find a viewer descriptor in the registry
- * which in turn is used to create a content compare viewer under the given parent composite.
- * If no viewer descriptor can be found <code>null</code> is returned.
- *
- * @param oldViewer a new viewer is only created if this old viewer cannot show the given input
- * @param input the input object for which to find a content viewer
- * @param parent the SWT parent composite under which the new viewer is created
- * @param configuration a configuration which is passed to a newly created viewer
- * @return the compare viewer which is suitable for the given input object or <code>null</code>
- */
- public static Viewer findContentViewer(Viewer oldViewer, Object in, Composite parent, CompareConfiguration cc) {
-
- if (in instanceof IStreamContentAccessor) {
- String type= ITypedElement.TEXT_TYPE;
-
- if (in instanceof ITypedElement) {
- ITypedElement tin= (ITypedElement) in;
- String ty= tin.getType();
- if (ty != null)
- type= ty;
- }
- type= normalizeCase(type);
-
- IViewerDescriptor vd= (IViewerDescriptor) fgContentViewerDescriptors.get(type);
- Viewer viewer= null;
- if (vd != null) {
- viewer= vd.createViewer(oldViewer, parent, cc);
- if (viewer != null)
- return viewer;
- }
- // fallback
- return new SimpleTextViewer(parent);
- }
-
- if (!(in instanceof ICompareInput))
- return null;
-
- ICompareInput input= (ICompareInput) in;
- String type= getType(input);
- type= normalizeCase(type);
-
- if (ITypedElement.FOLDER_TYPE.equals(type))
- return null;
-
- if (type != null) {
- IViewerDescriptor vd= (IViewerDescriptor) fgContentMergeViewerDescriptors.get(type);
- Viewer viewer= null;
- if (vd != null) {
- viewer= vd.createViewer(oldViewer, parent, cc);
- if (viewer != null)
- return viewer;
- }
- }
-
- // fallback
- String leftType= guessType(input.getLeft());
- String rightType= guessType(input.getRight());
-
- if (leftType != null || rightType != null) {
- boolean right_text= rightType != null && ITypedElement.TEXT_TYPE.equals(rightType);
- boolean left_text= leftType != null && ITypedElement.TEXT_TYPE.equals(leftType);
- if ((leftType == null && right_text) || (left_text && rightType == null) || (left_text && right_text))
- type= ITypedElement.TEXT_TYPE;
- else
- type= "binary"; //$NON-NLS-1$
-
- IViewerDescriptor vd= (IViewerDescriptor) fgContentMergeViewerDescriptors.get(normalizeCase(type));
- if (vd != null)
- return vd.createViewer(oldViewer, parent, cc);
- }
- return null;
- }
-
- /**
- * Determines the type of the given threeway input by analyzing
- * the types (file extension) of the individual parts.
- * Returns null if no type can be determined.
- */
- private static String getType(ICompareInput input) {
- ITypedElement ancestor= input.getAncestor();
- ITypedElement left= input.getLeft();
- ITypedElement right= input.getRight();
-
- String[] types= new String[3];
- int cnt= 0;
-
- if (ancestor != null) {
- String type= ancestor.getType();
- if (type != null)
- types[cnt++]= type;
- }
- if (left != null) {
- String type= left.getType();
- if (type != null)
- types[cnt++]= type;
- }
- if (right != null) {
- String type= right.getType();
- if (type != null)
- types[cnt++]= type;
- }
- boolean homogenous= false;
- switch (cnt) {
- case 1:
- homogenous= true;
- break;
- case 2:
- homogenous= types[0].equals(types[1]);
- break;
- case 3:
- homogenous= types[0].equals(types[1]) && types[1].equals(types[2]);
- break;
- }
- if (homogenous)
- return types[0];
- return null;
- }
-
- /**
- * Guesses the file type of the given input.
- * Returns ITypedElement.TEXT_TYPE if none of the first 10 lines is longer than 1000 bytes.
- * Returns ITypedElement.UNKNOWN_TYPE otherwise.
- * Returns <code>null</code> if the input isn't an <code>IStreamContentAccessor</code>.
- */
- private static String guessType(ITypedElement input) {
- if (input instanceof IStreamContentAccessor) {
- IStreamContentAccessor sca= (IStreamContentAccessor) input;
- InputStream is= null;
- try {
- is= sca.getContents();
- if (is == null)
- return null;
- int lineLength= 0;
- int lines= 0;
- while (lines < 10) {
- int c= is.read();
- if (c == -1) // EOF
- break;
- if (c == '\n' || c == '\r') { // reset line length
- lineLength= 0;
- lines++;
- } else
- lineLength++;
- if (lineLength > 1000)
- return ITypedElement.UNKNOWN_TYPE;
- }
- return ITypedElement.TEXT_TYPE;
- } catch (CoreException ex) {
- // be silent and return UNKNOWN_TYPE
- } catch (IOException ex) {
- // be silent and return UNKNOWN_TYPE
- } finally {
- if (is != null) {
- try {
- is.close();
- } catch (IOException ex) {
- }
- }
- }
- return ITypedElement.UNKNOWN_TYPE;
- }
- return null;
- }
-
- private static IViewerDescriptor getContentViewerDescriptor2(String type) {
- return (IViewerDescriptor) fgContentMergeViewerDescriptors.get(normalizeCase(type));
- }
-
- private static String normalizeCase(String s) {
- if (NORMALIZE_CASE && s != null)
- return s.toUpperCase();
- return s;
- }
-
- //---- alias mgmt
-
- private void initPreferenceStore() {
- //System.out.println("initPreferenceStore");
- IPreferenceStore ps= getPreferenceStore();
- if (ps != null) {
- String aliases= ps.getString(STRUCTUREVIEWER_ALIASES_PREFERENCE_NAME);
- //System.out.println(" <" + aliases + ">");
- if (aliases != null && aliases.length() > 0) {
- StringTokenizer st= new StringTokenizer(aliases, " "); //$NON-NLS-1$
- while (st.hasMoreTokens()) {
- String pair= st.nextToken();
- int pos= pair.indexOf('.');
- if (pos > 0) {
- String key= pair.substring(0, pos);
- String alias= pair.substring(pos+1);
- fgStructureViewerAliases.put(key, alias);
- //System.out.println("<" + key + "><" + alias + ">");
- }
- }
- }
- }
- }
-
- public static void addStructureViewerAlias(String type, String alias) {
- //System.out.println("addStructureViewerAlias: " + type + " " + alias);
- fgStructureViewerAliases.put(normalizeCase(alias), normalizeCase(type));
- }
-
- public static void removeAllStructureViewerAliases(String type) {
- String t= normalizeCase(type);
- Set entrySet= fgStructureViewerAliases.entrySet();
- for (Iterator iter= entrySet.iterator(); iter.hasNext(); ) {
- Map.Entry entry= (Map.Entry)iter.next();
- if (entry.getValue().equals(t))
- iter.remove();
- }
- }
-
- /**
- * Returns an array of all editors that have an unsaved content. If the identical content is
- * presented in more than one editor, only one of those editor parts is part of the result.
- *
- * @return an array of all dirty editor parts.
- */
- public static IEditorPart[] getDirtyEditors() {
- Set inputs= new HashSet();
- List result= new ArrayList(0);
- IWorkbench workbench= getDefault().getWorkbench();
- IWorkbenchWindow[] windows= workbench.getWorkbenchWindows();
- for (int i= 0; i < windows.length; i++) {
- IWorkbenchPage[] pages= windows[i].getPages();
- for (int x= 0; x < pages.length; x++) {
- IEditorPart[] editors= pages[x].getDirtyEditors();
- for (int z= 0; z < editors.length; z++) {
- IEditorPart ep= editors[z];
- IEditorInput input= ep.getEditorInput();
- if (!inputs.contains(input)) {
- inputs.add(input);
- result.add(ep);
- }
- }
- }
- }
- return (IEditorPart[])result.toArray(new IEditorPart[result.size()]);
- }
-
- public static void log(Throwable e) {
- log(new Status(IStatus.ERROR, getPluginId(), INTERNAL_ERROR, CompareMessages.getString("ComparePlugin.internal_error"), e)); //$NON-NLS-1$
- }
-
- public static void log(IStatus status) {
- getDefault().getLog().log(status);
- }
-
- public static String getPluginId() {
- return getDefault().getDescriptor().getUniqueIdentifier();
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithEditionAction.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithEditionAction.java
deleted file mode 100644
index dc5191df7..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithEditionAction.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-public class CompareWithEditionAction extends EditionAction {
-
- public CompareWithEditionAction() {
- super(false, "org.eclipse.compare.internal.CompareWithEditionAction"); //$NON-NLS-1$
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithEditionAction.properties b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithEditionAction.properties
deleted file mode 100644
index 7a4b31a68..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithEditionAction.properties
+++ /dev/null
@@ -1,32 +0,0 @@
-# =====================================
-# (c) Copyright IBM Corp. 2000, 2001.
-# All Rights Reserved.
-# ====================================
-
-# @(#)CompareWithEditionAction.properties
-#
-# Resources for CompareWithEditionAction.java
-
-title= Compare with Local History
-
-treeTitleFormat= Local History of ''{0}''
-dateIcon= obj16/day_obj.gif
-timeIcon= obj16/resource_obj.gif
-
-treeFormat= {0}
-workspaceTreeFormat= {0} (Workspace File)
-parseErrorFormat= {0} (Parse Error)
-
-editionLabel= Local History ({0})
-workspaceEditionLabel= Workspace File
-
-targetLabel= Editor Buffer
-workspaceTargetLabel= Workspace File
-
-todayFormat= Today ({0})
-yesterdayFormat= Yesterday ({0})
-dayFormat= {0}
-
-closeButton.label=Close
-
-noLocalHistoryError= No local history available for selected resource.
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/DiffImage.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/DiffImage.java
deleted file mode 100644
index 2e166ef80..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/DiffImage.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.graphics.*;
-
-import org.eclipse.jface.resource.CompositeImageDescriptor;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-/**
- * Combines an image with an overlay.
- */
-public class DiffImage extends CompositeImageDescriptor {
-
- static final int HEIGHT= 16;
-
- private Image fBaseImage;
- private ImageDescriptor fOverlayImage;
- private int fWidth;
- private boolean fLeft= true;
-
- public DiffImage(Image base, ImageDescriptor overlay, int w) {
- fBaseImage= base;
- fOverlayImage= overlay;
- fWidth= w;
- }
-
- public DiffImage(Image base, ImageDescriptor overlay, int w, boolean onLeft) {
- fBaseImage= base;
- fOverlayImage= overlay;
- fWidth= w;
- fLeft= onLeft;
- }
-
- protected Point getSize() {
- return new Point(fWidth, HEIGHT);
- }
-
- protected void drawCompositeImage(int width, int height) {
- if (fLeft) {
- if (fBaseImage != null) {
- ImageData base= fBaseImage.getImageData();
- if (base == null)
- base= DEFAULT_IMAGE_DATA;
- drawImage(base, fWidth - base.width, 0);
- }
-
- if (fOverlayImage != null) {
- ImageData overlay= fOverlayImage.getImageData();
- if (overlay == null)
- overlay= DEFAULT_IMAGE_DATA;
- drawImage(overlay, 0, (HEIGHT - overlay.height) / 2);
- }
- } else {
- if (fBaseImage != null) {
- ImageData base= fBaseImage.getImageData();
- if (base == null)
- base= DEFAULT_IMAGE_DATA;
- drawImage(base, 0, 0);
- }
-
- if (fOverlayImage != null) {
- ImageData overlay= fOverlayImage.getImageData();
- if (overlay == null)
- overlay= DEFAULT_IMAGE_DATA;
- drawImage(overlay, fWidth - overlay.width, (HEIGHT - overlay.height) / 2);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java
deleted file mode 100644
index 80b6409f1..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.jface.text.*;
-import org.eclipse.compare.contentmergeviewer.ITokenComparator;
-import org.eclipse.compare.rangedifferencer.IRangeComparator;
-
-/**
- * Implements the <code>IRangeComparator</code> interface for lines in a document.
- * A <code>DocLineComparator</code> is used as the input for the <code>RangeDifferencer</code>
- * engine to perform a line oriented compare on documents.
- * <p>
- * A <code>DocLineComparator</code> doesn't know anything about line separators because
- * its notion of lines is solely defined in the underlying <code>IDocument</code>.
- */
-public class DocLineComparator implements ITokenComparator {
-
- private IDocument fDocument;
- private int fLineOffset;
- private int fLineCount;
- private int fLength;
- private boolean fIgnoreWhiteSpace;
-
- /**
- * Creates a <code>DocLineComparator</code> for the given document range.
- * ignoreWhiteSpace controls whether comparing lines (in method
- * <code>rangesEqual<code>) should ignore whitespace.
- *
- * @param document the document from which the lines are taken
- * @param region if non-<code>null</code> only lines within this range are taken
- * @param ignoreWhiteSpace if <code>true</code> white space is ignored when comparing lines
- */
- public DocLineComparator(IDocument document, IRegion region, boolean ignoreWhiteSpace) {
-
- fDocument= document;
- fIgnoreWhiteSpace= ignoreWhiteSpace;
-
- fLineOffset= 0;
- if (region != null) {
- fLength= region.getLength();
- int start= region.getOffset();
- try {
- fLineOffset= fDocument.getLineOfOffset(start);
- } catch (BadLocationException ex) {
- }
-
- if (fLength == 0)
- fLineCount= 0;
- else {
- int endLine= fDocument.getNumberOfLines();
- try {
- endLine= fDocument.getLineOfOffset(start + fLength);
- } catch (BadLocationException ex) {
- }
- fLineCount= endLine - fLineOffset + 1;
- }
-
- } else {
- fLength= document.getLength();
- fLineCount= fDocument.getNumberOfLines();
- }
- }
-
- /**
- * Returns the number of lines in the document.
- *
- * @return number of lines
- */
- public int getRangeCount() {
- return fLineCount;
- }
-
- /* (non Javadoc)
- * see ITokenComparator.getTokenStart
- */
- public int getTokenStart(int line) {
- try {
- IRegion r= fDocument.getLineInformation(fLineOffset + line);
- return r.getOffset();
- } catch (BadLocationException ex) {
- return fDocument.getLength();
- }
- }
-
- /* (non Javadoc)
- * Returns the length of the given line.
- * see ITokenComparator.getTokenLength
- */
- public int getTokenLength(int line) {
- return getTokenStart(line+1) - getTokenStart(line);
- }
-
- /**
- * Returns <code>true</code> if a line given by the first index
- * matches a line specified by the other <code>IRangeComparator</code> and index.
- *
- * @param thisIndex the number of the line within this range comparator
- * @param other the range comparator to compare this with
- * @param otherIndex the number of the line within the other comparator
- * @return <code>true</code> if the lines are equal
- */
- public boolean rangesEqual(int thisIndex, IRangeComparator other0, int otherIndex) {
-
- if (other0 != null && other0.getClass() == getClass()) {
- DocLineComparator other= (DocLineComparator) other0;
-
- if (fIgnoreWhiteSpace) {
- String s1= extract(thisIndex);
- String s2= other.extract(otherIndex);
- return compare(s1, s2);
- }
-
- int tlen= getTokenLength(thisIndex);
- int olen= other.getTokenLength(otherIndex);
- if (tlen == olen) {
- String s1= extract(thisIndex);
- String s2= other.extract(otherIndex);
- return s1.equals(s2);
- }
- }
- return false;
- }
-
- /**
- * Aborts the comparison if the number of tokens is too large.
- *
- * @return <code>true</code> to abort a token comparison
- */
- public boolean skipRangeComparison(int length, int max, IRangeComparator other) {
- return false;
- }
-
- //---- private methods
-
- /**
- * Extract a single line from the underlying document without the line separator.
- *
- * @param line the number of the line to extract
- * @return the contents of the line as a String
- */
- private String extract(int line) {
- if (line < fLineCount) {
- try {
- IRegion r= fDocument.getLineInformation(fLineOffset + line);
- return fDocument.get(r.getOffset(), r.getLength());
- } catch(BadLocationException e) {
- }
- }
- return ""; //$NON-NLS-1$
- }
-
- private boolean compare(String s1, String s2) {
- int i1= 0;
- int i2= 0;
- int l1= s1.length();
- int l2= s2.length();
- char c1= ' ';
- char c2= ' ';
- while (i1 < l1 || i2 < l2) {
- if (i1 < l1) {
- c1= s1.charAt(i1);
- if (Character.isWhitespace(c1)) {
- i1++;
- continue;
- }
- }
- if (i2 < l2) {
- c2= s2.charAt(i2);
- if (Character.isWhitespace(c2)) {
- i2++;
- continue;
- }
- }
- if (c1 != c2)
- return false;
- i1++;
- i2++;
- }
- return true;
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/DocumentManager.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/DocumentManager.java
deleted file mode 100644
index 76491b987..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/DocumentManager.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.util.*;
-
-import org.eclipse.jface.text.IDocument;
-
-/**
- * No API yet.
- */
-public class DocumentManager {
-
- private static final boolean DEBUG= false;
-
- private static ArrayList fgKeys= new ArrayList();
- private static ArrayList fgValues= new ArrayList();
-
- public static IDocument get(Object o) {
-
- for (int i= 0; i < fgKeys.size(); i++) {
- if (fgKeys.get(i) == o)
- return (IDocument) fgValues.get(i);
- }
- return null;
- }
-
- public static void put(Object o, IDocument document) {
- if (DEBUG) System.out.println("DocumentManager.put: " + document); //$NON-NLS-1$
- for (int i= 0; i < fgKeys.size(); i++) {
- if (fgKeys.get(i) == o) {
- fgValues.set(i, document);
- return;
- }
- }
- fgKeys.add(o);
- fgValues.add(document);
- }
-
- public static void remove(IDocument document) {
- if (document != null) {
- if (DEBUG) System.out.println("DocumentManager.remove: " + document); //$NON-NLS-1$
- for (int i= 0; i < fgValues.size(); i++) {
- if (fgValues.get(i) == document) {
- fgKeys.remove(i);
- fgValues.remove(i);
- return;
- }
- }
- if (DEBUG) System.out.println("DocumentManager.remove: not found"); //$NON-NLS-1$
- }
- }
-
- public static void dump() {
- if (DEBUG) System.out.println("DocumentManager: managed docs:" + fgValues.size()); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/EditionAction.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/EditionAction.java
deleted file mode 100644
index a56b0692a..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/EditionAction.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.io.InputStream;
-import java.io.ByteArrayInputStream;
-import java.util.ArrayList;
-import java.util.ResourceBundle;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.BadLocationException;
-
-import org.eclipse.ui.*;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.ui.texteditor.IDocumentProvider;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.compare.IStreamContentAccessor;
-
-
-public class EditionAction implements IActionDelegate {
-
- /**
- * Implements the IStreamContentAccessor and ITypedElement protocols
- * for a Document.
- */
- class DocumentBufferNode implements ITypedElement, IStreamContentAccessor {
-
- private IDocument fDocument;
- private String type;
- private IFile fFile;
-
- DocumentBufferNode(IDocument document, IFile file) {
- fDocument= document;
- fFile= file;
- }
-
- public String getName() {
- return fFile.getName();
- }
-
- public String getType() {
- return fFile.getFileExtension();
- }
-
- public Image getImage() {
- return null;
- }
-
- public InputStream getContents() {
- return new ByteArrayInputStream(fDocument.get().getBytes());
- }
- }
-
- private ISelection fSelection;
- private String fBundleName;
- private boolean fReplaceMode;
- protected boolean fPrevious= false;
-
- EditionAction(boolean replaceMode, String bundleName) {
- fReplaceMode= replaceMode;
- fBundleName= bundleName;
- }
-
- public final void selectionChanged(IAction action, ISelection selection) {
- fSelection= selection;
- if (action != null) {
- IFile[] files= getFiles(selection, fReplaceMode);
- action.setEnabled(files.length == 1); // we don't support multiple selection for now
- }
- }
-
- public void run(IAction action) {
- IFile[] files= getFiles(fSelection, fReplaceMode);
- for (int i= 0; i < files.length; i++)
- doFromHistory(files[i]);
- }
-
- private void doFromHistory(final IFile file) {
-
- ResourceBundle bundle= ResourceBundle.getBundle(fBundleName);
- String title= Utilities.getString(bundle, "title"); //$NON-NLS-1$
-
- Shell parentShell= CompareUIPlugin.getShell();
-
- IFileState states[]= null;
- try {
- states= file.getHistory(null);
- } catch (CoreException ex) {
- MessageDialog.openError(parentShell, title, ex.getMessage());
- return;
- }
-
- if (states == null || states.length <= 0) {
- String msg= Utilities.getString(bundle, "noLocalHistoryError"); //$NON-NLS-1$
- MessageDialog.openInformation(parentShell, title, msg);
- return;
- }
-
- ITypedElement base= new ResourceNode(file);
-
- IDocument document= getDocument(file);
- ITypedElement target= base;
- if (document != null)
- target= new DocumentBufferNode(document, file);
-
- ITypedElement[] editions= new ITypedElement[states.length+1];
- editions[0]= base;
- for (int i= 0; i < states.length; i++)
- editions[i+1]= new HistoryItem(base, states[i]);
-
- EditionSelectionDialog d= new EditionSelectionDialog(parentShell, bundle);
- d.setEditionTitleArgument(file.getName());
- d.setEditionTitleImage(CompareUIPlugin.getImage(file));
- //d.setHideIdenticalEntries(false);
-
- if (fReplaceMode) {
-
- ITypedElement ti= null;
- if (fPrevious)
- ti= d.selectPreviousEdition(target, editions, null);
- else
- ti= d.selectEdition(target, editions, null);
-
- if (ti instanceof IStreamContentAccessor) {
- IStreamContentAccessor sa= (IStreamContentAccessor)ti;
- try {
-
- if (document != null)
- updateDocument(document, sa);
- else
- updateWorkspace(bundle, parentShell, sa, file);
-
- } catch (InterruptedException x) {
- // Do nothing. Operation has been canceled by user.
-
- } catch (InvocationTargetException x) {
- String reason= x.getTargetException().getMessage();
- MessageDialog.openError(parentShell, title, Utilities.getFormattedString(bundle, "replaceError", reason)); //$NON-NLS-1$
- }
- }
- } else {
- d.setCompareMode(true);
-
- d.selectEdition(target, editions, null);
- }
- }
-
- private void updateWorkspace(final ResourceBundle bundle, Shell shell,
- final IStreamContentAccessor sa, final IFile file)
- throws InvocationTargetException, InterruptedException {
-
- WorkspaceModifyOperation operation= new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor pm) throws InvocationTargetException {
- try {
- String taskName= Utilities.getString(bundle, "taskName"); //$NON-NLS-1$
- pm.beginTask(taskName, IProgressMonitor.UNKNOWN);
- file.setContents(sa.getContents(), false, true, pm);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- pm.done();
- }
- }
- };
-
- ProgressMonitorDialog pmdialog= new ProgressMonitorDialog(shell);
- pmdialog.run(false, true, operation);
- }
-
- private void updateDocument(IDocument document, IStreamContentAccessor sa) throws InvocationTargetException {
- try {
- InputStream is= sa.getContents();
- String text= Utilities.readString(is);
- document.replace(0, document.getLength(), text);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } catch (BadLocationException e) {
- throw new InvocationTargetException(e);
- }
- }
-
- private IDocument getDocument(IFile file) {
- IWorkbench wb= PlatformUI.getWorkbench();
- if (wb == null)
- return null;
- IWorkbenchWindow[] ws= wb.getWorkbenchWindows();
- if (ws == null)
- return null;
-
- FileEditorInput test= new FileEditorInput(file);
-
- for (int i= 0; i < ws.length; i++) {
- IWorkbenchWindow w= ws[i];
- IWorkbenchPage[] wps= w.getPages();
- if (wps != null) {
- for (int j= 0; j < wps.length; j++) {
- IWorkbenchPage wp= wps[j];
- IEditorPart ep= wp.findEditor(test);
- if (ep instanceof ITextEditor) {
- ITextEditor te= (ITextEditor) ep;
- IDocumentProvider dp= te.getDocumentProvider();
- if (dp != null) {
- IDocument doc= dp.getDocument(ep);
- if (doc != null)
- return doc;
- }
- }
- }
- }
- }
- return null;
- }
-
- private IFile[] getFiles(ISelection selection, boolean modifiable) {
- ArrayList result= new ArrayList();
- Object[] s= Utilities.toArray(selection);
- for (int i= 0; i < s.length; i++) {
- Object o= s[i];
- IFile file= null;
- if (o instanceof IFile) {
- file= (IFile) o;
- } else if (o instanceof IAdaptable) {
- IAdaptable a= (IAdaptable) o;
- Object adapter= a.getAdapter(IResource.class);
- if (adapter instanceof IFile)
- file= (IFile) adapter;
- }
- if (file != null) {
- if (modifiable) {
- if (!file.isReadOnly())
- result.add(file);
- } else {
- result.add(file);
- }
- }
- }
- return (IFile[]) result.toArray(new IFile[result.size()]);
- }
-
-
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ExceptionHandler.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ExceptionHandler.java
deleted file mode 100644
index 773b0499c..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ExceptionHandler.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.io.StringWriter;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.swt.widgets.Shell;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-
-/**
- * The default exception handler shows an error dialog when one of its handle methods
- * is called. If the passed exception is a <code>CoreException</code> an error dialog
- * pops up showing the exception's status information. For a <code>InvocationTargetException</code>
- * a normal message dialog pops up showing the exception's message. Additionally the exception
- * is written to the platform log.
- */
-public class ExceptionHandler {
-
- private static ExceptionHandler fgInstance= new ExceptionHandler();
-
- /**
- * Logs the given exception using the platform's logging mechanism. The exception is
- * logged as an error with the error code <code>JavaStatusConstants.INTERNAL_ERROR</code>.
- */
- public static void log(Throwable t, String message) {
- CompareUIPlugin.log(new Status(IStatus.ERROR, CompareUIPlugin.getPluginId(),
- CompareUIPlugin.INTERNAL_ERROR, message, t));
- }
-
- /**
- * Handles the given <code>CoreException</code>. The workbench shell is used as a parent
- * for the dialog window.
- *
- * @param e the <code>CoreException</code> to be handled
- * @param title the dialog window's window title
- * @param message message to be displayed by the dialog window
- */
- public static void handle(CoreException e, String title, String message) {
- handle(e, CompareUIPlugin.getShell(), title, message);
- }
-
- /**
- * Handles the given <code>CoreException</code>.
- *
- * @param e the <code>CoreException</code> to be handled
- * @param parent the dialog window's parent shell
- * @param title the dialog window's window title
- * @param message message to be displayed by the dialog window
- */
- public static void handle(CoreException e, Shell parent, String title, String message) {
- fgInstance.perform(e, parent, title, message);
- }
-
- /**
- * Handles the given <code>InvocationTargetException</code>. The workbench shell is used
- * as a parent for the dialog window.
- *
- * @param e the <code>InvocationTargetException</code> to be handled
- * @param title the dialog window's window title
- * @param message message to be displayed by the dialog window
- */
- public static void handle(InvocationTargetException e, String title, String message) {
- handle(e, CompareUIPlugin.getShell(), title, message);
- }
-
- /**
- * Handles the given <code>InvocationTargetException</code>.
- *
- * @param e the <code>InvocationTargetException</code> to be handled
- * @param parent the dialog window's parent shell
- * @param title the dialog window's window title
- * @param message message to be displayed by the dialog window
- */
- public static void handle(InvocationTargetException e, Shell parent, String title, String message) {
- fgInstance.perform(e, parent, title, message);
- }
-
- //---- Hooks for subclasses to control exception handling ------------------------------------
-
- protected void perform(CoreException e, Shell shell, String title, String message) {
- CompareUIPlugin.log(e);
- IStatus status= e.getStatus();
- if (status != null) {
- ErrorDialog.openError(shell, title, message, status);
- } else {
- displayMessageDialog(e, e.getMessage(), shell, title, message);
- }
- }
-
- protected void perform(InvocationTargetException e, Shell shell, String title, String message) {
- Throwable target= e.getTargetException();
- if (target instanceof CoreException) {
- perform((CoreException)target, shell, title, message);
- } else {
- CompareUIPlugin.log(e);
- if (e.getMessage() != null && e.getMessage().length() > 0) {
- displayMessageDialog(e, e.getMessage(), shell, title, message);
- } else {
- displayMessageDialog(e, target.getMessage(), shell, title, message);
- }
- }
- }
-
- //---- Helper methods -----------------------------------------------------------------------
-
- private void displayMessageDialog(Throwable t, String exceptionMessage, Shell shell, String title, String message) {
- StringWriter msg= new StringWriter();
- if (message != null) {
- msg.write(message);
- msg.write("\n\n"); //$NON-NLS-1$
- }
- if (exceptionMessage == null || exceptionMessage.length() == 0)
- msg.write(CompareMessages.getString("ExceptionDialog.seeErrorLogMessage")); //$NON-NLS-1$
- else
- msg.write(exceptionMessage);
- MessageDialog.openError(shell, title, msg.toString());
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/INavigatable.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/INavigatable.java
deleted file mode 100644
index 88ac71dbf..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/INavigatable.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-public interface INavigatable {
-
- static final String NAVIGATOR_PROPERTY= "org.eclipse.compare.internal.Navigator"; //$NON-NLS-1$
-
- /**
- * Returns true if at end or beginning.
- */
- boolean gotoDifference(boolean next);
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ISavable.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ISavable.java
deleted file mode 100644
index d4b4cc2f8..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ISavable.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.CoreException;
-
-public interface ISavable {
-
- void save(IProgressMonitor pm) throws CoreException;
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/IStructureCreatorDescriptor.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/IStructureCreatorDescriptor.java
deleted file mode 100644
index e637e5311..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/IStructureCreatorDescriptor.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.compare.structuremergeviewer.IStructureCreator;
-
-/**
- * A factory object for creating <code>IStructureCreator</code>s from a descriptor.
- * <p>
- * It is used when registering <code>IStructureCreator</code> for types
- * in <code>CompareUIPlugin.registerStructureCreator</code>.
- * </p>
- *
- * @see IStructureCreator
- * @see CompareUIPlugin
- */
-public interface IStructureCreatorDescriptor {
-
- /**
- * Creates a new structure creator.
- *
- * @return a newly created structure creator
- */
- IStructureCreator createStructureCreator();
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/IViewerDescriptor.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/IViewerDescriptor.java
deleted file mode 100644
index 8d69626db..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/IViewerDescriptor.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.widgets.Composite;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.compare.CompareConfiguration;
-
-/**
- * A factory object for creating a <code>Viewer</code>s from a descriptor.
- * <p>
- * It is used when registering a viewer for a specific type
- * in <code>CompareUIPlugin.registerContentViewerDescriptor</code> and
- * in <code>CompareUIPlugin.registerStructureViewerDescriptor</code>.
- *
- * @see org.eclipse.compare.structuremergeviewer.IStructureCreator
- * @see CompareUIPlugin
- */
-public interface IViewerDescriptor {
-
- /**
- * Creates a new viewer from this descriptor under the given STW parent control.
- * If the current viewer has the same type as a new viewer
- * the implementation of this method is free to return the current viewer instead.
- *
- * @param currentViewer the current viewer which is going to be replaced with a new viewer.
- * @param parent the SWT parent control under which the new viewer has to be created.
- * @param config a compare configuration the new viewer might be interested in.
- * @return a new viewer or the current viewer.
- */
- Viewer createViewer(Viewer currentViewer, Composite parent, CompareConfiguration config);
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/IgnoreWhiteSpaceAction.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/IgnoreWhiteSpaceAction.java
deleted file mode 100644
index bcfc62b60..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/IgnoreWhiteSpaceAction.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.compare.*;
-
-/**
- * Toggles the <code>ICompareConfiguration.IGNORE_WS</code> property of an
- * <code>ICompareConfiguration</code>.
- */
-public class IgnoreWhiteSpaceAction extends ChangePropertyAction {
-
- public IgnoreWhiteSpaceAction(ResourceBundle bundle, CompareConfiguration cc) {
- super(bundle, cc, "action.IgnoreWhiteSpace.", CompareConfiguration.IGNORE_WHITESPACE); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageCanvas.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageCanvas.java
deleted file mode 100644
index 3a3ec3326..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageCanvas.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * A <code>Canvas</code> showing a single centered SWT <code>Image</code>.
- * If the <code>Image</code> is larger than the <code>Canvas<code>,
- * <code>Scrollbars</code> will appear.
- */
-class ImageCanvas extends Canvas {
-
- private Image fImage;
-
- /**
- * Create a new ImageCanvas with the given SWT stylebits.
- * (SWT.H_SCROLL and SWT.V_SCROLL are automtically added).
- */
- public ImageCanvas(Composite parent, int style) {
- super(parent, style | SWT.H_SCROLL | SWT.V_SCROLL);
-
- ScrollBar sb= getHorizontalBar();
- sb.setIncrement(20);
- sb.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- repaint();
- }
- });
-
- sb= getVerticalBar();
- sb.setIncrement(20);
- sb.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- repaint();
- }
- });
-
- addListener(SWT.Resize, new Listener() {
- public void handleEvent(Event e) {
- updateScrollbars();
- }
- });
-
- addListener(SWT.Paint, new Listener() {
- public void handleEvent(Event event) {
- paint(event.gc);
- }
- });
- }
-
- /**
- * Set the SWT Image to use as the ImageCanvas contents.
- */
- public void setImage(Image img) {
- fImage= img;
-
- if (!isDisposed()) {
- getHorizontalBar().setSelection(0);
- getVerticalBar().setSelection(0);
- updateScrollbars();
- getParent().layout();
- redraw();
- }
- }
-
- public void repaint() {
- if (!isDisposed()) {
- GC gc= new GC(this);
- paint(gc);
- gc.dispose();
- }
- }
-
- /**
- * @private
- */
- private void paint(GC gc) {
- if (fImage != null) {
- Rectangle bounds= fImage.getBounds();
- Rectangle clientArea= getClientArea();
-
- int x;
- if (bounds.width < clientArea.width)
- x= (clientArea.width - bounds.width) / 2;
- else
- x= -getHorizontalBar().getSelection();
-
- int y;
- if (bounds.height < clientArea.height)
- y= (clientArea.height - bounds.height) / 2;
- else
- y= -getVerticalBar().getSelection();
-
- gc.drawImage(fImage, x, y);
- }
- }
-
- /**
- * @private
- */
- private void updateScrollbars() {
- Rectangle bounds= fImage != null ? fImage.getBounds() : new Rectangle(0, 0, 0, 0);
- Point size= getSize();
- Rectangle clientArea= getClientArea();
-
- ScrollBar horizontal= getHorizontalBar();
- if (bounds.width <= clientArea.width) {
- horizontal.setVisible(false);
- horizontal.setSelection(0);
- } else {
- horizontal.setPageIncrement(clientArea.width - horizontal.getIncrement());
- int max= bounds.width + (size.x - clientArea.width);
- horizontal.setMaximum(max);
- horizontal.setThumb(size.x > max ? max : size.x);
- horizontal.setVisible(true);
- }
-
- ScrollBar vertical= getVerticalBar();
- if (bounds.height <= clientArea.height) {
- vertical.setVisible(false);
- vertical.setSelection(0);
- } else {
- vertical.setPageIncrement(clientArea.height - vertical.getIncrement());
- int max= bounds.height + (size.y - clientArea.height);
- vertical.setMaximum(max);
- vertical.setThumb(size.y > max ? max : size.y);
- vertical.setVisible(true);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewer.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewer.java
deleted file mode 100644
index 8373bed55..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewer.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.IOException;
-import java.util.ResourceBundle;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.SWTException;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-
-import org.eclipse.core.runtime.CoreException;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.contentmergeviewer.ContentMergeViewer;
-
-/**
- */
-public class ImageMergeViewer extends ContentMergeViewer {
-
- private static final String BUNDLE_NAME= "org.eclipse.compare.internal.ImageMergeViewerResources"; //$NON-NLS-1$
-
- private Object fAncestorImage;
- private Object fLeftImage;
- private Object fRightImage;
-
- private ImageCanvas fAncestor;
- private ImageCanvas fLeft;
- private ImageCanvas fRight;
-
-
- public ImageMergeViewer(Composite parent, int styles, CompareConfiguration mp) {
- super(styles, ResourceBundle.getBundle(BUNDLE_NAME), mp);
- buildControl(parent);
- String title= Utilities.getString(getResourceBundle(), "title"); //$NON-NLS-1$
- getControl().setData(CompareUI.COMPARE_VIEWER_TITLE, title);
- }
-
- protected void updateContent(Object ancestor, Object left, Object right) {
-
- fAncestorImage= ancestor;
- setInput(fAncestor, ancestor);
-
- fLeftImage= left;
- setInput(fLeft, left);
-
- fRightImage= right;
- setInput(fRight, right);
- }
-
- /**
- * We can't modify the contents of either side we just return null.
- */
- protected byte[] getContents(boolean left) {
- return null;
- }
-
- public void createControls(Composite composite) {
- fAncestor= new ImageCanvas(composite, SWT.NO_FOCUS);
- fLeft= new ImageCanvas(composite, SWT.NO_FOCUS);
- fRight= new ImageCanvas(composite, SWT.NO_FOCUS);
- }
-
- private static void setInput(ImageCanvas canvas, Object input) {
- if (canvas != null) {
-
- InputStream stream= null;
- if (input instanceof IStreamContentAccessor) {
- IStreamContentAccessor sca= (IStreamContentAccessor) input;
- if (sca != null) {
- try {
- stream= sca.getContents();
- } catch (CoreException ex) {
- }
- }
- }
-
- Image image= null;
- Display display= canvas.getDisplay();
- if (stream != null) {
- try {
- image= new Image(display, stream);
- } catch (SWTException ex) {
- }
- }
-
- canvas.setImage(image);
- if (image != null) {
- canvas.setBackground(display.getSystemColor(SWT.COLOR_LIST_BACKGROUND));
- } else {
- canvas.setBackground(null);
- }
-
- if (stream != null) {
- try {
- stream.close();
- } catch (IOException ex) {
- }
- }
- }
- }
-
- protected void handleResizeAncestor(int x, int y, int width, int height) {
- if (width > 0) {
- fAncestor.setVisible(true);
- fAncestor.setBounds(x, y, width, height);
- } else {
- fAncestor.setVisible(false);
- }
- }
-
- protected void handleResizeLeftRight(int x, int y, int width1, int centerWidth, int width2, int height) {
- fLeft.setBounds(x, y, width1, height);
- fRight.setBounds(x+width1+centerWidth, y, width2, height);
- }
-
- protected void copy(boolean leftToRight) {
- if (leftToRight) {
- fRightImage= fLeftImage;
- setInput(fRight, fRightImage);
- setRightDirty(true);
- } else {
- fLeftImage= fRightImage;
- setInput(fLeft, fLeftImage);
- setLeftDirty(true);
- }
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewerCreator.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewerCreator.java
deleted file mode 100644
index 2d40636a5..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewerCreator.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-
-import org.eclipse.compare.*;
-import org.eclipse.jface.viewers.Viewer;
-
-/**
- * A factory object for the <code>ImageMergeViewer</code>.
- * This indirection is necessary because only objects with a default
- * constructor can be created via an extension point
- * (this precludes Viewers).
- */
-public class ImageMergeViewerCreator implements IViewerCreator {
-
- public Viewer createViewer(Composite parent, CompareConfiguration mp) {
- return new ImageMergeViewer(parent, SWT.NULL, mp);
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewerResources.properties b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewerResources.properties
deleted file mode 100644
index b150dda86..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewerResources.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-# =====================================
-# (c) Copyright IBM Corp. 2000, 2001.
-# All Rights Reserved.
-# =====================================
-
-# @(#)ImageMergeViewerResources.properties
-#
-# Resource strings for ImageMergeViewer.java
-
-title= Image Compare
-
-#####################################################
-# Actions
-#####################################################
-
-action.CopyLeftToRight.label= Copy Left to Right
-action.CopyLeftToRight.tooltip= Copy Image from Left to Right
-action.CopyLeftToRight.image= elcl16/copy_r_co.gif
-
-action.CopyRightToLeft.label= Copy Right to Left
-action.CopyRightToLeft.tooltip= Copy Image from Right to Left
-action.CopyRightToLeft.image= elcl16/copy_l_co.gif
-
-action.EnableAncestor.label= Enable Ancestor Pane
-action.EnableAncestor.tooltip= Control Visibility of Ancestor Pane
-action.EnableAncestor.image= elcl16/ancestorpane_co.gif
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ListContentProvider.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ListContentProvider.java
deleted file mode 100644
index 9170edeca..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ListContentProvider.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.util.List;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-
-/**
- * A specialized content provider to show a list of editor parts.
- */
-public class ListContentProvider implements IStructuredContentProvider {
- List fContents;
-
- public ListContentProvider() {
- }
-
- public Object[] getElements(Object input) {
- if (fContents != null && fContents == input)
- return fContents.toArray();
- return new Object[0];
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- if (newInput instanceof List)
- fContents= (List)newInput;
- else
- fContents= null;
- // we use a fixed set.
- }
-
- public void dispose() {
- }
-
- public boolean isDeleted(Object o) {
- return fContents != null && !fContents.contains(o);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ListDialog.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ListDialog.java
deleted file mode 100644
index 7cd262479..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ListDialog.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.*;
-
-import org.eclipse.ui.dialogs.SelectionDialog;
-
-public class ListDialog extends SelectionDialog {
-
- private IStructuredContentProvider fContentProvider;
- private ILabelProvider fLabelProvider;
- private Object fInput;
- private TableViewer fTableViewer;
- private boolean fAddCancelButton;
-
- public ListDialog(Shell parent) {
- super(parent);
- fAddCancelButton= false;
- }
-
- public void setInput(Object input) {
- fInput= input;
- }
-
- public void setContentProvider(IStructuredContentProvider sp){
- fContentProvider= sp;
- }
-
- public void setLabelProvider(ILabelProvider lp){
- fLabelProvider= lp;
- }
-
- public void setAddCancelButton(boolean addCancelButton) {
- fAddCancelButton= addCancelButton;
- }
-
- public TableViewer getTableViewer(){
- return fTableViewer;
- }
-
- public boolean hasFilters(){
- return fTableViewer.getFilters() != null && fTableViewer.getFilters().length != 0;
- }
-
- public void create() {
- setShellStyle(SWT.DIALOG_TRIM | SWT.RESIZE);
- super.create();
- }
-
- protected void createButtonsForButtonBar(Composite parent) {
- if (! fAddCancelButton)
- createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- else
- super.createButtonsForButtonBar(parent);
- }
-
- protected Control createDialogArea(Composite container) {
- Composite parent= (Composite) super.createDialogArea(container);
- createMessageArea(parent);
- fTableViewer= new TableViewer(parent, getTableStyle());
- fTableViewer.setContentProvider(fContentProvider);
- Table table= fTableViewer.getTable();
- fTableViewer.setLabelProvider(fLabelProvider);
- fTableViewer.setInput(fInput);
- GridData gd= new GridData(GridData.FILL_BOTH);
- gd.heightHint= convertHeightInCharsToPixels(15);
- gd.widthHint= convertWidthInCharsToPixels(55);
- table.setLayoutData(gd);
- return parent;
- }
-
- protected int getTableStyle() {
- return SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER;
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeSourceViewer.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeSourceViewer.java
deleted file mode 100644
index 307a1d139..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeSourceViewer.java
+++ /dev/null
@@ -1,392 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.util.*;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.graphics.Font;
-
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.text.*;
-import org.eclipse.jface.util.*;
-import org.eclipse.jface.text.source.*;
-
-import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.ui.texteditor.IUpdate;
-import org.eclipse.ui.IWorkbenchActionConstants;
-
-import org.eclipse.compare.contentmergeviewer.TextMergeViewer;
-
-/**
- * Extends the JFace SourceViewer with some convenience methods.
- */
-public class MergeSourceViewer extends SourceViewer
- implements ISelectionChangedListener, ITextListener, IMenuListener {
-
- public static final String UNDO_ID= "undo"; //$NON-NLS-1$
- public static final String REDO_ID= "redo"; //$NON-NLS-1$
- public static final String CUT_ID= "cut"; //$NON-NLS-1$
- public static final String COPY_ID= "copy"; //$NON-NLS-1$
- public static final String PASTE_ID= "paste"; //$NON-NLS-1$
- public static final String DELETE_ID= "delete"; //$NON-NLS-1$
- public static final String SELECT_ALL_ID= "selectAll"; //$NON-NLS-1$
- public static final String SAVE_ID= "save"; //$NON-NLS-1$
-
- class TextOperationAction extends MergeViewerAction {
-
- private int fOperationCode;
-
- TextOperationAction(int operationCode, boolean mutable, boolean selection, boolean content) {
- super(mutable, selection, content);
- fOperationCode= operationCode;
- update();
- }
-
- public void run() {
- if (isEnabled())
- doOperation(fOperationCode);
- }
-
- public boolean isEnabled() {
- return fOperationCode != -1 && canDoOperation(fOperationCode);
- }
-
- public void update() {
- this.setEnabled(isEnabled());
- }
- }
-
- private ResourceBundle fResourceBundle;
- private Position fRegion;
- private boolean fEnabled= true;
- private HashMap fActions= new HashMap();
-
- private boolean fInitialized= true;
- private boolean fAddSaveAction= true;
-
-
- public MergeSourceViewer(Composite parent, ResourceBundle bundle) {
- super(parent, null, SWT.H_SCROLL + SWT.V_SCROLL);
-
- fResourceBundle= bundle;
-
- MenuManager menu= new MenuManager();
- menu.setRemoveAllWhenShown(true);
- menu.addMenuListener(this);
- StyledText te= getTextWidget();
- te.setMenu(menu.createContextMenu(te));
- }
-
- public void hideSaveAction() {
- fAddSaveAction= false;
- }
-
- public void setFont(Font font) {
- StyledText te= getTextWidget();
- if (te != null)
- te.setFont(font);
- }
-
- public void setBackgroundColor(Color color) {
- StyledText te= getTextWidget();
- if (te != null)
- te.setBackground(color);
- }
-
- public void setEnabled(boolean enabled) {
- if (enabled != fEnabled) {
- fEnabled= enabled;
- StyledText c= getTextWidget();
- if (c != null) {
- c.setEnabled(enabled);
- Display d= c.getDisplay();
- c.setBackground(enabled ? d.getSystemColor(SWT.COLOR_LIST_BACKGROUND) : null);
- }
- }
- }
-
- public boolean getEnabled() {
- return fEnabled;
- }
-
- public void setRegion(Position region) {
- fRegion= region;
- }
-
- public Position getRegion() {
- return fRegion;
- }
-
- public boolean isControlOkToUse() {
- StyledText t= getTextWidget();
- return t != null && !t.isDisposed();
- }
-
- public void setSelection(Position position) {
- if (position != null)
- setSelectedRange(position.getOffset(), position.getLength());
- }
-
- public void setLineBackground(Position position, Color c) {
- StyledText t= getTextWidget();
- if (t != null && !t.isDisposed()) {
- Point region= new Point(0, 0);
- getLineRange(position, region);
-
- region.x-= getDocumentRegionOffset();
-
- try {
- t.setLineBackground(region.x, region.y, c);
- } catch (IllegalArgumentException ex) {
- }
- }
- }
-
- public void resetLineBackground() {
- StyledText t= getTextWidget();
- if (t != null && !t.isDisposed()) {
- int lines= getLineCount();
- t.setLineBackground(0, lines, null);
- }
- }
-
- /**
- * Returns number of lines in document region.
- */
- public int getLineCount() {
- IRegion region= getVisibleRegion();
-
- int length= region.getLength();
- if (length == 0)
- return 0;
-
- IDocument doc= getDocument();
- int startLine= 0;
- int endLine= 0;
-
- int start= region.getOffset();
- try {
- startLine= doc.getLineOfOffset(start);
- } catch(BadLocationException ex) {
- }
- try {
- endLine= doc.getLineOfOffset(start+length);
- } catch(BadLocationException ex) {
- }
-
- return endLine-startLine+1;
- }
-
- public int getViewportLines() {
- StyledText te= getTextWidget();
- Rectangle clArea= te.getClientArea();
- if (!clArea.isEmpty())
- return clArea.height / te.getLineHeight();
- return 0;
- }
-
- public int getViewportHeight() {
- StyledText te= getTextWidget();
- Rectangle clArea= te.getClientArea();
- if (!clArea.isEmpty())
- return clArea.height;
- return 0;
- }
-
- /**
- * Returns lines
- */
- public int getDocumentRegionOffset() {
- int start= getVisibleRegion().getOffset();
- IDocument doc= getDocument();
- if (doc != null) {
- try {
- return doc.getLineOfOffset(start);
- } catch(BadLocationException ex) {
- }
- }
- return 0;
- }
-
- public int getVerticalScrollOffset() {
- StyledText st= getTextWidget();
- int lineHeight= st.getLineHeight();
- return getTopInset() - ((getDocumentRegionOffset()*lineHeight) + st.getTopPixel());
- }
-
- /**
- * Returns the start line and the number of lines which correspond to the given position.
- * Starting line number is 0 based.
- */
- public Point getLineRange(Position p, Point region) {
-
- IDocument doc= getDocument();
-
- if (p == null || doc == null) {
- region.x= 0;
- region.y= 0;
- return region;
- }
-
- int start= p.getOffset();
- int length= p.getLength();
-
- int startLine= 0;
- try {
- startLine= doc.getLineOfOffset(start);
- } catch (BadLocationException e) {
- }
-
- int lineCount= 0;
-
- if (length == 0) {
-// // if range length is 0 and if range starts a new line
-// try {
-// if (start == doc.getLineStartOffset(startLine)) {
-// lines--;
-// }
-// } catch (BadLocationException e) {
-// lines--;
-// }
-
- } else {
- int endLine= 0;
- try {
- endLine= doc.getLineOfOffset(start + length - 1); // why -1?
- } catch (BadLocationException e) {
- }
- lineCount= endLine-startLine+1;
- }
-
- region.x= startLine;
- region.y= lineCount;
- return region;
- }
-
- /**
- * Scroll TextPart to the given line.
- */
- public void vscroll(int line) {
-
- int srcViewSize= getLineCount();
- int srcExtentSize= getViewportLines();
-
- if (srcViewSize > srcExtentSize) {
-
- if (line < 0)
- line= 0;
-
- int cp= getTopIndex();
- if (cp != line)
- setTopIndex(line + getDocumentRegionOffset());
- }
- }
-
- public void addAction(String actionId, MergeViewerAction action) {
- fActions.put(actionId, action);
- }
-
- public MergeViewerAction getAction(String actionId) {
- MergeViewerAction action= (MergeViewerAction) fActions.get(actionId);
- if (action == null) {
- action= createAction(actionId);
- if (action == null)
- return null;
-
- if (action.isContentDependent())
- addTextListener(this);
- if (action.isSelectionDependent())
- addSelectionChangedListener(this);
-
- Utilities.initAction(action, fResourceBundle, "action." + actionId + "."); //$NON-NLS-1$ //$NON-NLS-2$
- fActions.put(actionId, action);
- }
- if (action.isEditableDependent() && !isEditable())
- return null;
- return action;
- }
-
- protected MergeViewerAction createAction(String actionId) {
- if (UNDO_ID.equals(actionId))
- return new TextOperationAction(UNDO, true, false, true);
- if (REDO_ID.equals(actionId))
- return new TextOperationAction(REDO, true, false, true);
- if (CUT_ID.equals(actionId))
- return new TextOperationAction(CUT, true, true, false);
- if (COPY_ID.equals(actionId))
- return new TextOperationAction(COPY, false, true, false);
- if (PASTE_ID.equals(actionId))
- return new TextOperationAction(PASTE, true, false, false);
- if (DELETE_ID.equals(actionId))
- return new TextOperationAction(DELETE, true, false, false);
- if (SELECT_ALL_ID.equals(actionId))
- return new TextOperationAction(SELECT_ALL, false, false, false);
- return null;
- }
-
- public void selectionChanged(SelectionChangedEvent event) {
- Iterator e= fActions.values().iterator();
- while (e.hasNext()) {
- MergeViewerAction action= (MergeViewerAction) e.next();
- if (action.isSelectionDependent())
- action.update();
- }
- }
-
- public void textChanged(TextEvent event) {
- Iterator e= fActions.values().iterator();
- while (e.hasNext()) {
- MergeViewerAction action= (MergeViewerAction) e.next();
- if (action.isContentDependent())
- action.update();
- }
- }
-
- /**
- * Allows the viewer to add menus and/or tools to the context menu.
- */
- public void menuAboutToShow(IMenuManager menu) {
-
- menu.add(new Separator("undo")); //$NON-NLS-1$
- addMenu(menu, UNDO_ID);
- addMenu(menu, REDO_ID);
-
- menu.add(new Separator("ccp")); //$NON-NLS-1$
- addMenu(menu, CUT_ID);
- addMenu(menu, COPY_ID);
- addMenu(menu, PASTE_ID);
- addMenu(menu, DELETE_ID);
- addMenu(menu, SELECT_ALL_ID);
-
- menu.add(new Separator("edit")); //$NON-NLS-1$
- menu.add(new Separator("find")); //$NON-NLS-1$
- //addMenu(menu, FIND_ID);
-
- menu.add(new Separator("save")); //$NON-NLS-1$
- if (fAddSaveAction)
- addMenu(menu, SAVE_ID);
-
- menu.add(new Separator("rest")); //$NON-NLS-1$
- }
-
- private void addMenu(IMenuManager menu, String actionId) {
- IAction action= getAction(actionId);
- if (action != null)
- menu.add(action);
- }
-
- protected void handleDispose() {
-
- removeTextListener(this);
- removeSelectionChangedListener(this);
-
- super.handleDispose();
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeViewerAction.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeViewerAction.java
deleted file mode 100644
index 52269f883..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeViewerAction.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.ui.texteditor.IUpdate;
-import org.eclipse.jface.action.Action;
-
-
-public abstract class MergeViewerAction extends Action implements IUpdate {
-
- private boolean fMutable;
- private boolean fSelection;
- private boolean fContent;
-
- public MergeViewerAction(boolean mutable, boolean selection, boolean content) {
- fMutable= mutable;
- fSelection= selection;
- fContent= content;
- }
-
- public boolean isSelectionDependent() {
- return fSelection;
- }
-
- public boolean isContentDependent() {
- return fContent;
- }
-
- public boolean isEditableDependent() {
- return fMutable;
- }
-
- public void update() {
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeViewerContentProvider.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeViewerContentProvider.java
deleted file mode 100644
index d193501e5..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeViewerContentProvider.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.jface.viewers.Viewer;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.*;
-import org.eclipse.compare.contentmergeviewer.IMergeViewerContentProvider;
-
-/**
- * Adapts any <code>ContentMergeViewer</code> to work on an <code>ICompareInput</code>
- * e.g. a <code>DiffNode</code>.
- */
-public class MergeViewerContentProvider implements IMergeViewerContentProvider {
-
- private CompareConfiguration fCompareConfiguration;
-
- public MergeViewerContentProvider(CompareConfiguration cc) {
- fCompareConfiguration= cc;
- }
-
- public void dispose() {
- }
-
- public void inputChanged(Viewer v, Object o1, Object o2) {
- // we are not interested since we have no state
- }
-
- //---- ancestor
-
- public String getAncestorLabel(Object element) {
- return fCompareConfiguration.getAncestorLabel(element);
- }
-
- public Image getAncestorImage(Object element) {
- return fCompareConfiguration.getAncestorImage(element);
- }
-
- public Object getAncestorContent(Object element) {
- if (element instanceof ICompareInput)
- return ((ICompareInput) element).getAncestor();
- return null;
- }
-
- public boolean showAncestor(Object element) {
- if (element instanceof ICompareInput)
- return (((ICompareInput)element).getKind() & Differencer.DIRECTION_MASK) == Differencer.CONFLICTING;
- return false;
- }
-
- //---- left
-
- public String getLeftLabel(Object element) {
- return fCompareConfiguration.getLeftLabel(element);
- }
-
- public Image getLeftImage(Object element) {
- return fCompareConfiguration.getLeftImage(element);
- }
-
- public Object getLeftContent(Object element) {
- if (element instanceof ICompareInput)
- return ((ICompareInput) element).getLeft();
- return null;
- }
-
- public boolean isLeftEditable(Object element) {
- if (element instanceof ICompareInput) {
- Object left= ((ICompareInput) element).getLeft();
- if (left == null) {
- IDiffElement parent= ((IDiffElement)element).getParent();
- if (parent instanceof ICompareInput)
- left= ((ICompareInput) parent).getLeft();
- }
- if (left instanceof IEditableContent)
- return ((IEditableContent)left).isEditable();
- }
- return false;
- }
-
- public void saveLeftContent(Object element, byte[] bytes) {
- if (element instanceof ICompareInput) {
- ICompareInput node= (ICompareInput) element;
- if (bytes != null) {
- ITypedElement left= node.getLeft();
- // #9869: problem if left is null (because no resource exists yet) nothing is done!
- if (left == null) {
- node.copy(false);
- left= node.getLeft();
- }
- if (left instanceof IEditableContent)
- ((IEditableContent)left).setContent(bytes);
- if (node instanceof ResourceCompareInput.MyDiffNode)
- ((ResourceCompareInput.MyDiffNode)node).fireChange();
- } else {
- node.copy(false);
- }
- }
- }
-
- //---- right
-
- public String getRightLabel(Object element) {
- return fCompareConfiguration.getRightLabel(element);
- }
-
- public Image getRightImage(Object element) {
- return fCompareConfiguration.getRightImage(element);
- }
-
- public Object getRightContent(Object element) {
- if (element instanceof ICompareInput)
- return ((ICompareInput) element).getRight();
- return null;
- }
-
- public boolean isRightEditable(Object element) {
- if (element instanceof ICompareInput) {
- Object right= ((ICompareInput) element).getRight();
- if (right == null) {
- IDiffContainer parent= ((IDiffElement)element).getParent();
- if (parent instanceof ICompareInput)
- right= ((ICompareInput) parent).getRight();
- }
- if (right instanceof IEditableContent)
- return ((IEditableContent)right).isEditable();
- }
- return false;
- }
-
- public void saveRightContent(Object element, byte[] bytes) {
- if (element instanceof ICompareInput) {
- ICompareInput node= (ICompareInput) element;
- if (bytes != null) {
- ITypedElement right= node.getRight();
- // #9869: problem if right is null (because no resource exists yet) nothing is done!
- if (right == null) {
- node.copy(true);
- right= node.getRight();
- }
- if (right instanceof IEditableContent)
- ((IEditableContent)right).setContent(bytes);
- if (node instanceof ResourceCompareInput.MyDiffNode)
- ((ResourceCompareInput.MyDiffNode)node).fireChange();
- } else {
- node.copy(true);
- }
- }
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/NullViewer.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/NullViewer.java
deleted file mode 100644
index 32887e36f..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/NullViewer.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.compare.CompareViewerSwitchingPane;
-
-/**
- * Used whenever the input is null or no viewer can be found.
- */
-public class NullViewer extends AbstractViewer {
-
- private Control fDummy;
-
- public NullViewer(Composite parent) {
-
- fDummy= new Tree(parent, SWT.NULL);
-
- CompareViewerSwitchingPane.clearToolBar(parent);
- }
-
- public Control getControl() {
- return fDummy;
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/OverlayPreferenceStore.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/OverlayPreferenceStore.java
deleted file mode 100644
index 232a93d85..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/OverlayPreferenceStore.java
+++ /dev/null
@@ -1,446 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-package org.eclipse.compare.internal;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceStore;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-
-/**
- * An overlaying preference store.
- */
-public class OverlayPreferenceStore implements IPreferenceStore {
-
-
- public static final class TypeDescriptor {
- private TypeDescriptor() {
- }
- };
-
- public static final TypeDescriptor BOOLEAN= new TypeDescriptor();
- public static final TypeDescriptor DOUBLE= new TypeDescriptor();
- public static final TypeDescriptor FLOAT= new TypeDescriptor();
- public static final TypeDescriptor INT= new TypeDescriptor();
- public static final TypeDescriptor LONG= new TypeDescriptor();
- public static final TypeDescriptor STRING= new TypeDescriptor();
-
- public static class OverlayKey {
-
- TypeDescriptor fDescriptor;
- String fKey;
-
- public OverlayKey(TypeDescriptor descriptor, String key) {
- fDescriptor= descriptor;
- fKey= key;
- }
- };
-
- private class PropertyListener implements IPropertyChangeListener {
-
- /*
- * @see IPropertyChangeListener#propertyChange(PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- OverlayKey key= findOverlayKey(event.getProperty());
- if (key != null)
- propagateProperty(fParent, key, fStore);
- }
- };
-
-
- private IPreferenceStore fParent;
- private IPreferenceStore fStore;
- private OverlayKey[] fOverlayKeys;
-
- private PropertyListener fPropertyListener;
-
-
- public OverlayPreferenceStore(IPreferenceStore parent, OverlayKey[] overlayKeys) {
- fParent= parent;
- fOverlayKeys= overlayKeys;
- fStore= new PreferenceStore();
- }
-
- private OverlayKey findOverlayKey(String key) {
- for (int i= 0; i < fOverlayKeys.length; i++) {
- if (fOverlayKeys[i].fKey.equals(key))
- return fOverlayKeys[i];
- }
- return null;
- }
-
- private boolean covers(String key) {
- return (findOverlayKey(key) != null);
- }
-
- private void propagateProperty(IPreferenceStore orgin, OverlayKey key, IPreferenceStore target) {
-
- if (orgin.isDefault(key.fKey)) {
- if (!target.isDefault(key.fKey))
- target.setToDefault(key.fKey);
- return;
- }
-
- TypeDescriptor d= key.fDescriptor;
- if (BOOLEAN == d) {
-
- boolean originValue= orgin.getBoolean(key.fKey);
- boolean targetValue= target.getBoolean(key.fKey);
- if (targetValue != originValue)
- target.setValue(key.fKey, originValue);
-
- } else if (DOUBLE == d) {
-
- double originValue= orgin.getDouble(key.fKey);
- double targetValue= target.getDouble(key.fKey);
- if (targetValue != originValue)
- target.setValue(key.fKey, originValue);
-
- } else if (FLOAT == d) {
-
- float originValue= orgin.getFloat(key.fKey);
- float targetValue= target.getFloat(key.fKey);
- if (targetValue != originValue)
- target.setValue(key.fKey, originValue);
-
- } else if (INT == d) {
-
- int originValue= orgin.getInt(key.fKey);
- int targetValue= target.getInt(key.fKey);
- if (targetValue != originValue)
- target.setValue(key.fKey, originValue);
-
- } else if (LONG == d) {
-
- long originValue= orgin.getLong(key.fKey);
- long targetValue= target.getLong(key.fKey);
- if (targetValue != originValue)
- target.setValue(key.fKey, originValue);
-
- } else if (STRING == d) {
-
- String originValue= orgin.getString(key.fKey);
- String targetValue= target.getString(key.fKey);
- if (targetValue != null && originValue != null && !targetValue.equals(originValue))
- target.setValue(key.fKey, originValue);
-
- }
- }
-
- public void propagate() {
- for (int i= 0; i < fOverlayKeys.length; i++)
- propagateProperty(fStore, fOverlayKeys[i], fParent);
- }
-
- private void loadProperty(IPreferenceStore orgin, OverlayKey key, IPreferenceStore target, boolean forceInitialization) {
- TypeDescriptor d= key.fDescriptor;
- if (BOOLEAN == d) {
-
- if (forceInitialization)
- target.setValue(key.fKey, true);
- target.setValue(key.fKey, orgin.getBoolean(key.fKey));
- target.setDefault(key.fKey, orgin.getDefaultBoolean(key.fKey));
-
- } else if (DOUBLE == d) {
-
- if (forceInitialization)
- target.setValue(key.fKey, 1.0D);
- target.setValue(key.fKey, orgin.getDouble(key.fKey));
- target.setDefault(key.fKey, orgin.getDefaultDouble(key.fKey));
-
- } else if (FLOAT == d) {
-
- if (forceInitialization)
- target.setValue(key.fKey, 1.0F);
- target.setValue(key.fKey, orgin.getFloat(key.fKey));
- target.setDefault(key.fKey, orgin.getDefaultFloat(key.fKey));
-
- } else if (INT == d) {
-
- if (forceInitialization)
- target.setValue(key.fKey, 1);
- target.setValue(key.fKey, orgin.getInt(key.fKey));
- target.setDefault(key.fKey, orgin.getDefaultInt(key.fKey));
-
- } else if (LONG == d) {
-
- if (forceInitialization)
- target.setValue(key.fKey, 1L);
- target.setValue(key.fKey, orgin.getLong(key.fKey));
- target.setDefault(key.fKey, orgin.getDefaultLong(key.fKey));
-
- } else if (STRING == d) {
-
- if (forceInitialization)
- target.setValue(key.fKey, "1"); //$NON-NLS-1$
- target.setValue(key.fKey, orgin.getString(key.fKey));
- target.setDefault(key.fKey, orgin.getDefaultString(key.fKey));
-
- }
- }
-
- public void load() {
- for (int i= 0; i < fOverlayKeys.length; i++)
- loadProperty(fParent, fOverlayKeys[i], fStore, true);
- }
-
- public void loadDefaults() {
- for (int i= 0; i < fOverlayKeys.length; i++)
- setToDefault(fOverlayKeys[i].fKey);
- }
-
- public void start() {
- if (fPropertyListener == null) {
- fPropertyListener= new PropertyListener();
- fParent.addPropertyChangeListener(fPropertyListener);
- }
- }
-
- public void stop() {
- if (fPropertyListener != null) {
- fParent.removePropertyChangeListener(fPropertyListener);
- fPropertyListener= null;
- }
- }
-
- /*
- * @see IPreferenceStore#addPropertyChangeListener(IPropertyChangeListener)
- */
- public void addPropertyChangeListener(IPropertyChangeListener listener) {
- fStore.addPropertyChangeListener(listener);
- }
-
- /*
- * @see IPreferenceStore#removePropertyChangeListener(IPropertyChangeListener)
- */
- public void removePropertyChangeListener(IPropertyChangeListener listener) {
- fStore.removePropertyChangeListener(listener);
- }
-
- /*
- * @see IPreferenceStore#firePropertyChangeEvent(String, Object, Object)
- */
- public void firePropertyChangeEvent(String name, Object oldValue, Object newValue) {
- fStore.firePropertyChangeEvent(name, oldValue, newValue);
- }
-
- /*
- * @see IPreferenceStore#contains(String)
- */
- public boolean contains(String name) {
- return fStore.contains(name);
- }
-
- /*
- * @see IPreferenceStore#getBoolean(String)
- */
- public boolean getBoolean(String name) {
- return fStore.getBoolean(name);
- }
-
- /*
- * @see IPreferenceStore#getDefaultBoolean(String)
- */
- public boolean getDefaultBoolean(String name) {
- return fStore.getDefaultBoolean(name);
- }
-
- /*
- * @see IPreferenceStore#getDefaultDouble(String)
- */
- public double getDefaultDouble(String name) {
- return fStore.getDefaultDouble(name);
- }
-
- /*
- * @see IPreferenceStore#getDefaultFloat(String)
- */
- public float getDefaultFloat(String name) {
- return fStore.getDefaultFloat(name);
- }
-
- /*
- * @see IPreferenceStore#getDefaultInt(String)
- */
- public int getDefaultInt(String name) {
- return fStore.getDefaultInt(name);
- }
-
- /*
- * @see IPreferenceStore#getDefaultLong(String)
- */
- public long getDefaultLong(String name) {
- return fStore.getDefaultLong(name);
- }
-
- /*
- * @see IPreferenceStore#getDefaultString(String)
- */
- public String getDefaultString(String name) {
- return fStore.getDefaultString(name);
- }
-
- /*
- * @see IPreferenceStore#getDouble(String)
- */
- public double getDouble(String name) {
- return fStore.getDouble(name);
- }
-
- /*
- * @see IPreferenceStore#getFloat(String)
- */
- public float getFloat(String name) {
- return fStore.getFloat(name);
- }
-
- /*
- * @see IPreferenceStore#getInt(String)
- */
- public int getInt(String name) {
- return fStore.getInt(name);
- }
-
- /*
- * @see IPreferenceStore#getLong(String)
- */
- public long getLong(String name) {
- return fStore.getLong(name);
- }
-
- /*
- * @see IPreferenceStore#getString(String)
- */
- public String getString(String name) {
- return fStore.getString(name);
- }
-
- /*
- * @see IPreferenceStore#isDefault(String)
- */
- public boolean isDefault(String name) {
- return fStore.isDefault(name);
- }
-
- /*
- * @see IPreferenceStore#needsSaving()
- */
- public boolean needsSaving() {
- return fStore.needsSaving();
- }
-
- /*
- * @see IPreferenceStore#putValue(String, String)
- */
- public void putValue(String name, String value) {
- if (covers(name))
- fStore.putValue(name, value);
- }
-
- /*
- * @see IPreferenceStore#setDefault(String, double)
- */
- public void setDefault(String name, double value) {
- if (covers(name))
- fStore.setDefault(name, value);
- }
-
- /*
- * @see IPreferenceStore#setDefault(String, float)
- */
- public void setDefault(String name, float value) {
- if (covers(name))
- fStore.setDefault(name, value);
- }
-
- /*
- * @see IPreferenceStore#setDefault(String, int)
- */
- public void setDefault(String name, int value) {
- if (covers(name))
- fStore.setDefault(name, value);
- }
-
- /*
- * @see IPreferenceStore#setDefault(String, long)
- */
- public void setDefault(String name, long value) {
- if (covers(name))
- fStore.setDefault(name, value);
- }
-
- /*
- * @see IPreferenceStore#setDefault(String, String)
- */
- public void setDefault(String name, String value) {
- if (covers(name))
- fStore.setDefault(name, value);
- }
-
- /*
- * @see IPreferenceStore#setDefault(String, boolean)
- */
- public void setDefault(String name, boolean value) {
- if (covers(name))
- fStore.setDefault(name, value);
- }
-
- /*
- * @see IPreferenceStore#setToDefault(String)
- */
- public void setToDefault(String name) {
- fStore.setToDefault(name);
- }
-
- /*
- * @see IPreferenceStore#setValue(String, double)
- */
- public void setValue(String name, double value) {
- if (covers(name))
- fStore.setValue(name, value);
- }
-
- /*
- * @see IPreferenceStore#setValue(String, float)
- */
- public void setValue(String name, float value) {
- if (covers(name))
- fStore.setValue(name, value);
- }
-
- /*
- * @see IPreferenceStore#setValue(String, int)
- */
- public void setValue(String name, int value) {
- if (covers(name))
- fStore.setValue(name, value);
- }
-
- /*
- * @see IPreferenceStore#setValue(String, long)
- */
- public void setValue(String name, long value) {
- if (covers(name))
- fStore.setValue(name, value);
- }
-
- /*
- * @see IPreferenceStore#setValue(String, String)
- */
- public void setValue(String name, String value) {
- if (covers(name))
- fStore.setValue(name, value);
- }
-
- /*
- * @see IPreferenceStore#setValue(String, boolean)
- */
- public void setValue(String name, boolean value) {
- if (covers(name))
- fStore.setValue(name, value);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithEditionAction.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithEditionAction.java
deleted file mode 100644
index b4b965a0f..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithEditionAction.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-
-public class ReplaceWithEditionAction extends EditionAction {
-
- public ReplaceWithEditionAction() {
- super(true, "org.eclipse.compare.internal.ReplaceWithEditionAction"); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithEditionAction.properties b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithEditionAction.properties
deleted file mode 100644
index 0ee8160ba..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithEditionAction.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-# =====================================
-# (c) Copyright IBM Corp. 2000, 2001.
-# All Rights Reserved.
-# =====================================
-
-# @(#)ReplaceWithEditionAction.properties
-#
-# Resources for ReplaceWithEditionAction.java
-
-title= Replace from Local History
-
-treeTitleFormat= Local History of ''{0}''
-dateIcon= obj16/day_obj.gif
-timeIcon= obj16/resource_obj.gif
-
-treeFormat= {0}
-workspaceTreeFormat= {0} (Workspace File)
-parseErrorFormat= {0} (Parse Error)
-
-editionLabel= Local History ({0})
-workspaceEditionLabel= Workspace File
-
-targetLabel= {0}
-
-todayFormat= Today ({0})
-yesterdayFormat= Yesterday ({0})
-dayFormat= {0}
-
-buttonLabel= Replace
-
-noLocalHistoryError= No local history available for selected resource.
-replaceError=Can''t replace resource (reason: {0}).
-
-taskName=Replacing \ No newline at end of file
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithPreviousEditionAction.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithPreviousEditionAction.java
deleted file mode 100644
index 2f590db9c..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithPreviousEditionAction.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-
-public class ReplaceWithPreviousEditionAction extends EditionAction {
-
- public ReplaceWithPreviousEditionAction() {
- super(true, "org.eclipse.compare.internal.ReplaceWithEditionAction"); //$NON-NLS-1$
- fPrevious= true;
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ResizableDialog.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ResizableDialog.java
deleted file mode 100644
index 26e5fe34d..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ResizableDialog.java
+++ /dev/null
@@ -1,136 +0,0 @@
-package org.eclipse.compare.internal;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.Shell;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.DialogSettings;
-
-
-/**
- * Base class for resizable Dialogs with persistent window bounds.
- */
-public abstract class ResizableDialog extends Dialog {
-
- // dialog store id constants
- private final static String DIALOG_BOUNDS_KEY= "ResizableDialogBounds"; //$NON-NLS-1$
- private static final String X= "x"; //$NON-NLS-1$
- private static final String Y= "y"; //$NON-NLS-1$
- private static final String WIDTH= "width"; //$NON-NLS-1$
- private static final String HEIGHT= "height"; //$NON-NLS-1$
-
- protected ResourceBundle fBundle;
- private Rectangle fNewBounds;
- private IDialogSettings fSettings;
-
-
- public ResizableDialog(Shell parent, ResourceBundle bundle) {
- super(parent);
- setShellStyle(getShellStyle() | SWT.RESIZE);
-
- fBundle= bundle;
-
- fSettings= CompareUIPlugin.getDefault().getDialogSettings();
- }
-
- protected Point getInitialSize() {
-
- int width= 0;
- int height= 0;
-
- final Shell s= getShell();
- if (s != null) {
- s.addControlListener(
- new ControlListener() {
- public void controlMoved(ControlEvent arg0) {
- fNewBounds= s.getBounds();
- }
- public void controlResized(ControlEvent arg0) {
- fNewBounds= s.getBounds();
- }
- }
- );
- }
-
- IDialogSettings bounds= fSettings.getSection(DIALOG_BOUNDS_KEY); //$NON-NLS-1$
- if (bounds == null) {
- if (fBundle != null) {
- width= Utilities.getInteger(fBundle, WIDTH, 0);
- height= Utilities.getInteger(fBundle, HEIGHT, 0);
- Shell shell= getParentShell();
- if (shell != null) {
- Point parentSize= shell.getSize();
- if (width <= 0)
- width= parentSize.x-300;
- if (height <= 0)
- height= parentSize.y-200;
- }
- } else {
- Shell shell= getParentShell();
- if (shell != null) {
- Point parentSize= shell.getSize();
- width= parentSize.x-100;
- height= parentSize.y-100;
- }
- }
- if (width < 700)
- width= 700;
- if (height < 500)
- height= 500;
- } else {
- try {
- width= bounds.getInt(WIDTH);
- } catch (NumberFormatException e) {
- width= 700;
- }
- try {
- height= bounds.getInt(HEIGHT);
- } catch (NumberFormatException e) {
- height= 500;
- }
- }
-
- return new Point(width, height);
- }
-
- protected Point getInitialLocation(Point initialSize) {
- Point loc= super.getInitialLocation(initialSize);
-
- IDialogSettings bounds= fSettings.getSection(DIALOG_BOUNDS_KEY);
- if (bounds != null) {
- try {
- loc.x= bounds.getInt(X);
- } catch (NumberFormatException e) {
- }
- try {
- loc.y= bounds.getInt(Y);
- } catch (NumberFormatException e) {
- }
- }
- return loc;
- }
-
- public boolean close() {
- boolean closed= super.close();
- if (closed && fNewBounds != null)
- saveBounds(fNewBounds);
- return closed;
- }
-
- private void saveBounds(Rectangle bounds) {
- IDialogSettings dialogBounds= fSettings.getSection(DIALOG_BOUNDS_KEY);
- if (dialogBounds == null) {
- dialogBounds= new DialogSettings(DIALOG_BOUNDS_KEY);
- fSettings.addSection(dialogBounds);
- }
- dialogBounds.put(X, bounds.x);
- dialogBounds.put(Y, bounds.y);
- dialogBounds.put(WIDTH, bounds.width);
- dialogBounds.put(HEIGHT, bounds.height);
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ResourceCompareInput.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ResourceCompareInput.java
deleted file mode 100644
index 02a07d33b..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ResourceCompareInput.java
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.text.MessageFormat;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.swt.widgets.Composite;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.Viewer;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.*;
-
-
-/**
- * A two-way or three-way compare for arbitrary IResources.
- */
-class ResourceCompareInput extends CompareEditorInput {
-
- private static final boolean NORMALIZE_CASE= true;
-
- private boolean fThreeWay= false;
- private Object fRoot;
- private IStructureComparator fAncestor;
- private IStructureComparator fLeft;
- private IStructureComparator fRight;
- private IResource fAncestorResource;
- private IResource fLeftResource;
- private IResource fRightResource;
- private DiffTreeViewer fDiffViewer;
-
-
- class MyDiffNode extends DiffNode {
-
- private boolean fDirty= false;
- private ITypedElement fLastId;
- private String fLastName;
-
-
- public MyDiffNode(IDiffContainer parent, int description, ITypedElement ancestor, ITypedElement left, ITypedElement right) {
- super(parent, description, ancestor, left, right);
- }
- public void fireChange() {
- super.fireChange();
- setDirty(true);
- fDirty= true;
- if (fDiffViewer != null)
- fDiffViewer.refresh(this);
- }
- void clearDirty() {
- fDirty= false;
- }
- public String getName() {
- if (fLastName == null)
- fLastName= super.getName();
- if (fDirty)
- return '<' + fLastName + '>';
- return fLastName;
- }
-
- public ITypedElement getId() {
- ITypedElement id= super.getId();
- if (id == null)
- return fLastId;
- fLastId= id;
- return id;
- }
- }
-
- /**
- * Creates an compare editor input for the given selection.
- */
- ResourceCompareInput(CompareConfiguration config) {
- super(config);
- }
-
- public Viewer createDiffViewer(Composite parent) {
- Viewer v= super.createDiffViewer(parent);
- if (v instanceof DiffTreeViewer)
- fDiffViewer= (DiffTreeViewer) v;
- return v;
- }
-
- /**
- * Returns true if compare can be executed for the given selection.
- */
- boolean setSelection(ISelection s) {
-
- IResource[] selection= Utilities.getResources(s);
- if (selection.length < 2 || selection.length > 3)
- return false;
-
- fThreeWay= selection.length == 3;
-
- fLeftResource= selection[0];
- fRightResource= selection[1];
- if (fThreeWay) {
- fLeftResource= selection[1];
- fRightResource= selection[2];
- }
-
- fAncestor= null;
- fLeft= getStructure(fLeftResource);
- fRight= getStructure(fRightResource);
-
- if (incomparable(fLeft, fRight))
- return false;
-
- if (fThreeWay) {
- fAncestorResource= selection[0];
- fAncestor= getStructure(fAncestorResource);
-
- if (incomparable(fAncestor, fRight))
- return false;
- }
-
- return true;
- }
-
- /**
- * Returns true if the given arguments cannot be compared.
- */
- private boolean incomparable(IStructureComparator c1, IStructureComparator c2) {
- if (c1 == null || c2 == null)
- return true;
- return isLeaf(c1) != isLeaf(c2);
- }
-
- /**
- * Returns true if the given arguments is a leaf.
- */
- private boolean isLeaf(IStructureComparator c) {
- if (c instanceof ITypedElement) {
- ITypedElement te= (ITypedElement) c;
- return !ITypedElement.FOLDER_TYPE.equals(te.getType());
- }
- return false;
- }
-
- /**
- * Creates a <code>IStructureComparator</code> for the given input.
- * Returns <code>null</code> if no <code>IStructureComparator</code>
- * can be found for the <code>IResource</code>.
- */
- private IStructureComparator getStructure(IResource input) {
-
- if (input instanceof IContainer)
- return new BufferedResourceNode(input);
-
- if (input instanceof IFile) {
- IStructureComparator rn= new BufferedResourceNode(input);
- IFile file= (IFile) input;
- String type= normalizeCase(file.getFileExtension());
- if ("JAR".equals(type) || "ZIP".equals(type)) //$NON-NLS-2$ //$NON-NLS-1$
- return new ZipFileStructureCreator().getStructure(rn);
- return rn;
- }
- return null;
- }
-
- /**
- * Performs a two-way or three-way diff on the current selection.
- */
- public Object prepareInput(IProgressMonitor pm) throws InvocationTargetException {
-
- CompareConfiguration cc= (CompareConfiguration) getCompareConfiguration();
-
- try {
- // fix for PR 1GFMLFB: ITPUI:WIN2000 - files that are out of sync with the file system appear as empty
- fLeftResource.refreshLocal(IResource.DEPTH_INFINITE, pm);
- fRightResource.refreshLocal(IResource.DEPTH_INFINITE, pm);
- if (fThreeWay && fAncestorResource != null)
- fAncestorResource.refreshLocal(IResource.DEPTH_INFINITE, pm);
- // end fix
-
- pm.beginTask(Utilities.getString("ResourceCompare.taskName"), IProgressMonitor.UNKNOWN); //$NON-NLS-1$
-
- cc.setLeftLabel(buildLabel(fLeftResource));
- cc.setLeftImage(CompareUIPlugin.getImage(fLeftResource));
-
- cc.setRightLabel(buildLabel(fRightResource));
- cc.setRightImage(CompareUIPlugin.getImage(fRightResource));
-
- String leftLabel= fLeftResource.getName();
- String rightLabel= fRightResource.getName();
-
- String title;
- if (fThreeWay) {
- cc.setAncestorLabel(buildLabel(fAncestorResource));
- cc.setAncestorImage(CompareUIPlugin.getImage(fAncestorResource));
- String format= Utilities.getString("ResourceCompare.threeWay.title"); //$NON-NLS-1$
- String ancestorLabel= fAncestorResource.getName();
- title= MessageFormat.format(format, new String[] {ancestorLabel, leftLabel, rightLabel} );
- } else {
- String format= Utilities.getString("ResourceCompare.twoWay.title"); //$NON-NLS-1$
- title= MessageFormat.format(format, new String[] {leftLabel, rightLabel} );
- }
- setTitle(title);
-
- Differencer d= new Differencer() {
- protected Object visit(Object parent, int description, Object ancestor, Object left, Object right) {
- return new MyDiffNode((IDiffContainer) parent, description, (ITypedElement)ancestor, (ITypedElement)left, (ITypedElement)right);
- }
- };
-
- fRoot= d.findDifferences(fThreeWay, pm, null, fAncestor, fLeft, fRight);
- return fRoot;
-
- } catch (CoreException ex) {
- throw new InvocationTargetException(ex);
- } finally {
- pm.done();
- }
- }
-
- private String buildLabel(IResource r) {
- //return r.getName();
- String n= r.getFullPath().toString();
- if (n.charAt(0) == IPath.SEPARATOR)
- return n.substring(1);
- return n;
- }
-
- public void saveChanges(IProgressMonitor pm) throws CoreException {
- super.saveChanges(pm);
- if (fRoot instanceof DiffNode) {
- try {
- commit(pm, (DiffNode) fRoot);
- } finally {
- if (fDiffViewer != null)
- fDiffViewer.refresh();
- setDirty(false);
- }
- }
- }
-
- /*
- * Recursively walks the diff tree and commits all changes.
- */
- private static void commit(IProgressMonitor pm, DiffNode node) throws CoreException {
-
- if (node instanceof MyDiffNode)
- ((MyDiffNode)node).clearDirty();
-
- ITypedElement left= node.getLeft();
- if (left instanceof BufferedResourceNode)
- ((BufferedResourceNode) left).commit(pm);
-
- ITypedElement right= node.getRight();
- if (right instanceof BufferedResourceNode)
- ((BufferedResourceNode) right).commit(pm);
-
- IDiffElement[] children= node.getChildren();
- if (children != null) {
- for (int i= 0; i < children.length; i++) {
- IDiffElement element= children[i];
- if (element instanceof DiffNode)
- commit(pm, (DiffNode) element);
- }
- }
- }
-
- private static String normalizeCase(String s) {
- if (NORMALIZE_CASE && s != null)
- return s.toUpperCase();
- return s;
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ShowPseudoConflicts.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ShowPseudoConflicts.java
deleted file mode 100644
index e109359e8..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ShowPseudoConflicts.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.compare.*;
-
-/**
- * Toggles the <code>ICompareConfiguration.SHOW_PSEUDO_CONFLICTS</code> property of an
- * <code>ICompareConfiguration</code>.
- */
-public class ShowPseudoConflicts extends ChangePropertyAction {
-
- public ShowPseudoConflicts(ResourceBundle bundle, CompareConfiguration cc) {
- super(bundle, cc, "action.ShowPseudoConflicts.", CompareConfiguration.SHOW_PSEUDO_CONFLICTS); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/SimpleTextViewer.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/SimpleTextViewer.java
deleted file mode 100644
index fd7a885bd..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/SimpleTextViewer.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.io.IOException;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.jface.text.Document;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-
-
-public class SimpleTextViewer extends AbstractViewer {
-
- private SourceViewer fSourceViewer;
- private ICompareInput fInput;
-
-
- SimpleTextViewer(Composite parent) {
- fSourceViewer= new SourceViewer(parent, null, SWT.H_SCROLL + SWT.V_SCROLL);
- fSourceViewer.setEditable(false);
- }
-
- public Control getControl() {
- return fSourceViewer.getTextWidget();
- }
-
- public void setInput(Object input) {
- if (input instanceof IStreamContentAccessor) {
- fSourceViewer.setDocument(new Document(getString(input)));
- } else if (input instanceof ICompareInput) {
- fInput= (ICompareInput) input;
- ITypedElement left= ((ICompareInput) fInput).getLeft();
- fSourceViewer.setDocument(new Document(getString(left)));
- }
- }
-
- public Object getInput() {
- return fInput;
- }
-
- private String getString(Object input) {
-
- if (input instanceof IStreamContentAccessor) {
- IStreamContentAccessor sca= (IStreamContentAccessor) input;
- try {
- return Utilities.readString(sca.getContents());
- } catch (CoreException ex) {
- }
- }
- return ""; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/Splitter.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/Splitter.java
deleted file mode 100644
index 846a378dc..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/Splitter.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.custom.SashForm;
-
-public class Splitter extends SashForm {
-
- private static final String VISIBILITY= "org.eclipse.compare.internal.visibility"; //$NON-NLS-1$
-
-
- public Splitter(Composite parent, int style) {
- super(parent, style);
- }
-
- public void setVisible(Control child, boolean visible) {
-
- boolean wasEmpty= isEmpty();
-
- child.setVisible(visible);
- child.setData(VISIBILITY, new Boolean(visible));
-
- if (wasEmpty != isEmpty()) {
- Composite parent= getParent();
- if (parent instanceof Splitter) {
- Splitter sp= (Splitter) parent;
- sp.setVisible(this, visible);
- sp.layout();
- }
- } else {
- layout();
- }
- }
-
- private boolean isEmpty() {
- Control[] controls= getChildren();
- for (int i= 0; i < controls.length; i++)
- if (isVisible(controls[i]))
- return false;
- return true;
- }
-
- private boolean isVisible(Control child) {
- if (child instanceof Sash)
- return false;
- Object data= child.getData(VISIBILITY);
- if (data instanceof Boolean)
- return ((Boolean)data).booleanValue();
- return true;
- }
-
- public void setMaximizedControl(Control control) {
- if (control == null || control == getMaximizedControl())
- super.setMaximizedControl(null);
- else
- super.setMaximizedControl(control);
-
- // walk up
- Composite parent= getParent();
- if (parent instanceof Splitter)
- ((Splitter) parent).setMaximizedControl(this);
- else
- layout(true);
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/TabFolderLayout.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/TabFolderLayout.java
deleted file mode 100644
index c33ac3c76..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/TabFolderLayout.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved
- */
-package org.eclipse.compare.internal; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Layout;
-
-public class TabFolderLayout extends Layout {
-
- protected Point computeSize (Composite composite, int wHint, int hHint, boolean flushCache) {
- if (wHint != SWT.DEFAULT && hHint != SWT.DEFAULT)
- return new Point(wHint, hHint);
-
- Control [] children = composite.getChildren ();
- int count = children.length;
- int maxWidth = 0, maxHeight = 0;
- for (int i=0; i<count; i++) {
- Control child = children [i];
- Point pt = child.computeSize (SWT.DEFAULT, SWT.DEFAULT, flushCache);
- maxWidth = Math.max (maxWidth, pt.x);
- maxHeight = Math.max (maxHeight, pt.y);
- }
-
- if (wHint != SWT.DEFAULT)
- maxWidth= wHint;
- if (hHint != SWT.DEFAULT)
- maxHeight= hHint;
-
- return new Point(maxWidth, maxHeight);
-
- }
-
- protected void layout (Composite composite, boolean flushCache) {
- Rectangle rect= composite.getClientArea();
-
- Control[] children = composite.getChildren();
- for (int i = 0; i < children.length; i++) {
- children[i].setBounds(rect);
- }
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/TextMergeViewerCreator.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/TextMergeViewerCreator.java
deleted file mode 100644
index 9fb4b935b..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/TextMergeViewerCreator.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.widgets.Composite;
-
-import org.eclipse.jface.viewers.Viewer;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.contentmergeviewer.TextMergeViewer;
-
-/**
- * A factory object for the <code>TextMergeViewer</code>.
- * This indirection is necessary because only objects with a default
- * constructor can be created via an extension point
- * (this precludes Viewers).
- */
-public class TextMergeViewerCreator implements IViewerCreator {
-
- public Viewer createViewer(Composite parent, CompareConfiguration mp) {
- return new TextMergeViewer(parent, mp);
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/TextViewerCreator.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/TextViewerCreator.java
deleted file mode 100644
index 554114cd5..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/TextViewerCreator.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.widgets.Composite;
-
-import org.eclipse.jface.viewers.Viewer;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.IViewerCreator;
-
-
-/**
- * A factory object for the <code>TextMergeViewer</code>.
- * This indirection is necessary because only objects with a default
- * constructor can be created via an extension point
- * (this precludes Viewers).
- */
-public class TextViewerCreator implements IViewerCreator {
-
- public Viewer createViewer(Composite parent, CompareConfiguration mp) {
- return new SimpleTextViewer(parent);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/TimeoutContext.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/TimeoutContext.java
deleted file mode 100644
index c52da8b58..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/TimeoutContext.java
+++ /dev/null
@@ -1,380 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.operation.*;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.util.Assert;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.compare.contentmergeviewer.*;
-
-/**
- * A modal dialog that displays progress during a long running operation.
- */
-public class TimeoutContext {
-
- private static class ModalContextThread extends Thread {
-
- private boolean fWorking;
- private IRunnableWithProgress fRunnable;
- private Throwable fThrowable;
- private IProgressMonitor fProgressMonitor;
- private boolean fContinueEventDispatching= true;
- private Display fDisplay;
-
- private ModalContextThread(IRunnableWithProgress operation, IProgressMonitor monitor) {
- super("TimeoutContext"); //$NON-NLS-1$
- fRunnable= operation;
- fProgressMonitor= monitor;
- }
-
- synchronized boolean timeout(Display display) {
- fDisplay= display;
- return fWorking;
- }
-
- public void run() {
- try {
- fWorking= true;
- if (fRunnable != null)
- fRunnable.run(fProgressMonitor);
- } catch (InvocationTargetException e) {
- fThrowable= e;
- } catch (InterruptedException e) {
- fThrowable= e;
- } catch (RuntimeException e) {
- fThrowable= e;
- } catch (ThreadDeath e) {
- // Make sure to propagate ThreadDeath, or threads will never fully terminate
- throw e;
- } catch (Error e) {
- fThrowable= e;
- } finally {
- fWorking= false;
-
- if (fDisplay != null) {
- // Make sure that all events in the asynchronous event queue
- // are dispatched.
- fDisplay.syncExec(
- new Runnable() {
- public void run() {
- // do nothing
- }
- }
- );
-
- // Stop event dispatching
- fContinueEventDispatching= false;
-
- // Force the event loop to return from sleep () so that
- // it stops event dispatching.
- fDisplay.asyncExec(null);
- }
- }
- }
-
- public void block() {
- while (fContinueEventDispatching)
- if (!fDisplay.readAndDispatch())
- fDisplay.sleep();
- }
- }
-
- static class ProgressMonitorDialog extends org.eclipse.jface.dialogs.Dialog {
-
- protected ProgressIndicator fProgressIndicator;
- protected Label fTaskLabel;
- protected Label fSubTaskLabel;
- protected Button fCancel;
- protected boolean fEnableCancelButton;
- private ProgressMonitor fProgressMonitor;
- private Cursor fArrowCursor;
- private Cursor fWaitCursor;
- private Shell fParentShell;
-
- private ProgressMonitorDialog(Shell parent, boolean cancelable, ProgressMonitor pm) {
- super(parent);
- fProgressMonitor= pm;
- fParentShell= parent;
- fEnableCancelButton= cancelable;
- this.setBlockOnOpen(false);
- setShellStyle(SWT.BORDER | SWT.TITLE | SWT.APPLICATION_MODAL); // no close button
- }
-
- public boolean close() {
- if (fCancel != null && !fCancel.isDisposed())
- fCancel.setCursor(null);
- Shell shell= getShell();
- if (shell != null && !shell.isDisposed())
- shell.setCursor(null);
- if (fArrowCursor != null)
- fArrowCursor.dispose();
- if (fWaitCursor != null)
- fWaitCursor.dispose();
- fArrowCursor= null;
- fWaitCursor= null;
- return super.close();
- }
-
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- shell.setText(JFaceResources.getString("ProgressMonitorDialog.title")); //$NON-NLS-1$
- if (fWaitCursor == null)
- fWaitCursor= new Cursor(shell.getDisplay(),SWT.CURSOR_WAIT);
- shell.setCursor(fWaitCursor);
- }
-
- protected void createButtonsForButtonBar(Composite parent) {
- // cancel button
- fCancel= createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true);
- if(fArrowCursor == null)
- fArrowCursor= new Cursor(fCancel.getDisplay(),SWT.CURSOR_ARROW);
- fCancel.setCursor(fArrowCursor);
- fCancel.addListener(SWT.Selection,
- new Listener() {
- public void handleEvent(Event e) {
- if (fCancel != null && !fCancel.isDisposed())
- fCancel.setEnabled(false);
- fProgressMonitor.setCanceled(true);
- }
- }
- );
- fCancel.setEnabled(fEnableCancelButton);
- }
-
- protected Control createDialogArea(Composite parent) {
-
- Composite c= (Composite)super.createDialogArea(parent);
- ((GridLayout)c.getLayout()).numColumns= 2;
-
- // icon
- Label iconLabel= new Label(c, SWT.LEFT);
- GridData gd= new GridData();
- iconLabel.setLayoutData(gd);
- iconLabel.setFont(parent.getFont());
- Image i= JFaceResources.getImageRegistry().get(org.eclipse.jface.dialogs.Dialog.DLG_IMG_INFO);
- if (i != null)
- iconLabel.setImage(i);
- else
- iconLabel.setText(JFaceResources.getString("Image_not_found")); //$NON-NLS-1$
-
- // label on right hand side of icon
- fTaskLabel= new Label(c, SWT.LEFT | SWT.WRAP);
- fTaskLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- fTaskLabel.setFont(parent.getFont());
-
- // progress indicator
- fProgressIndicator= new ProgressIndicator(c);
- gd= new GridData();
- gd.heightHint= 15;
- gd.horizontalAlignment= gd.FILL;
- gd.grabExcessHorizontalSpace= true;
- gd.horizontalSpan= 2;
- fProgressIndicator.setLayoutData(gd);
-
- // label showing current task
- fSubTaskLabel= new Label(c, SWT.LEFT | SWT.WRAP);
- gd= new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint= 35;
- gd.horizontalSpan= 2;
- fSubTaskLabel.setLayoutData(gd);
- fSubTaskLabel.setFont(parent.getFont());
-
- // update with values fProgressMonitor
- String s= fProgressMonitor.fTask;
- if (s == null)
- s= ""; //$NON-NLS-1$
- fTaskLabel.setText(s);
-
- if (fProgressMonitor.fMaxWork == IProgressMonitor.UNKNOWN)
- fProgressIndicator.beginAnimatedTask();
- else
- fProgressIndicator.beginTask(fProgressMonitor.fMaxWork);
-
- if (fProgressMonitor.fSubTask != null)
- fSubTaskLabel.setText(fProgressMonitor.fSubTask);
- fProgressIndicator.worked(fProgressMonitor.fWorked);
-
- fProgressMonitor.activate(this);
-
- return c;
- }
-
- void beginTask(final String name, final int totalWork) {
- fParentShell.getDisplay().syncExec(
- new Runnable() {
- public void run() {
- fTaskLabel.setText(name);
-
- if (fProgressIndicator != null && fProgressIndicator.isDisposed()) {
- if (totalWork == IProgressMonitor.UNKNOWN)
- fProgressIndicator.beginAnimatedTask();
- else
- fProgressIndicator.beginTask(totalWork);
- }
- }
- }
- );
- }
-
- void setTaskName(final String name) {
- fParentShell.getDisplay().syncExec(
- new Runnable() {
- public void run() {
- if (fTaskLabel != null && fTaskLabel.isDisposed())
- fTaskLabel.setText(name);
- }
- }
- );
- }
-
- void setSubTaskName(final String name) {
- fParentShell.getDisplay().syncExec(
- new Runnable() {
- public void run() {
- String n= (name == null) ? "" : name; //$NON-NLS-1$
- if (fSubTaskLabel != null && !fSubTaskLabel.isDisposed())
- fSubTaskLabel.setText(n);
- }
- }
- );
- }
-
- void done() {
- fParentShell.getDisplay().syncExec(
- new Runnable() {
- public void run() {
- if (fProgressIndicator != null && !fProgressIndicator.isDisposed()) {
- fProgressIndicator.sendRemainingWork();
- fProgressIndicator.done();
- }
- }
- }
- );
- }
-
- void worked(final double work) {
- fParentShell.getDisplay().syncExec(
- new Runnable() {
- public void run() {
- if (fProgressIndicator != null && !fProgressIndicator.isDisposed())
- fProgressIndicator.worked(work);
- }
- }
- );
- }
-
- protected Point getInitialSize() {
- return getShell().computeSize(450, SWT.DEFAULT);
- }
- }
-
- private static class ProgressMonitor implements IProgressMonitor {
-
- private int fMaxWork;
- private String fTask;
- private String fSubTask;
- private int fWorked;
- private ProgressMonitorDialog fProgressMonitorDialog;
- private boolean fIsCanceled;
-
- public void beginTask(String name, int totalWork) {
-
- fTask= name;
- fMaxWork= totalWork;
- fWorked= 0;
-
- if (fProgressMonitorDialog != null)
- fProgressMonitorDialog.beginTask(name, totalWork);
- }
-
- void activate(ProgressMonitorDialog dialog) {
- fProgressMonitorDialog= dialog;
- }
-
- public void done() {
- if (fProgressMonitorDialog != null)
- fProgressMonitorDialog.done();
- }
-
- public void setTaskName(String name) {
- fTask= name;
- if (fProgressMonitorDialog != null)
- fProgressMonitorDialog.setTaskName(name);
- }
-
- public boolean isCanceled() {
- return fIsCanceled;
- }
-
- public void setCanceled(boolean b) {
- fIsCanceled= b;
- }
-
- public void subTask(String name) {
- fSubTask= name;
- if (fProgressMonitorDialog != null)
- fProgressMonitorDialog.setSubTaskName(name);
- }
-
- public void worked(int work) {
- if (fProgressMonitorDialog != null)
- internalWorked(work);
- else
- fWorked+= work;
- }
-
- public void internalWorked(double work) {
- if (fProgressMonitorDialog != null)
- fProgressMonitorDialog.worked(work);
- }
- }
-
- public static void run(boolean cancelable, int timeout, Shell parent, IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException {
-
- Display display= parent.getDisplay();
-
- ProgressMonitor pm= new ProgressMonitor();
-
- ModalContextThread t= new ModalContextThread(runnable, pm);
- t.start(); // start the long running operation
-
- // wait until long operations terminates or timeout
- try {
- t.join(timeout);
- } catch (InterruptedException e) {
- }
-
- if (t.timeout(display)) { // timeout
- ProgressMonitorDialog dialog= new ProgressMonitorDialog(parent, cancelable, pm);
- dialog.open();
- t.block();
- dialog.close();
- }
-
- Throwable throwable= t.fThrowable;
- if (throwable != null) {
- if (throwable instanceof InvocationTargetException) {
- throw (InvocationTargetException) throwable;
- } else if (throwable instanceof InterruptedException) {
- throw (InterruptedException) throwable;
- } else if (throwable instanceof OperationCanceledException) {
- throw new InterruptedException(throwable.getMessage());
- } else {
- throw new InvocationTargetException(throwable);
- }
- }
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/TokenComparator.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/TokenComparator.java
deleted file mode 100644
index d4253cdf2..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/TokenComparator.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.jface.util.Assert;
-
-import org.eclipse.compare.rangedifferencer.IRangeComparator;
-import org.eclipse.compare.contentmergeviewer.ITokenComparator;
-
-/**
- * Implements the <code>ITokenComparator</code> interface for words (or tokens)
- * in a string.
- * A <code>TokenComparator</code> is used as the input for the <code>RangeDifferencer</code>
- * engine to perform a token oriented compare on strings.
- */
-public class TokenComparator implements ITokenComparator {
-
- private boolean fShouldEscape= true;
- private String fText;
- private int fCount;
- private int[] fStarts;
- private int[] fLengths;
-
- /**
- * Creates a <code>TokenComparator</code> for the given string.
- *
- * @param string the string that is split into token
- */
- public TokenComparator(String text) {
-
- Assert.isNotNull(text);
-
- fText= text;
-
- int length= fText.length();
- fStarts= new int[length]; // pessimistic assumption!
- fLengths= new int[length];
- fCount= 0;
-
- char lastCategory= 0; // 0: no category
- for (int i= 0; i < length; i++) {
- char c= fText.charAt(i);
-
- char category= '?'; // unspecified category
- if (Character.isWhitespace(c))
- category= ' '; // white space category
- else if (Character.isDigit(c))
- category= '0'; // digits
- else if (Character.isLetter(c))
- category= 'a'; // letters
-
- if (category != lastCategory) {
- // start a new token
- fStarts[fCount++]= i;
- lastCategory= category;
- }
- fLengths[fCount-1]++;
- }
- }
-
- /**
- * Creates a <code>TokenComparator</code> for the given string.
- *
- * @param string the string that is split into token
- * @param shouldEscape
- */
- public TokenComparator(String s, boolean shouldEscape) {
- this(s);
- fShouldEscape= shouldEscape;
- }
-
- /**
- * Returns the number of token in the string.
- *
- * @return number of token in the string
- */
- public int getRangeCount() {
- return fCount;
- }
-
- /* (non Javadoc)
- * see ITokenComparator.getTokenStart
- */
- public int getTokenStart(int index) {
- if (index < fCount)
- return fStarts[index];
- return fText.length();
- }
-
- /* (non Javadoc)
- * see ITokenComparator.getTokenLength
- */
- public int getTokenLength(int index) {
- if (index < fCount)
- return fLengths[index];
- return 0;
- }
-
- /**
- * Returns <code>true</code> if a token given by the first index
- * matches a token specified by the other <code>IRangeComparator</code> and index.
- *
- * @param thisIndex the number of the token within this range comparator
- * @param other the range comparator to compare this with
- * @param otherIndex the number of the token within the other comparator
- * @return <code>true</code> if the token are equal
- */
- public boolean rangesEqual(int thisIndex, IRangeComparator other, int otherIndex) {
- if (other != null && getClass() == other.getClass()) {
- TokenComparator tc= (TokenComparator) other;
- int thisLen= getTokenLength(thisIndex);
- int otherLen= tc.getTokenLength(otherIndex);
- if (thisLen == otherLen)
- return fText.regionMatches(false, getTokenStart(thisIndex), tc.fText, tc.getTokenStart(otherIndex), thisLen);
- }
- return false;
- }
-
- /**
- * Aborts the comparison if the number of tokens is too large.
- *
- * @return <code>true</code> to abort a token comparison
- */
- public boolean skipRangeComparison(int length, int max, IRangeComparator other) {
-
- if (!fShouldEscape)
- return false;
-
- if (getRangeCount() < 50 || other.getRangeCount() < 50)
- return false;
-
- if (max < 100)
- return false;
-
- if (length < 100)
- return false;
-
- if (max > 800)
- return true;
-
- if (length < max / 4)
- return false;
-
- return true;
- }
-
-// public static void main(String args[]) {
-// //String in= "private static boolean isWhitespace(char c) {";
-// //String in= "for (int j= 0; j < l-1; j++) {";
-// String in= "for do i= 123; i++";
-// TokenComparator tc= new TokenComparator(in, false);
-//
-// System.out.println("n: " + tc.getRangeCount());
-// System.out.println(in);
-//
-// int p= 0;
-// for (int i= 0; i < tc.getRangeCount(); i++) {
-// int l= tc.getTokenLength(i);
-// System.out.print("<");
-//
-// for (int j= 0; j < l-1; j++)
-// System.out.print(" ");
-// }
-// System.out.println();
-//
-// //System.out.println("extract: <" + tc.extract(16, 1) + ">");
-// }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java
deleted file mode 100644
index 951178767..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java
+++ /dev/null
@@ -1,370 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import java.io.*;
-import java.text.MessageFormat;
-import java.util.*;
-
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.*;
-import org.eclipse.jface.viewers.*;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-
-import org.eclipse.ui.*;
-
-import org.eclipse.compare.CompareConfiguration;
-
-/**
- * Convenience and utility methods.
- */
-public class Utilities {
-
- public static IActionBars findActionBars(Control c) {
- while (c != null && !c.isDisposed()) {
- Object data= c.getData();
- if (data instanceof CompareEditor)
- return ((CompareEditor)data).getActionBars();
-
- // PR 1GDVZV7: ITPVCM:WIN98 - CTRL + C does not work in Java source compare
- if (data instanceof IViewPart)
- return ((IViewPart)data).getViewSite().getActionBars();
- // end PR 1GDVZV7
-
- c= c.getParent();
- }
- return null;
- }
-
- public static void setEnableComposite(Composite composite, boolean enable) {
- Control[] children= composite.getChildren();
- for (int i= 0; i < children.length; i++)
- children[i].setEnabled(enable);
- }
-
- public static boolean getBoolean(CompareConfiguration cc, String key, boolean dflt) {
- if (cc != null) {
- Object value= cc.getProperty(key);
- if (value instanceof Boolean)
- return ((Boolean) value).booleanValue();
- }
- return dflt;
- }
-
- public static void firePropertyChange(ListenerList ll, Object source, String property, Object old, Object newValue) {
- if (ll != null) {
- PropertyChangeEvent event= null;
- Object[] listeners= ll.getListeners();
- for (int i= 0; i < listeners.length; i++) {
- IPropertyChangeListener l= (IPropertyChangeListener) listeners[i];
- if (event == null)
- event= new PropertyChangeEvent(source, property, old, newValue);
- l.propertyChange(event);
- }
- }
- }
-
- public static boolean okToUse(Widget widget) {
- return widget != null && !widget.isDisposed();
- }
-
- public static boolean isMotif() {
- return false;
- }
-
- /**
- * Returns the elements of the given selection.
- * Returns an empty array if the selection is empty or if
- * the given selection is not of type <code>IStructuredSelection</code>.
- *
- * @param selection the selection
- * @return the selected elements
- */
- public static Object[] toArray(ISelection selection) {
- if (!(selection instanceof IStructuredSelection)) {
- return new Object[0];
- }
- IStructuredSelection ss= (IStructuredSelection) selection;
- return ss.toArray();
- }
-
- /**
- * Convenience method: extract all <code>IResources</code> from given selection.
- * Never returns null.
- */
- public static IResource[] getResources(ISelection selection) {
-
- ArrayList tmp= new ArrayList();
-
- if (selection instanceof IStructuredSelection) {
-
- Object[] s= ((IStructuredSelection)selection).toArray();
-
- for (int i= 0; i < s.length; i++) {
- Object o= s[i];
- if (o instanceof IResource) {
- tmp.add(o);
- continue;
- }
- if (o instanceof IAdaptable) {
- IAdaptable a= (IAdaptable) o;
- Object adapter= a.getAdapter(IResource.class);
- if (adapter instanceof IResource)
- tmp.add(adapter);
- continue;
- }
- }
- }
- return (IResource[]) tmp.toArray(new IResource[tmp.size()]);
- }
-
- 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();
- }
-
- /**
- * Returns null if an error occurred.
- */
- public static String readString(InputStream is) {
- if (is == null)
- return null;
- BufferedReader reader= null;
- try {
- StringBuffer buffer= new StringBuffer();
- char[] part= new char[2048];
- int read= 0;
- reader= new BufferedReader(new InputStreamReader(is, ResourcesPlugin.getEncoding()));
-
- while ((read= reader.read(part)) != -1)
- buffer.append(part, 0, read);
-
- return buffer.toString();
-
- } catch (IOException ex) {
- } finally {
- if (reader != null) {
- try {
- reader.close();
- } catch (IOException ex) {
- }
- }
- }
- return null;
- }
-
- public static String getIconPath(Display display) {
- return "icons/full/"; //$NON-NLS-1$
- }
-
- /**
- * Initialize the given Action from a ResourceBundle.
- */
- public static void initAction(IAction a, ResourceBundle bundle, String prefix) {
-
- 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;
- }
-
- a.setText(getString(bundle, labelKey, labelKey));
- a.setToolTipText(getString(bundle, tooltipKey, null));
- a.setDescription(getString(bundle, descriptionKey, null));
-
- String relPath= getString(bundle, imageKey, null);
- if (relPath != null && relPath.trim().length() > 0) {
-
- String cPath;
- String dPath;
- String ePath;
-
- if (relPath.indexOf("/") >= 0) { //$NON-NLS-1$
- String path= relPath.substring(1);
- cPath= 'c' + path;
- dPath= 'd' + path;
- ePath= 'e' + path;
- } else {
- cPath= "clcl16/" + relPath; //$NON-NLS-1$
- dPath= "dlcl16/" + relPath; //$NON-NLS-1$
- ePath= "elcl16/" + relPath; //$NON-NLS-1$
- }
-
- ImageDescriptor id= CompareUIPlugin.getImageDescriptor(dPath); // we set the disabled image first (see PR 1GDDE87)
- if (id != null)
- a.setDisabledImageDescriptor(id);
- id= CompareUIPlugin.getImageDescriptor(cPath);
- if (id != null)
- a.setHoverImageDescriptor(id);
- id= CompareUIPlugin.getImageDescriptor(ePath);
- if (id != null)
- a.setImageDescriptor(id);
- }
- }
-
- public static void initToggleAction(IAction a, ResourceBundle bundle, String prefix, boolean checked) {
-
- String tooltip= null;
- if (checked)
- tooltip= getString(bundle, prefix + "tooltip.checked", null); //$NON-NLS-1$
- else
- tooltip= getString(bundle, prefix + "tooltip.unchecked", null); //$NON-NLS-1$
- if (tooltip == null)
- tooltip= getString(bundle, prefix + "tooltip", null); //$NON-NLS-1$
-
- if (tooltip != null)
- a.setToolTipText(tooltip);
-
- String description= null;
- if (checked)
- description= getString(bundle, prefix + "description.checked", null); //$NON-NLS-1$
- else
- description= getString(bundle, prefix + "description.unchecked", null); //$NON-NLS-1$
- if (description == null)
- description= getString(bundle, prefix + "description", null); //$NON-NLS-1$
-
- if (description != null)
- a.setDescription(description);
-
- }
-
- public static String getString(ResourceBundle bundle, String key, String dfltValue) {
-
- if (bundle != null) {
- try {
- return bundle.getString(key);
- } catch (MissingResourceException x) {
- }
- }
- return dfltValue;
- }
-
- public static String getFormattedString(ResourceBundle bundle, String key, String arg) {
-
- if (bundle != null) {
- try {
- return MessageFormat.format(bundle.getString(key), new String[] { arg });
- } catch (MissingResourceException x) {
- }
- }
- return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
- }
-
- public static String getString(String key) {
- try {
- return CompareUIPlugin.getResourceBundle().getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
- }
- }
-
- public static String getFormattedString(String key, String arg) {
- try{
- return MessageFormat.format(CompareUIPlugin.getResourceBundle().getString(key), new String[] { arg });
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
- }
- }
-
- public static String getString(ResourceBundle bundle, String key) {
- return getString(bundle, key, key);
- }
-
- public static int getInteger(ResourceBundle bundle, String key, int dfltValue) {
-
- if (bundle != null) {
- try {
- String s= bundle.getString(key);
- if (s != null)
- return Integer.parseInt(s);
- } catch (NumberFormatException x) {
- } catch (MissingResourceException x) {
- }
- }
- return dfltValue;
- }
-
- /**
- * Answers <code>true</code> if the given selection contains resources that don't
- * have overlapping paths and <code>false</code> otherwise.
- */
- /*
- public static boolean isSelectionNonOverlapping() throws TeamException {
- IResource[] resources = getSelectedResources();
- // allow operation for non-overlapping resource selections
- if(resources.length>0) {
- List validPaths = new ArrayList(2);
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
-
- // only allow cvs resources to be selected
- if(RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId()) == null) {
- return false;
- }
-
- // check if this resource overlaps other selections
- IPath resourceFullPath = resource.getFullPath();
- if(!validPaths.isEmpty()) {
- for (Iterator it = validPaths.iterator(); it.hasNext();) {
- IPath path = (IPath) it.next();
- if(path.isPrefixOf(resourceFullPath) ||
- resourceFullPath.isPrefixOf(path)) {
- return false;
- }
- }
- }
- validPaths.add(resourceFullPath);
-
- // ensure that resources are managed
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- if(cvsResource.isFolder()) {
- if( ! ((ICVSFolder)cvsResource).isCVSFolder()) return false;
- } else {
- if( ! cvsResource.isManaged()) return false;
- }
- }
- return true;
- }
- return false;
- }
- */
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ViewerDescriptor.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ViewerDescriptor.java
deleted file mode 100644
index d6a64cd6b..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ViewerDescriptor.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal;
-
-import org.eclipse.swt.widgets.Composite;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.compare.*;
-
-import org.eclipse.jface.viewers.Viewer;
-
-import org.eclipse.ui.internal.ViewerActionBuilder;
-
-/**
- * Creates <code>Viewer</code>s from an <code>IConfigurationElement</code>.
- */
-public class ViewerDescriptor implements IViewerDescriptor {
-
- private final static String CLASS_ATTRIBUTE= "class"; //$NON-NLS-1$
- private final static String EXTENSIONS_ATTRIBUTE= "extensions"; //$NON-NLS-1$
-
- private IConfigurationElement fConfiguration;
- private IViewerCreator fViewerCreator;
- private Class fViewerClass;
-
- public ViewerDescriptor(IConfigurationElement config) {
- fConfiguration= config;
- }
-
- public Viewer createViewer(Viewer currentViewer, Composite parent, CompareConfiguration mp) {
-
- if (currentViewer != null && currentViewer.getClass() == fViewerClass) {
- //System.out.println("reused viewer: " + currentViewer.getClass().getName());
- return currentViewer;
- }
-
- if (fViewerCreator == null) {
- try {
- fViewerCreator= (IViewerCreator) fConfiguration.createExecutableExtension(CLASS_ATTRIBUTE);
- } catch (CoreException e) {
- }
- }
-
- if (fViewerCreator != null) {
- Viewer viewer= fViewerCreator.createViewer(parent, mp);
- if (viewer != null)
- fViewerClass= viewer.getClass();
- return viewer;
- }
-
- return null;
- }
-
- public String getExtension() {
- return fConfiguration.getAttribute(EXTENSIONS_ATTRIBUTE);
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ViewerSwitchingCancelled.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ViewerSwitchingCancelled.java
deleted file mode 100644
index a3874dd09..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ViewerSwitchingCancelled.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package org.eclipse.compare.internal;
-
-
-public class ViewerSwitchingCancelled extends Error {
-
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Attic/LineReader.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Attic/LineReader.java
deleted file mode 100644
index 053e3b99a..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Attic/LineReader.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal.patch;
-
-import java.io.*;
-import java.util.*;
-
-import org.eclipse.jface.util.Assert;
-
-/* package */ class LineReader {
-
- private boolean fHaveChar= false;
- private int fLastChar;
- private boolean fSawEOF= false;
- private BufferedReader fReader;
- private boolean fIgnoreSingleCR= false;
-
-
- /* package */ LineReader(BufferedReader reader) {
- fReader= reader;
- Assert.isNotNull(reader);
- }
-
- void ignoreSingleCR() {
- fIgnoreSingleCR= true;
- }
-
- /**
- * Reads a line of text. A line is considered to be terminated by any one
- * of a line feed ('\n'), a carriage return ('\r'), or a carriage return
- * followed immediately by a linefeed.
- * @return A string containing the contents of the line including
- * the line-termination characters, or <code>null</code> if the end of the
- * stream has been reached
- * @exception IOException If an I/O error occurs
- */
- /* package */ String readLine() throws IOException {
- StringBuffer sb= null;
-
- while (!fSawEOF) {
- int c= readChar();
- if (c == -1) {
- fSawEOF= true;
- break;
- }
- if (sb == null)
- sb= new StringBuffer();
- sb.append((char)c);
- if (c == '\n')
- break;
- if (c == '\r') {
- c= readChar();
- if (c == -1) {
- fSawEOF= true;
- break; // EOF
- }
- if (c != '\n') {
- if (fIgnoreSingleCR) {
- sb.append((char)c);
- continue;
- } else {
- fHaveChar= true;
- fLastChar= c;
- }
- } else
- sb.append((char)c);
- break;
- }
- }
-
- if (sb != null)
- return sb.toString();
- return null;
- }
-
- /* package */ void close() {
- try {
- fReader.close();
- } catch (IOException ex) {
- }
- }
-
- /* package */ List readLines() {
- try {
- List lines= new ArrayList();
- String line;
- while ((line= readLine()) != null)
- lines.add(line);
- return lines;
- } catch (IOException ex) {
- //System.out.println("error while reading file: " + fileName + "(" + ex + ")");
- } finally {
- close();
- }
- return null;
- }
- /**
- * Returns the number of characters in the given string without
- * counting a trailing line separator.
- */
- /* package */ int lineContentLength(String line) {
- if (line == null)
- return 0;
- int length= line.length();
- for (int i= length-1; i >= 0; i--) {
- char c= line.charAt(i);
- if (c =='\n' || c == '\r')
- length--;
- else
- break;
- }
- return length;
- }
-
- //---- private
-
- private int readChar() throws IOException {
- if (fHaveChar) {
- fHaveChar= false;
- return fLastChar;
- }
- return fReader.read();
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/CompareWithPatchAction.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/CompareWithPatchAction.java
deleted file mode 100644
index 75bd62f3b..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/CompareWithPatchAction.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal.patch;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Arrays;
-
-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.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.util.Assert;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-
-import org.eclipse.ui.IActionDelegate;
-import org.eclipse.ui.IEditorPart;
-
-import org.eclipse.compare.internal.*;
-
-
-public class CompareWithPatchAction implements IActionDelegate {
-
- static class PatchWizardDialog extends WizardDialog {
-
- PatchWizardDialog(Shell parent, IWizard wizard) {
- super(parent, wizard);
-
- setShellStyle(getShellStyle() | SWT.RESIZE);
- setMinimumPageSize(700, 500);
- }
- }
-
- private ISelection fSelection;
- private boolean fSavedFiles;
- private boolean fAutobuildState;
-
-
- public void selectionChanged(IAction action, ISelection selection) {
- fSelection= selection;
- IResource[] resources= PatchWizard.getResource(fSelection);
- action.setEnabled(resources != null && resources.length == 1);
- }
-
- public void run(IAction action) {
- PatchWizard wizard= new PatchWizard(fSelection);
-
- if (areAllEditorsSaved()) {
- PatchWizardDialog dialog= new PatchWizardDialog(CompareUIPlugin.getShell(), wizard);
- dialog.open();
- }
- }
-
- private boolean areAllEditorsSaved(){
- if (CompareUIPlugin.getDirtyEditors().length == 0)
- return true;
- if (! saveAllDirtyEditors())
- return false;
- Shell shell= CompareUIPlugin.getShell();
- try {
- // Save isn't cancelable.
- IWorkspace workspace= ResourcesPlugin.getWorkspace();
- IWorkspaceDescription description= workspace.getDescription();
- boolean autoBuild= description.isAutoBuilding();
- description.setAutoBuilding(false);
- workspace.setDescription(description);
- try {
- new ProgressMonitorDialog(shell).run(false, false, createRunnable());
- fSavedFiles= true;
- } finally {
- description.setAutoBuilding(autoBuild);
- workspace.setDescription(description);
- }
- return true;
- } catch (InvocationTargetException e) {
- ExceptionHandler.handle(e, shell, PatchMessages.getString("PatchAction.ExceptionTitle"), PatchMessages.getString("Exception")); //$NON-NLS-1$ //$NON-NLS-2$
- return false;
- } catch (CoreException e) {
- ExceptionHandler.handle(e, shell, PatchMessages.getString("PatchAction.ExceptionTitle"), PatchMessages.getString("Exception")); //$NON-NLS-1$ //$NON-NLS-2$
- return false;
- } catch (InterruptedException e) {
- Assert.isTrue(false); // Can't happen. Operation isn't cancelable.
- return false;
- }
- }
-
- private IRunnableWithProgress createRunnable() {
- return new IRunnableWithProgress() {
- public void run(IProgressMonitor pm) {
- IEditorPart[] editorsToSave= CompareUIPlugin.getDirtyEditors();
- pm.beginTask(PatchMessages.getString("PatchAction.SavingDirtyEditorsTask"), editorsToSave.length); //$NON-NLS-1$
- for (int i= 0; i < editorsToSave.length; i++) {
- editorsToSave[i].doSave(new SubProgressMonitor(pm, 1));
- pm.worked(1);
- }
- pm.done();
- }
- };
- }
-
- private boolean saveAllDirtyEditors() {
- if (ComparePreferencePage.getSaveAllEditors()) //must save everything
- return true;
- ListDialog dialog= new ListDialog(CompareUIPlugin.getShell()) {
- protected Control createDialogArea(Composite parent) {
- Composite result= (Composite) super.createDialogArea(parent);
- final Button check= new Button(result, SWT.CHECK);
- check.setText(PatchMessages.getString("PatchAction.AlwaysSaveQuestion")); //$NON-NLS-1$
- check.setSelection(ComparePreferencePage.getSaveAllEditors());
- check.addSelectionListener(
- new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- ComparePreferencePage.setSaveAllEditors(check.getSelection());
- }
- }
- );
- return result;
- }
- };
- dialog.setTitle(PatchMessages.getString("PatchAction.SaveAllQuestion")); //$NON-NLS-1$
- dialog.setAddCancelButton(true);
- dialog.setLabelProvider(createDialogLabelProvider());
- dialog.setMessage(PatchMessages.getString("PatchAction.SaveAllDescription")); //$NON-NLS-1$
- dialog.setContentProvider(new ListContentProvider());
- dialog.setInput(Arrays.asList(CompareUIPlugin.getDirtyEditors()));
- return dialog.open() == Dialog.OK;
- }
-
- private ILabelProvider createDialogLabelProvider() {
- return new LabelProvider() {
- public Image getImage(Object element) {
- return ((IEditorPart) element).getTitleImage();
- }
- public String getText(Object element) {
- return ((IEditorPart) element).getTitle();
- }
- };
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Diff.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Diff.java
deleted file mode 100644
index 5239340c5..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Diff.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal.patch;
-
-import java.util.*;
-
-import org.eclipse.core.runtime.IPath;
-
-import org.eclipse.compare.structuremergeviewer.Differencer;
-
-
-/* package */ class Diff {
-
- IPath fOldPath, fNewPath;
- long fOldDate, fNewDate; // if 0: no file
- List fHunks= new ArrayList();
- boolean fMatches= false;
- private boolean fIsEnabled2= true;
- String fRejected;
-
-
- /* package */ Diff(IPath oldPath, long oldDate, IPath newPath, long newDate) {
- fOldPath= oldPath;
- fOldDate= oldPath == null ? 0 : oldDate;
- fNewPath= newPath;
- fNewDate= newPath == null ? 0 : newDate;
- }
-
- boolean isEnabled() {
- return fIsEnabled2;
- }
-
- void setEnabled(boolean b) {
- fIsEnabled2= b;
- }
-
- void reverse() {
- IPath tp= fOldPath;
- fOldPath= fNewPath;
- fNewPath= tp;
-
- long t= fOldDate;
- fOldDate= fNewDate;
- fNewDate= t;
-
- Iterator iter= fHunks.iterator();
- while (iter.hasNext()) {
- Hunk hunk= (Hunk) iter.next();
- hunk.reverse();
- }
- }
-
- Hunk[] getHunks() {
- return (Hunk[]) fHunks.toArray((Hunk[]) new Hunk[fHunks.size()]);
- }
-
- IPath getPath() {
- if (fOldPath != null)
- return fOldPath;
- return fNewPath;
- }
-
- void finish() {
- if (fHunks.size() == 1) {
- Hunk h= (Hunk) fHunks.get(0);
- if (h.fNewLength == 0) {
- fNewDate= 0;
- fNewPath= fOldPath;
- }
- }
- }
-
- /* package */ void add(Hunk hunk) {
- fHunks.add(hunk);
- }
-
- /* package */ int getType() {
- if (fOldDate == 0)
- return Differencer.ADDITION;
- if (fNewDate == 0)
- return Differencer.DELETION;
- return Differencer.CHANGE;
- }
-
- /* package */ String getDescription(int strip) {
- IPath path= fOldPath;
- if (fOldDate == 0)
- path= fNewPath;
- if (strip > 0 && strip < path.segmentCount())
- path= path.removeFirstSegments(strip);
- return path.toOSString();
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Hunk.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Hunk.java
deleted file mode 100644
index e49d5ad6a..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Hunk.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal.patch;
-
-import java.util.List;
-
-import org.eclipse.jface.util.Assert;
-
-
-/**
- * A Hunk describes a range of changed lines and some context lines.
- */
-/* package */ class Hunk {
-
- Diff fParent;
- int fOldStart, fOldLength;
- int fNewStart, fNewLength;
- String[] fLines;
- boolean fMatches= false;
- private boolean fIsEnabled2= true;
-
-
- /* package */ Hunk(Diff parent, int[] oldRange, int[] newRange, List lines) {
-
- fParent= parent;
- if (fParent != null)
- fParent.add(this);
-
- if (oldRange[0] > 0)
- fOldStart= oldRange[0]-1; // line number start at 0!
- else
- fOldStart= 0;
- fOldLength= oldRange[1];
- if (newRange[0] > 0)
- fNewStart= newRange[0]-1; // line number start at 0!
- else
- fNewStart= 0;
- fNewLength= newRange[1];
-
- fLines= (String[]) lines.toArray(new String[lines.size()]);
- }
-
- boolean isEnabled() {
- return fIsEnabled2;
- }
-
- void setEnabled(boolean b) {
- fIsEnabled2= b;
- }
-
- void reverse() {
- int t= fOldStart;
- fOldStart= fNewStart;
- fNewStart= t;
-
- t= fOldLength;
- fOldLength= fNewLength;
- fNewLength= t;
-
- for (int i= 0; i < fLines.length; i++) {
- String line= fLines[i];
- char c= line.charAt(0);
- switch (c) {
- case '+':
- fLines[i]= '-' + line.substring(1);
- break;
- case '-':
- fLines[i]= '+' + line.substring(1);
- break;
- default:
- break;
- }
- }
- }
-
- /**
- * Returns the contents of this hunk.
- * Each line starts with a control character. Their meaning is as follows:
- * <ul>
- * <li>
- * '+': add the line
- * <li>
- * '-': delete the line
- * <li>
- * ' ': no change, context line
- * </ul>
- */
- String getContent() {
- StringBuffer sb= new StringBuffer();
- for (int i= 0; i < fLines.length; i++) {
- String line= fLines[i];
- sb.append(line.substring(0, Patcher.length(line)));
- sb.append('\n');
- }
- return sb.toString();
- }
-
- /**
- * Returns a descriptive String for this hunk.
- * It is in the form old_start,old_length -> new_start,new_length.
- */
- String getDescription() {
- StringBuffer sb= new StringBuffer();
- sb.append(Integer.toString(fOldStart));
- sb.append(',');
- sb.append(Integer.toString(fOldLength));
- sb.append(" -> "); //$NON-NLS-1$
- sb.append(Integer.toString(fNewStart));
- sb.append(',');
- sb.append(Integer.toString(fNewLength));
- return sb.toString();
- }
-
- String getRejectedDescription() {
- StringBuffer sb= new StringBuffer();
- sb.append("@@ -"); //$NON-NLS-1$
- sb.append(Integer.toString(fOldStart));
- sb.append(',');
- sb.append(Integer.toString(fOldLength));
- sb.append(" +"); //$NON-NLS-1$
- sb.append(Integer.toString(fNewStart));
- sb.append(',');
- sb.append(Integer.toString(fNewLength));
- sb.append(" @@"); //$NON-NLS-1$
- return sb.toString();
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java
deleted file mode 100644
index e238378d1..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java
+++ /dev/null
@@ -1,623 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal.patch;
-
-import java.io.*;
-import java.util.*;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.*;
-
-import org.eclipse.ui.help.*;
-import org.eclipse.ui.model.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-
-import org.eclipse.compare.internal.Utilities;
-
-
-/* package */ class InputPatchPage extends WizardPage {
-
- // constants
- protected static final int SIZING_TEXT_FIELD_WIDTH= 250;
- protected static final int COMBO_HISTORY_LENGTH= 5;
-
- private final static int SIZING_SELECTION_WIDGET_WIDTH= 400;
- private final static int SIZING_SELECTION_WIDGET_HEIGHT= 150;
-
- // dialog store id constants
- private final static String PAGE_NAME= "PatchWizardPage1"; //$NON-NLS-1$
- private final static String STORE_PATCH_FILE_ID= PAGE_NAME + ".PATCH_FILE"; //$NON-NLS-1$
- private final static String STORE_PATCH_FILES_ID= PAGE_NAME + ".PATCH_FILES"; //$NON-NLS-1$
- private final static String STORE_USE_CLIPBOARD_ID= PAGE_NAME + ".USE_CLIPBOARD"; //$NON-NLS-1$
-
- // help IDs
- private final static String PATCH_HELP_CONTEXT_ID= "PatchWizardHelpId"; //$NON-NLS-1$
-
- private boolean fShowError= false;
-
- // SWT widgets
- private Button fUseClipboardButton;
- private Combo fPatchFileNameField;
- private Button fPatchFileBrowseButton;
- private Button fUsePatchFileButton;
- private Group fPatchFileGroup;
- private CheckboxTreeViewer fPatchTargets;
- private PatchWizard fPatchWizard;
-
-
- InputPatchPage(PatchWizard pw) {
- super("InputPatchPage", PatchMessages.getString("InputPatchPage.title"), null); //$NON-NLS-1$ //$NON-NLS-2$
- fPatchWizard= pw;
- setMessage(PatchMessages.getString("InputPatchPage.message")); //$NON-NLS-1$
- }
-
- /**
- * Get a path from the supplied text widget.
- * @return org.eclipse.core.runtime.IPath
- */
- protected IPath getPathFromText(Text textField) {
- return (new Path(textField.getText())).makeAbsolute();
- }
-
- /* package */ String getPatchName() {
- if (getUseClipboard())
- return PatchMessages.getString("InputPatchPage.Clipboard"); //$NON-NLS-1$
- return getPatchFilePath();
- }
-
- public void createControl(Composite parent) {
-
- Composite composite= new Composite(parent, SWT.NULL);
- composite.setLayout(new GridLayout());
- composite.setLayoutData(new GridData(/* GridData.VERTICAL_ALIGN_FILL | */ GridData.HORIZONTAL_ALIGN_FILL));
- setControl(composite);
-
- Label l= new Label(composite, SWT.NONE); // a spacer
- l.setText(PatchMessages.getString("InputPatchPage.SelectInput")); //$NON-NLS-1$
- buildInputGroup(composite);
-
- new Label(composite, SWT.NONE); // a spacer
-
- buildPatchFileGroup(composite);
-
- restoreWidgetValues();
-
- updateWidgetEnablements();
- //updatePageCompletion();
-
- WorkbenchHelp.setHelp(composite, PATCH_HELP_CONTEXT_ID);
- }
-
- /* (non-JavaDoc)
- * Method declared in IWizardPage.
- */
- public IWizardPage getNextPage() {
- if (true) {
-
- Patcher patcher= ((PatchWizard) getWizard()).getPatcher();
-
- // Create a reader for the input
- Reader reader= null;
- if (getUseClipboard()) {
- Control c= getControl();
- if (c != null) {
- Clipboard clipboard= new Clipboard(c.getDisplay());
- Object o= clipboard.getContents(TextTransfer.getInstance());
- clipboard.dispose();
- if (o instanceof String)
- reader= new StringReader((String)o);
- }
- } else {
- String patchFilePath= getPatchFilePath();
- if (patchFilePath != null) {
- try {
- reader= new FileReader(patchFilePath);
- } catch (FileNotFoundException ex) {
- MessageDialog.openError(null,
- PatchMessages.getString("InputPatchPage.PatchErrorDialog.title"), //$NON-NLS-1$
- PatchMessages.getString("InputPatchPage.PatchFileNotFound.message")); //$NON-NLS-1$
- }
- }
- }
-
- // parse the input
- if (reader != null) {
- try {
- patcher.parse(new BufferedReader(reader));
- } catch (IOException ex) {
- MessageDialog.openError(null,
- PatchMessages.getString("InputPatchPage.PatchErrorDialog.title"), //$NON-NLS-1$
- PatchMessages.getString("InputPatchPage.ParseError.message")); //$NON-NLS-1$
- }
-
- try {
- reader.close();
- } catch (IOException x) {
- }
- }
-
- Diff[] diffs= patcher.getDiffs();
- if (diffs == null || diffs.length == 0) {
- String source= getUseClipboard() ? "Clipboard" //$NON-NLS-1$
- : "File"; //$NON-NLS-1$
- MessageDialog.openError(null,
- PatchMessages.getString("InputPatchPage.PatchErrorDialog.title"), //$NON-NLS-1$
- PatchMessages.getString("InputPatchPage.NoDiffsFound_"+source+".message")); //$NON-NLS-1$ //$NON-NLS-2$
- return this;
- }
-
- // guess prefix count
- int guess= guessPrefix(diffs);
- patcher.setStripPrefixSegments(guess);
- }
- return super.getNextPage();
- }
-
- private int guessPrefix(Diff[] diffs) {
- /*
- ArrayList list= new ArrayList();
- IResource target= fPatchWizard.getTarget();
- if (target instanceof IFile) {
- list.add(target.getFullPath());
- } else if (target instanceof IContainer) {
- addLeaf(list, (IContainer) target);
- }
-
- // guess prefix count
- for (int i= 0; i < diffs.length; i++) {
- IPath p= diffs[i].fOldPath;
- if (p != null) {
- int matches= match(p, list);
- if (matches > 0) {
- return p.segmentCount() - matches;
- }
- }
- }
- */
- return 0;
- }
-
- private int match(IPath path, ArrayList list) {
- Iterator iter= list.iterator();
- while (iter.hasNext()) {
- IPath filePath= (IPath) iter.next();
- int matches= matchTrailingSegments(path, filePath);
- if (matches > 0)
- return matches;
- }
- return 0;
- }
-
- private int matchTrailingSegments(IPath p1, IPath p2) {
- int matches= 0;
- int i1= p1.segmentCount()-1;
- int i2= p2.segmentCount()-1;
- for (; i1 >= 0 && i2 >= 0; i1--, i2--) {
- String s1= p1.segment(i1);
- String s2= p2.segment(i2);
- if (!s1.equals(s2))
- break;
- matches++;
- }
- return matches;
- }
-
- private void addLeaf(ArrayList list, IContainer c) {
- IResource[] rs= null;
- try {
- rs= c.members();
- } catch(CoreException ex) {
- }
- if (rs != null) {
- for (int i= 0; i < rs.length; i++) {
- IResource r= rs[i];
- if (r instanceof IFile)
- list.add(r.getFullPath());
- else if (r instanceof IContainer)
- addLeaf(list, (IContainer) r);
- }
- }
- }
-
- /* (non-JavaDoc)
- * Method declared in IWizardPage.
- */
- public boolean canFlipToNextPage() {
- if (true) {
- // we can't call getNextPage to determine if flipping is allowed since computing
- // the next page is quite expensive. So we say yes if the page is complete.
- return isPageComplete();
- } else {
- return super.canFlipToNextPage();
- }
- }
-
- private void setEnablePatchFile(boolean enable) {
- fPatchFileNameField.setEnabled(enable);
- fPatchFileBrowseButton.setEnabled(enable);
- }
-
- /**
- * Create the group for selecting the patch file
- */
- private void buildPatchFileGroup(Composite parent) {
-
- fPatchFileGroup= new Group(parent, SWT.NONE);
- fPatchFileGroup.setText(PatchMessages.getString("InputPatchPage.SelectPatch.title")); //$NON-NLS-1$
- GridLayout layout= new GridLayout();
- layout.numColumns= 3;
- fPatchFileGroup.setLayout(layout);
- fPatchFileGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- // 1st row
- fUsePatchFileButton= new Button(fPatchFileGroup, SWT.RADIO);
- fUsePatchFileButton.setText(PatchMessages.getString("InputPatchPage.FileButton.text")); //$NON-NLS-1$
-
- fPatchFileNameField= new Combo(fPatchFileGroup, SWT.BORDER);
- GridData gd= new GridData(GridData.FILL_HORIZONTAL);
- //gd.horizontalIndent= 8;
- gd.widthHint= SIZING_TEXT_FIELD_WIDTH;
- fPatchFileNameField.setLayoutData(gd);
-
- fPatchFileBrowseButton= new Button(fPatchFileGroup, SWT.PUSH);
- fPatchFileBrowseButton.setText(PatchMessages.getString("InputPatchPage.ChooseFileButton.text")); //$NON-NLS-1$
- fPatchFileBrowseButton.setLayoutData(new GridData());
-
- // 2nd row
- fUseClipboardButton= new Button(fPatchFileGroup, SWT.RADIO);
- fUseClipboardButton.setText(PatchMessages.getString("InputPatchPage.UseClipboardButton.text")); //$NON-NLS-1$
- gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- gd.horizontalSpan= 2;
- fUseClipboardButton.setLayoutData(gd);
-
-
- // Add listeners
- fUsePatchFileButton.addSelectionListener(
- new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- fShowError= true;
- setEnablePatchFile(!getUseClipboard());
- updateWidgetEnablements();
- }
- }
- );
- fPatchFileNameField.addSelectionListener(
- new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- setSourceName(fPatchFileNameField.getText());
- updateWidgetEnablements();
- }
- }
- );
- fPatchFileNameField.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- fShowError= true;
- updateWidgetEnablements();
- }
- }
- );
- fPatchFileBrowseButton.addSelectionListener(
- new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handlePatchFileBrowseButtonPressed();
- updateWidgetEnablements();
- }
- }
- );
-
- //fPatchFileNameField.setFocus();
- }
-
- private void buildInputGroup(Composite parent) {
-
- PatchWizard pw= (PatchWizard) getWizard();
- IResource target= pw.getTarget();
- IWorkspace workspace= target.getWorkspace();
- IWorkspaceRoot root= workspace.getRoot();
-
- Tree tree= new Tree(parent, SWT.BORDER);
- GridData gd= new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint= 200;
- tree.setLayoutData(gd);
-
- fPatchTargets= new CheckboxTreeViewer(tree);
- fPatchTargets.setLabelProvider(new WorkbenchLabelProvider());
- fPatchTargets.setContentProvider(new WorkbenchContentProvider());
- fPatchTargets.setSorter(new WorkbenchViewerSorter());
- fPatchTargets.setInput(root);
- if (target != null) {
- fPatchTargets.expandToLevel(target, 0);
- fPatchTargets.setSelection(new StructuredSelection(target));
- }
-
- // register listeners
- fPatchTargets.addSelectionChangedListener(
- new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- fPatchWizard.setTargets(PatchWizard.getResource(event.getSelection()));
- updateWidgetEnablements();
- }
- }
- );
- //fPatchFileNameField.setFocus();
- }
-
- /**
- * Returns a content provider for <code>IResource</code>s that returns
- * only children of the given resource type.
- */
- private ITreeContentProvider getResourceProvider(final int resourceType) {
- return new WorkbenchContentProvider() {
- public Object[] getChildren(Object o) {
- if (o instanceof IContainer) {
- try {
- ArrayList results= new ArrayList();
- IResource[] members= ((IContainer)o).members();
- for (int i= 0; i < members.length; i++)
- // filter out the desired resource types
- if ((members[i].getType() & resourceType) != 0)
- results.add(members[i]);
- return results.toArray();
- } catch (CoreException e) {
- }
- }
- // just return an empty set of children
- return new Object[0];
- }
- };
- }
-
- /**
- * Updates the enable state of this page's controls.
- */
- private void updateWidgetEnablements() {
-
- String error= null;
-
- ISelection selection= fPatchTargets.getSelection();
- boolean anySelected= selection != null && !selection.isEmpty();
- if (!anySelected)
- error= PatchMessages.getString("InputPatchPage.NothingSelected.message"); //$NON-NLS-1$
-
- boolean gotPatch= false;
- if (getUseClipboard()) {
- Control c= getControl();
- if (c != null) {
- Clipboard clipboard= new Clipboard(c.getDisplay());
- Object o= clipboard.getContents(TextTransfer.getInstance());
- clipboard.dispose();
- if (o instanceof String) {
- String s= ((String) o).trim();
- if (s.length() > 0)
- gotPatch= true;
- else
- error= PatchMessages.getString("InputPatchPage.ClipboardIsEmpty.message"); //$NON-NLS-1$
- } else
- error= PatchMessages.getString("InputPatchPage.NoTextInClipboard.message"); //$NON-NLS-1$
- } else
- error= PatchMessages.getString("InputPatchPage.CouldNotReadClipboard.message"); //$NON-NLS-1$
- } else {
- String path= fPatchFileNameField.getText();
- if (path != null && path.length() > 0) {
- File file= new File(path);
- gotPatch= file.exists() && file.isFile() && file.length() > 0;
- if (!gotPatch)
- error= PatchMessages.getString("InputPatchPage.CannotLocatePatch.message") + path; //$NON-NLS-1$
- } else {
- error= PatchMessages.getString("InputPatchPage.NoFileName.message"); //$NON-NLS-1$
- }
- }
-
- setPageComplete(anySelected && gotPatch);
- if (fShowError)
- setErrorMessage(error);
- }
-
- protected void handlePatchFileBrowseButtonPressed() {
- FileDialog dialog= new FileDialog(getShell(), SWT.NONE);
- dialog.setText(PatchMessages.getString("InputPatchPage.SelectPatchFileDialog.title")); //$NON-NLS-1$
- dialog.setFilterPath(getPatchFilePath());
- String res= dialog.open();
- if (res == null)
- return;
-
- String patchFilePath= dialog.getFileName();
- IPath filterPath= new Path(dialog.getFilterPath());
- IPath path= filterPath.append(patchFilePath).makeAbsolute();
- patchFilePath= path.toOSString();
- //fDialogSettings.put(IUIConstants.DIALOGSTORE_LASTEXTJAR, filterPath.toOSString());
-
- fPatchFileNameField.setText(patchFilePath);
- //setSourceName(patchFilePath);
- }
-
- /**
- * Sets the source name of the import to be the supplied path.
- * Adds the name of the path to the list of items in the
- * source combo and selects it.
- *
- * @param path the path to be added
- */
- protected void setSourceName(String path) {
-
- if (path.length() > 0) {
-
- String[] currentItems= fPatchFileNameField.getItems();
- int selectionIndex= -1;
- for (int i= 0; i < currentItems.length; i++)
- if (currentItems[i].equals(path))
- selectionIndex= i;
-
- if (selectionIndex < 0) { // not found in history
- int oldLength= currentItems.length;
- String[] newItems= new String[oldLength + 1];
- System.arraycopy(currentItems, 0, newItems, 0, oldLength);
- newItems[oldLength]= path;
- fPatchFileNameField.setItems(newItems);
- selectionIndex= oldLength;
- }
- fPatchFileNameField.select(selectionIndex);
-
- //resetSelection();
- }
- }
-
- /**
- * The Finish button was pressed. Try to do the required work now and answer
- * a boolean indicating success. If false is returned then the wizard will
- * not close.
- *
- * @return boolean
- */
- public boolean finish() {
-// if (!ensureSourceIsValid())
-// return false;
-
- saveWidgetValues();
-
-// Iterator resourcesEnum = getSelectedResources().iterator();
-// List fileSystemObjects = new ArrayList();
-// while (resourcesEnum.hasNext()) {
-// fileSystemObjects.add(
-// ((FileSystemElement) resourcesEnum.next()).getFileSystemObject());
-// }
-//
-// if (fileSystemObjects.size() > 0)
-// return importResources(fileSystemObjects);
-//
-// MessageDialog
-// .openInformation(
-// getContainer().getShell(),
-// DataTransferMessages.getString("DataTransfer.information"), //$NON-NLS-1$
-// DataTransferMessages.getString("FileImport.noneSelected")); //$NON-NLS-1$
-//
-// return false;
-
- return true;
- }
-
- /**
- * Use the dialog store to restore widget values to the values that they held
- * last time this wizard was used to completion
- */
- private void restoreWidgetValues() {
-
- boolean useClipboard= false;
-
- IDialogSettings settings= getDialogSettings();
- if (settings != null) {
-
- useClipboard= settings.getBoolean(STORE_USE_CLIPBOARD_ID);
-
- // set filenames history
- String[] sourceNames= settings.getArray(STORE_PATCH_FILES_ID);
- if (sourceNames != null)
- for (int i= 0; i < sourceNames.length; i++)
- if (sourceNames[i] != null && sourceNames[i].length() > 0)
- fPatchFileNameField.add(sourceNames[i]);
-
- // set patch file path
- String patchFilePath= settings.get(STORE_PATCH_FILES_ID);
- if (patchFilePath != null)
- setSourceName(patchFilePath);
- }
-
- // set 'Use Clipboard' radio buttons
- setUseClipboard(useClipboard);
- }
-
- /**
- * Since Finish was pressed, write widget values to the dialog store so that they
- * will persist into the next invocation of this wizard page
- */
- void saveWidgetValues() {
- IDialogSettings settings= getDialogSettings();
- if (settings != null) {
-
- settings.put(STORE_USE_CLIPBOARD_ID, getUseClipboard());
- settings.put(STORE_PATCH_FILES_ID, getPatchFilePath());
-
- // update source names history
- String[] sourceNames= settings.getArray(STORE_PATCH_FILES_ID);
- if (sourceNames == null)
- sourceNames= new String[0];
-
- sourceNames= addToHistory(sourceNames, getPatchFilePath());
- settings.put(STORE_PATCH_FILES_ID, sourceNames);
- }
- }
-
- // static helpers
-
- private void setUseClipboard(boolean useClipboard) {
- if (useClipboard)
- fUseClipboardButton.setSelection(true);
- else
- fUsePatchFileButton.setSelection(true);
- setEnablePatchFile(!useClipboard);
- }
-
- private boolean getUseClipboard() {
- if (fUseClipboardButton != null)
- return fUseClipboardButton.getSelection();
- return false;
- }
-
- private String getPatchFilePath() {
- if (fPatchFileNameField != null)
- return fPatchFileNameField.getText();
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Creates a new label with a bold font.
- *
- * @param parent the parent control
- * @param text the label text
- * @return the new label control
- */
- private static Label buildPlainLabel(Composite parent, String text) {
- Label label= new Label(parent, SWT.NONE);
- label.setText(text);
- GridData data= new GridData();
- data.verticalAlignment= GridData.FILL;
- data.horizontalAlignment= GridData.FILL;
- label.setLayoutData(data);
- return label;
- }
-
- /**
- * Adds an entry to a history, while taking care of duplicate history items
- * and excessively long histories. The assumption is made that all histories
- * should be of length <code>COMBO_HISTORY_LENGTH</code>.
- *
- * @param history the current history
- * @param newEntry the entry to add to the history
- */
- protected static String[] addToHistory(String[] history, String newEntry) {
- java.util.ArrayList l= new java.util.ArrayList(java.util.Arrays.asList(history));
-
- l.remove(newEntry);
- l.add(0,newEntry);
-
- // since only one new item was added, we can be over the limit
- // by at most one item
- if (l.size() > COMBO_HISTORY_LENGTH)
- l.remove(COMBO_HISTORY_LENGTH);
-
- return (String[]) l.toArray(new String[l.size()]);
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/LineReader.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/LineReader.java
deleted file mode 100644
index 053e3b99a..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/LineReader.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal.patch;
-
-import java.io.*;
-import java.util.*;
-
-import org.eclipse.jface.util.Assert;
-
-/* package */ class LineReader {
-
- private boolean fHaveChar= false;
- private int fLastChar;
- private boolean fSawEOF= false;
- private BufferedReader fReader;
- private boolean fIgnoreSingleCR= false;
-
-
- /* package */ LineReader(BufferedReader reader) {
- fReader= reader;
- Assert.isNotNull(reader);
- }
-
- void ignoreSingleCR() {
- fIgnoreSingleCR= true;
- }
-
- /**
- * Reads a line of text. A line is considered to be terminated by any one
- * of a line feed ('\n'), a carriage return ('\r'), or a carriage return
- * followed immediately by a linefeed.
- * @return A string containing the contents of the line including
- * the line-termination characters, or <code>null</code> if the end of the
- * stream has been reached
- * @exception IOException If an I/O error occurs
- */
- /* package */ String readLine() throws IOException {
- StringBuffer sb= null;
-
- while (!fSawEOF) {
- int c= readChar();
- if (c == -1) {
- fSawEOF= true;
- break;
- }
- if (sb == null)
- sb= new StringBuffer();
- sb.append((char)c);
- if (c == '\n')
- break;
- if (c == '\r') {
- c= readChar();
- if (c == -1) {
- fSawEOF= true;
- break; // EOF
- }
- if (c != '\n') {
- if (fIgnoreSingleCR) {
- sb.append((char)c);
- continue;
- } else {
- fHaveChar= true;
- fLastChar= c;
- }
- } else
- sb.append((char)c);
- break;
- }
- }
-
- if (sb != null)
- return sb.toString();
- return null;
- }
-
- /* package */ void close() {
- try {
- fReader.close();
- } catch (IOException ex) {
- }
- }
-
- /* package */ List readLines() {
- try {
- List lines= new ArrayList();
- String line;
- while ((line= readLine()) != null)
- lines.add(line);
- return lines;
- } catch (IOException ex) {
- //System.out.println("error while reading file: " + fileName + "(" + ex + ")");
- } finally {
- close();
- }
- return null;
- }
- /**
- * Returns the number of characters in the given string without
- * counting a trailing line separator.
- */
- /* package */ int lineContentLength(String line) {
- if (line == null)
- return 0;
- int length= line.length();
- for (int i= length-1; i >= 0; i--) {
- char c= line.charAt(i);
- if (c =='\n' || c == '\r')
- length--;
- else
- break;
- }
- return length;
- }
-
- //---- private
-
- private int readChar() throws IOException {
- if (fHaveChar) {
- fHaveChar= false;
- return fLastChar;
- }
- return fReader.read();
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchCompareInput.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchCompareInput.java
deleted file mode 100644
index d99a4f819..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchCompareInput.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal.patch;
-
-import java.io.*;
-import java.io.ByteArrayInputStream;
-import java.text.MessageFormat;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.resources.*;
-
-import org.eclipse.jface.viewers.*;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.*;
-import org.eclipse.compare.internal.*;
-
-
-/**
- * A PatchCompareInput uses a Patcher to
- * patch selected workspace resources.
- */
-/* package */ class PatchCompareInput extends CompareEditorInput {
-
- static class Rejected extends DiffNode implements IStreamContentAccessor {
- Diff fDiff;
- String fName;
- Rejected(IDiffContainer parent, String name, Diff diff) {
- super(parent, Differencer.NO_CHANGE);
- fName= name;
- fDiff= diff;
- }
- public String getName() {
- return fName + " *"; //$NON-NLS-1$
- }
- public String getType() {
- return "txt"; //$NON-NLS-1$
- }
- public Image getImage() {
- return CompareUI.getImage("file"); //$NON-NLS-1$
- }
- public InputStream getContents() {
- return new ByteArrayInputStream(fDiff.fRejected.getBytes());
- }
- }
-
- private DiffNode fRoot;
- private IResource fTarget;
- private Patcher fPatcher;
-
- /**
- * Creates an compare editor input for the given selection.
- */
- /* package */ PatchCompareInput(CompareConfiguration config, Patcher patcher, ISelection selection) {
- super(config);
- fPatcher= patcher;
- IResource[] s= Utilities.getResources(selection);
- if (s.length == 1)
- fTarget= s[0];
- }
-
- /**
- * Performs a two-way or three-way diff on the current selection.
- */
- public Object prepareInput(IProgressMonitor pm) throws InvocationTargetException {
-
- CompareConfiguration cc= (CompareConfiguration) getCompareConfiguration();
-
- try {
- Diff[] diffs= fPatcher.getDiffs();
-
- pm.beginTask(Utilities.getString("ResourceCompare.taskName"), diffs.length); //$NON-NLS-1$
-
- fRoot= new DiffNode(0);
- IContainer rootFolder= null;
- if (fTarget instanceof IContainer)
- rootFolder= (IContainer) fTarget;
-
- for (int i= 0; i < diffs.length; i++) {
- Diff diff= diffs[i];
- if (diff.isEnabled()) {
- IPath path= fPatcher.getPath(diff);
- createPath(fRoot, rootFolder, path, diff, false);
-
- String rej= diff.fRejected;
- if (rej != null) {
- IPath pp= path.removeLastSegments(1);
- pp= pp.append(path.lastSegment() + ".rej"); //$NON-NLS-1$
- createPath(fRoot, rootFolder, pp, diff, true);
- }
- }
- pm.worked(1);
- }
-
- fTarget.refreshLocal(IResource.DEPTH_INFINITE, pm);
-
- String leftLabel= fTarget.getName();
- cc.setLeftLabel(leftLabel);
- cc.setLeftImage(CompareUIPlugin.getImage(fTarget));
-
- String rformat= PatchMessages.getString("PatchCompareInput.RightTitle.format"); //$NON-NLS-1$
- String rightLabel= MessageFormat.format(rformat, new String[] { fPatcher.getName() } );
- cc.setRightLabel(rightLabel);
- //cc.setRightImage(CompareUIPlugin.getImage(fRightResource));
-
- String format= Utilities.getString("ResourceCompare.twoWay.title"); //$NON-NLS-1$
- String title= MessageFormat.format(format, new String[] {leftLabel, rightLabel} );
- setTitle(title);
-
- return fRoot;
-
- } catch (CoreException ex) {
- throw new InvocationTargetException(ex);
- } finally {
- pm.done();
- }
- }
-
- public void saveChanges(IProgressMonitor pm) throws CoreException {
- if (fRoot instanceof DiffNode) {
- try {
- commit(pm, (DiffNode) fRoot);
- } finally {
- setDirty(false);
- }
- }
- }
-
- /*
- * Recursively walks the diff tree and commits all changes.
- */
- private static void commit(IProgressMonitor pm, DiffNode node) throws CoreException {
-
- ITypedElement left= node.getLeft();
- if (left instanceof BufferedResourceNode)
- ((BufferedResourceNode) left).commit(pm);
-
- ITypedElement right= node.getRight();
- if (right instanceof BufferedResourceNode)
- ((BufferedResourceNode) right).commit(pm);
-
- IDiffElement[] children= node.getChildren();
- if (children != null) {
- for (int i= 0; i < children.length; i++) {
- IDiffElement element= children[i];
- if (element instanceof DiffNode)
- commit(pm, (DiffNode) element);
- }
- }
- }
-
- private void createPath(DiffContainer root, IContainer folder, IPath path, Diff diff, boolean reject) {
- if (path.segmentCount() > 1) {
- IFolder f= folder.getFolder(path.uptoSegment(1));
- IDiffElement child= root.findChild(path.segment(0));
- if (child == null) {
- ResourceNode rn= new ResourceNode(f);
- child= new DiffNode(root, Differencer.CHANGE, null, rn, rn);
- }
- if (child instanceof DiffContainer)
- createPath((DiffContainer)child, f, path.removeFirstSegments(1), diff, reject);
- } else {
- // a leaf
- BufferedResourceNode rn= new BufferedResourceNode(folder.getFile(path));
- if (reject) {
- new Rejected(root, path.segment(0), diff);
- } else {
- new DiffNode(root, diff.getType(), null, rn, new PatchedResource(rn, diff, path, fPatcher));
- }
- }
- }
-}
-
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchErrorDialog.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchErrorDialog.java
deleted file mode 100644
index cd4cb28a6..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchErrorDialog.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal.patch;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-
-import org.eclipse.compare.internal.ListDialog;
-
-public class PatchErrorDialog {
-
- private PatchErrorDialog() {
- // no instance.
- }
-
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.java
deleted file mode 100644
index 8dce380cc..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2002.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal.patch;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class PatchMessages {
-
- private static final String RESOURCE_BUNDLE= "org.eclipse.compare.internal.patch.PatchMessages";//$NON-NLS-1$
-
- private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
-
- private PatchMessages() {
- }
-
- public static String getString(String key) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
- }
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.properties b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.properties
deleted file mode 100644
index 550b9ee7e..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.properties
+++ /dev/null
@@ -1,79 +0,0 @@
-# =====================================
-# (c) Copyright IBM Corp. 2002.
-# All Rights Reserved.
-# =====================================
-
-#
-# 'Compare with Patch' Action
-#
-PatchAction.ExceptionTitle=Saving Resources
-PatchAction.Exception=Unexpected exception. See log for details
-PatchAction.SavingDirtyEditorsTask=Saving dirty editors
-PatchAction.AlwaysSaveQuestion=&Always save all modified resources automatically prior to patching
-PatchAction.SaveAllQuestion=Save all modified resources
-PatchAction.SaveAllDescription=All modified resources must be saved before this operation.\nPress OK to confirm or Cancel otherwise
-
-#
-# PatchWizard
-#
-PatchWizard.title=Resource Patcher
-PatchWizard.unexpectedException.message= Unexpected exception while applying the patch. See log for a detailed error description.
-
-#
-# InputPatchPage
-#
-InputPatchPage.title= Patch Input Specification
-InputPatchPage.message= Define what resource to patch with which patch
-InputPatchPage.Clipboard=Clipboard
-InputPatchPage.SelectInput=Select a single file or folder to patch:
-InputPatchPage.PatchErrorDialog.title=Patch Error
-InputPatchPage.PatchErrorDialog=Patch Error
-InputPatchPage.SelectPatch.title=Select Patch
-InputPatchPage.FileButton.text=Fil&e
-InputPatchPage.ChooseFileButton.text=&Browse...
-InputPatchPage.UseClipboardButton.text=&Clipboard
-InputPatchPage.NothingSelected.message=Nothing selected to apply patch to
-InputPatchPage.ClipboardIsEmpty.message=Clipboard is empty
-InputPatchPage.NoTextInClipboard.message=Clipboard does not contain text
-InputPatchPage.CouldNotReadClipboard.message=Couldn't retrieve clipboard contents
-InputPatchPage.CannotLocatePatch.message=Can't locate patch file:
-InputPatchPage.NoFileName.message=No file name
-InputPatchPage.SelectPatchFileDialog.title=Select Patch File
-InputPatchPage.PatchFileNotFound.message=Patch file not found.
-InputPatchPage.ParseError.message=Error while parsing patch
-InputPatchPage.NoDiffsFound_Clipboard.message=Clipboard does not contain valid patch
-InputPatchPage.NoDiffsFound_File.message=File does not contain valid patch
-
-#
-# PreviewPatchPage
-#
-PreviewPatchPage.title= Verify Patch
-PreviewPatchPage.message= The tree shows the contents of the patch.\nA checked item indicates that a patch could be applied succesfully. Uncheck an item if you want to exclude it.
-PreviewPatchPage.Left.title= Original
-PreviewPatchPage.Right.title= Result
-PreviewPatchPage.PatchOptions.title=Patch Options
-PreviewPatchPage.IgnoreSegments.text=&Ignore leading path name segments:
-PreviewPatchPage.ReversePatch.text=&Reverse patch
-PreviewPatchPage.FuzzFactor.text=&Maximum fuzz factor:
-PreviewPatchPage.FuzzFactor.tooltip=Allow context to shift this number of lines from the original place
-PreviewPatchPage.IgnoreWhitespace.text=Ignore &whitespace
-PreviewPatchPage.NoName.text=no name
-PreviewPatchPage.FileExists.error=(file already exists)
-PreviewPatchPage.FileDoesNotExist.error=(file doesn't exist)
-PreviewPatchPage.NoMatch.error=(no match)
-PreviewPatchPage.FileIsReadOnly.error=(file is read only)
-
-#
-# Patcher
-#
-Patcher.ErrorDialog.title=title
-Patcher.DeleteError.message=Error while deleting resource
-Patcher.UpdateError.message=Error while updating resource
-Patcher.RefreshError.message=Error while refreshing from local
-Patcher.Marker.message=Rejected patch
-Patcher.Task.message=Patching
-
-#
-# PatchCompareInput
-#
-PatchCompareInput.RightTitle.format= Patch: {0}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizard.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizard.java
deleted file mode 100644
index a0e3d8d1b..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizard.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal.patch;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.Wizard;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.CoreException;
-
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.internal.*;
-import org.eclipse.compare.structuremergeviewer.Differencer;
-
-
-/* package */ class PatchWizard extends Wizard {
-
- // dialog store id constants
- private final static String DIALOG_SETTINGS_KEY= "PatchWizard"; //$NON-NLS-1$
-
- private boolean fHasNewDialogSettings;
-
- private InputPatchPage fPatchWizardPage;
- private PreviewPatchPage fPreviewPatchPage;
-
- private Patcher fPatcher;
- private IResource fTarget;
-
-
- /**
- * Creates a wizard for applying a patch file to the workspace.
- */
- /* package */ PatchWizard(ISelection selection) {
-
- setTargets(getResource(selection));
-
- fPatcher= new Patcher();
-
- setWindowTitle(PatchMessages.getString("PatchWizard.title")); //$NON-NLS-1$
-
- IDialogSettings workbenchSettings= CompareUIPlugin.getDefault().getDialogSettings();
- IDialogSettings section= workbenchSettings.getSection(DIALOG_SETTINGS_KEY); //$NON-NLS-1$
- if (section == null)
- fHasNewDialogSettings= true;
- else {
- fHasNewDialogSettings= false;
- setDialogSettings(section);
- }
- }
-
- static IResource[] getResource(ISelection selection) {
- IResource[] rs= Utilities.getResources(selection);
- ArrayList list= null;
- for (int i= 0; i < rs.length; i++) {
- IResource r= rs[i];
- if (r != null && r.isAccessible()) {
- if (list == null)
- list= new ArrayList();
- list.add(r);
- }
- }
- if (list != null && list.size() > 0)
- return (IResource[]) list.toArray(new IResource[list.size()]);
- return null;
- }
-
- Patcher getPatcher() {
- return fPatcher;
- }
-
- IResource getTarget() {
- return fTarget;
- }
-
- void setTargets(IResource[] targets) {
- fTarget= targets[0]; // right now we can only deal with a single selection
- }
-
- /* (non-Javadoc)
- * Method declared on IWizard.
- */
- public void addPages() {
- super.addPages();
-
- addPage(fPatchWizardPage= new InputPatchPage(this));
- addPage(fPreviewPatchPage= new PreviewPatchPage(this));
- }
-
- /* (non-Javadoc)
- * Method declared on IWizard.
- */
- public boolean needsProgressMonitor() {
- return true;
- }
-
- /* (non-Javadoc)
- * Method declared on IWizard.
- */
- public boolean performFinish() {
-
- if (false) {
- CompareConfiguration cc= new CompareConfiguration() {
- public Image getImage(int kind) {
- if (kind == Differencer.ADDITION)
- kind= Differencer.DELETION;
- else if (kind == Differencer.DELETION)
- kind= Differencer.ADDITION;
- return super.getImage(kind);
- }
- public Image getImage(Image base, int kind) {
- if (kind == Differencer.ADDITION)
- kind= Differencer.DELETION;
- else if (kind == Differencer.DELETION)
- kind= Differencer.ADDITION;
- return super.getImage(base, kind);
- }
- };
- cc.setProperty(CompareEditor.CONFIRM_SAVE_PROPERTY, new Boolean(false));
-
- fPatcher.setName(fPatchWizardPage.getPatchName());
-
- CompareUI.openCompareEditor(new PatchCompareInput(cc, fPatcher, new StructuredSelection(fTarget)));
- } else {
- fPatcher.setName(fPatchWizardPage.getPatchName());
-
- try {
- WorkspaceModifyOperation op= new WorkspaceModifyOperation() {
- protected void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- fPatcher.applyAll(getTarget(), monitor);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- };
- getContainer().run(true, false, op);
-
- } catch (InvocationTargetException e) {
- ExceptionHandler.handle(e,
- PatchMessages.getString("PatchWizard.title"), //$NON-NLS-1$
- PatchMessages.getString("PatchWizard.unexpectedException.message")); //$NON-NLS-1$
- } catch (InterruptedException e) {
- // cannot happen
- }
- }
-
- // Save the dialog settings
- if (fHasNewDialogSettings) {
- IDialogSettings workbenchSettings= CompareUIPlugin.getDefault().getDialogSettings();
- IDialogSettings section= workbenchSettings.getSection(DIALOG_SETTINGS_KEY);
- section= workbenchSettings.addNewSection(DIALOG_SETTINGS_KEY);
- setDialogSettings(section);
- }
-
- fPatchWizardPage.saveWidgetValues();
- //fPreviewPatchPage.saveWidgetValues();
-
- return true;
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchedResource.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchedResource.java
deleted file mode 100644
index b4932a657..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchedResource.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal.patch;
-
-import java.io.*;
-
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.*;
-
-import org.eclipse.compare.*;
-
-
-/* package */ class PatchedResource implements ITypedElement, IStreamContentAccessor {
-
- private Diff fDiff;
- private IStreamContentAccessor fCurrent;
- private IPath fPath;
- private byte[] fContent;
- private Patcher fPatcher;
-
- /* package */ PatchedResource(IStreamContentAccessor current, Diff diff, IPath path, Patcher patcher) {
- fDiff= diff;
- fCurrent= current;
- fPath= path;
- fPatcher= patcher;
- }
-
- public InputStream getContents() throws CoreException {
- if (fContent == null) {
- InputStream is= null;
-
- try {
- is= fCurrent.getContents();
- } catch (CoreException ex) {
- is= new ByteArrayInputStream(new byte[0]);
- }
- if (is != null) {
-
- try {
- String encoding= ResourcesPlugin.getEncoding();
- BufferedReader br= new BufferedReader(new InputStreamReader(is, encoding));
- String s= fPatcher.patch(fDiff,br, null);
- if (s != null)
- fContent= s.getBytes(encoding);
- } catch (UnsupportedEncodingException e) {
- throw new CoreException(new Status(IStatus.ERROR, CompareUI.PLUGIN_ID, Platform.PLUGIN_ERROR, e.getMessage(), e));
- }
-
- try {
- is.close();
- } catch (IOException ex) {
- }
- }
- }
- return new ByteArrayInputStream(fContent);
- }
-
- public Image getImage() {
- return CompareUI.getImage(getType());
- }
-
- public String getName() {
- return fPath.toOSString();
- }
-
- public String getType() {
- String type= fPath.getFileExtension();
- if (type != null)
- return type;
- return ITypedElement.UNKNOWN_TYPE;
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
deleted file mode 100644
index 9fe7f3752..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
+++ /dev/null
@@ -1,1006 +0,0 @@
-package org.eclipse.compare.internal.patch;
-
-import java.io.*;
-import java.text.*;
-import java.util.*;
-
-import org.eclipse.jface.util.Assert;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.resources.*;
-
-import org.eclipse.compare.structuremergeviewer.Differencer;
-import org.eclipse.compare.internal.ExceptionHandler;
-
-
-/**
- * A Patcher
- * - knows how to parse various patch file formats into some in-memory structure,
- * - holds onto the parsed data and the options to use when applying the patches,
- * - knows how to apply the patches to files and folders.
- */
-public class Patcher {
-
- private static final boolean DEBUG= false;
-
- private static final String DEV_NULL= "/dev/null"; //$NON-NLS-1$
-
- private static final String REJECT_FILE_EXTENSION= ".rej"; //$NON-NLS-1$
-
- private static final String MARKER_TYPE= "org.eclipse.compare.rejectedPatchMarker"; //$NON-NLS-1$
-
- // diff formats
- private static final int CONTEXT= 0;
- private static final int ED= 1;
- private static final int NORMAL= 2;
- private static final int UNIFIED= 3;
-
- // we recognize the following date/time formats
- private static DateFormat[] DATE_FORMATS= new DateFormat[] {
- new SimpleDateFormat("EEE MMM dd kk:mm:ss yyyy"), //$NON-NLS-1$
- new SimpleDateFormat("yyyy/MM/dd kk:mm:ss"), //$NON-NLS-1$
- new SimpleDateFormat("EEE MMM dd kk:mm:ss yyyy", Locale.US) //$NON-NLS-1$
- };
-
- private String fName;
- private Diff[] fDiffs;
- // patch options
- private int fStripPrefixSegments;
- private int fFuzz;
- private boolean fIgnoreWhitespace= false;
- private boolean fIgnoreLineDelimiter= true;
- private boolean fPreserveLineDelimiters= false;
- private boolean fReverse= false;
-
-
- Patcher() {
- }
-
- //---- options
-
- void setName(String name) {
- fName= name;
- }
-
- String getName() {
- return fName;
- }
-
- /**
- * Returns an array of Diffs after a sucessfull call to <code>parse</code>.
- * If <code>parse</code> hasn't been called returns <code>null</code>.
- */
- Diff[] getDiffs() {
- return fDiffs;
- }
-
- IPath getPath(Diff diff) {
- IPath path= diff.getPath();
- if (fStripPrefixSegments > 0 && fStripPrefixSegments < path.segmentCount())
- path= path.removeFirstSegments(fStripPrefixSegments);
- return path;
- }
-
- /**
- * Returns <code>true</code> if new value differs from old.
- */
- boolean setStripPrefixSegments(int strip) {
- if (strip != fStripPrefixSegments) {
- fStripPrefixSegments= strip;
- return true;
- }
- return false;
- }
-
- int getStripPrefixSegments() {
- return fStripPrefixSegments;
- }
-
- /**
- * Returns <code>true</code> if new value differs from old.
- */
- boolean setFuzz(int fuzz) {
- if (fuzz != fFuzz) {
- fFuzz= fuzz;
- return true;
- }
- return false;
- }
-
- /**
- * Returns <code>true</code> if new value differs from old.
- */
- boolean setReversed(boolean reverse) {
- if (fReverse != reverse) {
- fReverse= reverse;
-
- for (int i= 0; i < fDiffs.length; i++)
- fDiffs[i].reverse();
-
- return true;
- }
- return false;
- }
-
- /**
- * Returns <code>true</code> if new value differs from old.
- */
- boolean setIgnoreWhitespace(boolean ignoreWhitespace) {
- if (ignoreWhitespace != fIgnoreWhitespace) {
- fIgnoreWhitespace= ignoreWhitespace;
- return true;
- }
- return false;
- }
-
- //---- parsing patch files
-
- /* package */ void parse(BufferedReader reader) throws IOException {
- List diffs= new ArrayList();
- String line= null;
- boolean reread= false;
- String diffArgs= null;
- String fileName= null;
-
- LineReader lr= new LineReader(reader);
- lr.ignoreSingleCR();
-
- // read leading garbage
- while (true) {
- if (!reread)
- line= lr.readLine();
- reread= false;
- if (line == null)
- break;
- if (line.length() < 4)
- continue; // too short
-
- // remember some infos
- if (line.startsWith("Index: ")) { //$NON-NLS-1$
- fileName= line.substring(7).trim();
- continue;
- }
- if (line.startsWith("diff")) { //$NON-NLS-1$
- diffArgs= line.substring(4).trim();
- continue;
- }
-
- if (line.startsWith("--- ")) { //$NON-NLS-1$
- line= readUnifiedDiff(diffs, lr, line, diffArgs, fileName);
- diffArgs= fileName= null;
- reread= true;
- } else if (line.startsWith("*** ")) { //$NON-NLS-1$
- line= readContextDiff(diffs, lr, line, diffArgs, fileName);
- diffArgs= fileName= null;
- reread= true;
- }
- }
-
- lr.close();
-
- fDiffs= (Diff[]) diffs.toArray((Diff[]) new Diff[diffs.size()]);
- }
-
- /**
- * Returns the next line that does not belong to this diff
- */
- private String readUnifiedDiff(List diffs, LineReader reader, String line, String args, String fileName) throws IOException {
-
- String[] oldArgs= split(line.substring(4));
-
- // read info about new file
- line= reader.readLine();
- if (line == null || !line.startsWith("+++ ")) //$NON-NLS-1$
- return line;
-
- String[] newArgs= split(line.substring(4));
-
- Diff diff= new Diff(extractPath(oldArgs, 0, fileName), extractDate(oldArgs, 1),
- extractPath(newArgs, 0, fileName), extractDate(newArgs, 1));
- diffs.add(diff);
-
- int[] oldRange= new int[2];
- int[] newRange= new int[2];
- List lines= new ArrayList();
-
- try {
- // read lines of hunk
- while (true) {
-
- line= reader.readLine();
- if (line == null)
- return null;
-
- if (reader.lineContentLength(line) == 0) {
- //System.out.println("Warning: found empty line in hunk; ignored");
- //lines.add(' ' + line);
- continue;
- }
-
- char c= line.charAt(0);
- switch (c) {
- case '@':
- if (line.startsWith("@@ ")) { //$NON-NLS-1$
- // flush old hunk
- if (lines.size() > 0) {
- new Hunk(diff, oldRange, newRange, lines);
- lines.clear();
- }
-
- // format: @@ -oldStart,oldLength +newStart,newLength @@
- extractPair(line, '-', oldRange);
- extractPair(line, '+', newRange);
- continue;
- }
- break;
- case ' ':
- case '+':
- case '-':
- lines.add(line);
- continue;
- case '\\':
- if (line.startsWith("No newline at end of file", 2)) { //$NON-NLS-1$
- int lastIndex= lines.size();
- if (lastIndex > 0) {
- line= (String) lines.get(lastIndex-1);
- int end= line.length()-1;
- char lc= line.charAt(end);
- if (lc == '\n') {
- end--;
- if (end > 0 && line.charAt(end-1) == '\r')
- end--;
- } else if (lc == '\r') {
- end--;
- }
- line= line.substring(0, end);
- lines.set(lastIndex-1, line);
- }
- continue;
- }
- break;
- default:
- if (DEBUG) {
- int a1= c, a2= 0;
- if (line.length() > 1)
- a2= line.charAt(1);
- System.out.println("char: " + a1 + " " + a2); //$NON-NLS-1$ //$NON-NLS-2$
- }
- break;
- }
- return line;
- }
- } finally {
- if (lines.size() > 0)
- new Hunk(diff, oldRange, newRange, lines);
- diff.finish();
- }
- }
-
- /**
- * Returns the next line that does not belong to this diff
- */
- private String readContextDiff(List diffs, LineReader reader, String line, String args, String fileName) throws IOException {
-
- String[] oldArgs= split(line.substring(4));
-
- // read info about new file
- line= reader.readLine();
- if (line == null || !line.startsWith("--- ")) //$NON-NLS-1$
- return line;
-
- String[] newArgs= split(line.substring(4));
-
- Diff diff= new Diff(extractPath(oldArgs, 0, fileName), extractDate(oldArgs, 1),
- extractPath(newArgs, 0, fileName), extractDate(newArgs, 1));
- diffs.add(diff);
-
- int[] oldRange= new int[2];
- int[] newRange= new int[2];
- List oldLines= new ArrayList();
- List newLines= new ArrayList();
- List lines= oldLines;
-
- try {
- // read lines of hunk
- while (true) {
-
- line= reader.readLine();
- if (line == null)
- return line;
-
- int l= line.length();
- if (l == 0)
- continue;
- if (l > 1) {
- switch (line.charAt(0)) {
- case '*':
- if (line.startsWith("***************")) { // new hunk //$NON-NLS-1$
- // flush old hunk
- if (oldLines.size() > 0 || newLines.size() > 0) {
- new Hunk(diff, oldRange, newRange, unifyLines(oldLines, newLines));
- oldLines.clear();
- newLines.clear();
- }
- continue;
- }
- if (line.startsWith("*** ")) { // old range //$NON-NLS-1$
- // format: *** oldStart,oldEnd ***
- extractPair(line, ' ', oldRange);
- oldRange[1]= oldRange[1]-oldRange[0]+1;
- lines= oldLines;
- continue;
- }
- break;
- case ' ': // context line
- case '+': // addition
- case '!': // change
- if (line.charAt(1) == ' ') {
- lines.add(line);
- continue;
- }
- break;
- case '-':
- if (line.charAt(1) == ' ') { // deletion
- lines.add(line);
- continue;
- }
- if (line.startsWith("--- ")) { // new range //$NON-NLS-1$
- // format: *** newStart,newEnd ***
- extractPair(line, ' ', newRange);
- newRange[1]= newRange[1]-newRange[0]+1;
- lines= newLines;
- continue;
- }
- break;
- default:
- break;
- }
- }
- return line;
- }
- } finally {
- // flush last hunk
- if (oldLines.size() > 0 || newLines.size() > 0)
- new Hunk(diff, oldRange, newRange, unifyLines(oldLines, newLines));
- diff.finish();
- }
- }
-
- /**
- * Creates a List of lines in the unified format from
- * two Lists of lines in the 'classic' format.
- */
- private List unifyLines(List oldLines, List newLines) {
- List result= new ArrayList();
-
- String[] ol= (String[]) oldLines.toArray(new String[oldLines.size()]);
- String[] nl= (String[]) newLines.toArray(new String[newLines.size()]);
-
- int oi= 0, ni= 0;
-
- while (true) {
-
- char oc= 0;
- String o= null;
- if (oi < ol.length) {
- o= ol[oi];
- oc= o.charAt(0);
- }
-
- char nc= 0;
- String n= null;
- if (ni < nl.length) {
- n= nl[ni];
- nc= n.charAt(0);
- }
-
- // EOF
- if (oc == 0 && nc == 0)
- break;
-
- // deletion in old
- if (oc == '-') {
- do {
- result.add('-' + o.substring(2));
- oi++;
- if (oi >= ol.length)
- break;
- o= ol[oi];
- } while (o.charAt(0) == '-');
- continue;
- }
-
- // addition in new
- if (nc == '+') {
- do {
- result.add('+' + n.substring(2));
- ni++;
- if (ni >= nl.length)
- break;
- n= nl[ni];
- } while (n.charAt(0) == '+');
- continue;
- }
-
- // differing lines on both sides
- if (oc == '!' && nc == '!') {
- // remove old
- do {
- result.add('-' + o.substring(2));
- oi++;
- if (oi >= ol.length)
- break;
- o= ol[oi];
- } while (o.charAt(0) == '!');
-
- // add new
- do {
- result.add('+' + n.substring(2));
- ni++;
- if (ni >= nl.length)
- break;
- n= nl[ni];
- } while (n.charAt(0) == '!');
-
- continue;
- }
-
- // context lines
- if (oc == ' ' && nc == ' ') {
- do {
- Assert.isTrue(o.equals(n), "non matching context lines"); //$NON-NLS-1$
- result.add(' ' + o.substring(2));
- oi++;
- ni++;
- if (oi >= ol.length || ni >= nl.length)
- break;
- o= ol[oi];
- n= nl[ni];
- } while (o.charAt(0) == ' ' && n.charAt(0) == ' ');
- continue;
- }
-
- if (oc == ' ') {
- do {
- result.add(' ' + o.substring(2));
- oi++;
- if (oi >= ol.length)
- break;
- o= ol[oi];
- } while (o.charAt(0) == ' ');
- continue;
- }
-
- if (nc == ' ') {
- do {
- result.add(' ' + n.substring(2));
- ni++;
- if (ni >= nl.length)
- break;
- n= nl[ni];
- } while (n.charAt(0) == ' ');
- continue;
- }
-
- Assert.isTrue(false, "unexpected char <" + oc + "> <" + nc + ">"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- return result;
- }
-
- /**
- * Breaks the given string into tab separated substrings.
- * Leading and trailing whitespace is removed from each token.
- */
- private String[] split(String line) {
- List l= new ArrayList();
- StringTokenizer st= new StringTokenizer(line, "\t"); //$NON-NLS-1$
- while (st.hasMoreElements()) {
- String token= st.nextToken().trim();
- if (token.length() > 0)
- l.add(token);
- }
- return (String[]) l.toArray(new String[l.size()]);
- }
-
- /**
- * @return the parsed time/date in milliseconds or -1 on error
- */
- private long extractDate(String[] args, int n) {
- if (n < args.length) {
- String line= args[n];
- for (int i= 0; i < DATE_FORMATS.length; i++) {
- DATE_FORMATS[i].setLenient(true);
- try {
- Date date= DATE_FORMATS[i].parse(line);
- return date.getTime();
- } catch (ParseException ex) {
- }
- }
- // System.err.println("can't parse date: <" + line + ">");
- }
- return -1;
- }
-
- /**
- * Returns null if file name is "/dev/null".
- */
- private IPath extractPath(String[] args, int n, String path2) {
- if (n < args.length) {
- String path= args[n];
- if (DEV_NULL.equals(path))
- return null;
- int pos= path.lastIndexOf(':');
- if (pos >= 0)
- path= path.substring(0, pos);
- if (path2 != null && !path2.equals(path)) {
- if (DEBUG) System.out.println("path mismatch: " + path2); //$NON-NLS-1$
- path= path2;
- }
- return new Path(path);
- }
- return null;
- }
-
- /**
- * Tries to extract two integers separated by a comma.
- * The parsing of the line starts at the position after
- * the first occurrence of the given character start an ends
- * at the first blank (or the end of the line).
- * If only a single number is found this is assumed to be the length of the range.
- * In this case the start of the range is set to 1.
- * If an error occurs the range -1,-1 is returned.
- */
- private void extractPair(String line, char start, int[] pair) {
- pair[0]= pair[1]= -1;
- int startPos= line.indexOf(start);
- if (startPos < 0) {
- if (DEBUG) System.out.println("parsing error in extractPair: couldn't find \'" + start + "\'"); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
- line= line.substring(startPos+1);
- int endPos= line.indexOf(' ');
- if (endPos < 0) {
- if (DEBUG) System.out.println("parsing error in extractPair: couldn't find end blank"); //$NON-NLS-1$
- return;
- }
- line= line.substring(0, endPos);
- int comma= line.indexOf(',');
- if (comma >= 0) {
- pair[0]= Integer.parseInt(line.substring(0, comma));
- pair[1]= Integer.parseInt(line.substring(comma+1));
- } else {
- pair[0]= 1;
- pair[1]= Integer.parseInt(line.substring(comma+1));
- }
- }
-
- //---- applying a patch file
-
- /**
- * Tries to patch the given lines with the specified Diff.
- * Any hunk that couldn't be applied is returned in the list failedHunks.
- */
- /* package */ void patch(Diff diff, List lines, List failedHunks) {
-
- int shift= 0;
- Iterator iter= diff.fHunks.iterator();
- while (iter.hasNext()) {
- Hunk hunk= (Hunk) iter.next();
- hunk.fMatches= false;
- shift= patch(hunk, lines, shift, failedHunks);
- }
- }
-
- /**
- * Tries to patch the contents of the given reader with the specified Diff.
- * Any hunk that couldn't be applied is returned in the list failedHunks.
- */
- /* package */ String patch(Diff diff, BufferedReader reader, List failedHunks) {
-
- List lines= new LineReader(reader).readLines();
- if (lines == null)
- lines= new ArrayList();
-
- patch(diff, lines, failedHunks);
-
- return createString(lines);
- }
-
- /**
- * Tries to apply the specified hunk to the given lines.
- * If the hunk cannot be applied at the original position
- * the methods tries Fuzz lines before and after.
- * If this fails the Hunk is added to the given list of failed hunks.
- */
- private int patch(Hunk hunk, List lines, int shift, List failedHunks) {
- if (tryPatch(hunk, lines, shift)) {
- shift+= doPatch(hunk, lines, shift);
- } else {
- boolean found= false;
- int oldShift= shift;
-
- for (int i= shift-1; i > shift-fFuzz; i--) {
- if (tryPatch(hunk, lines, i)) {
- shift= i;
- found= true;
- break;
- }
- }
-
- if (! found) {
- for (int i= shift+1; i < shift+fFuzz; i++) {
- if (tryPatch(hunk, lines, i)) {
- shift= i;
- found= true;
- break;
- }
- }
- }
-
- if (found) {
- if (DEBUG) System.out.println("patched hunk at offset: " + (shift-oldShift)); //$NON-NLS-1$
- shift+= doPatch(hunk, lines, shift);
- } else {
- if (failedHunks != null) {
- if (DEBUG) System.out.println("failed hunk"); //$NON-NLS-1$
- failedHunks.add(hunk);
- }
- }
- oldShift= oldShift; // prevent compiler warning about unused local variable
- }
- return shift;
- }
-
- /**
- * Tries to apply the given hunk on the specified lines.
- * The parameter shift is added to the line numbers given
- * in the hunk.
- */
- private boolean tryPatch(Hunk hunk, List lines, int shift) {
- int pos= hunk.fOldStart + shift;
- int contextMatches= 0;
- int deleteMatches= 0;
- for (int i= 0; i < hunk.fLines.length; i++) {
- String s= hunk.fLines[i];
- Assert.isTrue(s.length() > 0);
- String line= s.substring(1);
- char controlChar= s.charAt(0);
- if (controlChar == ' ') { // context lines
- while (true) {
- if (pos < 0 || pos >= lines.size())
- return false;
- if (linesMatch(line, (String) lines.get(pos))) {
- contextMatches++;
- pos++;
- break;
- }
- if (contextMatches <= 0)
- return false;
- pos++;
- }
- } else if (controlChar == '-') {
- // deleted lines
- while (true) {
- if (pos < 0 || pos >= lines.size())
- return false;
- if (linesMatch(line, (String) lines.get(pos))) {
- deleteMatches++;
- pos++;
- break;
- }
- if (deleteMatches <= 0)
- return false;
- pos++;
- }
- } else if (controlChar == '+') {
- // added lines
- // we don't have to do anything for a 'try'
- } else
- Assert.isTrue(false, "tryPatch: unknown control charcter: " + controlChar); //$NON-NLS-1$
- }
- return true;
- }
-
- private int doPatch(Hunk hunk, List lines, int shift) {
- int pos= hunk.fOldStart + shift;
- for (int i= 0; i < hunk.fLines.length; i++) {
- String s= hunk.fLines[i];
- Assert.isTrue(s.length() > 0);
- String line= s.substring(1);
- char controlChar= s.charAt(0);
- if (controlChar == ' ') { // context lines
- while (true) {
- Assert.isTrue(pos < lines.size(), "doPatch: inconsistency in context"); //$NON-NLS-1$
- if (linesMatch(line, (String) lines.get(pos))) {
- pos++;
- break;
- }
- pos++;
- }
- } else if (controlChar == '-') {
- // deleted lines
- while (true) {
- Assert.isTrue(pos < lines.size(), "doPatch: inconsistency in deleted lines"); //$NON-NLS-1$
- if (linesMatch(line, (String) lines.get(pos))) {
- break;
- }
- pos++;
- }
- lines.remove(pos);
- } else if (controlChar == '+') {
- // added lines
- lines.add(pos, line);
- pos++;
- } else
- Assert.isTrue(false, "doPatch: unknown control character: " + controlChar); //$NON-NLS-1$
- }
- hunk.fMatches= true;
- return hunk.fNewLength - hunk.fOldLength;
- }
-
- public void applyAll(IResource target, IProgressMonitor pm) throws CoreException {
-
- final int WORK_UNIT= 10;
-
- IFile file= null; // file to be patched
- IContainer container= null;
- if (target instanceof IContainer)
- container= (IContainer) target;
- else if (target instanceof IFile) {
- file= (IFile) target;
- container= file.getParent();
- } else {
- Assert.isTrue(false);
- }
-
- if (pm != null) {
- String message= PatchMessages.getString("Patcher.Task.message"); //$NON-NLS-1$
- pm.beginTask(message, fDiffs.length*WORK_UNIT);
- }
-
- for (int i= 0; i < fDiffs.length; i++) {
-
- int workTicks= WORK_UNIT;
-
- Diff diff= fDiffs[i];
- if (diff.isEnabled()) {
-
- IPath path= getPath(diff);
- if (pm != null)
- pm.subTask(path.toString());
-
- if (container != null)
- file= createPath(container, path);
- List failed= new ArrayList();
- List result= null;
-
- int type= diff.getType();
- switch (type) {
- case Differencer.ADDITION:
- // patch it and collect rejected hunks
- result= apply(diff, file, true, failed);
- store(createString(result), file, new SubProgressMonitor(pm, workTicks));
- workTicks-= WORK_UNIT;
- break;
- case Differencer.DELETION:
- file.delete(true, true, new SubProgressMonitor(pm, workTicks));
- workTicks-= WORK_UNIT;
- break;
- case Differencer.CHANGE:
- // patch it and collect rejected hunks
- result= apply(diff, file, false, failed);
- store(createString(result), file, new SubProgressMonitor(pm, workTicks));
- workTicks-= WORK_UNIT;
- break;
- }
-
- if (failed.size() > 0) {
- IPath pp= null;
- if (path.segmentCount() > 1) {
- pp= path.removeLastSegments(1);
- pp= pp.append(path.lastSegment() + REJECT_FILE_EXTENSION);
- } else
- pp= new Path(path.lastSegment() + REJECT_FILE_EXTENSION);
- file= createPath(container, pp);
- if (file != null) {
- store(getRejected(failed), file, pm);
- try {
- IMarker marker= file.createMarker(MARKER_TYPE);
- marker.setAttribute(marker.MESSAGE, PatchMessages.getString("Patcher.Marker.message")); //$NON-NLS-1$
- marker.setAttribute(marker.PRIORITY, IMarker.PRIORITY_HIGH);
- } catch (CoreException ex) {
- }
- }
- }
- }
-
- if (pm != null) {
- if (pm.isCanceled())
- break;
- if (workTicks > 0)
- pm.worked(workTicks);
- }
- }
- }
-
- /**
- * Reads the contents from the given file and returns them as
- * a List of lines.
- */
- private List load(IFile file, boolean create) {
- List lines= null;
- if (!create && file != null) {
- // read current contents
- InputStream is= null;
- try {
- is= file.getContents();
-
- Reader streamReader= null;
- try {
- streamReader= new InputStreamReader(is, ResourcesPlugin.getEncoding());
- } catch (UnsupportedEncodingException x) {
- // use default encoding
- streamReader= new InputStreamReader(is);
- }
-
- BufferedReader reader= new BufferedReader(streamReader);
- lines= new LineReader(reader).readLines();
- } catch(CoreException ex) {
- } finally {
- if (is != null)
- try {
- is.close();
- } catch(IOException ex) {
- }
- }
- }
-
- if (lines == null)
- lines= new ArrayList();
- return lines;
- }
-
- List apply(Diff diff, IFile file, boolean create, List failedHunks) {
-
- List lines= load(file, create);
- patch(diff, lines, failedHunks);
- return lines;
- }
-
- /**
- * Converts the string into bytes and stores them in the given file.
- */
- private void store(String contents, IFile file, IProgressMonitor pm) throws CoreException {
-
- byte[] bytes;
- try {
- bytes= contents.getBytes(ResourcesPlugin.getEncoding());
- } catch (UnsupportedEncodingException x) {
- // uses default encoding
- bytes= contents.getBytes();
- }
-
- InputStream is= new ByteArrayInputStream(bytes);
- try {
- if (file.exists()) {
- file.setContents(is, false, true, pm);
- } else {
- file.create(is, false, pm);
- }
- } finally {
- if (is != null)
- try {
- is.close();
- } catch(IOException ex) {
- }
- }
- }
-
- /**
- * Concatenates all strings found in the given List.
- */
- private String createString(List lines) {
- StringBuffer sb= new StringBuffer();
- Iterator iter= lines.iterator();
- if (fPreserveLineDelimiters) {
- while (iter.hasNext())
- sb.append((String)iter.next());
- } else {
- String lineSeparator= System.getProperty("line.separator"); //$NON-NLS-1$
- while (iter.hasNext()) {
- String line= (String)iter.next();
- int l= length(line);
- if (l < line.length()) { // line has delimiter
- sb.append(line.substring(0, l));
- sb.append(lineSeparator);
- } else {
- sb.append(line);
- }
- }
- }
- return sb.toString();
- }
-
- String getRejected(List failedHunks) {
- if (failedHunks.size() <= 0)
- return null;
-
- String lineSeparator= System.getProperty("line.separator"); //$NON-NLS-1$
- StringBuffer sb= new StringBuffer();
- Iterator iter= failedHunks.iterator();
- while (iter.hasNext()) {
- Hunk hunk= (Hunk) iter.next();
- sb.append(hunk.getRejectedDescription());
- sb.append(lineSeparator);
- sb.append(hunk.getContent());
- }
- return sb.toString();
- }
-
- /**
- * Ensures that a file with the given path exists in
- * the given container. Folder are created as necessary.
- */
- private IFile createPath(IContainer container, IPath path) throws CoreException {
- if (path.segmentCount() > 1) {
- IFolder f= container.getFolder(path.uptoSegment(1));
- if (!f.exists())
- f.create(false, true, null);
- return createPath(f, path.removeFirstSegments(1));
- }
- // a leaf
- return container.getFile(path);
- }
-
- /**
- * Returns the given string with all whitespace characters removed.
- * Whitespace is defined by <code>Character.isWhitespace(...)</code>.
- */
- private static String stripWhiteSpace(String s) {
- StringBuffer sb= new StringBuffer();
- int l= s.length();
- for (int i= 0; i < l; i++) {
- char c= s.charAt(i);
- if (!Character.isWhitespace(c))
- sb.append(c);
- }
- return sb.toString();
- }
-
- /**
- * Compares two strings.
- * If fIgnoreWhitespace is true whitespace is ignored.
- */
- private boolean linesMatch(String line1, String line2) {
- if (fIgnoreWhitespace)
- return stripWhiteSpace(line1).equals(stripWhiteSpace(line2));
- if (fIgnoreLineDelimiter) {
- int l1= length(line1);
- int l2= length(line2);
- if (l1 != l2)
- return false;
- return line1.regionMatches(0, line2, 0, l1);
- }
- return line1.equals(line2);
- }
-
- /**
- * Returns the length (exluding a line delimiter CR, LF, CR/LF)
- * of the given string.
- */
- /* package */ static int length(String s) {
- int l= s.length();
- if (l > 0) {
- char c= s.charAt(l-1);
- if (c == '\r')
- return l-1;
- if (c == '\n') {
- if (l > 1 && s.charAt(l-2) == '\r')
- return l-2;
- return l-1;
- }
- }
- return l;
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage.java
deleted file mode 100644
index 90c1737cf..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage.java
+++ /dev/null
@@ -1,596 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.internal.patch;
-
-import java.io.*;
-import java.util.*;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.internal.*;
-import org.eclipse.compare.structuremergeviewer.*;
-
-
-/**
- * Shows the parsed patch file and any mismatches
- * between files, hunks and the currently selected
- * resources.
- */
-/* package */ class PreviewPatchPage extends WizardPage {
-
- /**
- * Used with CompareInput
- */
- static class HunkInput implements ITypedElement, IStreamContentAccessor {
- String fContent;
- String fType;
-
- HunkInput(String type, String s) {
- fType= type;
- fContent= s;
- }
- public Image getImage() {
- return null;
- }
- public String getName() {
- return PatchMessages.getString("PreviewPatchPage.NoName.text"); //$NON-NLS-1$
- }
- public String getType() {
- return fType;
- }
- public InputStream getContents() {
- return new ByteArrayInputStream(fContent.getBytes());
- }
- };
-
- private PatchWizard fPatchWizard;
-
- private Tree fTree;
- private Combo fStripPrefixSegments;
- private CompareViewerSwitchingPane fHunkViewer;
- private Button fIgnoreWhitespaceButton;
- private Button fReversePatchButton;
- private Text fFuzzField;
-
- private Image fNullImage;
- private Image fAddImage;
- private Image fDelImage;
- private Image fErrorImage;
- private Image fErrorAddImage;
- private Image fErrorDelImage;
-
- private CompareConfiguration fCompareConfiguration;
-
-
- /* package */ PreviewPatchPage(PatchWizard pw) {
- super("PreviewPatchPage", //$NON-NLS-1$
- PatchMessages.getString("PreviewPatchPage.title"), null); //$NON-NLS-1$
-
- setMessage(PatchMessages.getString("PreviewPatchPage.message")); //$NON-NLS-1$
-
- fPatchWizard= pw;
- //setPageComplete(false);
-
- int w= 16;
-
- ImageDescriptor addId= CompareUIPlugin.getImageDescriptor("ovr16/add_ov.gif"); //$NON-NLS-1$
- ImageDescriptor delId= CompareUIPlugin.getImageDescriptor("ovr16/del_ov.gif"); //$NON-NLS-1$
-
- ImageDescriptor errId= CompareUIPlugin.getImageDescriptor("ovr16/error_ov.gif"); //$NON-NLS-1$
- Image errIm= errId.createImage();
-
- fNullImage= new DiffImage(null, null, w).createImage();
- fAddImage= new DiffImage(null, addId, w).createImage();
- fDelImage= new DiffImage(null, delId, w).createImage();
-
- fErrorImage= new DiffImage(errIm, null, w).createImage();
- fErrorAddImage= new DiffImage(errIm, addId, w).createImage();
- fErrorDelImage= new DiffImage(errIm, delId, w).createImage();
-
- fCompareConfiguration= new CompareConfiguration();
-
- fCompareConfiguration.setLeftEditable(false);
- fCompareConfiguration.setLeftLabel(PatchMessages.getString("PreviewPatchPage.Left.title")); //$NON-NLS-1$
-
- fCompareConfiguration.setRightEditable(false);
- fCompareConfiguration.setRightLabel(PatchMessages.getString("PreviewPatchPage.Right.title")); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * Method declared in WizardPage
- */
- public void setVisible(boolean visible) {
- if (visible)
- buildTree();
- super.setVisible(visible);
- }
-
- Image getImage(Diff diff) {
- if (diff.fMatches) {
- switch (diff.getType()) {
- case Differencer.ADDITION:
- return fAddImage;
- case Differencer.DELETION:
- return fDelImage;
- }
- return fNullImage;
- }
- switch (diff.getType()) {
- case Differencer.ADDITION:
- return fErrorAddImage;
- case Differencer.DELETION:
- return fErrorDelImage;
- }
- return fErrorImage;
- }
-
- Image getImage(Hunk hunk) {
- if (hunk.fMatches)
- return fNullImage;
- return fErrorImage;
- }
-
- public void createControl(Composite parent) {
-
- Composite composite= new Composite(parent, SWT.NULL);
- composite.setLayout(new GridLayout());
- composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));
-
- setControl(composite);
-
- buildPatchOptionsGroup(composite);
-
- Splitter splitter= new Splitter(composite, SWT.VERTICAL);
- splitter.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL
- | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_VERTICAL));
-
-
- // top pane showing diffs and hunks in a check box tree
- fTree= new Tree(splitter, SWT.CHECK | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- GridData gd= new GridData();
- gd.verticalAlignment= GridData.FILL;
- gd.horizontalAlignment= GridData.FILL;
- gd.grabExcessHorizontalSpace= true;
- gd.grabExcessVerticalSpace= true;
- fTree.setLayoutData(gd);
-
- // bottom pane showing hunks in compare viewer
- fHunkViewer= new CompareViewerSwitchingPane(splitter, SWT.BORDER | SWT.FLAT) {
- protected Viewer getViewer(Viewer oldViewer, Object input) {
- return CompareUI.findContentViewer(oldViewer, (ICompareInput)input, this, fCompareConfiguration);
- }
- };
- gd= new GridData();
- gd.verticalAlignment= GridData.FILL;
- gd.horizontalAlignment= GridData.FILL;
- gd.grabExcessHorizontalSpace= true;
- gd.grabExcessVerticalSpace= true;
- fHunkViewer.setLayoutData(gd);
-
- // register listeners
-
- fTree.addSelectionListener(
- new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- TreeItem ti= (TreeItem) e.item;
- Object data= e.item.getData();
- if (e.detail == SWT.CHECK) {
- boolean checked= ti.getChecked();
- if (data instanceof Hunk) {
- Hunk hunk= (Hunk) data;
- checked= checked && hunk.fMatches;
- //hunk.setEnabled(checked);
- ti.setChecked(checked);
- updateGrayedState(ti);
- } else if (data instanceof Diff) {
- updateCheckedState(ti);
- }
- } else {
- if (data instanceof Hunk)
- PreviewPatchPage.this.fHunkViewer.setInput(createInput((Hunk)data));
- else
- PreviewPatchPage.this.fHunkViewer.setInput(null);
- }
- }
- }
- );
-
- // creating tree's content
- buildTree();
-
- // WorkbenchHelp.setHelp(composite, new DialogPageContextComputer(this, PATCH_HELP_CONTEXT_ID));
- }
-
- /**
- * Create the group for setting various patch options
- */
- private void buildPatchOptionsGroup(Composite parent) {
-
- final Patcher patcher= fPatchWizard.getPatcher();
-
- Group group= new Group(parent, SWT.NONE);
- group.setText(PatchMessages.getString("PreviewPatchPage.PatchOptions.title")); //$NON-NLS-1$
- GridLayout layout= new GridLayout();
- layout.numColumns= 5;
- group.setLayout(layout);
- group.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
- //fPatchFileGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- // 1st row
- new Label(group, SWT.NONE).setText(PatchMessages.getString("PreviewPatchPage.IgnoreSegments.text")); //$NON-NLS-1$
-
- fStripPrefixSegments= new Combo(group, SWT.DROP_DOWN | SWT.READ_ONLY | SWT.SIMPLE);
- int prefixCnt= patcher.getStripPrefixSegments();
- String prefix= Integer.toString(prefixCnt);
- fStripPrefixSegments.add(prefix);
- fStripPrefixSegments.setText(prefix);
-
- addSpacer(group);
-
- fReversePatchButton= new Button(group, SWT.CHECK);
- fReversePatchButton.setText(PatchMessages.getString("PreviewPatchPage.ReversePatch.text")); //$NON-NLS-1$
-
- addSpacer(group);
-
- // 2nd row
- Label l= new Label(group, SWT.NONE);
- l.setText(PatchMessages.getString("PreviewPatchPage.FuzzFactor.text")); //$NON-NLS-1$
- l.setToolTipText(PatchMessages.getString("PreviewPatchPage.FuzzFactor.tooltip")); //$NON-NLS-1$
- fFuzzField= new Text(group, SWT.BORDER);
- fFuzzField.setText("2"); //$NON-NLS-1$
- GridData gd2= new GridData(GridData.HORIZONTAL_ALIGN_CENTER);
- gd2.widthHint= 30;
- fFuzzField.setLayoutData(gd2);
-
- addSpacer(group);
-
- fIgnoreWhitespaceButton= new Button(group, SWT.CHECK);
- fIgnoreWhitespaceButton.setText(PatchMessages.getString("PreviewPatchPage.IgnoreWhitespace.text")); //$NON-NLS-1$
-
- addSpacer(group);
-
- // register listeners
-
- if (fStripPrefixSegments != null)
- fStripPrefixSegments.addSelectionListener(
- new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- if (patcher.setStripPrefixSegments(getStripPrefixSegments()))
- updateTree();
- }
- }
- );
- fReversePatchButton.addSelectionListener(
- new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- if (patcher.setReversed(fReversePatchButton.getSelection()))
- updateTree();
- }
- }
- );
- fIgnoreWhitespaceButton.addSelectionListener(
- new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- if (patcher.setIgnoreWhitespace(fIgnoreWhitespaceButton.getSelection()))
- updateTree();
- }
- }
- );
-
- fFuzzField.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- if (patcher.setFuzz(getFuzzFactor()))
- updateTree();
- }
- }
- );
- }
-
- ICompareInput createInput(Hunk hunk) {
-
- String[] lines= hunk.fLines;
- StringBuffer left= new StringBuffer();
- StringBuffer right= new StringBuffer();
-
- for (int i= 0; i < lines.length; i++) {
- String line= lines[i];
- String rest= line.substring(1);
- switch (line.charAt(0)) {
- case ' ':
- left.append(rest);
- right.append(rest);
- break;
- case '-':
- left.append(rest);
- break;
- case '+':
- right.append(rest);
- break;
- }
- }
-
- Diff diff= hunk.fParent;
- IPath path= diff.getPath();
- String type= path.getFileExtension();
-
- return new DiffNode(new HunkInput(type, left.toString()), new HunkInput(type, right.toString()));
- }
-
- /**
- * Builds a tree from list of Diffs.
- * As a side effect it calculates the maximum number of segments
- * in all paths.
- */
- private void buildTree() {
- setPageComplete(true);
- if (fTree != null && !fTree.isDisposed()) {
- fTree.removeAll();
- fHunkViewer.setInput(null);
-
- int length= 99;
-
- Diff[] diffs= fPatchWizard.getPatcher().getDiffs();
- if (diffs != null) {
- for (int i= 0; i < diffs.length; i++) {
- Diff diff= diffs[i];
- TreeItem d= new TreeItem(fTree, SWT.NULL);
- d.setData(diff);
- d.setImage(getImage(diff));
-
- if (diff.fOldPath != null)
- length= Math.min(length, diff.fOldPath.segmentCount());
- if (diff.fNewPath != null)
- length= Math.min(length, diff.fNewPath.segmentCount());
-
- java.util.List hunks= diff.fHunks;
- java.util.Iterator iter= hunks.iterator();
- while (iter.hasNext()) {
- Hunk hunk= (Hunk) iter.next();
- TreeItem h= new TreeItem(d, SWT.NULL);
- h.setData(hunk);
- h.setText(hunk.getDescription());
- }
- }
- }
- if (fStripPrefixSegments != null && length != 99)
- for (int i= 1; i < length; i++)
- fStripPrefixSegments.add(Integer.toString(i));
- }
-
- updateTree();
- }
-
- private IFile existsInSelection(IPath path) {
- IResource target= fPatchWizard.getTarget();
- if (target instanceof IFile) {
- IFile file= (IFile) target;
- if (matches(file.getFullPath(), path))
- return file;
- } else if (target instanceof IContainer) {
- IContainer c= (IContainer) target;
- if (c.exists(path))
- return c.getFile(path);
- }
- return null;
- }
-
- /**
- * Returns true if path completely matches the end of fullpath
- */
- private boolean matches(IPath fullpath, IPath path) {
-
- for (IPath p= fullpath; path.segmentCount() <= p.segmentCount();
- p= p.removeFirstSegments(1)) {
- if (p.equals(path))
- return true;
- }
- return false;
- }
-
- /**
- * Updates label and checked state of tree items.
- */
- private void updateTree() {
- if (fTree == null || fTree.isDisposed())
- return;
- int strip= getStripPrefixSegments();
- TreeItem[] children= fTree.getItems();
- for (int i= 0; i < children.length; i++) {
- TreeItem item= children[i];
- Diff diff= (Diff) item.getData();
- diff.fMatches= false;
- String error= null;
-
- boolean create= false;
- IFile file= null;
- if (diff.getType() == Differencer.ADDITION) {
- IPath p= diff.fNewPath;
- if (strip > 0 && strip < p.segmentCount())
- p= p.removeFirstSegments(strip);
- file= existsInSelection(p);
- if (file == null) {
- diff.fMatches= true;
- } else {
- // file already exists
- error= PatchMessages.getString("PreviewPatchPage.FileExists.error"); //$NON-NLS-1$
- }
- create= true;
- } else {
- IPath p= diff.fOldPath;
- if (strip > 0 && strip < p.segmentCount())
- p= p.removeFirstSegments(strip);
- file= existsInSelection(p);
- diff.fMatches= false;
- if (file != null) {
- if (file.isReadOnly()) {
- // file is readonly
- error= PatchMessages.getString("PreviewPatchPage.FileIsReadOnly.error"); //$NON-NLS-1$
- file= null;
- } else {
- diff.fMatches= true;
- }
- } else {
- // file doesn't exist
- error= PatchMessages.getString("PreviewPatchPage.FileDoesNotExist.error"); //$NON-NLS-1$
- }
- }
-
- ArrayList failedHunks= new ArrayList();
- fPatchWizard.getPatcher().apply(diff, file, create, failedHunks);
-
- if (failedHunks.size() > 0)
- diff.fRejected= fPatchWizard.getPatcher().getRejected(failedHunks);
-
- int checkedSubs= 0; // counts checked hunk items
- TreeItem[] hunkItems= item.getItems();
- for (int h= 0; h < hunkItems.length; h++) {
- Hunk hunk= (Hunk) hunkItems[h].getData();
- boolean failed= failedHunks.contains(hunk);
- String hunkError= null;
- if (failed)
- hunkError= PatchMessages.getString("PreviewPatchPage.NoMatch.error"); //$NON-NLS-1$
-
- boolean check= !failed;
- hunkItems[h].setChecked(check);
- if (check)
- checkedSubs++;
-
- String hunkLabel= hunk.getDescription();
- if (hunkError != null)
- hunkLabel+= " " + hunkError; //$NON-NLS-1$
- hunkItems[h].setText(hunkLabel);
- hunkItems[h].setImage(getImage(hunk));
- }
-
- String label= diff.getDescription(strip);
- if (error != null)
- label+= " " + error; //$NON-NLS-1$
- item.setText(label);
- item.setImage(getImage(diff));
- item.setChecked(checkedSubs > 0);
- boolean gray= (checkedSubs > 0 && checkedSubs < hunkItems.length);
- item.setGrayed(gray);
- item.setExpanded(gray);
- }
- setPageComplete(updateModel());
- }
-
- /**
- * Updates the gray state of the given diff and the checked state of its children.
- */
- private void updateCheckedState(TreeItem diffItem) {
- boolean checked= diffItem.getChecked();
- // check whether we can enable all hunks
- TreeItem[] hunks= diffItem.getItems();
- int checkedCount= 0;
- for (int i= 0; i < hunks.length; i++) {
- Hunk hunk= (Hunk) hunks[i].getData();
- if (checked) {
- if (hunk.fMatches) {
- hunks[i].setChecked(true);
- checkedCount++;
- }
- } else {
- hunks[i].setChecked(false);
- }
- }
- diffItem.setGrayed(checkedCount > 0 && checkedCount < hunks.length);
- diffItem.setChecked(checkedCount > 0);
-
- setPageComplete(updateModel());
- }
-
- /**
- * Updates the gray state of the given items parent.
- */
- private void updateGrayedState(TreeItem hunk) {
- TreeItem diff= hunk.getParentItem();
- TreeItem[] hunks= diff.getItems();
- int checked= 0;
- for (int i= 0; i < hunks.length; i++)
- if (hunks[i].getChecked())
- checked++;
- diff.setChecked(checked > 0);
- diff.setGrayed(checked > 0 && checked < hunks.length);
-
- setPageComplete(updateModel());
- }
-
- private void addSpacer(Composite parent) {
- Label label= new Label(parent, SWT.NONE);
- GridData gd= new GridData(GridData.FILL_HORIZONTAL);
- gd.widthHint= 20;
- label.setLayoutData(gd);
- }
-
- private int getStripPrefixSegments() {
- int stripPrefixSegments= 0;
- if (fStripPrefixSegments != null) {
- String s= fStripPrefixSegments.getText();
- try {
- stripPrefixSegments= Integer.parseInt(s);
- } catch(NumberFormatException ex) {
- }
- }
- return stripPrefixSegments;
- }
-
- private int getFuzzFactor() {
- int fuzzFactor= 0;
- if (fFuzzField != null) {
- String s= fFuzzField.getText();
- try {
- fuzzFactor= Integer.parseInt(s);
- } catch(NumberFormatException ex) {
- }
- }
- return fuzzFactor;
- }
-
- public boolean updateModel() {
- boolean atLeastOneIsEnabled= false;
- if (fTree != null && !fTree.isDisposed()) {
- TreeItem [] diffItems= fTree.getItems();
- for (int i= 0; i < diffItems.length; i++) {
- TreeItem diffItem= diffItems[i];
- Object data= diffItem.getData();
- if (data instanceof Diff) {
- Diff diff= (Diff) data;
- boolean b= diffItem.getChecked();
- diff.setEnabled(b);
- if (b) {
- TreeItem [] hunkItems= diffItem.getItems();
- for (int j= 0; j < hunkItems.length; j++) {
- TreeItem hunkItem= hunkItems[j];
- data= hunkItem.getData();
- if (data instanceof Hunk) {
- Hunk hunk= (Hunk) data;
- b= hunkItem.getChecked();
- hunk.setEnabled(b);
- if (b) {
- atLeastOneIsEnabled= true;
- }
- }
- }
- }
- }
- }
- }
- return atLeastOneIsEnabled;
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/previewAncestor.txt b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/previewAncestor.txt
deleted file mode 100644
index 8f848397c..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/previewAncestor.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-a
-b
-c
-d
-e
-f
-g
-h
-i
-j \ No newline at end of file
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/previewLeft.txt b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/previewLeft.txt
deleted file mode 100644
index e24e0aaf1..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/previewLeft.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-a
-x
-c
-z
-e
-f
-g
-h
-i
-j \ No newline at end of file
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/previewRight.txt b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/previewRight.txt
deleted file mode 100644
index b45f220e6..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/previewRight.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-a
-y
-c
-z
-e
-f
-g
-h
-i
-j \ No newline at end of file
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/package.html b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/package.html
deleted file mode 100644
index fb0ad6215..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/package.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides support for performing structural and textual
-compare operations on arbitrary data and displaying the results.
-<h2>
-Package Specification</h2>
-The class <tt>CompareUI</tt> defines the entry point to initiate a configurable
-compare operation on arbitrary resources. The result of the compare is
-opened into a compare editor where the details can be browsed and edited
-in dynamically selected structure and content viewers.
-<p>A compare operation must be implemented as a subclass of <tt>CompareEditorInput</tt>.
-A <tt>CompareEditorInput</tt> runs a (potentially lengthy) compare operation
-under progress monitor control, creates a UI for drilling-down into the
-compare results, tracks the dirty state of the result in case of merge,
-and saves any changes that occured during a merge.
-<p>An instance of <tt>CompareConfiguration</tt> configures various UI aspects
-of compare/merge viewers like title labels and images, or whether a side
-of a merge viewer is editable. It is passed to the <tt>CompareEditorInput</tt>
-on creation.
-<p>When implementing a compare operation clients have to provide a tree
-of <tt>IStructureComparator</tt> (see package org.eclipse.compare.structuremergeviewer)
-and <tt>IStreamContentAccessor</tt> that can be passed as the input to
-the differencing engine (org.eclipse.compare.structuremergeviewer.Differencer).
-A <tt>ResourceNode</tt> is a convenience class that implements both interfaces
-for Eclipse workbench resources (org.eclipse.core.resources.IResource).
-It can be used without modification as the input to the differencing engine.
-<p>The <tt>EditionSelectionDialog</tt> is a simple selection dialog where
-one input element can be compared against a list of historic variants (<i>editions</i>)
-of the same input element. The dialog can be used to implement functions
-like <i>"Replace with Version"</i> or
-<br><i>"Replace with Edition"</i> on workbench resources.
-<p>In addition it is possible to specify a subsection of the input element
-(e.g. a method in a Java source file) by means of a <i>path</i>. In this
-case the dialog compares only the subsection (as specified by the path)
-with the corresponding subsection in the list of editions. This functionality
-can be used to implement <i>"Replace with Method Edition"</i> for the Java
-language.
-<p>The <tt>EditionSelectionDialog</tt> requires that the editions implement
-the <tt>IStreamContentAccessor</tt> and <tt>IModificationDate</tt> interfaces.
-The <tt>HistoryItem</tt> is a convenience class that implements these interfaces
-for <tt>IFileState</tt> objects.
-</body>
-</html>
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/DifferencesIterator.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/DifferencesIterator.java
deleted file mode 100644
index 4fa96b73e..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/DifferencesIterator.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.rangedifferencer;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * A custom iterator to iterate over a List of <code>RangeDifferences</code>.
- * It is used internally by the <code>RangeDifferencer</code>.
- */
-/* package */ class DifferencesIterator {
-
- List fRange;
- int fIndex;
- RangeDifference[] fArray;
- RangeDifference fDifference;
-
- /**
- * Creates a differences iterator on an array of <code>RangeDifference</code>s.
- */
- DifferencesIterator(RangeDifference[] differenceRanges) {
-
- fArray= differenceRanges;
- fIndex= 0;
- fRange= new ArrayList();
- if (fIndex < fArray.length)
- fDifference= fArray[fIndex++];
- else
- fDifference= null;
- }
-
- /**
- * Returns the number of RangeDifferences
- */
- int getCount() {
- return fRange.size();
- }
-
- /**
- * Appends the edit to its list and moves to the next <code>RangeDifference</code>.
- */
- void next() {
- fRange.add(fDifference);
- if (fDifference != null) {
- if (fIndex < fArray.length)
- fDifference= fArray[fIndex++];
- else
- fDifference= null;
- }
- }
-
- /**
- * Difference iterators are used in pairs.
- * This method returns the other iterator.
- */
- DifferencesIterator other(DifferencesIterator right, DifferencesIterator left) {
- if (this == right)
- return left;
- return right;
- }
-
- /**
- * Removes all <code>RangeDifference</code>s
- */
- void removeAll() {
- fRange.clear();
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/IRangeComparator.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/IRangeComparator.java
deleted file mode 100644
index ce01dc1e9..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/IRangeComparator.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.rangedifferencer;
-
-/**
- * For breaking an object to compare into a sequence of comparable entities.
- * <p>
- * It is used by <code>RangeDifferencer</code> to find longest sequences of
- * matching and non-matching ranges.
- * <p>
- * For example, to compare two text documents and find longest common sequences
- * of matching and non-matching lines, the implementation must break the document
- * into lines. <code>getRangeCount</code> would return the number of lines in the
- * document, and <code>rangesEqual</code> would compare a specified line given
- * with one in another <code>IRangeComparator</code>.
- * </p>
- * <p>
- * Clients should implement this interface; there is no standard implementation.
- * </p>
- */
-public interface IRangeComparator {
-
- /**
- * Returns the number of comparable entities.
- *
- * @return the number of comparable entities
- */
- int getRangeCount();
-
- /**
- * Returns whether the comparable entity given by the first index
- * matches an entity specified by the other <code>IRangeComparator</code> and index.
- *
- * @param thisIndex the index of the comparable entity within this <code>IRangeComparator</code>
- * @param other the IRangeComparator to compare this with
- * @param otherIndex the index of the comparable entity within the other <code>IRangeComparator</code>
- * @return <code>true</code> if the comparable entities are equal
- */
- boolean rangesEqual(int thisIndex, IRangeComparator other, int otherIndex);
-
- /**
- * Returns whether a comparison should be skipped because it would be too costly (or lengthy).
- *
- * @param length a number on which to base the decision whether to return
- * <code>true</code> or <code>false</code>
- * @param maxLength another number on which to base the decision whether to return
- * <code>true</code> or <code>false</code>
- * @param other the other <code>IRangeComparator</code> to compare with
- * @return <code>true</code> to avoid a too lengthy range comparison
- */
- boolean skipRangeComparison(int length, int maxLength, IRangeComparator other);
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/LinkedRangeDifference.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/LinkedRangeDifference.java
deleted file mode 100644
index 9374957ba..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/LinkedRangeDifference.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.rangedifferencer;
-
-/* package */ class LinkedRangeDifference extends RangeDifference {
-
- static final int INSERT= 0;
- static final int DELETE= 1;
- static final int CHANGE= 2;
- static final int ERROR= 3;
-
- LinkedRangeDifference fNext;
-
- /**
- * Creates a LinkedRangeDifference an initializes it to the error state
- */
- LinkedRangeDifference() {
- super(ERROR);
- fNext= null;
- }
-
- /**
- * Constructs and links a LinkeRangeDifference to another LinkedRangeDifference
- */
- LinkedRangeDifference(LinkedRangeDifference next, int operation) {
- super(operation);
- fNext= next;
- }
-
- /**
- * Follows the next link
- */
- LinkedRangeDifference getNext() {
- return fNext;
- }
-
- boolean isDelete() {
- return kind() == DELETE;
- }
-
- boolean isInsert() {
- return kind() == INSERT;
- }
-
- /**
- * Sets the next link of this LinkedRangeDifference
- */
- void setNext(LinkedRangeDifference next) {
- fNext= next;
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/RangeDifference.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/RangeDifference.java
deleted file mode 100644
index 2c4d62bbc..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/RangeDifference.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.rangedifferencer;
-
-import org.eclipse.jface.*;
-import org.eclipse.jface.util.Assert;
-
-/**
- * Description of a change between two or three ranges of comparable entities.
- * <p>
- * <code>RangeDifference</code> objects are the elements of a compare result returned from
- * the <code>RangeDifferencer</code> <code>find* </code> methods.
- * Clients use these objects as they are returned from the differencer.
- * This class is not intended to be instantiated or subclassed.
- * <p>
- * Note: A range in the <code>RangeDifference</code> object is given as a start index
- * and length in terms of comparable entities. However, these entity indices and counts
- * are not necessarily character positions. For example, if an entity represents a line
- * in a document, the start index would be a line number and the count would be in lines.
- * </p>
- *
- * @see RangeDifferencer
- */
-public class RangeDifference {
-
- /** Two-way change constant indicating no change. */
- public final static int NOCHANGE= 0;
- /** Two-way change constant indicating two-way change (same as <code>RIGHT</code>) */
- public final static int CHANGE= 2;
-
- /** Three-way change constant indicating a change in both right and left. */
- public final static int CONFLICT= 1;
- /** Three-way change constant indicating a change in right. */
- public final static int RIGHT= 2;
- /** Three-way change constant indicating a change in left. */
- public final static int LEFT= 3;
- /**
- * Three-way change constant indicating the same change in both right and left,
- * that is only the ancestor is different.
- */
- public final static int ANCESTOR= 4;
-
- /** Constant indicating an unknown change kind. */
- public final static int ERROR= 5;
-
- /** the kind of change: NOCHANGE, CHANGE, LEFT, RIGHT, ANCESTOR, CONFLICT, ERROR */
- int fKind;
-
- int fLeftStart;
- int fLeftLength;
- int fRightStart;
- int fRightLength;
- int lAncestorStart;
- int lAncestorLength;
-
- /**
- * Creates a new range difference with the given change kind.
- *
- * @param changeKind the kind of change
- */
- /* package */ RangeDifference(int changeKind) {
- fKind= changeKind;
- }
-
- /**
- * Creates a new <code>RangeDifference</code> with the given change kind
- * and left and right ranges.
- *
- * @param changeKind the kind of change
- * @param rightStart start index of entity on right side
- * @param rightLength number of entities on right side
- * @param leftStart start index of entity on left side
- * @param leftLength number of entities on left side
- */
- /* package */ RangeDifference(int kind, int rightStart, int rightLength, int leftStart, int leftLength) {
- fKind= kind;
- fRightStart= rightStart;
- fRightLength= rightLength;
- fLeftStart= leftStart;
- fLeftLength= leftLength;
- }
-
- /**
- * Creates a new <code>RangeDifference</code> with the given change kind
- * and left, right, and ancestor ranges.
- *
- * @param changeKind the kind of change
- * @param rightStart start index of entity on right side
- * @param rightLength number of entities on right side
- * @param leftStart start index of entity on left side
- * @param leftLength number of entities on left side
- * @param ancestorStart start index of entity on ancestor side
- * @param ancestorLength number of entities on ancestor side
- */
- /* package */ RangeDifference(int kind, int rightStart, int rightLength, int leftStart, int leftLength,
- int ancestorStart, int ancestorLength) {
- this(kind, rightStart, rightLength, leftStart, leftLength);
- lAncestorStart= ancestorStart;
- lAncestorLength= ancestorLength;
- }
-
- /**
- * Returns the kind of difference.
- *
- * @return the kind of difference, one of
- * <code>NOCHANGE</code>, <code>CHANGE</code>, <code>LEFT</code>, <code>RIGHT</code>,
- * <code>ANCESTOR</code>, <code>CONFLICT</code>, <code>ERROR</code>
- */
- public int kind() {
- return fKind;
- }
-
- /**
- * Returns the start index of the entity range on the ancestor side.
- *
- * @return the start index of the entity range on the ancestor side
- */
- public int ancestorStart() {
- return lAncestorStart;
- }
-
- /**
- * Returns the number of entities on the ancestor side.
- *
- * @return the number of entities on the ancestor side
- */
- public int ancestorLength() {
- return lAncestorLength;
- }
-
- /**
- * Returns the end index of the entity range on the ancestor side.
- *
- * @return the end index of the entity range on the ancestor side
- */
- public int ancestorEnd() {
- return lAncestorStart + lAncestorLength;
- }
-
- /**
- * Returns the start index of the entity range on the right side.
- *
- * @return the start index of the entity range on the right side
- */
- public int rightStart() {
- return fRightStart;
- }
-
- /**
- * Returns the number of entities on the right side.
- *
- * @return the number of entities on the right side
- */
- public int rightLength() {
- return fRightLength;
- }
-
- /**
- * Returns the end index of the entity range on the right side.
- *
- * @return the end index of the entity range on the right side
- */
- public int rightEnd() {
- return fRightStart + fRightLength;
- }
-
- /**
- * Returns the start index of the entity range on the left side.
- *
- * @return the start index of the entity range on the left side
- */
- public int leftStart() {
- return fLeftStart;
- }
-
- /**
- * Returns the number of entities on the left side.
- *
- * @return the number of entities on the left side
- */
- public int leftLength() {
- return fLeftLength;
- }
-
- /**
- * Returns the end index of the entity range on the left side.
- *
- * @return the end index of the entity range on the left side
- */
- public int leftEnd() {
- return fLeftStart + fLeftLength;
- }
-
- /**
- * Returns the maximum number of entities in the left, right, and ancestor sides of this range.
- *
- * @return the maximum number of entities in the left, right, and ancestor sides of this range
- */
- public int maxLength() {
- return Math.max(fRightLength, Math.max(fLeftLength, lAncestorLength));
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/RangeDifferencer.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/RangeDifferencer.java
deleted file mode 100644
index 43b880853..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/RangeDifferencer.java
+++ /dev/null
@@ -1,532 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.rangedifferencer;
-
-import java.util.*;
-
-import org.eclipse.jface.util.Assert;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * A <code>RangeDifferencer</code> finds the differences between two or three <code>IRangeComparator</code>s.
- * <p>
- * To use the differencer, clients provide an <code>IRangeComparator</code>
- * that breaks their input data into a sequence of comparable entities. The differencer
- * returns the differences among these sequences as an array of <code>RangeDifference</code> objects
- * (<code>findDifferences</code> methods).
- * Every <code>RangeDifference</code> represents a single kind of difference
- * and the corresponding ranges of the underlying comparable entities in the
- * left, right, and optionally ancestor sides.
- * <p>
- * Alternatively, the <code>findRanges</code> methods not only return objects for
- * the differing ranges but for non-differing ranges too.
- * <p>
- * The algorithm used is an objectified version of one described in:
- * <it>A File Comparison Program,</it> by Webb Miller and Eugene W. Myers,
- * Software Practice and Experience, Vol. 15, Nov. 1985.
- *
- * @see IRangeComparator
- * @see RangeDifference
- */
-public final class RangeDifferencer {
-
- private static final RangeDifference[] EMPTY_RESULT= new RangeDifference[0];
-
- /* (non Javadoc)
- * Non instantiatiable!
- */
- private RangeDifferencer() {
- }
-
- /**
- * Finds the differences between two <code>IRangeComparator</code>s.
- * The differences are returned as an array of <code>RangeDifference</code>s.
- * If no differences are detected an empty array is returned.
- *
- * @param left the left range comparator
- * @param right the right range comparator
- * @return an array of range differences, or an empty array if no differences were found
- */
- public static RangeDifference[] findDifferences(IRangeComparator left, IRangeComparator right) {
- return findDifferences((IProgressMonitor)null, left, right);
- }
-
- /**
- * Finds the differences between two <code>IRangeComparator</code>s.
- * The differences are returned as an array of <code>RangeDifference</code>s.
- * If no differences are detected an empty array is returned.
- *
- * @param pm if not <code>null</code> used to report progress
- * @param left the left range comparator
- * @param right the right range comparator
- * @return an array of range differences, or an empty array if no differences were found
- */
- public static RangeDifference[] findDifferences(IProgressMonitor pm, IRangeComparator left, IRangeComparator right) {
-
- // assert that both IRangeComparators are of the same class
- Assert.isTrue(right.getClass().equals(left.getClass()));
-
- int rightSize= right.getRangeCount();
- int leftSize= left.getRangeCount();
- //
- // Differences matrix:
- // only the last d of each diagonal is stored, i.e., lastDiagonal[k] = row of d
- //
- int diagLen= 2 * Math.max(rightSize, leftSize); // bound on the size of edit script
- int maxDiagonal= diagLen;
- int lastDiagonal[]= new int[diagLen + 1]; // the row containing the last d
- // on diagonal k (lastDiagonal[k] = row)
- int origin= diagLen / 2; // origin of diagonal 0
-
- // script corresponding to d[k]
- LinkedRangeDifference script[]= new LinkedRangeDifference[diagLen + 1];
- int row, col;
-
- // find common prefix
- for (row= 0; row < rightSize && row < leftSize && rangesEqual(right, row, left, row) == true; ++row)
- ;
-
- lastDiagonal[origin]= row;
- script[origin]= null;
- int lower= (row == rightSize) ? origin + 1 : origin - 1;
- int upper= (row == leftSize) ? origin - 1 : origin + 1;
-
- if (lower > upper)
- return EMPTY_RESULT;
-
- //System.out.println("findDifferences: " + maxDiagonal + " " + lower + " " + upper);
-
- // for each value of the edit distance
- for (int d= 1; d <= maxDiagonal; ++d) { // d is the current edit distance
-
- if (pm != null)
- pm.worked(1);
-
- if (right.skipRangeComparison(d, maxDiagonal, left))
- return EMPTY_RESULT; // should be something we already found
-
- // for each relevant diagonal (-d, -d+2 ..., d-2, d)
- for (int k= lower; k <= upper; k += 2) { // k is the current diagonal
- LinkedRangeDifference edit;
-
- if (pm != null && pm.isCanceled())
- return EMPTY_RESULT;
-
- if (k == origin - d || k != origin + d && lastDiagonal[k + 1] >= lastDiagonal[k - 1]) {
- //
- // move down
- //
- row= lastDiagonal[k + 1] + 1;
- edit= new LinkedRangeDifference(script[k + 1], LinkedRangeDifference.DELETE);
- } else {
- //
- // move right
- //
- row= lastDiagonal[k - 1];
- edit= new LinkedRangeDifference(script[k - 1], LinkedRangeDifference.INSERT);
- }
- col= row + k - origin;
- edit.fRightStart= row;
- edit.fLeftStart= col;
- Assert.isTrue(k >= 0 && k <= maxDiagonal);
- script[k]= edit;
-
- // slide down the diagonal as far as possible
- while (row < rightSize && col < leftSize && rangesEqual(right, row, left, col) == true) {
- ++row;
- ++col;
- }
-
- Assert.isTrue(k >= 0 && k <= maxDiagonal); // Unreasonable value for diagonal index
- lastDiagonal[k]= row;
-
- if (row == rightSize && col == leftSize) {
- //showScript(script[k], right, left);
- return createDifferencesRanges(script[k]);
- }
- if (row == rightSize)
- lower= k + 2;
- if (col == leftSize)
- upper= k - 2;
- }
- --lower;
- ++upper;
- }
- // too many differences
- Assert.isTrue(false);
- return null;
- }
-
- /**
- * Finds the differences among three <code>IRangeComparator</code>s.
- * The differences are returned as a list of <code>RangeDifference</code>s.
- * If no differences are detected an empty list is returned.
- * If the ancestor range comparator is <code>null</code>, a two-way
- * comparison is performed.
- *
- * @param ancestor the ancestor range comparator or <code>null</code>
- * @param left the left range comparator
- * @param right the right range comparator
- * @return an array of range differences, or an empty array if no differences were found
- */
- public static RangeDifference[] findDifferences(IRangeComparator ancestor, IRangeComparator left, IRangeComparator right) {
- return findDifferences(null, ancestor, left, right);
- }
-
- /**
- * Finds the differences among three <code>IRangeComparator</code>s.
- * The differences are returned as a list of <code>RangeDifference</code>s.
- * If no differences are detected an empty list is returned.
- * If the ancestor range comparator is <code>null</code>, a two-way
- * comparison is performed.
- *
- * @param pm if not <code>null</code> used to report progress
- * @param ancestor the ancestor range comparator or <code>null</code>
- * @param left the left range comparator
- * @param right the right range comparator
- * @return an array of range differences, or an empty array if no differences were found
- */
- public static RangeDifference[] findDifferences(IProgressMonitor pm, IRangeComparator ancestor, IRangeComparator left, IRangeComparator right) {
-
- if (ancestor == null)
- return findDifferences(pm, left, right);
-
- RangeDifference[] leftAncestorScript= null;
- RangeDifference[] rightAncestorScript= findDifferences(pm, ancestor, right);
- if (rightAncestorScript != null)
- leftAncestorScript= findDifferences(pm, ancestor, left);
- if (rightAncestorScript == null || leftAncestorScript == null)
- return null;
-
- DifferencesIterator myIter= new DifferencesIterator(rightAncestorScript);
- DifferencesIterator yourIter= new DifferencesIterator(leftAncestorScript);
-
- List diff3= new ArrayList();
- diff3.add(new RangeDifference(RangeDifference.ERROR)); // add a sentinel
-
- int changeRangeStart= 0;
- int changeRangeEnd= 0;
- //
- // Combine the two two-way edit scripts into one
- //
- while (myIter.fDifference != null || yourIter.fDifference != null) {
-
- DifferencesIterator startThread;
- myIter.removeAll();
- yourIter.removeAll();
- //
- // take the next diff that is closer to the start
- //
- if (myIter.fDifference == null)
- startThread= yourIter;
- else if (yourIter.fDifference == null)
- startThread= myIter;
- else { // not at end of both scripts take the lowest range
- if (myIter.fDifference.fLeftStart <= yourIter.fDifference.fLeftStart) // 2 -> common (Ancestor) change range
- startThread= myIter;
- else
- startThread= yourIter;
- }
- changeRangeStart= startThread.fDifference.fLeftStart;
- changeRangeEnd= startThread.fDifference.leftEnd();
-
- startThread.next();
- //
- // check for overlapping changes with other thread
- // merge overlapping changes with this range
- //
- DifferencesIterator other= startThread.other(myIter, yourIter);
- while (other.fDifference != null && other.fDifference.fLeftStart <= changeRangeEnd) {
- int newMax= other.fDifference.leftEnd();
- other.next();
- if (newMax >= changeRangeEnd) {
- changeRangeEnd= newMax;
- other= other.other(myIter, yourIter);
- }
- }
- diff3.add(createRangeDifference3(myIter, yourIter, diff3, right, left, changeRangeStart, changeRangeEnd));
- }
-
- // remove sentinel
- diff3.remove(0);
- return (RangeDifference[]) diff3.toArray(EMPTY_RESULT);
- }
-
- /**
- * Finds the differences among two <code>IRangeComparator</code>s.
- * In contrast to <code>findDifferences</code>, the result
- * contains <code>RangeDifference</code> elements for non-differing ranges too.
- *
- * @param left the left range comparator
- * @param right the right range comparator
- * @return an array of range differences
- */
- public static RangeDifference[] findRanges(IRangeComparator left, IRangeComparator right) {
- return findRanges((IProgressMonitor)null, left, right);
- }
-
- /**
- * Finds the differences among two <code>IRangeComparator</code>s.
- * In contrast to <code>findDifferences</code>, the result
- * contains <code>RangeDifference</code> elements for non-differing ranges too.
- *
- * @param pm if not <code>null</code> used to report progress
- * @param left the left range comparator
- * @param right the right range comparator
- * @return an array of range differences
- */
- public static RangeDifference[] findRanges(IProgressMonitor pm, IRangeComparator left, IRangeComparator right) {
- RangeDifference[] in= findDifferences(pm, left, right);
- List out= new ArrayList();
-
- RangeDifference rd;
-
- int mstart= 0;
- int ystart= 0;
-
- for (int i= 0; i < in.length; i++) {
- RangeDifference es= in[i];
-
- rd= new RangeDifference(RangeDifference.NOCHANGE, mstart, es.rightStart() - mstart, ystart, es.leftStart() - ystart);
- if (rd.maxLength() != 0)
- out.add(rd);
-
- out.add(es);
-
- mstart= es.rightEnd();
- ystart= es.leftEnd();
- }
- rd= new RangeDifference(RangeDifference.NOCHANGE, mstart, right.getRangeCount() - mstart, ystart, left.getRangeCount() - ystart);
- if (rd.maxLength() > 0)
- out.add(rd);
-
- return (RangeDifference[]) out.toArray(EMPTY_RESULT);
- }
-
- /**
- * Finds the differences among three <code>IRangeComparator</code>s.
- * In contrast to <code>findDifferences</code>, the result
- * contains <code>RangeDifference</code> elements for non-differing ranges too.
- * If the ancestor range comparator is <code>null</code>, a two-way
- * comparison is performed.
- *
- * @param pm if not <code>null</code> used to report progress
- * @param ancestor the ancestor range comparator or <code>null</code>
- * @param left the left range comparator
- * @param right the right range comparator
- * @return an array of range differences
- */
- public static RangeDifference[] findRanges(IRangeComparator ancestor, IRangeComparator left, IRangeComparator right) {
- return findRanges(null, ancestor, left, right);
- }
-
- /**
- * Finds the differences among three <code>IRangeComparator</code>s.
- * In contrast to <code>findDifferences</code>, the result
- * contains <code>RangeDifference</code> elements for non-differing ranges too.
- * If the ancestor range comparator is <code>null</code>, a two-way
- * comparison is performed.
- *
- * @param pm if not <code>null</code> used to report progress
- * @param ancestor the ancestor range comparator or <code>null</code>
- * @param left the left range comparator
- * @param right the right range comparator
- * @return an array of range differences
- */
- public static RangeDifference[] findRanges(IProgressMonitor pm, IRangeComparator ancestor, IRangeComparator left, IRangeComparator right) {
-
- if (ancestor == null)
- return findRanges(pm, left, right);
-
- RangeDifference[] in= findDifferences(pm, ancestor, left, right);
- List out= new ArrayList();
-
- RangeDifference rd;
-
- int mstart= 0;
- int ystart= 0;
- int astart= 0;
-
- for (int i= 0; i < in.length; i++) {
- RangeDifference es= (RangeDifference) in[i];
-
- rd= new RangeDifference(RangeDifference.NOCHANGE, mstart, es.rightStart() - mstart, ystart, es.leftStart() - ystart, astart, es.ancestorStart() - astart);
- if (rd.maxLength() > 0)
- out.add(rd);
-
- out.add(es);
-
- mstart= es.rightEnd();
- ystart= es.leftEnd();
- astart= es.ancestorEnd();
- }
- rd= new RangeDifference(RangeDifference.NOCHANGE, mstart, right.getRangeCount() - mstart, ystart, left.getRangeCount() - ystart, astart, ancestor.getRangeCount() - astart);
- if (rd.maxLength() > 0)
- out.add(rd);
-
- return (RangeDifference[]) out.toArray(EMPTY_RESULT);
- }
-
- //---- private methods
-
- /**
- * Creates a Vector of DifferencesRanges out of the LinkedRangeDifference.
- * It coalesces adjacent changes.
- * In addition, indices are changed such that the ranges are 1) open, i.e,
- * the end of the range is not included, and 2) are zero based.
- */
- private static RangeDifference[] createDifferencesRanges(LinkedRangeDifference start) {
-
- LinkedRangeDifference ep= reverseDifferences(start);
- ArrayList result= new ArrayList();
- RangeDifference es= null;
-
- while (ep != null) {
- es= new RangeDifference(RangeDifference.CHANGE);
-
- if (ep.isInsert()) {
- es.fRightStart= ep.fRightStart + 1;
- es.fLeftStart= ep.fLeftStart;
- RangeDifference b= ep;
- do {
- ep= ep.getNext();
- es.fLeftLength++;
- } while (ep != null && ep.isInsert() && ep.fRightStart == b.fRightStart);
- } else {
- es.fRightStart= ep.fRightStart;
- es.fLeftStart= ep.fLeftStart;
-
- RangeDifference a= ep;
- //
- // deleted lines
- //
- do {
- a= ep;
- ep= ep.getNext();
- es.fRightLength++;
- } while (ep != null && ep.isDelete() && ep.fRightStart == a.fRightStart + 1);
-
- boolean change= (ep != null && ep.isInsert() && ep.fRightStart == a.fRightStart);
-
- if (change) {
- RangeDifference b= ep;
- //
- // replacement lines
- //
- do {
- ep= ep.getNext();
- es.fLeftLength++;
- } while (ep != null && ep.isInsert() && ep.fRightStart == b.fRightStart);
- } else {
- es.fLeftLength= 0;
- }
- es.fLeftStart++; // meaning of range changes from "insert after", to "replace with"
-
- }
- //
- // the script commands are 1 based, subtract one to make them zero based
- //
- es.fRightStart--;
- es.fLeftStart--;
- result.add(es);
- }
- return (RangeDifference[]) result.toArray(EMPTY_RESULT);
- }
-
- /**
- * Creates a <code>RangeDifference3</code> given the
- * state of two DifferenceIterators.
- */
- private static RangeDifference createRangeDifference3(
- DifferencesIterator myIter,
- DifferencesIterator yourIter,
- List diff3,
- IRangeComparator right,
- IRangeComparator left,
- int changeRangeStart,
- int changeRangeEnd) {
-
- int rightStart, rightEnd;
- int leftStart, leftEnd;
- int kind= RangeDifference.ERROR;
- RangeDifference last= (RangeDifference) diff3.get(diff3.size() - 1);
-
- Assert.isTrue((myIter.getCount() != 0 || yourIter.getCount() != 0)); // At least one range array must be non-empty
- //
- // find corresponding lines to fChangeRangeStart/End in right and left
- //
- if (myIter.getCount() == 0) { // only left changed
- rightStart= changeRangeStart - last.ancestorEnd() + last.rightEnd();
- rightEnd= changeRangeEnd - last.ancestorEnd() + last.rightEnd();
- kind= RangeDifference.LEFT;
- } else {
- RangeDifference f= (RangeDifference) myIter.fRange.get(0);
- RangeDifference l= (RangeDifference) myIter.fRange.get(myIter.fRange.size() - 1);
- rightStart= changeRangeStart - f.fLeftStart + f.fRightStart;
- rightEnd= changeRangeEnd - l.leftEnd() + l.rightEnd();
- }
-
- if (yourIter.getCount() == 0) { // only right changed
- leftStart= changeRangeStart - last.ancestorEnd() + last.leftEnd();
- leftEnd= changeRangeEnd - last.ancestorEnd() + last.leftEnd();
- kind= RangeDifference.RIGHT;
- } else {
- RangeDifference f= (RangeDifference) yourIter.fRange.get(0);
- RangeDifference l= (RangeDifference) yourIter.fRange.get(yourIter.fRange.size() - 1);
- leftStart= changeRangeStart - f.fLeftStart + f.fRightStart;
- leftEnd= changeRangeEnd - l.leftEnd() + l.rightEnd();
- }
-
- if (kind == RangeDifference.ERROR) { // overlapping change (conflict) -> compare the changed ranges
- if (rangeSpansEqual(right, rightStart, rightEnd - rightStart, left, leftStart, leftEnd - leftStart))
- kind= RangeDifference.ANCESTOR;
- else
- kind= RangeDifference.CONFLICT;
- }
- return new RangeDifference(kind, rightStart, rightEnd - rightStart, leftStart, leftEnd - leftStart, changeRangeStart, changeRangeEnd - changeRangeStart);
- }
-
- /**
- * Tests if two ranges are equal
- */
- private static boolean rangesEqual(IRangeComparator a, int ai, IRangeComparator b, int bi) {
- return a.rangesEqual(ai, b, bi);
- }
-
- /**
- * Tests whether <code>right</code> and <code>left</left> changed in the same way
- */
- private static boolean rangeSpansEqual(IRangeComparator right, int rightStart, int rightLen, IRangeComparator left, int leftStart, int leftLen) {
- if (rightLen == leftLen) {
- int i= 0;
- for (i= 0; i < rightLen; i++) {
- if (!rangesEqual(right, rightStart + i, left, leftStart + i))
- break;
- }
- if (i == rightLen)
- return true;
- }
- return false;
- }
-
- /**
- * Reverses the range differences
- */
- private static LinkedRangeDifference reverseDifferences(LinkedRangeDifference start) {
- LinkedRangeDifference ep, behind, ahead;
-
- ahead= start;
- ep= null;
- while (ahead != null) {
- behind= ep;
- ep= ahead;
- ahead= ahead.getNext();
- ep.setNext(behind);
- }
- return ep;
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/package.html b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/package.html
deleted file mode 100644
index 2e4ffaf2b..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/package.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides support for finding the differences between
-two or three sequences of comparable entities.
-<h2>
-Package Specification</h2>
-The class <tt>Differencer</tt> finds longest sequences of matching and
-non-matching comparable entities.
-<p>Clients must supply the input to the differencer as an implementation
-of the <tt>IRangeComparator</tt> interface.
-<br>An <tt>IRangeComparator</tt> breaks the input data into a sequence
-of entities and provides a method for comparing
-<br>one entity with the entity in another <tt>IRangeComparator</tt>.
-<br>For example, to compare two text documents and find longest common
-sequences
-<br>of matching and non-matching lines, the implementation of <tt>IRangeComparator
-</tt>must break the document
-<br>into lines and provide a method for testing whether two lines are considered
-equal.
-<p>The differencer returns the differences among these sequences as an
-array of <tt>RangeDifference</tt> objects.
-<br>Every single <tt>RangeDifference</tt> describes kind of difference
-(no change, change, addition, deletion)
-<br>and the corresponding ranges of the underlying comparable entities
-in the two or three inputs.
-<p>The algorithm used is an objectified version of one described in:
-<br><i>A File Comparison Program,</i> by Webb Miller and Eugene W. Myers,
-<br>Software Practice and Experience, Vol. 15, Nov. 1985.
-</body>
-</html>
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffContainer.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffContainer.java
deleted file mode 100644
index f101c35ba..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffContainer.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.structuremergeviewer;
-
-import java.util.Iterator;
-import java.util.ArrayList;
-import org.eclipse.swt.graphics.Image;
-
-
-/**
- * The standard implementation of a diff container element.
- * <p>
- * This class may be instantiated, or further subclassed.
- * </p>
- */
-public abstract class DiffContainer extends DiffElement implements IDiffContainer {
-
- private static IDiffElement[] fgEmptyArray= new IDiffElement[0];
- private ArrayList fChildren;
-
- /**
- * Creates a new container with the specified kind under the given parent.
- *
- * @param parent under which the new container is added as a child or <code>null</code>.
- * @param name of the container
- * @param kind of difference (defined in <code>Differencer</code>).
- */
- public DiffContainer(IDiffContainer parent, int kind) {
- super(parent, kind);
- }
-
- /**
- * Tries to find the child with the given name.
- * Returns <code>null</code> if no such child exists.
- *
- * @param name of the child to find
- * @return the first element with a matching name
- */
- public IDiffElement findChild(String name) {
- Object[] children= getChildren();
- for (int i= 0; i < children.length; i++) {
- IDiffElement child= (IDiffElement) children[i];
- if (name.equals(child.getName()))
- return child;
- }
- return null;
- }
-
- /* (non Javadoc)
- * see IDiffContainer.add
- */
- public void add(IDiffElement diff) {
- if (fChildren == null)
- fChildren= new ArrayList();
- fChildren.add(diff);
- diff.setParent(this);
- }
-
- /**
- * Removes the given child from this container.
- * If the container becomes empty it is removed from its container.
- */
- /* (non Javadoc)
- * see IDiffContainer.removeToRoot
- */
- public void removeToRoot(IDiffElement child) {
- if (fChildren != null) {
- fChildren.remove(child);
- child.setParent(null);
- if (fChildren.size() == 0) {
- IDiffContainer p= getParent();
- if (p != null)
- p.removeToRoot(this);
- }
- }
- }
-
- /**
- * Removes the given child (non-recursively) from this container.
- *
- * @param child to remove
- */
- public void remove(IDiffElement child) {
- if (fChildren != null) {
- fChildren.remove(child);
- child.setParent(null);
- }
- }
-
- /* (non Javadoc)
- * see IDiffContainer.hasChildren
- */
- public boolean hasChildren() {
- return fChildren != null && fChildren.size() > 0;
- }
-
- /* (non Javadoc)
- * see IDiffContainer.getChildren
- */
- public IDiffElement[] getChildren() {
- if (fChildren != null)
- return (IDiffElement[]) fChildren.toArray(fgEmptyArray);
- return fgEmptyArray;
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffElement.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffElement.java
deleted file mode 100644
index 7174a95a3..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffElement.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.structuremergeviewer;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.jface.util.Assert;
-
-/**
- * An abstract base implementation of the <code>IDiffElement</code> interface.
- * <p>
- * Subclasses may add behavior and state, and may override <code>getImage</code>
- * and <code>getType</code> to suit.
- * </p>
- */
-public abstract class DiffElement implements IDiffElement {
-
- private int fKind;
- private IDiffContainer fParent;
-
- /**
- * Creates a new <code>DiffElement</code> as a child of the given parent.
- * If parent is not <code>null</code> the new element is added to the parent.
- *
- * @param parent the parent of this child; if not <code>null</code> this element is automatically added as a child
- * @param kind the kind of change
- */
- public DiffElement(IDiffContainer parent, int kind) {
- fParent= parent;
- fKind= kind;
- if (parent != null)
- parent.add(this);
- }
-
- /**
- * The <code>DiffElement</code> implementation of this <code>ITypedInput</code>
- * method returns <code>null</code>. Subclasses may re-implement to provide
- * an image for this element.
- */
- public Image getImage() {
- return null;
- }
-
- /**
- * The <code>DiffElement</code> implementation of this <code>ITypedElement</code>
- * method returns <code>ITypedElement.UNKNOWN_TYPE</code>. Subclasses may
- * re-implement to provide a type for this element.
- */
- public String getType() {
- return ITypedElement.UNKNOWN_TYPE;
- }
-
- /**
- * Sets the kind of difference for this element.
- *
- * @param kind set the kind of difference this element represents
- * @see Differencer
- */
- public void setKind(int kind) {
- fKind= kind;
- }
-
- /* (non Javadoc)
- * see IDiffElement.getKind
- */
- public int getKind() {
- return fKind;
- }
-
- /* (non Javadoc)
- * see IDiffElement.getParent
- */
- public IDiffContainer getParent() {
- return fParent;
- }
-
- /* (non Javadoc)
- * see IDiffElement.setParent
- */
- public void setParent(IDiffContainer parent) {
- fParent= parent;
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffNode.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffNode.java
deleted file mode 100644
index a2960a2a7..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffNode.java
+++ /dev/null
@@ -1,351 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.structuremergeviewer;
-
-import java.text.MessageFormat;
-
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.jface.util.ListenerList;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.internal.Utilities;
-
-/**
- * Diff node are used as the compare result of the differencing engine.
- * 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>
- * <code>DiffNode</code>s are typically created as the result of performing
- * a compare with the <code>Differencer</code>.
- * <p>
- * Clients typically use this class as is, but may subclass if required.
- *
- * @see DiffTreeViewer
- * @see Differencer
- */
-public class DiffNode extends DiffContainer implements ITypedElement, ICompareInput {
-
- private ITypedElement fAncestor;
- private ITypedElement fLeft;
- private ITypedElement fRight;
- private boolean fDontExpand;
- private ListenerList fListener;
- private boolean fSwapSides;
-
-
- /**
- * Creates a new <code>DiffNode</code> and initializes with the given values.
- *
- * @param parent under which the new container is added as a child or <code>null</code>
- * @param kind of difference (defined in <code>Differencer</code>)
- * @param ancestor the common ancestor input to a compare
- * @param left the left input to a compare
- * @param right the right input to a compare
- */
- public DiffNode(IDiffContainer parent, int kind, ITypedElement ancestor, ITypedElement left, ITypedElement right) {
- this(parent, kind);
- fAncestor= ancestor;
- fLeft= left;
- fRight= right;
- }
-
- /**
- * Creates a new <code>DiffNode</code> with diff kind <code>Differencer.CHANGE</code>
- * and initializes with the given values.
- *
- * @param left the left input to a compare
- * @param right the right input to a compare
- */
- public DiffNode(ITypedElement left, ITypedElement right) {
- this(null, Differencer.CHANGE, null, left, right);
- }
-
- /**
- * Creates a new <code>DiffNode</code> and initializes with the given values.
- *
- * @param kind of difference (defined in <code>Differencer</code>)
- * @param ancestor the common ancestor input to a compare
- * @param left the left input to a compare
- * @param right the right input to a compare
- */
- public DiffNode(int kind, ITypedElement ancestor, ITypedElement left, ITypedElement right) {
- this(null, kind, ancestor, left, right);
- }
-
- /**
- * Creates a new <code>DiffNode</code> with the given diff kind.
- *
- * @param kind of difference (defined in <code>Differencer</code>)
- */
- public DiffNode(int kind) {
- super(null, kind);
- }
-
- /**
- * Creates a new <code>DiffNode</code> and initializes with the given values.
- *
- * @param parent under which the new container is added as a child or <code>null</code>
- * @param kind of difference (defined in <code>Differencer</code>)
- */
- public DiffNode(IDiffContainer parent, int kind) {
- super(parent, kind);
- }
-
- /**
- * Registers a listener for changes of this <code>ICompareInput</code>.
- * Has no effect if an identical listener is already registered.
- *
- * @param listener the listener to add
- */
- public void addCompareInputChangeListener(ICompareInputChangeListener listener) {
- if (fListener == null)
- fListener= new ListenerList();
- fListener.add(listener);
- }
-
- /**
- * Unregisters a <code>ICompareInput</code> listener.
- * Has no effect if listener is not registered.
- *
- * @param listener the listener to remove
- */
- public void removeCompareInputChangeListener(ICompareInputChangeListener listener) {
- if (fListener != null) {
- fListener.remove(listener);
- if (fListener.isEmpty())
- fListener= null;
- }
- }
-
- /**
- * Sends out notification that a change has occured on the <code>ICompareInput</code>.
- */
- protected void fireChange() {
- if (fListener != null) {
- Object[] listeners= fListener.getListeners();
- for (int i= 0; i < listeners.length; i++)
- ((ICompareInputChangeListener) listeners[i]).compareInputChanged(this);
- }
- }
-
- //---- getters & setters
-
- /**
- * Returns <code>true</code> if this node shouldn't automatically be expanded in
- * a </code>DiffTreeViewer</code>.
- *
- * @return <code>true</code> if node shouldn't automatically be expanded
- */
- public boolean dontExpand() {
- return fDontExpand;
- }
-
- /**
- * Controls whether this node is not automatically expanded when displayed in
- * a </code>DiffTreeViewer</code>.
- *
- * @param dontExpand if <code>true</code> this node is not automatically expanded in </code>DiffTreeViewer</code>
- */
- public void setDontExpand(boolean dontExpand) {
- fDontExpand= dontExpand;
- }
-
- /**
- * Returns the first not-<code>null</code> input of this node.
- * Method checks the three inputs in the order: ancestor, right, left.
- *
- * @return the first not-<code>null</code> input of this node
- */
- public ITypedElement getId() {
- if (fAncestor != null)
- return fAncestor;
- if (fRight != null)
- return fRight;
- return fLeft;
- }
-
- /**
- * Returns the (non-<code>null</code>) name of the left or right side if they are identical.
- * Otherwise both names are concatenated (separated with a slash ('/')).
- * <p>
- * Subclasses may re-implement to provide a different name for this node.
- */
- /* (non Javadoc)
- * see ITypedElement.getName
- */
- public String getName() {
- String right= null;
- if (fRight != null)
- right= fRight.getName();
-
- String left= null;
- if (fLeft != null)
- left= fLeft.getName();
-
- if (right == null && left == null) {
- if (fAncestor != null)
- return fAncestor.getName();
- return Utilities.getString("DiffNode.noName"); //$NON-NLS-1$
- }
-
- if (right == null)
- return left;
- if (left == null)
- return right;
-
- if (right.equals(left))
- return right;
-
- String s1;
- String s2;
-
- if (fSwapSides) {
- s1= left;
- s2= right;
- } else {
- s1= right;
- s2= left;
- }
-
- String fmt= Utilities.getString("DiffNode.nameFormat"); //$NON-NLS-1$
- return MessageFormat.format(fmt, new String[] { s1, s2 });
- }
-
- void swapSides(boolean swap) {
- fSwapSides= swap;
- }
-
- /* (non Javadoc)
- * see ITypedElement.getImage
- */
- public Image getImage() {
- ITypedElement id= getId();
- if (id != null)
- return id.getImage();
- return null;
- }
-
- /* (non Javadoc)
- * see ITypedElement.getType
- */
- public String getType() {
- ITypedElement id= getId();
- if (id != null)
- return id.getType();
- return ITypedElement.UNKNOWN_TYPE;
- }
-
- /* (non Javadoc)
- * see ICompareInput.getAncestor
- */
- public ITypedElement getAncestor() {
- return fAncestor;
- }
-
- /**
- * Sets the left input to the given value.
- *
- * @param left the new value for the left input
- */
- public void setLeft(ITypedElement left) {
- fLeft= left;
- }
-
- /* (non Javadoc)
- * see ICompareInput.getLeft
- */
- public ITypedElement getLeft() {
- return fLeft;
- }
-
- /**
- * Sets the right input to the given value.
- *
- * @param right the new value for the right input
- */
- public void setRight(ITypedElement right) {
- fRight= right;
- }
-
- /* (non Javadoc)
- * see ICompareInput.getRight
- */
- public ITypedElement getRight() {
- return fRight;
- }
-
- /* (non Javadoc)
- * see ICompareInput.copy
- */
- public void copy(boolean leftToRight) {
- //System.out.println("DiffNode.copy: " + leftToRight);
-
- IDiffContainer pa= getParent();
- if (pa instanceof ICompareInput) {
- ICompareInput parent= (ICompareInput) pa;
- Object dstParent= leftToRight ? parent.getRight() : parent.getLeft();
-
- if (dstParent instanceof IEditableContent) {
- ITypedElement dst= leftToRight ? getRight() : getLeft();
- ITypedElement src= leftToRight ? getLeft() : getRight();
- dst= ((IEditableContent)dstParent).replace(dst, src);
- if (leftToRight)
- setRight(dst);
- else
- setLeft(dst);
-
- //setKind(Differencer.NO_CHANGE);
-
- fireChange();
- }
- }
- }
-
- /* (non Javadoc)
- * see Object.hashCode
- */
- public int hashCode() {
- String[] path= getPath(this, 0);
- int hashCode= 1;
- for (int i= 0; i < path.length; i++) {
- String s= path[i];
- hashCode= (31*hashCode) + (s != null ? s.hashCode() : 0);
- }
- return hashCode;
- }
-
- /* (non Javadoc)
- * see Object.equals
- */
- public boolean equals(Object other) {
- if (other != null && getClass() == other.getClass()) {
- String[] path1= getPath(this, 0);
- String[] path2= getPath((DiffNode) other, 0);
- if (path1.length != path2.length)
- return false;
- for (int i= 0; i < path1.length; i++)
- if (! path1[i].equals(path2[i]))
- return false;
- return true;
- }
- return super.equals(other);
- }
-
- private static String[] getPath(ITypedElement el, int level) {
- String[] path= null;
- if (el instanceof IDiffContainer) {
- IDiffContainer parent= ((IDiffContainer)el).getParent();
- if (parent instanceof ITypedElement)
- path= getPath((ITypedElement)parent, level+1);
- }
- if (path == null)
- path= new String[level+1];
- path[(path.length-1)-level]= el.getName();
- return path;
- }
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java
deleted file mode 100644
index 918f5eff6..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java
+++ /dev/null
@@ -1,708 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.structuremergeviewer;
-
-import java.util.Iterator;
-import java.util.ResourceBundle;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.jface.util.*;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.preference.IPreferenceStore;
-
-import org.eclipse.compare.internal.*;
-import org.eclipse.compare.*;
-
-/**
- * A tree viewer that works on objects implementing
- * the <code>IDiffContainer</code> and <code>IDiffElement</code> interfaces.
- * <p>
- * This class may be instantiated; it is not intended to be subclassed outside
- * this package.
- * </p>
- *
- * @see IDiffContainer
- * @see IDiffElement
- */
-public class DiffTreeViewer extends TreeViewer {
-
- static class DiffViewerSorter extends ViewerSorter {
-
- public boolean isSorterProperty(Object element, Object property) {
- return false;
- }
-
- public int category(Object node) {
- if (node instanceof DiffNode) {
- Object o= ((DiffNode) node).getId();
- if (o instanceof DocumentRangeNode)
- return ((DocumentRangeNode) o).getTypeCode();
- }
- return 0;
- }
- }
-
- class DiffViewerContentProvider implements ITreeContentProvider {
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
- public boolean isDeleted(Object element) {
- return false;
- }
-
- public void dispose() {
- inputChanged(DiffTreeViewer.this, getInput(), null);
- }
-
- public Object getParent(Object element) {
- if (element instanceof IDiffElement)
- return ((IDiffElement)element).getParent();
- return null;
- }
-
- public final boolean hasChildren(Object element) {
- if (element instanceof IDiffContainer)
- return ((IDiffContainer)element).hasChildren();
- return false;
- }
-
- public final Object[] getChildren(Object element) {
- if (element instanceof IDiffContainer)
- return ((IDiffContainer)element).getChildren();
- return new Object[0];
- }
-
- public Object[] getElements(Object element) {
- return getChildren(element);
- }
- }
-
- /*
- * Takes care of swapping left and right if fLeftIsLocal
- * is true.
- */
- class DiffViewerLabelProvider extends LabelProvider {
-
- public String getText(Object element) {
-
- if (element instanceof IDiffElement)
- return ((IDiffElement)element).getName();
-
- return Utilities.getString(fBundle, "defaultLabel"); //$NON-NLS-1$
- }
-
- public Image getImage(Object element) {
- if (element instanceof IDiffElement) {
- IDiffElement input= (IDiffElement) element;
-
- int kind= input.getKind();
- if (fLeftIsLocal) {
- switch (kind & Differencer.DIRECTION_MASK) {
- case Differencer.LEFT:
- kind= (kind &~ Differencer.LEFT) | Differencer.RIGHT;
- break;
- case Differencer.RIGHT:
- kind= (kind &~ Differencer.RIGHT) | Differencer.LEFT;
- break;
- }
- }
-
- return fCompareConfiguration.getImage(input.getImage(), kind);
- }
- return null;
- }
- }
-
- static class FilterSame extends ViewerFilter {
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- if (element instanceof IDiffElement)
- return (((IDiffElement)element).getKind() & Differencer.PSEUDO_CONFLICT) == 0;
- return true;
- }
- public boolean isFilterProperty(Object element, Object property) {
- return false;
- }
- }
-
- private ResourceBundle fBundle;
- private CompareConfiguration fCompareConfiguration;
- /* package */ boolean fLeftIsLocal;
- private ViewerFilter fViewerFilter;
- private IPropertyChangeListener fPropertyChangeListener;
- //private IPropertyChangeListener fPreferenceChangeListener;
-
- private Action fCopyLeftToRightAction;
- private Action fCopyRightToLeftAction;
- private Action fNextAction;
- private Action fPreviousAction;
- private Action fEmptyMenuAction;
- private Action fExpandAllAction;
-
- /**
- * Creates a new viewer for the given SWT tree control with the specified configuration.
- *
- * @param tree the tree control
- * @param configuration the configuration for this viewer
- */
- public DiffTreeViewer(Tree tree, CompareConfiguration configuration) {
- super(tree);
- initialize(configuration);
- }
-
- /**
- * Creates a new viewer under the given SWT parent and with the specified configuration.
- *
- * @param parent the SWT control under which to create the viewer
- * @param configuration the configuration for this viewer
- */
- public DiffTreeViewer(Composite parent, CompareConfiguration configuration) {
- super(new Tree(parent, SWT.MULTI));
- initialize(configuration);
- }
-
- private void initialize(CompareConfiguration configuration) {
-
- Control tree= getControl();
-
- INavigatable nav= new INavigatable() {
- public boolean gotoDifference(boolean next) {
- return internalNavigate(next);
- }
- };
- tree.setData(INavigatable.NAVIGATOR_PROPERTY, nav);
-
- fLeftIsLocal= Utilities.getBoolean(configuration, "LEFT_IS_LOCAL", false); //$NON-NLS-1$
-
- tree.setData(CompareUI.COMPARE_VIEWER_TITLE, getTitle());
-
- Composite parent= tree.getParent();
-
- fBundle= ResourceBundle.getBundle("org.eclipse.compare.structuremergeviewer.DiffTreeViewerResources"); //$NON-NLS-1$
-
- // register for notification with the CompareConfiguration
- fCompareConfiguration= configuration;
- if (fCompareConfiguration != null) {
- fPropertyChangeListener= new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- DiffTreeViewer.this.propertyChange(event);
- }
- };
- fCompareConfiguration.addPropertyChangeListener(fPropertyChangeListener);
- }
-
- // register for notification with the Compare plugin's PreferenceStore
- /*
- fPreferenceChangeListener= new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(ComparePreferencePage.SHOW_PSEUDO_CONFLICTS))
- syncShowPseudoConflictFilter();
- }
- };
- IPreferenceStore ps= CompareUIPlugin.getDefault().getPreferenceStore();
- if (ps != null)
- ps.addPropertyChangeListener(fPreferenceChangeListener);
- */
-
-
- setContentProvider(new DiffViewerContentProvider());
- setLabelProvider(new DiffViewerLabelProvider());
-
- addSelectionChangedListener(
- new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent se) {
- updateActions();
- }
- }
- );
-
- // syncShowPseudoConflictFilter();
-
- setSorter(new DiffViewerSorter());
-
- ToolBarManager tbm= CompareViewerSwitchingPane.getToolBarManager(parent);
- if (tbm != null) {
- tbm.removeAll();
-
- tbm.add(new Separator("merge")); //$NON-NLS-1$
- tbm.add(new Separator("modes")); //$NON-NLS-1$
- tbm.add(new Separator("navigation")); //$NON-NLS-1$
-
- createToolItems(tbm);
- updateActions();
-
- tbm.update(true);
- }
-
- MenuManager mm= new MenuManager();
- mm.setRemoveAllWhenShown(true);
- mm.addMenuListener(
- new IMenuListener() {
- public void menuAboutToShow(IMenuManager mm) {
- fillContextMenu(mm);
- if (mm.isEmpty()) {
- if (fEmptyMenuAction == null) {
- fEmptyMenuAction=
- new Action(Utilities.getString(fBundle, "emptyMenuItem")) {}; //$NON-NLS-1$
- fEmptyMenuAction.setEnabled(false);
- }
- mm.add(fEmptyMenuAction);
- }
- }
- }
- );
- tree.setMenu(mm.createContextMenu(tree));
- }
-
- /**
- * Returns the viewer's name.
- *
- * @return the viewer's name
- */
- public String getTitle() {
- String title= Utilities.getString(fBundle, "title", null); //$NON-NLS-1$
- if (title == null)
- title= Utilities.getString("DiffTreeViewer.title"); //$NON-NLS-1$
- return title;
- }
-
- /**
- * Returns the resource bundle.
- *
- * @return the viewer's resource bundle
- */
- protected ResourceBundle getBundle() {
- return fBundle;
- }
-
- /**
- * Returns the compare configuration of this viewer.
- *
- * @return the compare configuration of this viewer
- */
- public CompareConfiguration getCompareConfiguration() {
- return fCompareConfiguration;
- }
-
- /**
- * Called on the viewer disposal.
- * Unregisters from the compare configuration.
- * Clients may extend if they have to do additional cleanup.
- */
- protected void handleDispose(DisposeEvent event) {
-
- /*
- if (fPreferenceChangeListener != null) {
- IPreferenceStore ps= CompareUIPlugin.getDefault().getPreferenceStore();
- if (ps != null)
- ps.removePropertyChangeListener(fPreferenceChangeListener);
- fPreferenceChangeListener= null;
- }
- */
-
- if (fCompareConfiguration != null) {
- if (fPropertyChangeListener != null)
- fCompareConfiguration.removePropertyChangeListener(fPropertyChangeListener);
- fCompareConfiguration= null;
- }
- fPropertyChangeListener= null;
-
- super.handleDispose(event);
- }
-
- /**
- * Tracks property changes of the configuration object.
- * Clients may extend to track their own property changes.
- */
- protected void propertyChange(PropertyChangeEvent event) {
- }
-
- protected void inputChanged(Object in, Object oldInput) {
- super.inputChanged(in, oldInput);
-
- if (in != oldInput) {
- initialSelection();
- updateActions();
- }
- }
-
- /**
- * This hook method is called from within <code>inputChanged</code>
- * after a new input has been set but before any controls are updated.
- * This default implementation calls <code>navigate(true)<code>
- * to select and expand the first leaf node.
- * Clients can override this method and are free to decide whether
- * they want to call the inherited method.
- */
- protected void initialSelection() {
- navigate(true);
- }
-
- /**
- * Overridden to avoid expanding <code>DiffNode</code>s that shouldn't expand
- * (i.e. where the <code>dontExpand</code> method returns <code>true</code>).
- */
- protected void internalExpandToLevel(Widget node, int level) {
-
- Object data= node.getData();
-
- if (dontExpand(data))
- return;
-
- super.internalExpandToLevel(node, level);
- }
-
- protected boolean dontExpand(Object o) {
- return o instanceof DiffNode && ((DiffNode)o).dontExpand();
- }
-
- //---- merge action support
-
- /**
- * This factory method is called after the viewer's controls have been created.
- * It installs four actions in the given <code>ToolBarManager</code>. Two actions
- * allow for copying one side of a <code>DiffNode</code> to the other side.
- * Two other actions are for navigating from one node to the next (previous).
- * <p>
- * Clients can override this method and are free to decide whether they want to call
- * the inherited method.
- *
- * @param toolbarManager the toolbar manager for which to add the actions
- */
- protected void createToolItems(ToolBarManager toolbarManager) {
-
-// fCopyLeftToRightAction= new Action() {
-// public void run() {
-// copySelected(true);
-// }
-// };
-// Utilities.initAction(fCopyLeftToRightAction, fBundle, "action.TakeLeft.");
-// toolbarManager.appendToGroup("merge", fCopyLeftToRightAction);
-
-// fCopyRightToLeftAction= new Action() {
-// public void run() {
-// copySelected(false);
-// }
-// };
-// Utilities.initAction(fCopyRightToLeftAction, fBundle, "action.TakeRight.");
-// toolbarManager.appendToGroup("merge", fCopyRightToLeftAction);
-
-// fNextAction= new Action() {
-// public void run() {
-// navigate(true);
-// }
-// };
-// Utilities.initAction(fNextAction, fBundle, "action.NextDiff."); //$NON-NLS-1$
-// toolbarManager.appendToGroup("navigation", fNextAction); //$NON-NLS-1$
-
-// fPreviousAction= new Action() {
-// public void run() {
-// navigate(false);
-// }
-// };
-// Utilities.initAction(fPreviousAction, fBundle, "action.PrevDiff."); //$NON-NLS-1$
-// toolbarManager.appendToGroup("navigation", fPreviousAction); //$NON-NLS-1$
- }
-
- /**
- * This method is called to add actions to the viewer's context menu.
- * It installs actions for expanding tree nodes, copying one side of a <code>DiffNode</code> to the other side.
- * Clients can override this method and are free to decide whether they want to call
- * the inherited method.
- *
- * @param manager the menu manager for which to add the actions
- */
- protected void fillContextMenu(IMenuManager manager) {
- if (fExpandAllAction == null) {
- fExpandAllAction= new Action() {
- public void run() {
- expandSelection();
- }
- };
- Utilities.initAction(fExpandAllAction, fBundle, "action.ExpandAll."); //$NON-NLS-1$
- }
- ISelection selection= getSelection();
- fExpandAllAction.setEnabled(selection != null && !selection.isEmpty());
- manager.add(fExpandAllAction);
-
- if (fCopyLeftToRightAction != null)
- manager.add(fCopyLeftToRightAction);
- if (fCopyRightToLeftAction != null)
- manager.add(fCopyRightToLeftAction);
- }
-
- /**
- * Expands to infinity all items in the selection.
- */
- protected void expandSelection() {
- ISelection selection= getSelection();
- if (selection instanceof IStructuredSelection) {
- Iterator elements= ((IStructuredSelection)selection).iterator();
- while (elements.hasNext()) {
- Object next= elements.next();
- expandToLevel(next, ALL_LEVELS);
- }
- }
- }
-
- /**
- * Copies one side of all <code>DiffNode</code>s in the current selection to the other side.
- * Called from the (internal) actions for copying the sides of a <code>DiffNode</code>.
- * Clients may override.
- *
- * @param leftToRight if <code>true</code> the left side is copied to the right side.
- * If <code>false</code> the right side is copied to the left side
- */
- protected void copySelected(boolean leftToRight) {
- ISelection selection= getSelection();
- if (selection instanceof IStructuredSelection) {
- Iterator e= ((IStructuredSelection) selection).iterator();
- while (e.hasNext()) {
- Object element= e.next();
- if (element instanceof ICompareInput)
- copyOne((ICompareInput) element, leftToRight);
- }
- }
- }
-
- /**
- * Called to copy one side of the given node to the other.
- * This default implementation delegates the call to <code>ICompareInput.copy(...)</code>.
- * Clients may override.
- *
- * @param leftToRight if <code>true</code> the left side is copied to the right side.
- * If <code>false</code> the right side is copied to the left side
- */
- protected void copyOne(ICompareInput node, boolean leftToRight) {
-
- node.copy(leftToRight);
-
- // update node's image
- update(new Object[] { node }, null);
- }
-
- /**
- * 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 override.
- *
- * @param next if <code>true</code> the next node is selected, otherwise the previous node
- */
- protected void navigate(boolean next) {
- internalNavigate(next);
- }
-
- //---- private
-
- /**
- * 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 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)
- */
- private boolean internalNavigate(boolean next) {
-
- Control c= getControl();
- if (!(c instanceof Tree))
- return false;
-
- Tree tree= (Tree) c;
- 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) {
- internalSetSelection(item);
- return false;
- }
- }
- }
-
- while (true) {
- item= findNextPrev(item, next);
- if (item == null)
- break;
- if (item.getItemCount() <= 0)
- break;
- }
-
- if (item != null) {
- internalSetSelection(item);
- return false;
- }
- return true;
- }
-
- private TreeItem findNextPrev(TreeItem item, boolean next) {
-
- if (item == null)
- return null;
-
- TreeItem children[]= null;
-
- 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) {
- 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);
- 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 void internalSetSelection(TreeItem ti) {
- if (ti != null) {
- Object data= ti.getData();
- if (data != null)
- setSelection(new StructuredSelection(data), true);
- }
- }
-
- /*
- private void syncShowPseudoConflictFilter() {
-
- IPreferenceStore ps= CompareUIPlugin.getDefault().getPreferenceStore();
- boolean showPseudoConflicts= ps.getBoolean(ComparePreferencePage.SHOW_PSEUDO_CONFLICTS);
-
- Control tree= getControl();
- if (!tree.isDisposed()) {
- if (showPseudoConflicts) {
- if (fViewerFilter != null) {
- removeFilter(fViewerFilter);
- }
- } else {
- if (fViewerFilter == null)
- fViewerFilter= new FilterSame();
- addFilter(fViewerFilter);
- }
- }
- }
- */
-
- private final boolean isEditable(Object element, boolean left) {
- if (element instanceof ICompareInput) {
- ICompareInput diff= (ICompareInput) element;
- Object side= left ? diff.getLeft() : diff.getRight();
- if (side == null && diff instanceof IDiffElement) {
- IDiffContainer container= ((IDiffElement)diff).getParent();
- if (container instanceof ICompareInput) {
- ICompareInput parent= (ICompareInput) container;
- side= left ? parent.getLeft() : parent.getRight();
- }
- }
- if (side instanceof IEditableContent)
- return ((IEditableContent) side).isEditable();
- }
- return false;
- }
-
- private void updateActions() {
- int leftToRight= 0;
- int rightToLeft= 0;
- ISelection selection= getSelection();
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ss= (IStructuredSelection) selection;
- Iterator e= ss.iterator();
- while (e.hasNext()) {
- Object element= e.next();
- if (element instanceof ICompareInput) {
- if (isEditable(element, false))
- leftToRight++;
- if (isEditable(element, true))
- rightToLeft++;
- if (leftToRight > 0 && rightToLeft > 0)
- break;
- }
- }
- if (fExpandAllAction != null)
- fExpandAllAction.setEnabled(selection.isEmpty());
- }
- if (fCopyLeftToRightAction != null)
- fCopyLeftToRightAction.setEnabled(leftToRight > 0);
- if (fCopyRightToLeftAction != null)
- fCopyRightToLeftAction.setEnabled(rightToLeft > 0);
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewerResources.properties b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewerResources.properties
deleted file mode 100644
index 9fc63b64b..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewerResources.properties
+++ /dev/null
@@ -1,44 +0,0 @@
-# =====================================
-# (c) Copyright IBM Corp. 2000, 2001.
-# All Rights Reserved.
-# =====================================
-
-# @(#)DiffTreeViewerResources.properties
-#
-# Resource strings for DiffTreeViewer.java
-
-title= Structure Compare
-defaultLabel= <no name>
-
-#####################################################
-# Dummy menu item for empty context menu
-#####################################################
-
-emptyMenuItem= <Empty Menu>
-
-#####################################################
-# Actions
-#####################################################
-
-action.Smart.label=Smart
-action.Smart.tooltip=Try to Guess Similar Elements
-action.Smart.image=smartmode_co.gif
-
-action.ExpandAll.label=Expand All
-action.ExpandAll.tooltip=Expand All Nodes
-
-action.NextDiff.label=Next
-action.NextDiff.tooltip=Select Next Change
-action.NextDiff.image=next_nav.gif
-
-action.PrevDiff.label=Previous
-action.PrevDiff.tooltip=Select Previous Change
-action.PrevDiff.image=prev_nav.gif
-
-action.TakeLeft.label=Copy Left to Right
-action.TakeLeft.tooltip=Copy Selected Nodes from Left to Right
-action.TakeLeft.image=copycont_r_co.gif
-
-action.TakeRight.label=Copy Right to Left
-action.TakeRight.tooltip=Copy Selected Nodes from Right to Left
-action.TakeRight.image=copycont_l_co.gif
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/Differencer.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/Differencer.java
deleted file mode 100644
index e8c8ab369..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/Differencer.java
+++ /dev/null
@@ -1,515 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.structuremergeviewer;
-
-import java.io.*;
-import java.util.*;
-import java.text.MessageFormat;
-
-import org.eclipse.jface.util.Assert;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.internal.Utilities;
-
-
-/**
- * A generic two-way or three-way differencing engine.
- * <p>
- * The engine is used by calling one of the <code>findDifferences</code> methods and passing
- * in the objects to compare.
- * The engine calls the following methods on the input objects to perform the compare:
- * <UL>
- * <LI><code>getChildren</code>: for enumerating the children of an object (if any),
- * <LI><code>contentsEqual</code>: for comparing the content of leaf objects, that is, objects without children,
- * <LI><code>visit</code>: for every pair of compared object the compare result is passed in.
- * </UL>
- * Clients may use as is, or subclass to provide a custom implementation for the three hooks.
- * However the default implementation already deals with the typical case:
- * <UL>
- * <LI><code>getChildren</code>: tries to apply the <code>IStructureComparator</code>
- * interface to enumerate the children,
- * <LI><code>contentsEqual</code>: tries to apply the <code>IStreamContentAccessor</code> interface
- * to perform a byte-wise content comparison,
- * <LI><code>visit</code>: creates a <code>DiffNode</code> for any detected difference between the compared objects and
- * links it under a parent node effectively creating a tree of differences.
- * </UL>
- * The different kind of changes detected by the engine are decoded as follows:
- * In the two-way case only NO_CHANGE, ADDITION, DELETION, and CHANGE are used.
- * In the three-way case these constants are bitwise ORed with one of directional constants
- * LEFT, RIGHT, and CONFLICTING.
- */
-public class Differencer {
-
- // The kind of differences.
- /**
- * Difference constant (value 0) indicating no difference.
- */
- public static final int NO_CHANGE= 0;
- /**
- * Difference constant (value 1) indicating one side was added.
- */
- public static final int ADDITION= 1;
- /**
- * Difference constant (value 2) indicating one side was removed.
- */
- public static final int DELETION= 2;
- /**
- * Difference constant (value 3) indicating side changed.
- */
- public static final int CHANGE= 3;
-
- /**
- * Bit mask (value 3) for extracting the kind of difference.
- */
- public static final int CHANGE_TYPE_MASK= 3;
-
- // The direction of a three-way change.
- /**
- * Three-way change constant (value 4) indicating a change on left side.
- */
- public static final int LEFT= 4;
-
- /**
- * Three-way change constant (value 8) indicating a change on right side.
- */
- public static final int RIGHT= 8;
-
- /**
- * Three-way change constant (value 12) indicating a change on left and
- * right sides.
- */
- public static final int CONFLICTING= 12;
-
- /**
- * Bit mask (value 12) for extracting the direction of a three-way change.
- */
- public static final int DIRECTION_MASK= 12;
-
- /**
- * Constant (value 16) indicating a change on left and
- * right side (with respect to ancestor) but left and right are identical.
- */
- public static final int PSEUDO_CONFLICT= 16;
-
-
- static class Node {
- List fChildren;
- int fCode;
- Object fAncestor;
- Object fLeft;
- Object fRight;
-
- Node() {
- }
- Node(Node parent, Object ancestor, Object left, Object right) {
- parent.add(this);
- fAncestor= ancestor;
- fLeft= left;
- fRight= right;
- }
- void add(Node child) {
- if (fChildren == null)
- fChildren= new ArrayList();
- fChildren.add(child);
- }
- Object visit(Differencer d, Object parent, int level) {
- if (fCode == NO_CHANGE)
- return null;
- //dump(level);
- Object data= d.visit(parent, fCode, fAncestor, fLeft, fRight);
- if (fChildren != null) {
- Iterator i= fChildren.iterator();
- while (i.hasNext()) {
- Node n= (Node) i.next();
- n.visit(d, data, level+1);
- }
- }
- return data;
- }
- private void dump(int level) {
- String name= null;
- if (fAncestor instanceof ITypedElement)
- name= ((ITypedElement)fAncestor).getName();
- if (name == null && fLeft instanceof ITypedElement)
- name= ((ITypedElement)fLeft).getName();
- if (name == null && fRight instanceof ITypedElement)
- name= ((ITypedElement)fRight).getName();
- if (name == null)
- name= "???"; //$NON-NLS-1$
-
- for (int i= 0; i < level; i++)
- System.out.print(" "); //$NON-NLS-1$
-
- System.out.println(getDiffType(fCode) + name);
- }
- private String getDiffType(int code) {
- String dir= " "; //$NON-NLS-1$
- switch (code & DIRECTION_MASK) {
- case LEFT:
- dir= ">"; //$NON-NLS-1$
- break;
- case RIGHT:
- dir= "<"; //$NON-NLS-1$
- break;
- case CONFLICTING:
- dir= "!"; //$NON-NLS-1$
- break;
- }
- String change= "="; //$NON-NLS-1$
- switch (code & CHANGE_TYPE_MASK) {
- case ADDITION:
- change= "+"; //$NON-NLS-1$
- break;
- case DELETION:
- change= "-"; //$NON-NLS-1$
- break;
- case CHANGE:
- change= "#"; //$NON-NLS-1$
- break;
- }
- return dir + change + " "; //$NON-NLS-1$
- }
- }
-
- /**
- * Creates a new differencing engine.
- */
- public Differencer() {
- }
-
- /**
- * Starts the differencing engine on the three input objects. If threeWay is <code>true</code> a
- * three-way comparison is performed, otherwise a two-way compare (in the latter case the ancestor argument is ignored).
- * The progress monitor is passed to the method <code>updateProgress</code> which is called for every node or
- * leaf compare. The method returns the object that was returned from the top-most call to method <code>visit</code>.
- * At most two of the ancestor, left, and right parameters are allowed to be <code>null</code>.
- *
- * @param threeWay if <code>true</code> a three-way comparison is performed, otherwise a two-way compare
- * @param pm a progress monitor which is passed to method <code>updateProgress</code>
- * @param data a client data that is passed to the top-level call to <code>visit</code>
- * @param ancestor the ancestor object of the compare (may be <code>null</code>)
- * @param left the left object of the compare
- * @param right the right object of the compare
- * @return the object returned from the top most call to method <code>visit</code>,
- * possibly <code>null</code>
- */
- public Object findDifferences(boolean threeWay, IProgressMonitor pm, Object data, Object ancestor, Object left, Object right) {
-
- Node root= new Node();
-
- int code= traverse(threeWay, root, pm, threeWay ? ancestor : null, left, right);
-
- if (code != NO_CHANGE) {
- List l= root.fChildren;
- if (l.size() > 0) {
- Node first= (Node)l.get(0);
- return first.visit(this, data, 0);
- }
- }
- return null;
- }
-
- /**
- * Traverse tree in postorder.
- */
- private int traverse(boolean threeWay, Node parent, IProgressMonitor pm, Object ancestor, Object left, Object right) {
-
- Object[] ancestorChildren= getChildren(ancestor);
- Object[] rightChildren= getChildren(right);
- Object[] leftChildren= getChildren(left);
-
- int code= NO_CHANGE;
-
- Node node= new Node(parent, ancestor, left, right);
-
- boolean content= true; // we reset this if we have at least one child
-
- if (((threeWay && ancestorChildren != null) || !threeWay)
- && rightChildren != null && leftChildren != null) {
- // we only recurse down if no leg is null
- // a node
-
- Set allSet= new HashSet(20);
- Map ancestorSet= null;
- Map rightSet= null;
- Map leftSet= null;
-
- if (ancestorChildren != null) {
- ancestorSet= new HashMap(10);
- for (int i= 0; i < ancestorChildren.length; i++) {
- Object ancestorChild= ancestorChildren[i];
- ancestorSet.put(ancestorChild, ancestorChild);
- allSet.add(ancestorChild);
- }
- }
-
- if (rightChildren != null) {
- rightSet= new HashMap(10);
- for (int i= 0; i < rightChildren.length; i++) {
- Object rightChild= rightChildren[i];
- rightSet.put(rightChild, rightChild);
- allSet.add(rightChild);
- }
- }
-
- if (leftChildren != null) {
- leftSet= new HashMap(10);
- for (int i= 0; i < leftChildren.length; i++) {
- Object leftChild= leftChildren[i];
- leftSet.put(leftChild, leftChild);
- allSet.add(leftChild);
- }
- }
-
- Iterator e= allSet.iterator();
- while (e.hasNext()) {
- Object keyChild= e.next();
-
- content= false;
-
- if (pm != null) {
-
- if (pm.isCanceled())
- throw new OperationCanceledException();
-
- updateProgress(pm, keyChild);
- }
-
- Object ancestorChild= ancestorSet != null ? ancestorSet.get(keyChild) : null;
- Object leftChild= leftSet != null ? leftSet.get(keyChild) : null;
- Object rightChild= rightSet != null ? rightSet.get(keyChild) : null;
-
- int c= traverse(threeWay, node, pm, ancestorChild, leftChild, rightChild);
-
- if ((c & CHANGE_TYPE_MASK) != NO_CHANGE) {
- code|= CHANGE; // deletions and additions of child result in a change of the container
- code|= (c & DIRECTION_MASK); // incoming & outgoing are just ored
- }
- }
- }
-
- if (content) // a leaf
- code= compare(threeWay, ancestor, left, right);
-
- node.fCode= code;
-
- return code;
- }
-
- /**
- * Called for every node or leaf comparison.
- * The differencing engine passes in the input objects of the compare and the result of the compare.
- * The data object is the value returned from a call to the <code>visit</code> method on the parent input.
- * It can be considered the "parent" reference and is useful when building a tree.
- * <p>
- * The <code>Differencer</code> implementation returns a new
- * <code>DiffNode</code> which is initialized with the corresponding values.
- * Subclasses may override.
- *
- * @param data object returned from parent call to <code>visit</code>,
- * possibly <code>null</code>
- * @param result the result of the compare operation performed on the three inputs
- * @param ancestor the compare ancestor of the left and right inputs
- * @param left the left input to the compare
- * @param right the right input to the compare
- * @return the result, possibly <code>null</code>
- */
- protected Object visit(Object data, int result, Object ancestor, Object left, Object right) {
- return new DiffNode((IDiffContainer) data, result, (ITypedElement)ancestor, (ITypedElement)left, (ITypedElement)right);
- }
-
- /**
- * Performs a 2-way or 3-way compare of the given leaf elements and returns an integer
- * describing the kind of difference.
- */
- private int compare(boolean threeway, Object ancestor, Object left, Object right) {
-
- int description= NO_CHANGE;
-
- if (threeway) {
- if (ancestor == null) {
- if (left == null) {
- if (right == null) {
- Assert.isTrue(false);
- // shouldn't happen
- } else {
- description= RIGHT | ADDITION;
- }
- } else {
- if (right == null) {
- description= LEFT | ADDITION;
- } else {
- description= CONFLICTING | ADDITION;
- if (contentsEqual(left, right))
- description|= PSEUDO_CONFLICT;
- }
- }
- } else {
- if (left == null) {
- if (right == null) {
- description= CONFLICTING | DELETION | PSEUDO_CONFLICT;
- } else {
- if (contentsEqual(ancestor, right))
- description= LEFT | DELETION;
- else
- description= CONFLICTING | CHANGE;
- }
- } else {
- if (right == null) {
- if (contentsEqual(ancestor, left))
- description= RIGHT | DELETION;
- else
- description= CONFLICTING | CHANGE;
- } else {
- boolean ay= contentsEqual(ancestor, left);
- boolean am= contentsEqual(ancestor, right);
-
- if (ay && am)
- ;
- else if (ay && !am) {
- description= RIGHT | CHANGE;
- } else if (!ay && am) {
- description= LEFT | CHANGE;
- } else {
- description= CONFLICTING | CHANGE;
- if (contentsEqual(left, right))
- description|= PSEUDO_CONFLICT;
- }
- }
- }
- }
- } else { // two way compare ignores ancestor
- if (left == null) {
- if (right == null) {
- Assert.isTrue(false);
- // shouldn't happen
- } else {
- description= ADDITION;
- }
- } else {
- if (right == null) {
- description= DELETION;
- } else {
- if (! contentsEqual(left, right))
- description= CHANGE;
- }
- }
- }
-
- return description;
- }
-
- /**
- * Performs a content compare on the two given inputs.
- * <p>
- * The <code>Differencer</code> implementation
- * returns <code>true</code> if both inputs implement <code>IStreamContentAccessor</code>
- * and their byte contents is identical. Subclasses may override to implement
- * a different content compare on the given inputs.
- * </p>
- *
- * @param input1 first input to contents compare
- * @param input2 second input to contents compare
- * @return <code>true</code> if content is equal
- */
- protected boolean contentsEqual(Object input1, Object input2) {
-
- if (input1 == input2)
- return true;
-
- InputStream is1= getStream(input1);
- InputStream is2= getStream(input2);
-
- if (is1 == null && is2 == null) // no byte contents
- return true;
-
- try {
- if (is1 == null || is2 == null) // only one has contents
- return false;
-
- while (true) {
- int c1= is1.read();
- int c2= is2.read();
- if (c1 == -1 && c2 == -1)
- return true;
- if (c1 != c2)
- break;
-
- }
- } catch (IOException ex) {
- } finally {
- if (is1 != null) {
- try {
- is1.close();
- } catch(IOException ex) {
- }
- }
- if (is2 != null) {
- try {
- is2.close();
- } catch(IOException ex) {
- }
- }
- }
- return false;
- }
-
- /**
- * Tries to return an InputStream for the given object.
- * Returns <code>null</code> if the object not an IStreamContentAccessor
- * or an error occured.
- */
- private InputStream getStream(Object o) {
- if (o instanceof IStreamContentAccessor) {
- try {
- return ((IStreamContentAccessor)o).getContents();
- } catch(CoreException ex) {
- }
- }
- return null;
- }
-
- /**
- * Returns the children of the given input or <code>null</code> if there are no children.
- * <p>
- * The <code>Differencer</code> implementation checks whether the input
- * implements the <code>IStructureComparator</code> interface. If yes it is used
- * to return an array containing all children. Otherwise <code>null</code> is returned.
- * Subclasses may override to implement a different strategy to enumerate children.
- * </p>
- *
- * @param input the object for which to return children
- */
- protected Object[] getChildren(Object input) {
- if (input instanceof IStructureComparator)
- return ((IStructureComparator)input).getChildren();
- return null;
- }
-
- /**
- * Called for every leaf or node compare to update progress information.
- * <p>
- * The <code>Differencer</code> implementation shows the name of the input object
- * as a subtask. Subclasses may override.
- * </p>
- *
- * @param progressMonitor the progress monitor for reporting progress
- * @name input a non-<code>null</code> input object
- */
- protected void updateProgress(IProgressMonitor progressMonitor, Object node) {
- if (node instanceof ITypedElement) {
- String name= ((ITypedElement)node).getName();
- String fmt= Utilities.getString("Differencer.progressFormat"); //$NON-NLS-1$
- String msg= MessageFormat.format(fmt, new String[] { name });
- progressMonitor.subTask(msg);
- //progressMonitor.worked(1);
- }
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DocumentRangeNode.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DocumentRangeNode.java
deleted file mode 100644
index 57073008b..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DocumentRangeNode.java
+++ /dev/null
@@ -1,354 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.structuremergeviewer;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.jface.text.*;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.compare.*;
-import org.eclipse.compare.internal.Utilities;
-import org.eclipse.compare.contentmergeviewer.*;
-import org.eclipse.compare.contentmergeviewer.IDocumentRange;
-import org.eclipse.compare.contentmergeviewer.TextMergeViewer;
-
-
-/**
- * A document range node represents a structural element
- * when performing a structure compare of documents.
- * <code>DocumentRangeNodes</code> are created while parsing the document and represent
- * a semantic entity (e.g. a Java class or method).
- * As a consequence of the parsing a <code>DocumentRangeNode</code> maps to a range
- * of characters in the document.
- * <p>
- * Since a <code>DocumentRangeNode</code> implements the <code>IStructureComparator</code>
- * and <code>IStreamContentAccessor</code> interfaces it can be used as input to the
- * differencing engine. This makes it possible to perform
- * a structural diff on a document and have the nodes and leaves of the compare easily map
- * to character ranges within the document.
- * <p>
- * Subclasses may add additional state collected while parsing the document.
- * </p>
- * @see Differencer
- */
-public class DocumentRangeNode
- implements IDocumentRange, IStructureComparator, IEditableContent, IStreamContentAccessor {
-
- private static final boolean POS_UPDATE= true;
-
- private IDocument fBaseDocument;
- private Position fRange; // the range in the base document
- private int fTypeCode;
- private String fID;
- private Position fAppendPosition; // a position where to insert a child textually
- private ArrayList fChildren;
-
- /**
- * Creates a new <code>DocumentRangeNode</code> for the given range within the specified
- * document. The <code>typeCode</code> is uninterpreted client data. The ID is used when comparing
- * two nodes with each other: i.e. the differencing engine performs a content compare
- * on two nodes if their IDs are equal.
- *
- * @param typeCode a type code for this node
- * @param id an identifier for this node
- * @param document document on which this node is based on
- * @param start start position of range within document
- * @param length length of range
- */
- public DocumentRangeNode(int typeCode, String id, IDocument document, int start, int length) {
-
- fTypeCode= typeCode;
- fID= id;
-
- fBaseDocument= document;
- fBaseDocument.addPositionCategory(RANGE_CATEGORY);
- fRange= new Position(start, length);
-
- if (POS_UPDATE) {
- try {
- document.addPosition(RANGE_CATEGORY, fRange);
- } catch (BadPositionCategoryException ex) {
- } catch (BadLocationException ex) {
- }
- }
- }
-
- /* (non Javadoc)
- * see IDocumentRange.getDocument
- */
- public IDocument getDocument() {
- return fBaseDocument;
- }
-
- /* (non Javadoc)
- * see IDocumentRange.getRange
- */
- public Position getRange() {
- return fRange;
- }
-
- /**
- * Returns the type code of this node.
- * The type code is uninterpreted client data which can be set in the constructor.
- *
- * @return the type code of this node
- */
- public int getTypeCode() {
- return fTypeCode;
- }
-
- /**
- * Returns this node's id.
- * It is used in <code>equals</code> and <code>hashcode</code>.
- *
- * @return the node's id
- */
- public String getId() {
- return fID;
- }
-
- /**
- * Sets this node's id.
- * It is used in <code>equals</code> and <code>hashcode</code>.
- *
- * @param id the new id for this node
- */
- public void setId(String id) {
- fID= id;
- }
-
- /**
- * Adds the given node as a child.
- *
- * @param node the node to add as a child
- */
- public void addChild(DocumentRangeNode node) {
- if (fChildren == null)
- fChildren= new ArrayList();
- fChildren.add(node);
- }
-
- /* (non Javadoc)
- * see IStructureComparator.getChildren
- */
- public Object[] getChildren() {
- if (fChildren != null)
- return fChildren.toArray();
- return new Object[0];
- }
-
- /**
- * Sets the length of the range of this node.
- *
- * @param length the length of the range
- */
- public void setLength(int length) {
- getRange().setLength(length);
- }
-
- /**
- * Sets a position within the document range that can be used to (legally) insert
- * text without breaking the syntax of the document.
- * <p>
- * E.g. when parsing a Java document the "append position" of a <code>DocumentRangeNode</code>
- * representating a Java class could be the character position just before the closing bracket.
- * Inserting the text of a new method there would not disturb the syntax of the class.
- *
- * @param pos the character position within the underlying document where text can be legally inserted
- */
- public void setAppendPosition(int pos) {
- if (POS_UPDATE) {
- fBaseDocument.removePosition(fAppendPosition);
- try {
- Position p= new Position(pos);
- fBaseDocument.addPosition(RANGE_CATEGORY, p);
- fAppendPosition= p;
- } catch (BadPositionCategoryException ex) {
- } catch (BadLocationException ex) {
- // ignore
- }
- } else {
- fAppendPosition= new Position(pos);
- }
- }
-
- /**
- * Returns the position that has been set with <code>setAppendPosition</code>.
- * If <code>setAppendPosition</code> hasn't been called, the position after the last character
- * of this range is returned.
- *
- * @return a position where text can be legally inserted
- */
- public Position getAppendPosition() {
- if (fAppendPosition == null) {
- if (POS_UPDATE) {
- try {
- Position p= new Position(fBaseDocument.getLength());
- fBaseDocument.addPosition(RANGE_CATEGORY, p);
- fAppendPosition= p;
- } catch (BadPositionCategoryException ex) {
- } catch (BadLocationException ex) {
- // ignore
- }
- } else {
- fAppendPosition= new Position(fBaseDocument.getLength());
- }
- }
- return fAppendPosition;
- }
-
- /**
- * Implementation based on <code>getID</code>.
- */
- public boolean equals(Object other) {
- if (other != null && other.getClass() == getClass()) {
- DocumentRangeNode tn= (DocumentRangeNode) other;
- return fTypeCode == tn.fTypeCode && fID.equals(tn.fID);
- }
- return super.equals(other);
- }
-
- /**
- * Implementation based on <code>getID</code>.
- */
- public int hashCode() {
- return fID.hashCode();
- }
-
- /**
- * Find corresponding position
- */
- private Position findCorrespondingPosition(DocumentRangeNode otherParent, DocumentRangeNode child) {
-
- // we try to find a predecessor of left Node which exists on the right side
-
- if (child != null && fChildren != null) {
- int ix= otherParent.fChildren.indexOf(child);
- if (ix >= 0) {
-
- for (int i= ix - 1; i >= 0; i--) {
- DocumentRangeNode c1= (DocumentRangeNode) otherParent.fChildren.get(i);
- int i2= fChildren.indexOf(c1);
- if (i2 >= 0) {
- DocumentRangeNode c= (DocumentRangeNode) fChildren.get(i2);
- //System.out.println(" found corresponding: " + i2 + " " + c);
- Position p= c.fRange;
-
- //try {
- Position po= new Position(p.getOffset() + p.getLength() + 1, 0);
- //c.fBaseDocument.addPosition(RANGE_CATEGORY, po);
- return po;
- //} catch (BadLocationException ex) {
- //}
- //break;
- }
- }
-
- for (int i= ix; i < otherParent.fChildren.size(); i++) {
- DocumentRangeNode c1= (DocumentRangeNode) otherParent.fChildren.get(i);
- int i2= fChildren.indexOf(c1);
- if (i2 >= 0) {
- DocumentRangeNode c= (DocumentRangeNode) fChildren.get(i2);
- //System.out.println(" found corresponding: " + i2 + " " + c);
- Position p= c.fRange;
- //try {
- Position po= new Position(p.getOffset(), 0);
- //c.fBaseDocument.addPosition(RANGE_CATEGORY, po);
- return po;
- //} catch (BadLocationException ex) {
- //}
- //break;
- }
- }
-
- }
- }
- return getAppendPosition();
- }
-
- private void add(String s, DocumentRangeNode parent, DocumentRangeNode child) {
-
- Position p= findCorrespondingPosition(parent, child);
- if (p != null) {
- try {
- fBaseDocument.replace(p.getOffset(), p.getLength(), s);
- } catch (BadLocationException ex) {
- // ignore
- }
- }
- }
-
- /* (non Javadoc)
- * see IStreamContentAccessor.getContents
- */
- public InputStream getContents() {
- String s;
- try {
- s= fBaseDocument.get(fRange.getOffset(), fRange.getLength());
- } catch (BadLocationException ex) {
- s= ""; //$NON-NLS-1$
- }
- return new ByteArrayInputStream(s.getBytes());
- }
-
- /* (non Javadoc)
- * see IEditableContent.isEditable
- */
- public boolean isEditable() {
- return true;
- }
-
- /* (non Javadoc)
- * see IEditableContent.replace
- */
- public ITypedElement replace(ITypedElement child, ITypedElement other) {
-
- DocumentRangeNode src= null;
- String srcContents= ""; //$NON-NLS-1$
-
- if (other != null) {
- src= (DocumentRangeNode) child;
-
- if (other instanceof IStreamContentAccessor) {
- try {
- InputStream is= ((IStreamContentAccessor)other).getContents();
- byte[] bytes= Utilities.readBytes(is);
- srcContents= new String(bytes);
- } catch(CoreException ex) {
- }
- }
- }
-
- if (child != null) { // there is a destination
-
-// if (child instanceof DocumentRangeNode) {
-// DocumentRangeNode drn= (DocumentRangeNode) child;
-//
-// IDocument doc= drn.getDocument();
-// Position range= drn.getRange();
-// try {
-// doc.replace(range.getOffset(), range.getLength(), srcContents);
-// } catch (BadLocationException ex) {
-// }
-// }
- } else {
- // no destination: we have to add the contents into the parent
- add(srcContents, null /*srcParentNode*/, src);
- }
- return child;
- }
-
- /* (non Javadoc)
- * see IEditableContent.setContent
- */
- public void setContent(byte[] content) {
-// fBaseDocument.set(new String(content));
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/ICompareInput.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/ICompareInput.java
deleted file mode 100644
index badc21666..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/ICompareInput.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.structuremergeviewer;
-
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Interface for objects used as input to a two-way or three-way compare viewer.
- * It defines API for accessing the three sides for the compare,
- * and a name and image which is used when displaying the three way input
- * in the UI, for example, in a title bar.
- * <p>
- * Note: at most two sides of an <code>ICompareInput</code> can be <code>null</code>,
- * (as it is normal for additions or deletions) but not all three.
- * <p>
- * <code>ICompareInput</code> provides methods for registering
- * <code>ICompareInputChangeListener</code>s
- * that get informed if one (or more)
- * of the three sides of an <code>ICompareInput</code> object changes its value.
- * <p>
- * For example when accepting an incoming addition
- * the (non-<code>null</code>) left side of an <code>ICompareInput</code>
- * is copied to the right side by means of method <code>copy</code>.
- * This should trigger a call to <code>compareInputChanged</code> of registered
- * <code>ICompareInputChangeListener</code>s.
- * <p>
- * Clients can implement this interface, or use the convenience implementation
- * <code>DiffNode</code>.
- * </p>
- *
- * @see StructureDiffViewer
- * @see org.eclipse.compare.contentmergeviewer.ContentMergeViewer
- * @see DiffNode
- */
-public interface ICompareInput {
-
- /**
- * Returns name of input.
- * This name is displayed when this input is shown in a viewer.
- * In many cases this name is the name of one of the non-<code>null</code> sides or a combination
- * thereof.
- *
- * @return name of input
- */
- String getName();
-
- /**
- * Returns an image representing this input.
- * This image is typically displayed when this input is shown in a viewer.
- * In many cases this image is the image of one of the non-<code>null</code> sides.
- *
- * @return image representing this input, or <code>null</code> if no icon should be shown
- */
- Image getImage();
-
- /**
- * Returns the kind of difference between the
- * three sides ancestor, left and right.
- * This field is only meaningful if the <code>ICompareInput</code>
- * is the result of another compare. In this case it is used
- * together with <code>getImage</code> to compose a icon
- * which reflects the kind of difference between the two or three elements.
- *
- * @return kind of difference (see <code>Differencer</code>)
- */
- int getKind();
-
- /**
- * Returns the ancestor side of this input.
- * Returns <code>null</code> if this input has no ancestor
- * or in the two-way compare case.
- *
- * @return the ancestor of this input, or <code>null</code>
- */
- ITypedElement getAncestor();
-
- /**
- * Returns the left side of this input.
- * Returns <code>null</code> if there is no left side (deletion or addition).
- *
- * @return the left side of this input, or <code>null</code>
- */
- ITypedElement getLeft();
-
- /**
- * Returns the right side of this input.
- * Returns <code>null</code> if there is no right side (deletion or addition).
- *
- * @return the right side of this input, or <code>null</code>
- */
- ITypedElement getRight();
-
- /**
- * Registers the given listener for notification.
- * If the identical listener is already registered the method has no effect.
- *
- * @param listener the listener to register for changes of this input
- */
- void addCompareInputChangeListener(ICompareInputChangeListener listener);
-
- /**
- * Unregisters the given listener.
- * If the identical listener is not registered the method has no effect.
- *
- * @param listener the listener to unregister
- */
- void removeCompareInputChangeListener(ICompareInputChangeListener listener);
-
- /**
- * Copy one side (source) to the other side (destination) depending on the
- * value of <code>leftToRight</code>. This method is called from
- * a merge viewer if a corresponding action ("take left" or "take right")
- * has been pressed.
- * <p>
- * The implementation should handle the following cases:
- * <UL>
- * <LI>
- * if the source side is <code>null</code> the destination must be deleted,
- * <LI>
- * if the destination is <code>null</code> the destination must be created
- * and filled with the contents from the source,
- * <LI>
- * if both sides are non-<code>null</code> the contents of source must be copied to destination.
- * </UL>
- * In addition the implementation should send out notification to the registered
- * <code>ICompareInputChangeListener</code>.
- *
- * @param leftToRight if <code>true</code> the left side is copied to the right side.
- * If <code>false</code> the right side is copied to the left side
- */
- void copy(boolean leftToRight);
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/ICompareInputChangeListener.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/ICompareInputChangeListener.java
deleted file mode 100644
index ba8d967b9..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/ICompareInputChangeListener.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.structuremergeviewer;
-
-/**
- * Listener that gets informed if one (or more)
- * of the three sides of an <code>ICompareInput</code> object changes its value.
- * <p>
- * For example when accepting an incoming addition
- * the (non-null) left side of an <code>ICompareInput</code>
- * is copied to the right side (which was <code>null</code>).
- * This triggers a call to <code>compareInputChanged</code> of registered
- * <code>ICompareInputChangeListener</code>.
- * <p>
- * Note however, that listener are not informed if the content of one of the sides changes.
- * <p>
- * Clients may implement this interface. It is also implemented by viewers that take
- * an <code>ICompareInput</code> as input.
- * </p>
- */
-public interface ICompareInputChangeListener {
-
- /**
- * Called whenever the value (not the content) of one or more of the three sides
- * of a <code>ICompareInput</code> has changed.
- *
- * @param source the <code>ICompareInput</code> that has changed
- */
- void compareInputChanged(ICompareInput source);
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IDiffContainer.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IDiffContainer.java
deleted file mode 100644
index c87f30c5d..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IDiffContainer.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.structuremergeviewer;
-
-import java.util.Iterator;
-
-/**
- * <code>IDiffContainer</code> is a <code>IDiffElement</code> with children.
- * <p>
- * <code>IDiffContainer</code> are the inner nodes displayed
- * by the <code>DiffTreeViewer</code>.
- * <code>IDiffContainer</code> are typically created as the result of performing
- * a compare with the <code>Differencer</code>.
- * <p>
- * Clients may implement this interface, or use one of the standard implementations,
- * <code>DiffContainer</code> or <code>DiffNode</code>.
- *
- * @see Differencer
- * @see DiffTreeViewer
- */
-public interface IDiffContainer extends IDiffElement {
-
- /**
- * Returns whether this container has at least one child.
- * In some cases this methods avoids having to call the
- * potential more costly <code>getChildren</code> method.
- *
- * @return <code>true</code> if this container has at least one child
- */
- boolean hasChildren();
-
- /**
- * Returns the children of this container.
- * If this container has no children an empty array is returned (not <code>null</code>).
- *
- * @return the children of this container as an array
- */
- IDiffElement[] getChildren();
-
- /**
- * Adds the given child to this container.
- * If the child is already contained in this container, this method has no effect.
- *
- * @param child the child to be added to this container
- */
- void add(IDiffElement child);
-
- /**
- * Removes the given child from this container.
- * If the container becomes empty it is removed from its container.
- * If the child is not contained in this container, this method has no effect.
- *
- * @param child the child to be removed from this container
- */
- void removeToRoot(IDiffElement child);
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IDiffElement.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IDiffElement.java
deleted file mode 100644
index 32e858ab3..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IDiffElement.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.structuremergeviewer;
-
-import org.eclipse.compare.ITypedElement;
-
-/**
- * An <code>IDiffElement</code> is used in the <code>DiffTreeViewer</code>
- * to display the kind of change detected as the result of a two-way or three-way compare.
- * <p>
- * The base interface <code>ITypedElement</code> provides a name, a type, and an image.
- * <code>IDiffElement</code> adds API for maintaining a parent relationship.
- * <p>
- * <code>DiffTreeViewer</code> works on a tree of <code>IDiffElements</code>.
- * Leaf elements must implement the
- * <code>IDiffElement</code> interface, inner nodes the <code>IDiffContainer</code> interface.
- * <p>
- * <code>IDiffElement</code>s are typically created as the result of performing
- * a compare with the <code>Differencer</code>.
- * <p>
- * Clients may implement this interface, or use one of the standard implementations,
- * <code>DiffElement</code>, <code>DiffContainer</code>, or <code>DiffNode</code>.
- *
- * @see DiffTreeViewer
- * @see DiffElement
- * @see DiffContainer
- * @see DiffNode
- */
-public interface IDiffElement extends ITypedElement {
-
- /**
- * Returns the kind of difference as defined in <code>Differencer</code>.
- *
- * @return the kind of difference as defined in <code>Differencer</code>
- */
- int getKind();
-
- /**
- * Returns the parent of this element.
- * If the object is the root of a hierarchy <code>null</code> is returned.
- *
- * @return the parent of this element, or <code>null</code> if the element has no parent
- */
- IDiffContainer getParent();
-
- /**
- * Sets the parent of this element.
- *
- * @param parent the new parent of this element, or <code>null</code> if this
- * element is to have no parent
- */
- void setParent(IDiffContainer parent);
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IStructureComparator.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IStructureComparator.java
deleted file mode 100644
index 68626539f..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IStructureComparator.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.structuremergeviewer;
-
-import java.util.Iterator;
-
-import org.eclipse.compare.ITypedElement;
-
-/**
- * Interface used to compare hierarchical structures.
- * It is used by the differencing engine.
- * <p>
- * Clients typically implement this interface in an adaptor class which
- * wrappers the objects to be compared.
- *
- * @see org.eclipse.compare.ResourceNode
- * @see Differencer
- */
-public interface IStructureComparator {
-
- /**
- * Returns an iterator for all children of this object or <code>null</code>
- * if there are no children.
- *
- * @return an array with all children of this object, or an empty array if there are no children
- */
- Object[] getChildren();
-
- /**
- * Returns whether some other object is "equal to" this one
- * with respect to a structural comparison. For example, when comparing
- * Java class methods, <code>equals</code> would return <code>true</code>
- * if two methods have the same signature (the argument names and the
- * method body might differ).
- *
- * @param other the reference object with which to compare
- * @return <code>true</code> if this object is the same as the other argument; <code>false</code> otherwise
- * @see java.lang.Object#equals
- */
- boolean equals(Object other);
-}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IStructureCreator.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IStructureCreator.java
deleted file mode 100644
index d3e9f3c7f..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IStructureCreator.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.structuremergeviewer;
-
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.jface.text.IDocument;
-
-/**
- * For creating a hierarchical structure of <code>IStructureComparators</code> for a
- * given input object.
- * In addition, it provides methods for locating a path in the hierarchical structure
- * and to map a node of this structure back to the corresponding input object.
- * <p>
- * Structure creators are used in the following contexts:
- * <ul>
- * <li>
- * the <code>StructureDiffViewer</code> uses an <code>IStructureCreator</code> to
- * build two (or three) tree structures of its input elements (method <code>getStructure</code>).
- * These trees are then compared with each other by means of the differencing engine and displayed
- * with the <code>DiffTreeViewer</code>,
- * </li>
- * <li>
- * the <code>ReplaceWithEditionDialog</code> uses an <code>IStructureCreator</code>
- * to map a path back to a range of characters in the textual representation.
- * </li>
- * </ul>
- * A <code>IStructureCreator</code> provides methods for rewriting the tree produced by the differencing
- * engine to support "smart" structural differencing. E.g. certain patterns of pairs of "addition"
- * and "deletion" nodes can be detected as renames and merged into a single node.
- * </p>
- * <p>
- * Clients may implement this interface; there is no standard implementation.
- * </p>
- *
- * @see StructureDiffViewer
- * @see org.eclipse.compare.EditionSelectionDialog
- * @see Differencer
- */
-public interface IStructureCreator {
-
- /**
- * Returns a descriptive name which can be used in the UI of the <code>StructureDiffViewer</code>.
- *
- * @return a descriptive name for this <code>IStructureCreator</code>
- */
- String getName();
-
- /**
- * Creates a tree structure consisting of <code>IStructureComparator</code>s
- * from the given object and returns its root object.
- * Implementing this method typically involves parsing the input object.
- * In case of an error (e.g. a parsing error) the value <code>null</code> is returned.
- *
- * @param input the object from which to create the tree of <code>IStructureComparator</code>
- * @return the root node of the structure or <code>null</code> in case of error
- */
- IStructureComparator getStructure(Object input);
-
- /**
- * Creates the single node specified by path from the given input object.
- * In case of an error (e.g. a parsing error) the value <code>null</code> is returned.
- * This method is similar to <code>getStructure</code> but in
- * contrast to <code>getStructure</code> only a single node without any children must be returned.
- * This method is used in the <code>ReplaceWithEditionDialog</code> to locate a sub element
- * (e.g. a method) within an input object (e.g. a file containing source code).
- * <p>
- * One (not optimized) approach to implement this method is calling <code>getStructure(input)</code>
- * to build the full tree, and then finding that node within the tree that is specified
- * by <code>path</code>.
- * <p>
- * The syntax of <code>path</code> is not specified, because it is treated by the compare subsystem
- * as an opaque entity and is not further interpreted. Clients using this functionality
- * will pass a value of <code>path</code> to the <code>selectEdition</code>
- * method of <code>ReplaceWithEditionDialog</code> and will receive this value unchanged
- * as an argument to <code>locate</code>.
- *
- * @param path specifies a sub object within the input object
- * @param input the object from which to create the <code>IStructureComparator</code>
- * @return the single node specified by <code>path</code> or <code>null</code>
- *
- * @see org.eclipse.compare.EditionSelectionDialog#selectEdition
- */
- IStructureComparator locate(Object path, Object input);
-
- /**
- * Returns the contents of the given node as a string for the purpose
- * of performing a content comparison only (that is the string will not be visible in the UI).
- * If <code>ignoreWhitespace</code> is <code>true</code> all character sequences considered
- * whitespace should be removed from the returned string.
- *
- * @param node the node for which to return a string representation
- * @param ignoreWhitespace if <code>true</code> the returned string should not contain whitespace
- * @return the string contents of the given node
- */
- String getContents(Object node, boolean ignoreWhitespace);
-
- /**
- * FIXME: need better name?
- * Called whenever a copy operation has been performed on a tree node.
- *
- * @param node the node for which to save the new content
- * @param input the object from which the structure tree was created in <code>getStructure</code>
- */
- void save(IStructureComparator node, Object input);
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java
deleted file mode 100644
index 7a766746d..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java
+++ /dev/null
@@ -1,354 +0,0 @@
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-package org.eclipse.compare.structuremergeviewer;
-
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.widgets.*;
-
-import org.eclipse.jface.util.PropertyChangeEvent;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.internal.*;
-
-
-/**
- * A diff tree viewer that can be configured with a <code>IStructureCreator</code>
- * to retrieve a hierarchical structure from the input object (an <code>ICompareInput</code>)
- * and perform a two-way or three-way compare on it.
- * <p>
- * This <code>DiffTreeViewer</code> supports the so called "smart" mode of the structure creator
- * by installing a button in the viewer's pane title bar.
- * <p>
- * This class may be instantiated; it is not intended to be subclassed outside
- * this package.
- * </p>
- *
- * @see IStructureCreator
- * @see ICompareInput
- */
-public class StructureDiffViewer extends DiffTreeViewer {
-
- private Differencer fDifferencer;
- private boolean fThreeWay= false;
-
- private ITypedElement fAncestorInput;
- private ITypedElement fLeftInput;
- private ITypedElement fRightInput;
-
- private IStructureComparator fAncestorStructure;
- private IStructureComparator fLeftStructure;
- private IStructureComparator fRightStructure;
-
- private IStructureCreator fStructureCreator;
- private IDiffContainer fRoot;
- private IContentChangeListener fContentChangedListener;
- private ICompareInputChangeListener fThreeWayInputChangedListener;
- private CompareViewerSwitchingPane fParent;
-
- /**
- * Creates a new viewer for the given SWT tree control with the specified configuration.
- *
- * @param tree the tree control
- * @param configuration the configuration for this viewer
- */
- public StructureDiffViewer(Tree tree, CompareConfiguration configuration) {
- super(tree, configuration);
- Composite c= tree.getParent();
- if (c instanceof CompareViewerSwitchingPane)
- fParent= (CompareViewerSwitchingPane) c;
- initialize();
- }
-
- /**
- * Creates a new viewer under the given SWT parent with the specified configuration.
- *
- * @param parent the SWT control under which to create the viewer
- * @param configuration the configuration for this viewer
- */
- public StructureDiffViewer(Composite parent, CompareConfiguration configuration) {
- super(parent, configuration);
- if (parent instanceof CompareViewerSwitchingPane)
- fParent= (CompareViewerSwitchingPane) parent;
- initialize();
- }
-
- private void initialize() {
-
- setAutoExpandLevel(3);
-
- fContentChangedListener= new IContentChangeListener() {
- public void contentChanged(IContentChangeNotifier changed) {
- StructureDiffViewer.this.contentChanged(changed);
- }
- };
- fThreeWayInputChangedListener= new ICompareInputChangeListener() {
- public void compareInputChanged(ICompareInput input) {
- StructureDiffViewer.this.compareInputChanged(input);
- }
- };
- }
-
- /**
- * Configures the <code>StructureDiffViewer</code> with a structure creator.
- * The structure creator is used to create a hierarchical structure
- * for each side of the viewer's input element of type <code>ICompareInput</code>.
- * <p>
- * If the structure creator's <code>canRewriteTree</code> returns <code>true</code>
- * the "smart" button in the viewer's pane control bar is enabled.
- *
- * @param structureCreator the new structure creator
- */
- public void setStructureCreator(IStructureCreator structureCreator) {
- if (fStructureCreator != structureCreator) {
- fStructureCreator= structureCreator;
- Control tree= getControl();
- if (tree != null && !tree.isDisposed())
- tree.setData(CompareUI.COMPARE_VIEWER_TITLE, getTitle());
- }
- }
-
- /**
- * Returns the structure creator or <code>null</code> if no
- * structure creator has been set with <code>setStructureCreator</code>.
- *
- * @return the structure creator or <code>null</code>
- */
- public IStructureCreator getStructureCreator() {
- return fStructureCreator;
- }
-
- /**
- * Reimplemented to get the descriptive title for this viewer from the <code>IStructureCreator</code>.
- */
- public String getTitle() {
- if (fStructureCreator != null)
- return fStructureCreator.getName();
- return super.getTitle();
- }
-
- /**
- * Overridden because the input of this viewer is not identical to the root of the tree.
- * The tree's root is a IDiffContainer that was returned from the method <code>diff</code>.
- *
- * @return the root of the diff tree produced by method <code>diff</code>
- */
- protected Object getRoot() {
- return fRoot;
- }
-
- /**
- * Overridden to create the comparable structures from the input object
- * and to feed them through the differencing engine. Note: for this viewer
- * the value from <code>getInput</code> is not identical to <code>getRoot</code>.
- */
- protected void inputChanged(Object input, Object oldInput) {
- if (input instanceof ICompareInput) {
- compareInputChanged((ICompareInput) input);
- if (input != oldInput)
- initialSelection();
- }
- }
-
- protected void initialSelection() {
- expandToLevel(2);
- }
-
- /* (non Javadoc)
- * Overridden to unregister all listeners.
- */
- protected void handleDispose(DisposeEvent event) {
-
- compareInputChanged(null);
-
- fContentChangedListener= null;
- fThreeWayInputChangedListener= null;
-
- super.handleDispose(event);
- }
-
- /**
- * Recreates the comparable structures for the input sides.
- */
- protected void compareInputChanged(ICompareInput input) {
- ITypedElement t= null;
- boolean changed= false;
-
- if (input != null)
- t= input.getAncestor();
-
- fThreeWay= (t != null);
-
- if (t != fAncestorInput) {
- if (fAncestorInput instanceof IContentChangeNotifier)
- ((IContentChangeNotifier)fAncestorInput).removeContentChangeListener(fContentChangedListener);
- fAncestorInput= t;
- if (fAncestorInput != null) {
- fAncestorStructure= fStructureCreator.getStructure(fAncestorInput);
- changed= true;
- } else
- fAncestorStructure= null;
- if (fAncestorInput instanceof IContentChangeNotifier)
- ((IContentChangeNotifier)fAncestorInput).addContentChangeListener(fContentChangedListener);
- }
-
- if (input != null)
- t= input.getLeft();
- if (t != fLeftInput) {
- if (fLeftInput instanceof IContentChangeNotifier)
- ((IContentChangeNotifier)fLeftInput).removeContentChangeListener(fContentChangedListener);
- fLeftInput= t;
- if (fLeftInput != null) {
- fLeftStructure= fStructureCreator.getStructure(fLeftInput);
- changed= true;
- } else
- fLeftStructure= null;
- if (fLeftInput instanceof IContentChangeNotifier)
- ((IContentChangeNotifier)fLeftInput).addContentChangeListener(fContentChangedListener);
- }
-
- if (input != null)
- t= input.getRight();
- if (t != fRightInput) {
- if (fRightInput instanceof IContentChangeNotifier)
- ((IContentChangeNotifier)fRightInput).removeContentChangeListener(fContentChangedListener);
- fRightInput= t;
- if (fRightInput != null) {
- fRightStructure= fStructureCreator.getStructure(fRightInput);
- changed= true;
- } else
- fRightStructure= null;
- if (fRightInput instanceof IContentChangeNotifier)
- ((IContentChangeNotifier)fRightInput).addContentChangeListener(fContentChangedListener);
- }
-
- if (changed)
- diff();
- }
-
- /**
- * Calls <code>diff</code> whenever the byte contents changes.
- */
- protected void contentChanged(IContentChangeNotifier changed) {
-
- if (fStructureCreator == null)
- return;
-
- if (changed != null) {
- if (changed == fAncestorInput) {
- fAncestorStructure= fStructureCreator.getStructure(fAncestorInput);
- } else if (changed == fLeftInput) {
- fLeftStructure= fStructureCreator.getStructure(fLeftInput);
- } else if (changed == fRightInput) {
- fRightStructure= fStructureCreator.getStructure(fRightInput);
- } else
- return;
- } else {
- fAncestorStructure= fStructureCreator.getStructure(fAncestorInput);
- fLeftStructure= fStructureCreator.getStructure(fLeftInput);
- fRightStructure= fStructureCreator.getStructure(fRightInput);
- }
-
- diff();
- }
-
- protected void preDiffHook(IStructureComparator ancestor, IStructureComparator left, IStructureComparator right) {
- // we do nothing here
- }
-
- /**
- * Runs the difference engine and refreshes the tree.
- */
- protected void diff() {
-
- preDiffHook(fAncestorStructure, fLeftStructure, fRightStructure);
-
- String message= null;
-
- if ((fThreeWay && fAncestorStructure == null) || fLeftStructure == null || fRightStructure == null) {
- // could not get structure of one (or more) of the legs
- fRoot= null;
- message= CompareMessages.getString("StructureDiffViewer.StructureError"); //$NON-NLS-1$
-
- } else { // calculate difference of the two (or three) structures
-
- if (fDifferencer == null)
- fDifferencer= new Differencer() {
- protected boolean contentsEqual(Object o1, Object o2) {
- return StructureDiffViewer.this.contentsEqual(o1, o2);
- }
- protected Object visit(Object data, int result, Object ancestor, Object left, Object right) {
- Object o= super.visit(data, result, ancestor, left, right);
- if (fLeftIsLocal && o instanceof DiffNode)
- ((DiffNode)o).swapSides(fLeftIsLocal);
- return o;
- }
- };
-
- fRoot= (IDiffContainer) fDifferencer.findDifferences(fThreeWay, null, null,
- fAncestorStructure, fLeftStructure, fRightStructure);
-
- if (fRoot == null || fRoot.getChildren().length == 0) {
- message= CompareMessages.getString("StructureDiffViewer.NoStructuralDifferences"); //$NON-NLS-1$
- } else {
- postDiffHook(fDifferencer, fRoot);
- }
- }
- if (fParent != null)
- fParent.setTitleArgument(message);
-
- refresh(getRoot());
- }
-
- protected void postDiffHook(Differencer differencer, IDiffContainer root) {
- // we do nothing here
- }
-
- /**
- * Performs a byte compare on the given objects.
- * Called from the difference engine.
- * Returns <code>null</code> if no structure creator has been set.
- */
- private boolean contentsEqual(Object o1, Object o2) {
- if (fStructureCreator != null) {
- boolean ignoreWhiteSpace= Utilities.getBoolean(getCompareConfiguration(), CompareConfiguration.IGNORE_WHITESPACE, false);
- String s1= fStructureCreator.getContents(o1, ignoreWhiteSpace);
- String s2= fStructureCreator.getContents(o2, ignoreWhiteSpace);
- if (s1 == null || s2 == null)
- return false;
- return s1.equals(s2);
- }
- return false;
- }
-
- /**
- * Tracks property changes of the configuration object.
- * Clients may override to track their own property changes.
- * In this case they must call the inherited method.
- */
- protected void propertyChange(PropertyChangeEvent event) {
- String key= event.getProperty();
- if (key.equals(CompareConfiguration.IGNORE_WHITESPACE))
- diff();
- else
- super.propertyChange(event);
- }
-
- /**
- * Overridden to call the <code>save</code> method on the structure creator after
- * nodes have been copied from one side to the other side of an input object.
- *
- * @param leftToRight if <code>true</code> the left side is copied to the right side.
- * If <code>false</code> the right side is copied to the left side
- */
- protected void copySelected(boolean leftToRight) {
- super.copySelected(leftToRight);
-
- if (fStructureCreator != null)
- fStructureCreator.save(
- leftToRight ? fRightStructure : fLeftStructure,
- leftToRight ? fRightInput : fLeftInput);
- }
-}
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/package.html b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/package.html
deleted file mode 100644
index b0cc1b33d..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/package.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides support for finding and displaying the differences
-between hierarchically structured data.
-<h2>
-Package Specification</h2>
-The class <tt>Differencer</tt> is a differencing engine for hierarchically
-structured data. It takes two or three inputs and performs a two-way or
-three-way compare on them.
-<p>If the input elements to the differencing engine implement the <tt>IStructureComparator</tt>
-interface the engine recursively applies itself&nbsp; to the children of
-the input element. Leaf elements must implement the <tt>IStreamContentAccessor</tt>
-interface (see package <tt>org.eclipse.compare</tt>) so that the
-differencer can perform a bytewise comparison on them.
-<p>By default the differencing engine returns the result of the compare
-as a tree of <tt>DiffNode</tt> objects. Every <tt>DiffNode</tt> describes
-the changes among the two or three inputs.
-<p>A tree of <tt>DiffNodes</tt> can be displayed in a <tt>DiffTreeViewer</tt>.
-The <tt>DiffTreeViewer</tt> requires that inner nodes of the tree implement
-the <tt>IDiffContainer</tt> interface and leafs the <tt>IDiffElement</tt>
-interface.
-<p>The typical steps to compare hierarchically structured data and to display
-the differences would be to:
-<ul>
-<li>
-map the input data into a tree of <tt>IStructureComparator</tt> and <tt>IStreamContentAccessor</tt>s,</li>
-
-<li>
-perform the compare operation by means of the <tt>Differencer</tt>, and</li>
-
-<li>
-feed the differencing result into the <tt>DiffTreeViewer</tt>.</li>
-
-</ul>
-The <tt>StructureDiffViewer</tt> is a specialized <tt>DiffTreeViewer</tt>
-that automates the three steps from above. It takes a single input object
-of type <tt>ICompareInput</tt> from which it retrieves the two or three
-input elements to compare. Then it uses a <tt>IStructureCreator</tt> to
-extract a tree of <tt>IStructureComparator</tt> and <tt>IStreamContentAccessor</tt>
-from them. These trees are then compared with the differencing engine and
-the result is displayed in the tree viewer.
-</body>
-</html>
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/hglegal.htm b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/hglegal.htm
deleted file mode 100644
index b071dbdf4..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/hglegal.htm
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.73 [en] (Win98; U) [Netscape]">
- <title>Legal Notices</title>
-</head>
-<body>
-
-<h3>
-<a NAME="Notices"></a>Notices</h3>
-(c) Copyright IBM Corp. 2000, 2001. All Rights Reserved.
-</body>
-</html>
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/ngibmcpy.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/ngibmcpy.gif
deleted file mode 100644
index 360f8e998..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/ngibmcpy.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/org_eclipse_compare.html b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/org_eclipse_compare.html
deleted file mode 100644
index c0e152c28..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/org_eclipse_compare.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
- <title>Compare Infrastructure Extension Points</title>
-</head>
-<body link="#0000FF" vlink="#800080">
-
-<center>
-<h1>
-IBM Eclipse Platform Compare</h1></center>
-This document lists all of the extension points that the compare plug-in
-makes available to tool developers.
-<p>All XML sub-elements defined in the individual extension point documents
-may appear more than once inside an extension element. For example, an
-<tt>org.eclipse.compare.contentMergeViewers</tt> extension may contain
-several instances of <tt>viewer</tt> elements. Although making one extension
-per sub-element is not technically incorrect, we recommend grouping for
-consistent style. It can also improve platform startup time because there
-will be fewer extensions to process.
-<br>
-<hr WIDTH="100%">
-<h1>
-Extension Points</h1>
-The following extension points can be used to extend the capabilities of
-the compare infrastructure:
-<ul>
-<li>
-<a href="org_eclipse_compare_contentMergeViewers.html">org.eclipse.compare.contentMergeViewers</a></li>
-
-<li>
-<a href="org_eclipse_compare_contentViewers.html">org.eclipse.compare.contentViewers</a></li>
-
-<li>
-<a href="org_eclipse_compare_structureMergeViewers.html">org.eclipse.compare.structureMergeViewers</a></li>
-
-<li>
-<a href="org_eclipse_compare_structureCreators.html">org.eclipse.compare.structureCreators</a></li>
-</ul>
-<a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2001. All Rights Reserved." BORDER=0 height=12 width=195></a>
-</body>
-</html>
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/org_eclipse_compare_contentMergeViewers.html b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/org_eclipse_compare_contentMergeViewers.html
deleted file mode 100644
index aebc43e02..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/org_eclipse_compare_contentMergeViewers.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
- <title>Compare Extension Points: contentMergeViewers</title>
-</head>
-<body link="#0000FF" vlink="#800080">
-
-<center>
-<h1>
-ContentMergeViewers</h1></center>
-<b><i>Identifier: </i></b>org.eclipse.compare.contentMergeViewers
-<p><b><i>Description: </i></b>This extension point allows to plug in a
-compare/merge viewer for specific content types. The viewer must extend
-<tt>org.eclipse.jface.viewers.Viewer</tt>.
-<br>However since viewers don't have a default constructor the extension
-point must implement a factory object for viewers: the interface <tt>org.eclipse.compare.IViewerCreator</tt>.
-<p><b><i>Configuration Markup:</i></b>
-<p><tt>&nbsp;&nbsp; &lt;!ELEMENT viewer EMPTY></tt>
-<br><tt>&nbsp;&nbsp; &lt;!ATTLIST viewer</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extensions CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp; ></tt>
-<ul>
-<li>
-<b>id</b> - a unique identifier that can be used to reference the viewer</li>
-
-<li>
-<b>class</b> - name of a class that implements a factory for the content
-merge viewer and implements <tt>org.eclipse.compare.IViewerCreator</tt></li>
-
-<li>
-<b>extensions </b>- a comma separated list of file extensions e.g . "java,
-gif"</li>
-</ul>
-<b><i>Examples:</i></b>
-<br>The following is an example of compare/merge viewer for text files
-(extension "txt"):
-<p>&lt;extension point = "org.eclipse.compare.contentMergeViewers">
-<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;viewer
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id="org.eclipse.compare.contentmergeviewer.TextMergeViewer"
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class="org.eclipse.compare.internal.TextMergeViewerCreator"
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extensions="txt"
-<br>&nbsp;&nbsp;&nbsp; />
-<br>&lt;/extension>
-<p><b><i>Supplied Implementation:</i></b>
-<br>The Compare UI plugin defines content viewers for text, binary contents,
-and images.
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2001. All Rights Reserved." BORDER=0 height=12 width=195></a>
-</body>
-</html>
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/org_eclipse_compare_contentViewers.html b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/org_eclipse_compare_contentViewers.html
deleted file mode 100644
index 1a877ed62..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/org_eclipse_compare_contentViewers.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
- <title>Compare Extension Points: contentViewers</title>
-</head>
-<body link="#0000FF" vlink="#800080">
-
-<center>
-<h1>
-ContentViewers</h1></center>
-<b><i>Identifier: </i></b>org.eclipse.compare.contentViewers
-<p><b><i>Description: </i></b>This extension point allows to plug in a
-viewer for specific content types. These viewers are used in the EditionSelectionDialog
-when presenting an edition of a resource or a subsection thereof. The viewer
-must extend
-<tt>org.eclipse.jface.viewers.Viewer</tt> and must accept a
-viewer input of type <tt>IStreamContentAccessor</tt>.
-<br>However since viewers don't have a default constructor the extension
-point must implement a factory object for viewers: the interface <tt>org.eclipse.compare.IViewerCreator</tt>.
-<p><b><i>Configuration Markup:</i></b>
-<p><tt>&nbsp;&nbsp; &lt;!ELEMENT viewer EMPTY></tt>
-<br><tt>&nbsp;&nbsp; &lt;!ATTLIST viewer</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extensions CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp; ></tt>
-<ul>
-<li>
-<b>id</b> - a unique identifier that can be used to reference the viewer</li>
-
-<li>
-<b>class</b> - name of a class that implements a factory for the content
-merge viewer and implements <tt>org.eclipse.compare.IViewerCreator</tt></li>
-
-<li>
-<b>extensions </b>- a comma separated list of file extensions e.g . "java,
-gif"</li>
-</ul>
-<b><i>Examples:</i></b>
-<br>The following is an example of a viewer for text files (extension "txt"):
-<p>&lt;extension point = "org.eclipse.compare.contentViewers">
-<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;viewer
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id="org.eclipse.compare.internal.TextViewer"
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class="org.eclipse.compare.internal.TextViewerCreator"
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extensions="txt"
-<br>&nbsp;&nbsp;&nbsp; />
-<br>&lt;/extension>
-<p><b><i>Supplied Implementation:</i></b>
-<br>The Compare UI plugin defines content viewers for text and images.
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2001. All Rights Reserved." BORDER=0 height=12 width=195></a>
-</body>
-</html>
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/org_eclipse_compare_structureCreators.html b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/org_eclipse_compare_structureCreators.html
deleted file mode 100644
index d48dd73e2..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/org_eclipse_compare_structureCreators.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
- <title>Compare Extension Points: structureCreators</title>
-</head>
-<body link="#0000FF" vlink="#800080">
-
-<center>
-<h1>
-StructureCreators</h1></center>
-<b><i>Identifier: </i></b>org.eclipse.compare.structureCreators
-<p><b><i>Description: </i></b>This extension point allows to plug in an
-object that produces a tree structure of <tt>IStructureComparator</tt>
-for a given content.
-<p><b><i>Configuration Markup:</i></b>
-<p><tt>&nbsp;&nbsp; &lt;!ELEMENT structureCreator EMPTY></tt>
-<br><tt>&nbsp;&nbsp; &lt;!ATTLIST structureCreator</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extensions CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp; ></tt>
-<ul>
-<li>
-<b>id</b> - a unique identifier that can be used to reference the structure
-creator</li>
-
-<li>
-<b>class</b> - name of a class that implements the strcuture creator and
-implements <tt>org.eclipse.compare.structuremergeviewer.IStructureComparator</tt></li>
-
-<li>
-<b>extensions </b>- a comma separated list of file extensions e.g . "java,
-properties"</li>
-</ul>
-<b><i>Examples:</i></b>
-<br>The following is an example of a structure creator for java files (extension
-"java"):
-<p>&lt;extension point = "org.eclipse.compare.structureCreators">
-<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;structureCreator
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id="org.eclipse.compare.JavaStructureCreator"
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class="org.eclipse.compare.JavaStructureCreator"
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extensions="java"
-<br>&nbsp;&nbsp;&nbsp; />
-<br>&lt;/extension>
-<p><b><i>Supplied Implementation:</i></b>
-<br>The Compare UI plugin defines a structure creator for zip archives.
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2001. All Rights Reserved." BORDER=0 height=12 width=195></a>
-</body>
-</html>
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/org_eclipse_compare_structureMergeViewers.html b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/org_eclipse_compare_structureMergeViewers.html
deleted file mode 100644
index 187fc44c8..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/doc/org_eclipse_compare_structureMergeViewers.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
- <title>Compare Extension Points: structureMergeViewers</title>
-</head>
-<body link="#0000FF" vlink="#800080">
-
-<center>
-<h1>
-StructureMergeViewers</h1></center>
-<b><i>Identifier: </i></b>org.eclipse.compare.structureMergeViewers
-<p><b><i>Description: </i></b>This extension point allows to plug in a
-compare/merge viewer for structured content. The viewer must extend <tt>org.eclipse.jface.viewers.Viewer</tt>.
-However since viewers don't have a default constructor the extension point
-must implement a factory object for viewers: the interface <tt>org.eclipse.compare.IViewerCreator</tt>.
-<p><b><i>Configuration Markup:</i></b>
-<p><tt>&nbsp;&nbsp; &lt;!ELEMENT viewer EMPTY></tt>
-<br><tt>&nbsp;&nbsp; &lt;!ATTLIST viewer</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extensions CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp; ></tt>
-<ul>
-<li>
-<b>id</b> - a unique identifier that can be used to reference the viewer</li>
-
-<li>
-<b>class</b> - name of a class that implements a factory for the strcuture
-merge viewer and implements <tt>org.eclipse.compare.IViewerCreator</tt></li>
-
-<li>
-<b>extensions </b>- a comma separated list of file extensions e.g . "zip,
-jar"</li>
-</ul>
-<b><i>Examples:</i></b>
-<br>The following is an example of compare/merge viewer for zip files (extension
-"zip"):
-<p>&lt;extension point = "org.eclipse.compare.structureMergeViewers">
-<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;viewer
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id="org.eclipse.compare.ZipCompareViewer"
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class="org.eclipse.compare.ZipCompareViewerCreator"
-<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extensions="zip"
-<br>&nbsp;&nbsp;&nbsp; />
-<br>&lt;/extension>
-<p><b><i>Supplied Implementation:</i></b>
-<br>The Compare UI plugin defines a structure compare viewer for zip archives.
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2001. All Rights Reserved." BORDER=0 height=12 width=195></a>
-</body>
-</html>
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/ancestorpane_co.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/ancestorpane_co.gif
deleted file mode 100644
index 0088c97c8..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/ancestorpane_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/copy_l_co.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/copy_l_co.gif
deleted file mode 100644
index 6c83c45d9..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/copy_l_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/copy_r_co.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/copy_r_co.gif
deleted file mode 100644
index a3a444adf..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/copy_r_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/copycont_l_co.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/copycont_l_co.gif
deleted file mode 100644
index 706dc020e..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/copycont_l_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/copycont_r_co.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/copycont_r_co.gif
deleted file mode 100644
index b95e26a1b..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/copycont_r_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/next_nav.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/next_nav.gif
deleted file mode 100644
index 8392f3345..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/next_nav.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/prev_nav.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/prev_nav.gif
deleted file mode 100644
index 9b278e6fa..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/prev_nav.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/smartmode_co.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/smartmode_co.gif
deleted file mode 100644
index c2a47b6a2..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/smartmode_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/syncpane_co.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/syncpane_co.gif
deleted file mode 100644
index 3aabbce51..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/syncpane_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/twowaycompare_co.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/twowaycompare_co.gif
deleted file mode 100644
index 2045daedd..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/clcl16/twowaycompare_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ctool16/conflict_edit.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ctool16/conflict_edit.gif
deleted file mode 100644
index ecde52ea8..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ctool16/conflict_edit.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ctool16/ignorews_edit.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ctool16/ignorews_edit.gif
deleted file mode 100644
index 097ecdda5..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ctool16/ignorews_edit.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/cview16/compare_view.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/cview16/compare_view.gif
deleted file mode 100644
index 41800a0c9..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/cview16/compare_view.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/ancestorpane_co.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/ancestorpane_co.gif
deleted file mode 100644
index 6e00deec9..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/ancestorpane_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/copy_l_co.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/copy_l_co.gif
deleted file mode 100644
index cb11ac9f9..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/copy_l_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/copy_r_co.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/copy_r_co.gif
deleted file mode 100644
index 202b04139..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/copy_r_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/copycont_l_co.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/copycont_l_co.gif
deleted file mode 100644
index 4e9a3eb98..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/copycont_l_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/copycont_r_co.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/copycont_r_co.gif
deleted file mode 100644
index e84103f40..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/copycont_r_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/next_nav.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/next_nav.gif
deleted file mode 100644
index 6cbeced26..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/next_nav.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/prev_nav.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/prev_nav.gif
deleted file mode 100644
index a3441a062..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/prev_nav.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/smartmode_co.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/smartmode_co.gif
deleted file mode 100644
index 6f55d908b..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/smartmode_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/syncpane_co.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/syncpane_co.gif
deleted file mode 100644
index 2a8541ca8..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/syncpane_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/twowaycompare_co.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/twowaycompare_co.gif
deleted file mode 100644
index ecab86455..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/twowaycompare_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dtool16/conflict_edit.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dtool16/conflict_edit.gif
deleted file mode 100644
index c76fcc707..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dtool16/conflict_edit.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dtool16/ignorews_edit.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dtool16/ignorews_edit.gif
deleted file mode 100644
index 55147cc33..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dtool16/ignorews_edit.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/ancestorpane_co.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/ancestorpane_co.gif
deleted file mode 100644
index 3ce77c8d3..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/ancestorpane_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/copy_l_co.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/copy_l_co.gif
deleted file mode 100644
index d9f5900b6..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/copy_l_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/copy_r_co.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/copy_r_co.gif
deleted file mode 100644
index 61289f18f..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/copy_r_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/copycont_l_co.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/copycont_l_co.gif
deleted file mode 100644
index 4fdde615d..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/copycont_l_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/copycont_r_co.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/copycont_r_co.gif
deleted file mode 100644
index feb14bf53..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/copycont_r_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/next_nav.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/next_nav.gif
deleted file mode 100644
index 03b7af342..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/next_nav.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/prev_nav.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/prev_nav.gif
deleted file mode 100644
index dd65c5235..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/prev_nav.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/smartmode_co.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/smartmode_co.gif
deleted file mode 100644
index e0a262e03..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/smartmode_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/syncpane_co.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/syncpane_co.gif
deleted file mode 100644
index 3e45390ef..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/syncpane_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/twowaycompare_co.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/twowaycompare_co.gif
deleted file mode 100644
index 4c2532296..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/twowaycompare_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/etool16/conflict_edit.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/etool16/conflict_edit.gif
deleted file mode 100644
index b4451ec5e..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/etool16/conflict_edit.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/etool16/ignorews_edit.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/etool16/ignorews_edit.gif
deleted file mode 100644
index f816c9e43..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/etool16/ignorews_edit.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/eview16/compare_view.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/eview16/compare_view.gif
deleted file mode 100644
index 1030b6efc..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/eview16/compare_view.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/obj16/day_obj.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/obj16/day_obj.gif
deleted file mode 100644
index 96aae05cb..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/obj16/day_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/obj16/resource_obj.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/obj16/resource_obj.gif
deleted file mode 100644
index d1e679e38..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/obj16/resource_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/add_ov.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/add_ov.gif
deleted file mode 100644
index 2a8115602..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/add_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/chg_ov.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/chg_ov.gif
deleted file mode 100644
index 67b25c457..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/chg_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/confadd_ov.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/confadd_ov.gif
deleted file mode 100644
index e049755f2..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/confadd_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/confchg_ov.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/confchg_ov.gif
deleted file mode 100644
index 020fc5438..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/confchg_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/confdel_ov.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/confdel_ov.gif
deleted file mode 100644
index 39ed5115e..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/confdel_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/del_ov.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/del_ov.gif
deleted file mode 100644
index 675c20fcc..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/del_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/error_ov.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/error_ov.gif
deleted file mode 100644
index 95e4db64f..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/error_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/inadd_ov.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/inadd_ov.gif
deleted file mode 100644
index 0dc3ea89a..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/inadd_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/inchg_ov.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/inchg_ov.gif
deleted file mode 100644
index f719405c9..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/inchg_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/indel_ov.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/indel_ov.gif
deleted file mode 100644
index 3e107d24d..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/indel_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/outadd_ov.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/outadd_ov.gif
deleted file mode 100644
index 780da9881..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/outadd_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/outchg_ov.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/outchg_ov.gif
deleted file mode 100644
index 4f6a3168e..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/outchg_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/outdel_ov.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/outdel_ov.gif
deleted file mode 100644
index ab4898167..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/outdel_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_inadd_ov.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_inadd_ov.gif
deleted file mode 100644
index 14ba0119b..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_inadd_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_inchg_ov.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_inchg_ov.gif
deleted file mode 100644
index 0aca3c482..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_inchg_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_indel_ov.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_indel_ov.gif
deleted file mode 100644
index c37753736..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_indel_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_outadd_ov.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_outadd_ov.gif
deleted file mode 100644
index 11c2d5de0..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_outadd_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_outchg_ov.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_outchg_ov.gif
deleted file mode 100644
index 704d70694..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_outchg_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_outdel_ov.gif b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_outdel_ov.gif
deleted file mode 100644
index 95ec3012e..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_outdel_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/plugin.properties b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/plugin.properties
deleted file mode 100644
index 18971a0d7..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/plugin.properties
+++ /dev/null
@@ -1,130 +0,0 @@
-#########################################
-# (c) Copyright IBM Corp. 2000, 2001.
-# All Rights Reserved.
-#########################################
-#
-# Resource strings for Compare Plug-in
-#
-pluginName= Compare Support
-providerName=Eclipse.org
-
-#
-# Extension point names
-#
-structureCreators= Structure Creator
-structureMergeViewers= Structure Merge Viewer
-contentMergeViewers= Content Merge Viewer
-contentViewers= Content Viewer
-
-#
-# CompareUIPlugin
-#
-CompareUIPlugin.dialogTitle=Compare
-CompareUIPlugin.noActiveWorkbenchPage=Can't find active workbench page
-CompareUIPlugin.compareFailed=Compare Failed
-CompareUIPlugin.openEditorError=Problems Opening Editor
-CompareUIPlugin.noDifferences=There are no differences between the selected inputs.
-
-#
-# Compare Editor
-#
-defaultCompareEditor.name= Default Compare Editor
-CompareEditor.saveError.title= Save Error
-CompareEditor.cantSaveError= Can''t save contents ({0})
-CompareEditor.invalidInput=Invalid Input: Must be CompareEditorInput
-
-#
-# Context menu & actions
-#
-CompareWithMenu.label= Comp&are With
-
-CompareWithEachOtherAction.label= &Each Other
-CompareWithEachOtherAction.tooltip= Compare the Selected Resources
-
-CompareWithPatchAction.label= P&atch...
-CompareWithPatchAction.tooltip= Compare the Selected Resource with a Patch
-
-CompareWithHistoryAction.label= &Local History...
-CompareWithHistoryAction.tooltip= Compare the Selected Resource with Local History
-
-ReplaceWithMenu.label= Rep&lace With
-
-ReplaceFromHistoryAction.label= &Local History...
-ReplaceFromHistoryAction.tooltip= Replace the Selected Resource with Local History
-
-ReplaceWithPreviousFromHistoryAction.label= &Previous From Local History
-ReplaceWithPreviousFromHistoryAction.tooltip= Replace the Selected Resource with the Previous from Local History
-
-addFromHistoryAction.label= Restore From Local Histor&y...
-addFromHistoryAction.tooltip= Restore Deleted Files From Local History
-
-#
-# Preference Page
-#
-ComparePreferencePage.name= Compare
-ComparePreferencePage.initiallyShowAncestorPane.label= Initially show a&ncestor pane
-ComparePreferencePage.showPseudoConflicts.label= Show &pseudo conflicts
-ComparePreferencePage.synchronizeScrolling.label= Synchronize &scrolling between panes in compare viewers
-ComparePreferencePage.textFont.label= Text &font
-ComparePreferencePage.showMoreInfo.label= Show additional compare &information in the status line
-ComparePreferencePage.preview.label= Preview:
-ComparePreferencePage.ancestor.label= Common Ancestor
-ComparePreferencePage.left.label= Local
-ComparePreferencePage.right.label= Remote
-ComparePreferencePage.structureCompare.label= &Open structure compare automatically
-ComparePreferencePage.generalTab.label= &General
-ComparePreferencePage.textCompareTab.label= &Text Compare
-ComparePreferencePage.backgroundColor1.label= Bac&kground Color:
-ComparePreferencePage.backgroundColor2.label= S&ystem Default
-ComparePreferencePage.backgroundColor3.label= C&ustom
-ComparePreferencePage.ignoreWhitespace.label= Ignore &Whitespace
-#
-# Toolbar actions
-#
-action.IgnoreWhiteSpace.label=Ignore White Space
-action.IgnoreWhiteSpace.tooltip=Ignore White Space Where Applicable
-action.IgnoreWhiteSpace.image=etool16/ignorews_edit.gif
-
-action.Next.label=Next Difference
-action.Next.tooltip=Go to Next Difference
-action.Next.image=elcl16/next_nav.gif
-
-action.Previous.label=Previous Difference
-action.Previous.tooltip=Go to Previous Difference
-action.Previous.image=elcl16/prev_nav.gif
-
-#
-# Built in Structure Creators
-#
-ZipStructureCreator.name=Zip Archive Compare
-
-#
-# Compare Dialog
-#
-CompareDialog.commit.label=Commit
-CompareDialog.saveErrorTitle=Save Error
-CompareDialog.saveErrorMessage=Can't save
-
-#
-# Compare With Each Other
-#
-ResourceCompare.taskName=Operation in Progress...
-ResourceCompare.twoWay.title=Compare ({0}-{1})
-ResourceCompare.threeWay.title=Compare ({0}-{1}-{2})
-
-#
-# DiffTreeViewer & DiffNodes
-#
-DiffTreeViewer.title= Structure Compare
-DiffNode.noName= <no name>
-DiffNode.nameFormat= {0} / {1}
-
-#
-# Differencing engine
-#
-Differencer.progressFormat= Comparing {0}
-
-#
-# Patch: rejected patch markers
-#
-rejectedPatchMarker.name= Rejected Patch
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/plugin.xml b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/plugin.xml
deleted file mode 100644
index 3d67a73a0..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/plugin.xml
+++ /dev/null
@@ -1,195 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- ======================================================================= -->
-<!-- Compare UI Plugin -->
-<!-- ======================================================================= -->
-
-<plugin
- name="%pluginName"
- id="org.eclipse.compare"
- version="2.0.0"
- provider-name="%providerName"
- class="org.eclipse.compare.internal.CompareUIPlugin">
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.resources"/>
- </requires>
-
- <runtime>
- <library name="compare.jar" >
- <export name="*"/>
- </library>
- </runtime>
-
-<!-- Compare extension point definitions -->
-
- <extension-point
- name="%structureCreators"
- id="structureCreators"/>
-
- <extension-point
- name="%structureMergeViewers"
- id="structureMergeViewers"/>
-
- <extension-point
- name="%contentMergeViewers"
- id="contentMergeViewers"/>
-
- <extension-point
- name="%contentViewers"
- id="contentViewers"/>
-
-<!-- Extensions -->
-
- <extension point="org.eclipse.core.resources.markers"
- id="rejectedPatchMarker" name="%rejectedPatchMarker.name">
- <super type="org.eclipse.core.resources.taskmarker"/>
- <persistent value="true"/>
- </extension>
-
- <extension point="org.eclipse.ui.editors">
- <editor id="org.eclipse.compare.CompareEditor"
- name="%defaultCompareEditor.name"
- icon="icons/full/cview16/compare_view.gif"
- class="org.eclipse.compare.internal.CompareEditor"
- contributorClass="org.eclipse.compare.internal.CompareEditorContributor">
- </editor>
- </extension>
-
- <extension
- point="org.eclipse.ui.preferencePages">
- <page name="%ComparePreferencePage.name"
- id="org.eclipse.compare.internal.ComparePreferencePage"
- class="org.eclipse.compare.internal.ComparePreferencePage"
- category= "org.eclipse.ui.preferencePages.Workbench">
- </page>
- </extension>
-
- <extension point="org.eclipse.ui.popupMenus">
-
- <objectContribution
- id="org.eclipse.compare.CompareAction"
- objectClass="org.eclipse.core.resources.IResource" adaptable="true">
- <menu
- id="replaceWithMenu"
- path="additions"
- label="%ReplaceWithMenu.label">
- <separator name="replaceWithGroup"/>
- </menu>
- <menu
- id="compareWithMenu"
- path="additions"
- label="%CompareWithMenu.label">
- <separator name="compareWithGroup"/>
- </menu>
- <action
- id="compareWithEachOther"
- label="%CompareWithEachOtherAction.label"
- tooltip="%CompareWithEachOtherAction.tooltip"
- menubarPath="compareWithMenu/compareWithGroup"
- enablesFor="2+"
- class="org.eclipse.compare.internal.CompareAction">
- </action>
- <action
- id="compareWithPatch"
- label="%CompareWithPatchAction.label"
- tooltip="%CompareWithPatchAction.tooltip"
- menubarPath="compareWithMenu/compareWithGroup"
- enablesFor="1"
- class="org.eclipse.compare.internal.patch.CompareWithPatchAction">
- </action>
- </objectContribution>
-
- <objectContribution
- id="org.eclipse.compare.ReplaceWithEditionAction"
- objectClass="org.eclipse.core.resources.IFile" adaptable="true">
- <menu
- id="replaceWithMenu"
- path="additions"
- label="%ReplaceWithMenu.label">
- <separator name="replaceWithGroup"/>
- </menu>
- <action
- id="replaceFromHistory"
- label="%ReplaceFromHistoryAction.label"
- tooltip="%ReplaceFromHistoryAction.tooltip"
- menubarPath="replaceWithMenu/replaceWithGroup"
- enablesFor="1"
- class="org.eclipse.compare.internal.ReplaceWithEditionAction">
- </action>
- <action
- id="replaceWithPreviousFromHistory"
- label="%ReplaceWithPreviousFromHistoryAction.label"
- tooltip="%ReplaceWithPreviousFromHistoryAction.tooltip"
- menubarPath="replaceWithMenu/replaceWithGroup"
- enablesFor="1"
- class="org.eclipse.compare.internal.ReplaceWithPreviousEditionAction">
- </action>
- </objectContribution>
-
- <objectContribution
- id="org.eclipse.compare.CompareWithEditionAction"
- objectClass="org.eclipse.core.resources.IFile" adaptable="true">
- <menu
- id="compareWithMenu"
- path="additions"
- label="%CompareWithMenu.label">
- <separator name="compareWithGroup"/>
- </menu>
- <action
- id="compareWithHistory"
- label="%CompareWithHistoryAction.label"
- tooltip="%CompareWithHistoryAction.tooltip"
- menubarPath="compareWithMenu/compareWithGroup"
- enablesFor="1"
- class="org.eclipse.compare.internal.CompareWithEditionAction">
- </action>
- </objectContribution>
-
- <objectContribution
- id="org.eclipse.compare.AddFromHistoryAction"
- objectClass="org.eclipse.core.resources.IContainer" adaptable="true">
- <action
- id="addFromHistoryAction"
- label="%addFromHistoryAction.label"
- tooltip="%addFromHistoryAction.tooltip"
- menubarPath="replaceWithMenu"
- enablesFor="1"
- class="org.eclipse.compare.internal.AddFromHistoryAction">
- </action>
- </objectContribution>
-
- </extension>
-
- <extension point="org.eclipse.compare.structureCreators">
- <structureCreator
- extensions="zip"
- class="org.eclipse.compare.ZipFileStructureCreator">
- </structureCreator>
- </extension>
-
- <extension point="org.eclipse.compare.contentMergeViewers">
- <viewer
- extensions="class,exe,dll,binary,zip,jar"
- class="org.eclipse.compare.internal.BinaryCompareViewerCreator">
- </viewer>
- <viewer
- extensions="txt"
- class="org.eclipse.compare.internal.TextMergeViewerCreator">
- </viewer>
- <viewer
- extensions="gif,jpg"
- class="org.eclipse.compare.internal.ImageMergeViewerCreator">
- </viewer>
- </extension>
-
- <extension point="org.eclipse.compare.contentViewers">
- <viewer
- extensions="txt"
- class="org.eclipse.compare.internal.TextViewerCreator">
- </viewer>
- </extension>
-
-</plugin>
-
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/scripts/exportplugin.xml b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/scripts/exportplugin.xml
deleted file mode 100644
index 6abc6abe3..000000000
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/scripts/exportplugin.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<project name="org.eclipse.compare" default="export" basedir="..">
- <target name="init">
- <tstamp/>
- <property name="destdir" value="../../plugin-export" />
- <property name="plugin" value="org.eclipse.compare" />
- <property name="version" value="_2.0.0" />
- <property name="dest" value="${destdir}/${plugin}${version}" />
- </target>
-
- <target name="build" depends="init">
- <eclipse.incrementalBuild project="${plugin}" kind="incr"/>
- </target>
-
- <target name="export" depends="build">
- <mkdir dir="${destdir}" />
- <delete dir="${dest}" />
- <mkdir dir="${dest}" />
- <jar
- jarfile="${dest}/compare.jar"
- basedir="bin"
- />
- <copy file="plugin.xml" todir="${dest}"/>
- <copy file="plugin.properties" todir="${dest}"/>
- <copy todir="${dest}/icons">
- <fileset dir="icons" />
- </copy>
- <zip zipfile="${dest}/comparesrc.zip">
- <fileset dir="compare" />
- </zip>
- </target>
-</project>
diff --git a/bundles/org.eclipse.compare/scripts/exportplugin.xml b/bundles/org.eclipse.compare/scripts/exportplugin.xml
deleted file mode 100644
index 6abc6abe3..000000000
--- a/bundles/org.eclipse.compare/scripts/exportplugin.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<project name="org.eclipse.compare" default="export" basedir="..">
- <target name="init">
- <tstamp/>
- <property name="destdir" value="../../plugin-export" />
- <property name="plugin" value="org.eclipse.compare" />
- <property name="version" value="_2.0.0" />
- <property name="dest" value="${destdir}/${plugin}${version}" />
- </target>
-
- <target name="build" depends="init">
- <eclipse.incrementalBuild project="${plugin}" kind="incr"/>
- </target>
-
- <target name="export" depends="build">
- <mkdir dir="${destdir}" />
- <delete dir="${dest}" />
- <mkdir dir="${dest}" />
- <jar
- jarfile="${dest}/compare.jar"
- basedir="bin"
- />
- <copy file="plugin.xml" todir="${dest}"/>
- <copy file="plugin.properties" todir="${dest}"/>
- <copy todir="${dest}/icons">
- <fileset dir="icons" />
- </copy>
- <zip zipfile="${dest}/comparesrc.zip">
- <fileset dir="compare" />
- </zip>
- </target>
-</project>
diff --git a/bundles/org.eclipse.team.core/.classpath b/bundles/org.eclipse.team.core/.classpath
deleted file mode 100644
index 4432f278d..000000000
--- a/bundles/org.eclipse.team.core/.classpath
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/"/>
- <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
- <classpathentry kind="src" path="/org.apache.xerces"/>
- <classpathentry kind="src" path="/org.eclipse.core.resources"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.team.core/.cvsignore b/bundles/org.eclipse.team.core/.cvsignore
deleted file mode 100644
index c5e82d745..000000000
--- a/bundles/org.eclipse.team.core/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/.options b/bundles/org.eclipse.team.core/.options
deleted file mode 100644
index 60b638244..000000000
--- a/bundles/org.eclipse.team.core/.options
+++ /dev/null
@@ -1,4 +0,0 @@
-# Debugging options for the org.eclipse.team.core plugin.
-
-# Turn on debugging for the plugin.
-org.eclipse.team.core/debug=true # Shows stream debugging information org.eclipse.team.core/streams=false \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/.project b/bundles/org.eclipse.team.core/.project
deleted file mode 100644
index d81dc3af3..000000000
--- a/bundles/org.eclipse.team.core/.project
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.team.core</name>
- <comment></comment>
- <projects>
- <project>org.apache.xerces</project>
- <project>org.eclipse.core.resources</project>
- <project>org.eclipse.core.runtime</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.team.cvs.core.cvsnature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.team.core/README b/bundles/org.eclipse.team.core/README
deleted file mode 100644
index 6a358f07a..000000000
--- a/bundles/org.eclipse.team.core/README
+++ /dev/null
@@ -1,13 +0,0 @@
-Note to users of this plug-in
-
-The classes and interfaces in this plug-in are part of an API that is
-still under development and expected to change significantly before
-reaching stability. It is being made available at this early stage to
-solicit feedback from pioneering adopters on the understanding
-that any code that uses this API will almost certainly be broken
-(repeatedly) as the API evolves.
-
-For up-to-date information on these APIs and other related news see
-our component page:
-
-http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/platform-vcm-home/main.html \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/about.html b/bundles/org.eclipse.team.core/about.html
deleted file mode 100644
index 441774f92..000000000
--- a/bundles/org.eclipse.team.core/about.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<html>
-<head>
-<title>About</title>
-<style type="text/css">
-p, table, td, th { font-family: arial, helvetica, geneva; font-size: 10pt}
-pre { font-family: "Courier New", Courier, mono; font-size: 10pt}
-h2 { font-family: arial, helvetica, geneva; font-size: 18pt; font-weight: bold ; line-height: 14px}
-code { font-family: "Courier New", Courier, mono; font-size: 10pt}
-sup { font-family: arial,helvetica,geneva; font-size: 10px}
-h3 { font-family: arial, helvetica, geneva; font-size: 14pt; font-weight: bold}
-li { font-family: arial, helvetica, geneva; font-size: 10pt}
-h1 { font-family: arial, helvetica, geneva; font-size: 28px; font-weight: bold}
-body { font-family: arial, helvetica, geneva; font-size: 10pt; clip: rect( ); margin-top: 5mm; margin-left: 3mm}
-</style>
-</head>
-<body lang="EN-US" link="blue" vlink="purple">
-<table border="0" cellspacing="5" cellpadding="2" width="100%" >
- <tr>
- <td align="LEFT" valign="TOP" colspan="2" bgcolor="#0080C0"><b><font color="#FFFFFF">About This Content</font></b></td>
- </tr>
- <tr>
- <td>
-<p>11th December, 2001</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in &quot;Content&quot;. Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-<a href="http://www.eclipse.org/legal/cpl-v05.html">Common Public License Version 0.5</a> &quot;CPL&quot;. For purposes of the CPL, &quot;Program&quot; will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL &quot;Other License&quot;, any modifications, enhancements and/or
-other code and/or documentation &quot;Modifications&quot; uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-</td></tr></table>
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/build.properties b/bundles/org.eclipse.team.core/build.properties
deleted file mode 100644
index e38fc784e..000000000
--- a/bundles/org.eclipse.team.core/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-# Eclipse build contribution
-bin.includes = about.html,plugin.xml,plugin.properties,*.jar
-source.team.jar=src/
-src.includes=about.html
diff --git a/bundles/org.eclipse.team.core/buildnotes_team.html b/bundles/org.eclipse.team.core/buildnotes_team.html
deleted file mode 100644
index 4f55a4ff4..000000000
--- a/bundles/org.eclipse.team.core/buildnotes_team.html
+++ /dev/null
@@ -1,522 +0,0 @@
-<!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en">
-<html xmlns:v="urn:schemas-microsoft-com:vml"
- xmlns:o="urn:schemas-microsoft-com:office:office"
- xmlns:w="urn:schemas-microsoft-com:office:word"
- xmlns="http://www.w3.org/TR/REC-html40">
-<head>
-
- <meta http-equiv="Content-Type"
- content="text/html; charset=iso-8859-1">
-
- <meta name="ProgId" content="Word.Document">
-
- <meta name="Generator" content="Microsoft Word 9">
-
- <meta name="Originator" content="Microsoft Word 9">
-
- <link rel="File-List" href="filelist">
- <title>Eclipse Platform Release Notes - VCM</title>
-
- <style>
-<!--
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-h1
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-outline-level:1;
- font-size:24.0pt;
- font-family:"Times New Roman";
- mso-font-kerning:18.0pt;
- font-weight:bold;}
-h2
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-outline-level:2;
- font-size:18.0pt;
- font-family:"Times New Roman";
- font-weight:bold;}
-h3
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-outline-level:3;
- font-size:13.5pt;
- font-family:"Times New Roman";
- font-weight:bold;}
-a:link, span.MsoHyperlink
- {color:blue;
- text-decoration:underline;
- text-underline:single;}
-a:visited, span.MsoHyperlinkFollowed
- {color:purple;
- text-decoration:underline;
- text-underline:single;}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
- /* List Definitions */
-@list l0
- {mso-list-id:180434102;
- mso-list-type:hybrid;
- mso-list-template-ids:-764372184 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
-ol
- {margin-bottom:0in;}
-ul
- {margin-bottom:0in;}
--->
- </style>
- <!--[if gte mso 9]><xml>
- <u1:DocumentProperties>
- <u1:Author>johnart</u1:Author>
- <u1:LastAuthor>johnart</u1:LastAuthor>
- <u1:Revision>2</u1:Revision>
- <u1:TotalTime>14</u1:TotalTime>
- <u1:Created>2001-05-14T20:34:00Z</u1:Created>
- <u1:LastSaved>2001-05-14T20:58:00Z</u1:LastSaved>
- <u1:Pages>9</u1:Pages>
- <u1:Words>3732</u1:Words>
- <u1:Characters>21276</u1:Characters>
- <u1:Lines>177</u1:Lines>
- <u1:Paragraphs>42</u1:Paragraphs>
- <u1:CharactersWithSpaces>26128</u1:CharactersWithSpaces>
- <u1:Version>9.3821</u1:Version>
- </u1:DocumentProperties>
-</xml><![endif]-->
-</head>
- <body lang="EN-US" link="blue" vlink="purple" style="">
-
-<h1 style=""> </h1>
-
-<h1 style=""> </h1>
-
-<h1 style=""> </h1>
-
-<h1 style=""> </h1>
-
-<h1 style=""> </h1>
-
-<h1 style=""> </h1>
-<h1 style="">
-<h1 style="">Eclipse Platform Build Notes &#8211; Team Support</h1>
- </h1>
-<p class="MsoNormal">Team build I20020517 &#8211; May 17 2002</p>
-
-<p class="MsoNormal">Build submission for Integration Build 20020517</p>
-
-<h2>What's new in this build</h2>
-
-<p class="MsoNormal">This build introduces Target Management support. Target
-management consists of a set of core API, in combination with one or more
-target providers. Initially, we are providing a WebDAV target provider in
-the plug-in org.eclipse.team.webdav. Target management operations appear
-in the navigator under the "Deploy" sub-menu.</p>
-
-<h1 style=""> </h1>
-
-<h1 style=""> </h1>
-
-<h1 style=""> </h1>
-
-<h1 style=""> </h1>
-
-<h1 style=""> </h1>
-
-<h1 style="">Eclipse Platform Build Notes &#8211; Team Support</h1>
-
-<p class="MsoNormal">Team build I20020430 &#8211; April 30 2002</p>
-
-<p class="MsoNormal">Build submission for Integration Build 20020430</p>
-
-<h2>What's new in this build</h2>
-
-<p class="MsoNormal">No major changes</p>
-
-<h1 style=""> </h1>
-
-<h1 style=""> </h1>
-
-<h1 style=""> </h1>
-
-<h1 style=""> </h1>
-
-<h1 style=""> </h1>
-
-<h1 style="">Eclipse Platform Build Notes &#8211; Team Support</h1>
-
-<p class="MsoNormal">Team build I20020423 &#8211; April 23 2002</p>
-
-<p class="MsoNormal">Build submission for Integration Build 20020423</p>
-
-<h2>What's new in this build</h2>
-
-<p class="MsoNormal">Initial release of team project set support. There is
- now an import and export wizard that allows one to create a file containing
- a list (and location) of team shared projects. This file may be imported
-into another workspace, re-creating the entire set of projects.</p>
-
-<h1 style=""> </h1>
-
-<h1 style=""> </h1>
-
-<h1 style=""> </h1>
-
-<h1 style=""> </h1>
-
-<h1 style=""> </h1>
-
-<h1 style="">Eclipse Platform Build Notes &#8211; Team Support</h1>
-
-<p class="MsoNormal">Team build I20020418 &#8211; April 18 2002</p>
-
-<p class="MsoNormal">Build submission for Integration Build 20020418</p>
-
-<h2>What's new in this build</h2>
-
-<p class="MsoNormal">No significant changes to the core Team support in this
- build.</p>
-
-<h1 style="">Eclipse Platform Build Notes &#8211; Team Support</h1>
-
-<p class="MsoNormal">Team build I20020409 &#8211; April 9 2002</p>
-
-<p class="MsoNormal">Build submission for Integration Build 20020409</p>
-
-<h2>What's new in this build</h2>
-
-<p class="MsoNormal">No significant changes to the core Team support in this
- build.</p>
- <br>
-
-<h1 style="">Eclipse Platform Build Notes &#8211; Team Support</h1>
-
-<p class="MsoNormal">Team build I20020402 &#8211; April 2 2002</p>
-
-<p class="MsoNormal">Build submission for Integration Build 20020402</p>
-
-<h2>What's new in this build</h2>
-
-<p class="MsoNormal">Team plug-ins are now turned <b>on</b> by default. The
- old VCM plug-ins are still included in the build but are turned off.<br>
- The global ignore and text/binary APIs have changed substantially. The
- facilities are now provided as static methods on the class org.eclipse.team.core.Team.
- See that class's Javadoc for more details.<br>
- <br>
- </p>
-
-<p class="MsoNormal"><br>
- </p>
-
-<div class="Section1">
-<h1 style="">Eclipse Platform Build Notes &#8211; Team Support</h1>
-
-<p class="MsoNormal">Team build I20020312 &#8211; March 12 2002</p>
-
-<p class="MsoNormal">Build submission for Integration Build 20020312</p>
-
-<h2>What's new in this build</h2>
-
-<p class="MsoNormal"></p>
-
-<p class="MsoNormal">Team plug-ins are now turned <b>on</b> by default. The
- old VCM plug-ins are still included in the build but are turned off.</p>
-
-<p class="MsoNormal"><br>
- The Decorations extension point has been removed from org.eclipse.team.ui.
- Please use the generic workbench decoration facility in the future.<br>
- </p>
-
-<h1 style="">Eclipse Platform Build Notes &#8211; Team Support</h1>
-
-<p class="MsoNormal">Team build I20020305 &#8211; March 5 2002</p>
-
-<p class="MsoNormal">Build submission for Integration Build 20020305</p>
-
-<h2>What's new in this drop</h2>
-
-<p class="MsoNormal">No changes to the core team support in this drop.</p>
-
-<p class="MsoNormal"><br>
- All Team plug-ins are turned off by default. If you wish to use Team
- support,</p>
-
-<ol style="margin-top: 0in;" start="1" type="1">
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.ui/plugin.xml.off
- to plugins/org.eclipse.team.ui/plugin.xml&nbsp;</li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.ui/plugin.xml.off
- to plugins/org.eclipse.team.cvs.ui/plugin.xml&nbsp;</li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.core/plugin.xml.off
- to plugins/org.eclipse.team.core/plugin.xml&nbsp;</li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.core/plugin.xml.off
- to plugins/org.eclipse.team.cvs.core/plugin.xml&nbsp;</li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.ssh/plugin.xml.off
- to plugins/org.eclipse.team.cvs.ssh/plugin.xml&nbsp;</li>
-
-</ol>
-
-<h1 style="">Eclipse Platform Build Notes &#8211; Team Support</h1>
-
-<p class="MsoNormal">Team build I20020226 &#8211; February 26, 2002</p>
-
-<p class="MsoNormal">Build submission for Integration Build 20020226</p>
-
-<h2>What's new in this drop</h2>
-
-<p class="MsoNormal"></p>
-
-<p class="MsoNormal"></p>
-
-<p class="MsoNormal"><!--[if !supportEmptyParas]--><!--[endif]--></p>
-
-<p class="MsoNormal">No changes in this drop.</p>
-
-<p class="MsoNormal"><br>
- All Team plug-ins are turned off by default. If you wish to use Team
- support,</p>
-
-<ol style="margin-top: 0in;" start="1" type="1">
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.ui/plugin.xml.off
- to plugins/org.eclipse.team.ui/plugin.xml&nbsp;</li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.ui/plugin.xml.off
- to plugins/org.eclipse.team.cvs.ui/plugin.xml&nbsp;</li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.core/plugin.xml.off
- to plugins/org.eclipse.team.core/plugin.xml&nbsp;</li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.core/plugin.xml.off
- to plugins/org.eclipse.team.cvs.core/plugin.xml&nbsp;</li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.ssh/plugin.xml.off
- to plugins/org.eclipse.team.cvs.ssh/plugin.xml&nbsp;</li>
-
-</ol>
-
-<h1 style="">Eclipse Platform Build Notes &#8211; Team Support</h1>
-
-<p class="MsoNormal">Team build I20020214 &#8211; February 14, 2002<o:p></o:p></p>
-
-<p class="MsoNormal">Build submission for Integration Build 20020214<o:p></o:p></p>
-
-<h2>What's new in this drop<o:p></o:p></h2>
-
-<p class="MsoNormal">Bug fixes:<o:p></o:p></p>
-
-<p class="MsoNormal">Change in semantics to validateEdit (9802)<o:p></o:p></p>
-
-<p class="MsoNormal"><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]--><o:p></o:p></p>
-
-<p class="MsoNormal">All Team plug-ins are turned off by default. If you
-wish to use Team support,<o:p></o:p></p>
-
-<ol style="margin-top: 0in;" start="1" type="1">
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.ui/plugin.xml.off
- to plugins/org.eclipse.team.ui/plugin.xml <o:p></o:p></li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.ui/plugin.xml.off
- to plugins/org.eclipse.team.cvs.ui/plugin.xml <o:p></o:p></li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.core/plugin.xml.off
- to plugins/org.eclipse.team.core/plugin.xml <o:p></o:p></li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.core/plugin.xml.off
- to plugins/org.eclipse.team.cvs.core/plugin.xml <o:p></o:p></li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.ssh/plugin.xml.off
- to plugins/org.eclipse.team.cvs.ssh/plugin.xml <o:p></o:p></li>
-
-</ol>
-
-<h1 style="">Eclipse Platform Build Notes &#8211; Team Support</h1>
-
-<p class="MsoNormal">Team build V2_0_6 &#8211; February 12, 2002</p>
-
-<p class="MsoNormal">Build submission for Integration Build 20020212</p>
-
-<h2>What's new in this drop</h2>
-
-<p class="MsoNormal">48 bugs fixed.</p>
-
-<p class="MsoNormal">Global ignore facility added to the core team support.</p>
-
-<p class="MsoNormal"><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]--><o:p></o:p></p>
-
-<p class="MsoNormal">All Team plug-ins are turned off by default. If you
-wish to use Team support,</p>
-
-<ol style="margin-top: 0in;" start="6" type="1">
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.ui/plugin.xml.off
- to plugins/org.eclipse.team.ui/plugin.xml</li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.ui/plugin.xml.off
- to plugins/org.eclipse.team.cvs.ui/plugin.xml</li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.core/plugin.xml.off
- to plugins/org.eclipse.team.core/plugin.xml</li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.core/plugin.xml.off
- to plugins/org.eclipse.team.cvs.core/plugin.xml</li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.ssh/plugin.xml.off
- to plugins/org.eclipse.team.cvs.ssh/plugin.xml</li>
-
-</ol>
-
-<p class="MsoNormal" style="margin-left: 0.25in;"><!--[if !supportEmptyParas]-->
- &nbsp;<!--[endif]--><o:p></o:p></p>
-
-<p class="MsoNormal">Please report any problems to the VCM team, and use
-the VCM component for bug tracking.</p>
-
-<h1 style="">Eclipse Platform Build Notes &#8211; Team Support</h1>
-
-<p class="MsoNormal">Team build V2_0_5 &#8211; February 5, 2002</p>
-
-<p class="MsoNormal">Build submission for Integration Build 20020205</p>
-
-<h2>What's new in this drop</h2>
-
-<p class="MsoNormal">41 bugs fixed.</p>
-
-<p class="MsoNormal">CVS operations move from the CVS submenu to the Team
- submenu.</p>
-
-<p class="MsoNormal">Proper plugin.xml files will be included with this build.</p>
-
-<p class="MsoNormal"><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]--><o:p></o:p></p>
-
-<p class="MsoNormal">All Team plug-ins are turned off by default. If you
-wish to use Team support,</p>
-
-<ol style="margin-top: 0in;" start="11" type="1">
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.ui/plugin.xml.off
- to plugins/org.eclipse.team.ui/plugin.xml</li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.ui/plugin.xml.off
- to plugins/org.eclipse.team.cvs.ui/plugin.xml</li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.core/plugin.xml.off
- to plugins/org.eclipse.team.core/plugin.xml</li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.core/plugin.xml.off
- to plugins/org.eclipse.team.cvs.core/plugin.xml</li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.ssh/plugin.xml.off
- to plugins/org.eclipse.team.cvs.ssh/plugin.xml</li>
-
-</ol>
-
-<p class="MsoNormal" style="margin-left: 0.25in;"><!--[if !supportEmptyParas]-->
- &nbsp;<!--[endif]--><o:p></o:p></p>
-
-<p class="MsoNormal">Please report any problems to the VCM team, and use
-the VCM component for bug tracking.</p>
-
-<p class="MsoNormal"><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]--><o:p></o:p></p>
-
-<p class="MsoNormal">Run <a
- href="http://dev.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&amp;resolution=FIXED&amp;email1=&amp;emailtype1=substring&amp;emailassigned_to1=1&amp;email2=&amp;emailtype2=substring&amp;emailreporter2=1&amp;bugidtype=include&amp;bug_id=&amp;changedin=&amp;votes=&amp;chfield=bug_status&amp;chfieldfr%20">
- this</a> query to determine which bugs have been fixed since January
- 29<sup> th</sup>. If you wish to narrow the search, edit the query and
- change the dates.</p>
-
-<h1 style="">Eclipse Platform Build Notes &#8211; Team Support</h1>
-
-<p class="MsoNormal">Team build V2_0_4 &#8211; January 29, 2002</p>
-
-<p class="MsoNormal">Build submission for Integration Build 20020129</p>
-
-<h2>What's new in this drop</h2>
-
-<p class="MsoNormal">Merge support has been added</p>
-
-<p class="MsoNormal">Numerous bug fixes</p>
-
-<p class="MsoNormal"><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]--><o:p></o:p></p>
-
-<p class="MsoNormal">All Team plug-ins are turned off by default. If you
-wish to use Team support,</p>
-
-<ol style="margin-top: 0in;" start="16" type="1">
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.ui/plugin.xml.off
- to plugins/org.eclipse.team.ui/plugin.xml</li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.ui/plugin.xml.off
- to plugins/org.eclipse.team.cvs.ui/plugin.xml</li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.core/plugin.xml.off
- to plugins/org.eclipse.team.core/plugin.xml</li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.core/plugin.xml.off
- to plugins/org.eclipse.team.cvs.core/plugin.xml</li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.ssh/plugin.xml.off
- to plugins/org.eclipse.team.cvs.ssh/plugin.xml</li>
-
-</ol>
-
-<p class="MsoNormal" style="margin-left: 0.25in;"><!--[if !supportEmptyParas]-->
- &nbsp;<!--[endif]--><o:p></o:p></p>
-
-<p class="MsoNormal">Please report any problems to the VCM team, and use
-the VCM component for bug tracking.</p>
-
-<p class="MsoNormal"><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]--><o:p></o:p></p>
-
-<p class="MsoNormal">Run <a
- href="http://dev.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&amp;resolution=FIXED&amp;priority=P1&amp;priority=P2&amp;priority=P3&amp;priority=P4&amp;email1=&amp;emailtype1=substring&amp;emailassigned_to1=1&amp;email2=&amp;emailtype2=substring&amp;emailreporter2=1&amp;bugidtype=include&amp;bug_id%20">
- this</a> query to determine which bugs have been fixed since January
- 15<sup> th</sup>. If you wish to narrow the search, edit the query and
- change the dates.</p>
-
-<h1 style="">Eclipse Platform Build Notes &#8211; Team Support</h1>
-
-<p class="MsoNormal">Team build V2_0_2 &#8211; January 15, 2002</p>
-
-<p class="MsoNormal">Build submission for Integration Build 20020115</p>
-
-<h2>What's new in this drop</h2>
-
-<p class="MsoNormal">This is the initial release for the Team support plug-ins.
- Team support is intended to be an eventual replacement for the VCM codebase.</p>
-
-<p class="MsoNormal"><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]--><o:p></o:p></p>
-
-<p class="MsoNormal">The plug-ins are turned off by default. If you wish
-to use Team support,</p>
-
-<ol style="margin-top: 0in;" start="21" type="1">
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.ui/plugin.xml.off
- to plugins/org.eclipse.team.ui/plugin.xml</li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.ui/plugin.xml.off
- to plugins/org.eclipse.team.cvs.ui/plugin.xml</li>
-
-</ol>
-
-<p class="MsoNormal"><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]--><o:p></o:p></p>
-
-<p class="MsoNormal">Please report any problems to the VCM team, and use
-the VCM component for bug tracking.</p>
-
-<p class="MsoNormal"><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]--><o:p></o:p></p>
-
-<p class="MsoNormal">Run <a
- href="http://dev.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;resolution=FIXED&amp;priority=P1&amp;priority=P2&amp;priority=P3&amp;priority=P4&amp;email1=&amp;emailtype1=substring&amp;emailassigned_to1=1&amp;email2=&amp;emailtype2=substring&amp;emailreporter2=1&amp;bugi%20">
- this</a> query to determine which bugs have been fixed since January
- 7<sup> th</sup>. If you wish to narrow the search, edit the query and
- change the dates.</p>
-
-<h1 style=""><!--[if !supportEmptyParas]--> &nbsp;<!--[endif]--><o:p></o:p></h1>
- </div>
-
-</body>
-</html>
diff --git a/bundles/org.eclipse.team.core/doc/hglegal.htm b/bundles/org.eclipse.team.core/doc/hglegal.htm
deleted file mode 100644
index c59811321..000000000
--- a/bundles/org.eclipse.team.core/doc/hglegal.htm
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.73 [en] (Win98; U) [Netscape]">
- <title>Legal Notices</title>
-</head>
-<body>
-
-<h3>
-<a NAME="Notices"></a>Notices</h3>
-(c) Copyright IBM Corp. 2000, 2001. All Rights Reserved.
-</body>
-</html>
diff --git a/bundles/org.eclipse.team.core/doc/ngibmcpy.gif b/bundles/org.eclipse.team.core/doc/ngibmcpy.gif
deleted file mode 100644
index 360f8e998..000000000
--- a/bundles/org.eclipse.team.core/doc/ngibmcpy.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.core/doc/org_eclipse_team_core.html b/bundles/org.eclipse.team.core/doc/org_eclipse_team_core.html
deleted file mode 100644
index a001ac9a1..000000000
--- a/bundles/org.eclipse.team.core/doc/org_eclipse_team_core.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Team Core Extension Points</title>
-</head>
-<body link="#0000FF" vlink="#800080">
-
-<center>
-<h1>Team Core Plug-in</h1></center>
-This document lists all of the extension points that the Team Core plug-in makes available to repository provider developers.
-<p>
-<hr WIDTH="100%">
-<h1>General Extension Points</h1>
-The following extension points can be used to extend various aspects of the team functionality:
-<ul>
-<li>
-<a href="org_eclipse_team_core_fileTypes.html">org.eclipse.team.core.fileTypes</a></li>
-<li>
-<a href="org_eclipse_team_core_ignore.html">org.eclipse.team.core.ignore</a></li>
-<li>
-<a href="org_eclipse_team_core_projectSets.html">org.eclipse.team.core.projectSets</a></li>
-</ul>
-<a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2001. All Rights Reserved." BORDER=0 height=12 width=195></a>
-</body>
-</html>
diff --git a/bundles/org.eclipse.team.core/doc/org_eclipse_team_core_fileTypes.html b/bundles/org.eclipse.team.core/doc/org_eclipse_team_core_fileTypes.html
deleted file mode 100644
index 5b9a6f636..000000000
--- a/bundles/org.eclipse.team.core/doc/org_eclipse_team_core_fileTypes.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Eclipse Team Core Extension Point: File Types</title>
-</head>
-<body link="#0000FF" vlink="#800080">
-
-<center>
-<h1>
-File Types</h1></center>
-<b><i>Identifier: </i></b>org.eclipse.team.core.fileTypes
-<p><b><i>Description: </i></b>This extension point is used to register
-information about whether particular file types should be considered
-to contain text or binary data. This information is important to some
-repository providers as it affects how the data is stored, compared and
-transmitted.
-<p>Providers may provide an extension for this extension point. No code
-beyond the XML extension declaration is required.
-<p><b><i>Configuration Markup:</i></b>
-<p><tt>&nbsp;&nbsp; &lt;!ELEMENT fileTypes EMPTY></tt>
-<br><tt>&nbsp;&nbsp; &lt;!ATTLIST fileTypes</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extension&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp; ></tt>
-
-<ul>
-<li><b>extension -</b> the file extension being identified by this contribution.</li>
-<li><b>type -</b> one of either "text" or "binary", identifying the contents of files matching the value of extension.</li>
-</ul>
-
-<b><i>Examples:</i></b>
-<p>Following is an example of a fileTypes extension:
-<p><tt>&nbsp;&nbsp; &lt;extension point="org.eclipse.team.core.fileTypes"></tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;fileTypes</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extension="txt"</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type="text"</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/fileTypes></tt>
-<br><tt>&nbsp;&nbsp; &lt;/extension></tt>
-
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2001. All Rights Reserved." BORDER=0 height=12 width=195></a>
-</body>
-</html>
diff --git a/bundles/org.eclipse.team.core/doc/org_eclipse_team_core_ignore.html b/bundles/org.eclipse.team.core/doc/org_eclipse_team_core_ignore.html
deleted file mode 100644
index cdab6827f..000000000
--- a/bundles/org.eclipse.team.core/doc/org_eclipse_team_core_ignore.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Eclipse Team Core Extension Point: Ignore</title>
-</head>
-<body link="#0000FF" vlink="#800080">
-
-<center>
-<h1>
-Ignore</h1></center>
-<b><i>Identifier: </i></b>org.eclipse.team.core.ignore
-<p><b><i>Description: </i></b>This extension point is used to register
-information about whether particular resources should be ignored; that
-is, excluded from version configuration management operations.
-<p>Providers may provide an extension for this extension point. No code
-beyond the XML extension declaration is required.
-<p><b><i>Configuration Markup:</i></b>
-<p><tt>&nbsp;&nbsp; &lt;!ELEMENT ignore EMPTY></tt>
-<br><tt>&nbsp;&nbsp; &lt;!ATTLIST ignore</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pattern&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enabled&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp; ></tt>
-
-<ul>
-<li><b>pattern -</b> the pattern against which resources will be compared.</li>
-<li><b>enabled -</b> one of "true" or "false", determines whether this ignore pattern is enabled.</li>
-</ul>
-
-<b><i>Examples:</i></b>
-<p>Following is an example of an ignore extension:
-<p><tt>&nbsp;&nbsp; &lt;extension point="org.eclipse.team.core.ignore"></tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ignore</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pattern="*.class"</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enabled="true"</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/ignore></tt>
-<br><tt>&nbsp;&nbsp; &lt;/extension></tt>
-
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2001. All Rights Reserved." BORDER=0 height=12 width=195></a>
-</body>
-</html>
diff --git a/bundles/org.eclipse.team.core/doc/org_eclipse_team_core_projectSets.html b/bundles/org.eclipse.team.core/doc/org_eclipse_team_core_projectSets.html
deleted file mode 100644
index ae3dbe470..000000000
--- a/bundles/org.eclipse.team.core/doc/org_eclipse_team_core_projectSets.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Eclipse Team Core Extension Point: Project Sets</title>
-</head>
-<body link="#0000FF" vlink="#800080">
-
-<center>
-<h1>
-Project Sets</h1></center>
-<b><i>Identifier: </i></b>org.eclipse.team.core.projectSets
-<p><b><i>Description: </i></b>This extension point is used to register
-a handler for creating and reading project sets. Project sets are a lightweight,
-portable method of sharing a particular lineup of team-shared projects in a
-workspace. A project set file may be used to provide team members with a simple
-way of creating a workspace with a particular lineup of projects from one or
-more team providers.
-<p>Providers may provide an extension for this extension point.
-<p><b><i>Configuration Markup:</i></b>
-<p><tt>&nbsp;&nbsp; &lt;!ELEMENT projectSets EMPTY></tt>
-<br><tt>&nbsp;&nbsp; &lt;!ATTLIST projectSets</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp; ></tt>
-
-<ul>
-<li><b>id -</b> the nature id of the provider for which this handler creates and reads project sets.</li>
-<li><b>type -</b> the fully-qualified name of a class implementing <code>org.eclipse.team.core.IProjectSetSerializer</code>.</li>
-</ul>
-
-<b><i>Examples:</i></b>
-<p>Following is an example of a projectSets extension:
-<p><tt>&nbsp;&nbsp; &lt;extension point="org.eclipse.team.core.projectSets"></tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;projectSets</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id="org.eclipse.team.cvs.core.cvsnature"</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class="org.eclipse.team.cvs.core.CVSProjectSetSerializer"</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/projectSets></tt>
-<br><tt>&nbsp;&nbsp; &lt;/extension></tt>
-
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2001. All Rights Reserved." BORDER=0 height=12 width=195></a>
-</body>
-</html>
diff --git a/bundles/org.eclipse.team.core/plugin.properties b/bundles/org.eclipse.team.core/plugin.properties
deleted file mode 100644
index 539fdfdde..000000000
--- a/bundles/org.eclipse.team.core/plugin.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-pluginName=Team Support Core
-providerName=Eclipse.org
-FileTypesRegistry=File Types Registry
-GlobalIgnoreRegistry=Global Ignore Registry
-TeamProjectSets=Team Project Sets
-Targets=Target Provider and Location Factories
-Repository=Repository Provider Factories \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/plugin.xml b/bundles/org.eclipse.team.core/plugin.xml
deleted file mode 100644
index f8fa8503a..000000000
--- a/bundles/org.eclipse.team.core/plugin.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- File written by PDE 1.0 -->
-<plugin
- id="org.eclipse.team.core"
- name="%pluginName"
- version="2.0.0"
- provider-name="%providerName"
- class="org.eclipse.team.internal.core.TeamPlugin">
-<requires>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.core.runtime"/>
-</requires>
-
-<runtime>
- <library name="team.jar">
- <export name="*"/>
- </library>
-</runtime>
-
-<extension-point id="fileTypes" name="%FileTypesRegistry"/>
-<extension-point id="ignore" name="%GlobalIgnoreRegistry"/>
-<extension-point id="projectSets" name="%TeamProjectSets"/>
-<extension-point id="repository" name="%Repository"/>
-<extension-point id="targets" name="%Targets"/>
-
-<!-- Define common known file types -->
-
-<extension point="org.eclipse.team.core.fileTypes">
- <fileTypes extension="txt" type="text"/>
- <fileTypes extension="properties" type="text"/>
- <fileTypes extension="xml" type="text"/>
- <fileTypes extension="html" type="text"/>
- <fileTypes extension="jpg" type="binary"/>
- <fileTypes extension="gif" type="binary"/>
- <fileTypes extension="ico" type="binary"/>
- <fileTypes extension="bmp" type="binary"/>
- <fileTypes extension="tif" type="binary"/>
- <fileTypes extension="doc" type="binary"/>
- <fileTypes extension="xls" type="binary"/>
- <fileTypes extension="ppt" type="binary"/>
- <fileTypes extension="zip" type="binary"/>
- <fileTypes extension="exe" type="binary"/>
- <fileTypes extension="dll" type="binary"/>
- <fileTypes extension="so" type="binary"/>
- <fileTypes extension="project" type="text"/>
-</extension>
-
-<extension point="org.eclipse.core.resources.fileModificationValidator" id="FileValidator">
- <fileModificationValidator class="org.eclipse.team.internal.core.FileModificationValidatorManager"/>
-</extension>
-
-<extension point="org.eclipse.core.resources.moveDeleteHook" id="MoveDeleteHook">
- <moveDeleteHook class="org.eclipse.team.internal.core.MoveDeleteManager"/>
-</extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IFileTypeInfo.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IFileTypeInfo.java
deleted file mode 100644
index e78cbbabf..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IFileTypeInfo.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.core;
-
-/**
- * A file type info specifies both the file extension and the
- * corresponding file type.
- *
- * @since 2.0
- */
-public interface IFileTypeInfo {
- /**
- * Returns the string specifying the file extension
- *
- * @return the file extension
- */
- public String getExtension();
-
- /**
- * Returns the file type for files ending with the corresponding
- * extension.
- *
- * Valid values are:
- * Team.UNKNOWN
- * Team.TEXT
- * Team.BINARY
- *
- * @return the file type
- */
- public int getType();
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IIgnoreInfo.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IIgnoreInfo.java
deleted file mode 100644
index a35e684c3..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IIgnoreInfo.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.core;
-
-/**
- * An ignore info specifies both the pattern and the enabled state
- * of a globally ignored pattern.
- *
- * @since 2.0
- */
-public interface IIgnoreInfo {
- /**
- * Return the string specifying the pattern of this ignore. The string
- * may include the wildcard characters '*' and '?'. If you wish to
- * include either of these characters verbatim (i.e. you do not wish
- * them to expand to wildcards), you must escape them with a backslash '\'.
- * <p>
- * If you are using string literals in Java to represent the patterns, don't
- * forget escape characters are represented by "\\".
- *
- * @return the pattern represented by this ignore info
- */
- public String getPattern();
- /**
- * Return whether or not this ignore info is enabled. A disabled ignore
- * info remains in the global ignore list, but no attempt is made to match
- * with it to determine resource ignore state.
- *
- * @return whether the ignore info is enabled
- */
- public boolean getEnabled();
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IProjectSetSerializer.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IProjectSetSerializer.java
deleted file mode 100644
index bf1dbf358..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/IProjectSetSerializer.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.core;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * IProjectSetSerializer manages the serializing and deserializing
- * of references to projects. Given a project, it can produce a
- * UTF-8 encoded String which can be stored in a file.
- * Given this String, it can create in the workspace an IProject.
- */
-
-public interface IProjectSetSerializer {
-
- /**
- * For every IProject in providerProjects, return an opaque
- * UTF-8 encoded String to act as a reference to that project.
- * The format of the String is specific to the provider.
- * The format of the String must be such that
- * IProjectSetSerializer.addToWorskpace() will be able to
- * consume it and recreate a corresponding project.
- * @see IProjectSetSerializer.addToWorkspace()
- *
- * @param providerProjects an array of projects that the serializer should create
- * text references for
- * @param context a UI context object. This object will either be a
- * com.ibm.swt.widgets.Shell or it will be null.
- * @param monitor a progress monitor
- * @return an array of serialized reference strings uniquely identifying the projects
- */
- public String[] asReference(IProject[] providerProjects, Object context, IProgressMonitor monitor) throws TeamException;
-
- /**
- * For every String in referenceStrings, create in the workspace a
- * corresponding IProject. Return an Array of the resulting IProjects.
- * Result is unspecified in the case where an IProject of that name
- * already exists. In the case of failure, a TeamException must be thrown.
- * The opaque strings in referenceStrings are guaranteed to have been previously
- * produced by IProjectSetSerializer.asReference().
- * @see IProjectSetSerializer.asReference()
- *
- * @param referenceStrings an array of referene strings uniquely identifying the projects
- * @param filename the name of the file that the references were read from. This is included
- * in case the provider needs to deduce relative paths
- * @param context a UI context object. This object will either be a
- * com.ibm.swt.widgets.Shell or it will be null.
- * @param monitor a progress monitor
- * @return an array of projects that were created
- */
- public IProject[] addToWorkspace(String[] referenceStrings, String filename, Object context, IProgressMonitor monitor) throws TeamException;
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProvider.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProvider.java
deleted file mode 100644
index e4f0f5221..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProvider.java
+++ /dev/null
@@ -1,488 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.core;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFileModificationValidator;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IProjectNature;
-import org.eclipse.core.resources.IProjectNatureDescriptor;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.team.IMoveDeleteHook;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.team.internal.core.*;
-import org.eclipse.team.internal.core.Policy;
-import org.eclipse.team.internal.core.simpleAccess.SimpleAccessOperations;
-
-/**
- * A concrete subclass of <code>RepositoryProvider</code> is created for each
- * project that is associated with a repository provider. The lifecycle of these
- * instances is managed by the platform's 'nature' mechanism.
- * <p>
- * To create a repository provider and have it registered with the platform a client
- * must minimally:
- * <ol>
- * <li>extend <code>RepositoryProvider<code>
- * <li>define a nature extension in <code>plugin.xml</code> that is
- * part of the "org.eclipse.team.repository-provider" set. Having the repository nature
- * assigned to the team set allows cardinality restrictions to be inforced by the platform
- * (e.g. one repository provider can assigned to a project at a time). Here is an
- * example extension point definition:
- * <code>
- * <extension point="org.eclipse.core.resources.natures" id="myprovidernature" name="MyRepositoryType">
- * <runtime>
- * <run class="org.eclipse.myprovider.MyRepositoryProvider"/>
- * </runtime>
- * <one-of-nature id="org.eclipse.team.repository-provider"/>
- * </extension>
- * </p>
- * </code>
- * </ol></p>
- * <p>
- * Once a repository provider is registered as a nature and is in the team set, then you
- * can associate a repository provider with a project by assigning to the project the
- * nature id of the repository provider.
- * </p>
- * @see IProjectNature
- * @see RepositoryProviderType
- *
- * @since 2.0
- */
-public abstract class RepositoryProvider implements IProjectNature {
-
- private final static String TEAM_SETID = "org.eclipse.team.repository-provider"; //$NON-NLS-1$
-
- private final static QualifiedName PROVIDER_PROP_KEY =
- new QualifiedName("org.eclipse.team.core", "repository"); //$NON-NLS-1$ //$NON-NLS-2$
-
- private final static List AllProviderTypeIds = initializeAllProviderTypes();
-
- // the project instance that this nature is assigned to
- private IProject project;
-
- /**
- * Instantiate a new RepositoryProvider with concrete class by given providerID
- * and associate it with project.
- * @throws TeamException
- * <ul>
- * <li>There is no provider by that ID.</li>
- * <li>The project is already associated with a repository provider.</li>
- * </ul>
- * @see unmap(IProject)
- */
- public static void map(IProject project, String id) throws TeamException {
- try {
- RepositoryProvider existingProvider = null;
-
- if(project.getPersistentProperty(PROVIDER_PROP_KEY) != null)
- existingProvider = getProvider(project); // get the real one, not the nature one
-
- //if we already have a provider, and its the same ID, we're ok
- //if the ID's differ, unmap the existing.
- if(existingProvider != null) {
- if(existingProvider.getID().equals(id))
- return; //nothing to do
- else
- unmap(project);
- }
-
- RepositoryProvider provider = mapNewProvider(project, id);
-
- //mark it with the persistent ID for filtering
- project.setPersistentProperty(PROVIDER_PROP_KEY, id);
- provider.configure(); //xxx not sure if needed since they control with wiz page and can configure all they want
-
- //adding the nature would've caused project description delta, so trigger one
- project.setDescription(project.getDescription(), null);
- } catch (CoreException e) {
- throw TeamPlugin.wrapException(e);
- }
- }
-
- /*
- * Instantiate the provider denoted by ID and store it in the session property.
- * Return the new provider instance.
- * @throws TeamException if the we can't instantiate the provider,
- * or if the set session property fails from core
- */
- private static RepositoryProvider mapNewProvider(IProject project, String id) throws TeamException {
- RepositoryProvider provider = newProvider(id); // instantiate via extension point
-
- if(provider == null)
- throw new TeamException(Policy.bind("RepositoryProvider.couldNotInstantiateProvider", project.getName(), id));
-
- //store provider instance as session property
- try {
- project.setSessionProperty(PROVIDER_PROP_KEY, provider);
- provider.setProject(project);
- } catch (CoreException e) {
- throw TeamPlugin.wrapException(e);
- }
- return provider;
- }
-
- /**
- * Disassoociates project with the repository provider its currently mapped to.
- * @throws TeamException The project isn't associated with any repository provider.
- */
- public static void unmap(IProject project) throws TeamException {
- try{
- boolean hasProviderAssociated = project.getPersistentProperty(PROVIDER_PROP_KEY) != null;
-
- //If you tried to remove a non-existance nature it would fail, so we need to as well with the persistent prop
- if(! hasProviderAssociated)
- throw new TeamException(Policy.bind("RepositoryProvider.No_Provider_Registered", project.getName())); //$NON-NLS-1$
-
- //This will instantiate one if it didn't already exist,
- //which is ok since we need to call deconfigure() on it for proper lifecycle
- getProvider(project).deconfigure();
-
- project.setSessionProperty(PROVIDER_PROP_KEY, null);
- project.setPersistentProperty(PROVIDER_PROP_KEY, null);
-
- //removing the nature would've caused project description delta, so trigger one
- project.setDescription(project.getDescription(), null);
- } catch (CoreException e) {
- throw TeamPlugin.wrapException(e);
- }
- }
-
- /*
- * Return the provider mapped to project, or null if none;
- */
- private static RepositoryProvider lookupProviderProp(IProject project) throws CoreException {
- return (RepositoryProvider) project.getSessionProperty(PROVIDER_PROP_KEY);
- }
-
-
- /**
- * Default constructor required for the resources plugin to instantiate this class from
- * the nature extension definition.
- */
- public RepositoryProvider() {
- }
-
- /**
- * Configures the nature for the given project. This method is called after <code>setProject</code>
- * and before the nature is added to the project. If an exception is generated during configuration
- * of the project, the nature will not be assigned to the project.
- *
- * @throws CoreException if the configuration fails.
- */
- abstract public void configureProject() throws CoreException;
-
- /**
- * Configures the nature for the given project. This is called by the platform when a nature is assigned
- * to a project. It is not intended to be called by clients.
- *
- * @throws CoreException if this method fails. If the configuration fails the nature will not be added
- * to the project.
- *
- * @see IProjectNature#configure
- */
- final public void configure() throws CoreException {
- try {
- configureProject();
- } catch(CoreException e) {
- try {
- RepositoryProvider.unmap(getProject());
- } catch(TeamException e2) {
- throw new CoreException(new Status(IStatus.ERROR, TeamPlugin.ID, 0, Policy.bind("RepositoryProvider_Error_removing_nature_from_project___1") + getID(), e2)); //$NON-NLS-1$
- }
- throw e;
- }
- }
-
- /**
- * Answer the id of this provider instance. The id should be the repository provider's
- * nature id.
- *
- * @return the nature id of this provider
- */
- abstract public String getID();
-
- /**
- * Returns an <code>IFileModificationValidator</code> for pre-checking operations
- * that modify the contents of files.
- * Returns <code>null</code> if the provider does not wish to participate in
- * file modification validation.
- *
- * @see org.eclipse.core.resources.IFileModificationValidator
- */
-
- public IFileModificationValidator getFileModificationValidator() {
- return null;
- }
-
- /**
- * Returns an <code>IMoveDeleteHook</code> for handling moves and deletes
- * that occur withing projects managed by the provider. This allows providers
- * to control how moves and deletes occur and includes the ability to prevent them.
- * <p>
- * Returning <code>null</code> signals that the default move and delete behavior is desired.
- *
- * @see org.eclipse.core.resources.IMoveDeleteHook
- */
- public IMoveDeleteHook getMoveDeleteHook() {
- return null;
- }
-
- /**
- * Returns a brief description of this provider. The exact details of the
- * representation are unspecified and subject to change, but the following
- * may be regarded as typical:
- *
- * "SampleProject:org.eclipse.team.cvs.provider"
- *
- * @return a string description of this provider
- */
- public String toString() {
- return Policy.bind("RepositoryProvider.toString", getProject().getName(), getID()); //$NON-NLS-1$
- }
-
- /**
- * Returns all known (registered) RepositoryProvider ids.
- *
- * @return an array of registered repository provider ids.
- */
- final public static String[] getAllProviderTypeIds() {
- IProjectNatureDescriptor[] desc = ResourcesPlugin.getWorkspace().getNatureDescriptors();
- List teamSet = new ArrayList();
-
- teamSet.addAll(AllProviderTypeIds); // add in all the ones we know via extension point
-
- //fall back to old method of nature ID to find any for backwards compatibility
- for (int i = 0; i < desc.length; i++) {
- String[] setIds = desc[i].getNatureSetIds();
- for (int j = 0; j < setIds.length; j++) {
- if(setIds[j].equals(TEAM_SETID)) {
- teamSet.add(desc[i].getNatureId());
- }
- }
- }
- return (String[]) teamSet.toArray(new String[teamSet.size()]);
- }
-
- /**
- * Returns the provider for a given IProject or <code>null</code> if a provider is not associated with
- * the project or if the project is closed or does not exist. This method should be called if the caller
- * is looking for <b>any</b> repository provider. Otherwise call <code>getProvider(project, id)</code>
- * yo look for a specific repository provider type.
- * </p>
- * @param project the project to query for a provider
- * @return the repository provider associated with the project
- */
- final public static RepositoryProvider getProvider(IProject project) {
- try {
- if(project.isAccessible()) {
-
- //-----------------------------
- //First check if we are using the persistent property to tag the project with provider
-
- //
- String id = project.getPersistentProperty(PROVIDER_PROP_KEY);
- RepositoryProvider provider = lookupProviderProp(project); //throws core, we will reuse the catching already here
-
- //If we have the session but not the persistent, we have a problem
- //because we somehow got only halfway through mapping before
- if(id == null && provider != null) {
- TeamPlugin.log(IStatus.ERROR, Policy.bind("RepositoryProvider.propertyMismatch", project.getName()), null);
- project.setSessionProperty(PROVIDER_PROP_KEY, null); //clears it
- return null;
- }
-
- if(provider != null)
- return provider;
-
- //check if it has the ID as a persistent property, if yes then instantiate provider
- if(id != null)
- return mapNewProvider(project, id);
-
- //Couldn't find using new method, fall back to lookup using natures for backwards compatibility
- //-----------------------------
-
- IProjectDescription projectDesc = project.getDescription();
- String[] natureIds = projectDesc.getNatureIds();
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- // for every nature id on this project, find it's natures sets and check if it is
- // in the team set.
- for (int i = 0; i < natureIds.length; i++) {
- IProjectNatureDescriptor desc = workspace.getNatureDescriptor(natureIds[i]);
- // The descriptor can be null if the nature doesn't exist
- if (desc != null) {
- String[] setIds = desc.getNatureSetIds();
- for (int j = 0; j < setIds.length; j++) {
- if(setIds[j].equals(TEAM_SETID)) {
- return getProvider(project, natureIds[i]);
- }
- }
- }
- }
- }
- } catch(CoreException e) {
- TeamPlugin.log(e.getStatus());
- } catch(TeamException e) {
- TeamPlugin.log(e.getStatus());
- }
- return null;
- }
-
- /**
- * Returns a provider of type with the given id if associated with the given project
- * or <code>null</code> if the project is not associated with a provider of that type
- * or the nature id is that of a non-team repository provider nature.
- *
- * @param project the project to query for a provider
- * @param id the repository provider id
- * @return the repository provider
- */
- final public static RepositoryProvider getProvider(IProject project, String id) {
- try {
- if(project.isAccessible()) {
- String existingID = project.getPersistentProperty(PROVIDER_PROP_KEY);
-
- if(id.equals(existingID)) {
- //if the IDs are the same then they were previously mapped
- //see if we already instantiated one
- RepositoryProvider provider = lookupProviderProp(project); //throws core, we will reuse the catching already here
- if(provider != null)
- return provider;
- //otherwise instantiate and map a new one
- return mapNewProvider(project, id);
- }
-
- //couldn't find using new method, fall back to lookup using natures for backwards compatibility
- //-----------------------------
-
- // if the nature id given is not in the team set then return
- // null.
- IProjectNatureDescriptor desc = ResourcesPlugin.getWorkspace().getNatureDescriptor(id);
- if(desc == null) //for backwards compat., may not have any nature by that ID
- return null;
-
- String[] setIds = desc.getNatureSetIds();
- for (int i = 0; i < setIds.length; i++) {
- if(setIds[i].equals(TEAM_SETID)) {
- return (RepositoryProvider)project.getNature(id);
- }
- }
- }
- } catch(CoreException e) {
- // would happen if provider nature id is not registered with the resources plugin
- TeamPlugin.log(new Status(IStatus.WARNING, TeamPlugin.ID, 0, Policy.bind("RepositoryProviderTypeRepositoryProvider_not_registered_as_a_nature_id___3", id), e)); //$NON-NLS-1$
- } catch(TeamException e) {
- TeamPlugin.log(e.getStatus());
- }
- return null;
- }
-
- /*
- * Provisional.
- * Returns an object which implements a set of provider neutral operations for this
- * provider. Answers <code>null</code> if the provider does not wish to support these
- * operations.
- *
- * @return the repository operations or <code>null</code> if the provider does not
- * support provider neutral operations.
- */
- public SimpleAccessOperations getSimpleAccess() {
- return null;
- }
-
- /*
- * @see IProjectNature#getProject()
- */
- public IProject getProject() {
- return project;
- }
-
- /*
- * @see IProjectNature#setProject(IProject)
- */
- public void setProject(IProject project) {
- this.project = project;
- }
-
- private static List initializeAllProviderTypes() {
- List allIDs = new ArrayList();
-
- TeamPlugin plugin = TeamPlugin.getPlugin();
- if (plugin != null) {
- IExtensionPoint extension = plugin.getDescriptor().getExtensionPoint(TeamPlugin.REPOSITORY_EXTENSION);
- if (extension != null) {
- IExtension[] extensions = extension.getExtensions();
- for (int i = 0; i < extensions.length; i++) {
- IConfigurationElement [] configElements = extensions[i].getConfigurationElements();
- for (int j = 0; j < configElements.length; j++) {
- String extensionId = configElements[j].getAttribute("id"); //$NON-NLS-1$
- allIDs.add(extensionId);
- }
- }
- }
- }
- return allIDs;
- }
-
- private static RepositoryProvider newProvider(String id) {
- TeamPlugin plugin = TeamPlugin.getPlugin();
- if (plugin != null) {
- IExtensionPoint extension = plugin.getDescriptor().getExtensionPoint(TeamPlugin.REPOSITORY_EXTENSION);
- if (extension != null) {
- IExtension[] extensions = extension.getExtensions();
- for (int i = 0; i < extensions.length; i++) {
- IConfigurationElement [] configElements = extensions[i].getConfigurationElements();
- for (int j = 0; j < configElements.length; j++) {
- String extensionId = configElements[j].getAttribute("id"); //$NON-NLS-1$
- if (extensionId != null && extensionId.equals(id)) {
- try {
- return (RepositoryProvider) configElements[j].createExecutableExtension("class"); //$NON-NLS-1$
- } catch (CoreException e) {
- TeamPlugin.log(e.getStatus());
- return null;
- }
- }
- }
- }
- }
- }
- return null;
- }
-
- /*
- * Convert a project that are using natures to mark them as Team projects
- * to instead use persistent properties. Optionally remove the nature from the project.
- * Do nothing if the project has no Team nature.
- * Assume that the same ID is used for both the nature and the persistent property.
- */
- public static void convertNatureToProperty(IProject project, boolean removeNature) throws TeamException {
- RepositoryProvider provider = RepositoryProvider.getProvider(project);
- if(provider == null)
- return;
-
- String providerId = provider.getID();
-
- RepositoryProvider.map(project, providerId);
- if(removeNature) {
- Team.removeNatureFromProject(project, providerId, new NullProgressMonitor());
- }
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/Team.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/Team.java
deleted file mode 100644
index 398fbf701..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/Team.java
+++ /dev/null
@@ -1,572 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.core;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.EOFException;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.team.internal.core.Policy;
-import org.eclipse.team.internal.core.StringMatcher;
-import org.eclipse.team.internal.core.TeamPlugin;
-
-/**
- * The Team class provides a global point of reference for the global ignore set
- * and the text/binary registry.
- */
-public final class Team {
- // File type constants
- public static final int UNKNOWN = 0;
- public static final int TEXT = 1;
- public static final int BINARY = 2;
-
- // File name of the persisted file type information
- private static final String STATE_FILE = ".fileTypes"; //$NON-NLS-1$
-
- // File name of the persisted global ignore patterns
- private final static String GLOBALIGNORE_FILE = ".globalIgnores"; //$NON-NLS-1$
-
- // Keys: file extensions. Values: Integers
- private static Hashtable table;
-
- // The ignore list that is read at startup from the persisted file
- private static Map globalIgnore = new HashMap(11);
-
- private static class FileTypeInfo implements IFileTypeInfo {
- private String extension;
- private int type;
-
- public FileTypeInfo(String extension, int type) {
- this.extension = extension;
- this.type = type;
- }
- public String getExtension() {
- return extension;
- }
- public int getType() {
- return type;
- }
- }
-
- private static class IgnoreInfo implements IIgnoreInfo {
- private String pattern;
- private boolean enabled;
-
- public IgnoreInfo(String pattern, boolean enabled) {
- this.pattern = pattern;
- this.enabled = enabled;
- }
- public String getPattern() {
- return pattern;
- }
- public boolean getEnabled() {
- return enabled;
- }
- };
-
- /**
- * Return the type of the given IStorage.
- *
- * Valid return values are:
- * Team.TEXT
- * Team.BINARY
- * Team.UNKNOWN
- *
- * @param storage the IStorage
- * @return whether the given IStorage is TEXT, BINARY, or UNKNOWN
- */
- public static int getType(IStorage storage) {
- String extension = getFileExtension(storage.getName());
- if (extension == null) return UNKNOWN;
- Integer integer = (Integer)table.get(extension);
- if (integer == null) return UNKNOWN;
- return integer.intValue();
- }
-
- /**
- * Returns whether the given file should be ignored.
- *
- * This method answers true if the file matches one of the global ignore
- * patterns, or if the file is marked as derived.
- *
- * @param file the file
- * @return whether the file should be ignored
- */
- public static boolean isIgnoredHint(IFile file) {
- if (file.isDerived()) return true;
- IIgnoreInfo[] ignorePatterns = getAllIgnores();
- StringMatcher matcher;
- for (int i = 0; i < ignorePatterns.length; i++) {
- IIgnoreInfo info = ignorePatterns[i];
- if (info.getEnabled()) {
- matcher = new StringMatcher(info.getPattern(), true, false);
- if (matcher.match(file.getName())) return true;
- }
- }
- return false;
- }
-
- /**
- * Returns whether the given file should be ignored.
- * @deprecated use isIgnoredHint instead
- */
- public static boolean isIgnored(IFile file) {
- IIgnoreInfo[] ignorePatterns = getAllIgnores();
- StringMatcher matcher;
- for (int i = 0; i < ignorePatterns.length; i++) {
- IIgnoreInfo info = ignorePatterns[i];
- if (info.getEnabled()) {
- matcher = new StringMatcher(info.getPattern(), true, false);
- if (matcher.match(file.getName())) return true;
- }
- }
- return false;
- }
-
- /**
- * Return all known file types.
- *
- * @return all known file types
- */
- public static IFileTypeInfo[] getAllTypes() {
- List result = new ArrayList();
- Enumeration e = table.keys();
- while (e.hasMoreElements()) {
- String string = (String)e.nextElement();
- int type = ((Integer)table.get(string)).intValue();
- result.add(new FileTypeInfo(string, type));
- }
- return (IFileTypeInfo[])result.toArray(new IFileTypeInfo[result.size()]);
- }
-
- /**
- * Returns the list of global ignores.
- */
- public static IIgnoreInfo[] getAllIgnores() {
- IIgnoreInfo[] result = new IIgnoreInfo[globalIgnore.size()];
- Iterator e = globalIgnore.keySet().iterator();
- int i = 0;
- while (e.hasNext() ) {
- final String pattern = (String)e.next();
- final boolean enabled = ((Boolean)globalIgnore.get(pattern)).booleanValue();
- result[i++] = new IIgnoreInfo() {
- private String p = pattern;
- private boolean e = enabled;
- public String getPattern() {
- return p;
- }
- public boolean getEnabled() {
- return e;
- }
- };
- }
- return result;
- }
-
- /**
- * Set the file type for the give extension to the given type.
- *
- * Valid types are:
- * Team.TEXT
- * Team.BINARY
- * Team.UNKNOWN
- *
- * @param extension the file extension
- * @param type the file type
- */
- public static void setAllTypes(String[] extensions, int[] types) {
- table = new Hashtable(11);
- for (int i = 0; i < extensions.length; i++) {
- table.put(extensions[i], new Integer(types[i]));
- }
- }
-
- /**
- * Add patterns to the list of global ignores.
- */
- public static void setAllIgnores(String[] patterns, boolean[] enabled) {
- globalIgnore = new Hashtable(11);
- for (int i = 0; i < patterns.length; i++) {
- globalIgnore.put(patterns[i], new Boolean(enabled[i]));
- }
- }
-
- /**
- * Utility method for removing a project nature from a project.
- *
- * @param proj the project to remove the nature from
- * @param natureId the nature id to remove
- * @param monitor a progress monitor to indicate the duration of the operation, or
- * <code>null</code> if progress reporting is not required.
- */
- public static void removeNatureFromProject(IProject proj, String natureId, IProgressMonitor monitor) throws TeamException {
- try {
- IProjectDescription description = proj.getDescription();
- String[] prevNatures= description.getNatureIds();
- List newNatures = new ArrayList(Arrays.asList(prevNatures));
- newNatures.remove(natureId);
- description.setNatureIds((String[])newNatures.toArray(new String[newNatures.size()]));
- proj.setDescription(description, monitor);
- } catch(CoreException e) {
- throw wrapException(Policy.bind("manager.errorRemovingNature", proj.getName(), natureId), e); //$NON-NLS-1$
- }
- }
-
- /**
- * Utility method for adding a nature to a project.
- *
- * @param proj the project to add the nature
- * @param natureId the id of the nature to assign to the project
- * @param monitor a progress monitor to indicate the duration of the operation, or
- * <code>null</code> if progress reporting is not required.
- *
- * @exception TeamException if a problem occured setting the nature
- */
- public static void addNatureToProject(IProject proj, String natureId, IProgressMonitor monitor) throws TeamException {
- try {
- IProjectDescription description = proj.getDescription();
- String[] prevNatures= description.getNatureIds();
- String[] newNatures= new String[prevNatures.length + 1];
- System.arraycopy(prevNatures, 0, newNatures, 0, prevNatures.length);
- newNatures[prevNatures.length]= natureId;
- description.setNatureIds(newNatures);
- proj.setDescription(description, monitor);
- } catch(CoreException e) {
- throw wrapException(Policy.bind("manager.errorSettingNature", proj.getName(), natureId), e); //$NON-NLS-1$
- }
- }
-
- /*
- * TEXT
- *
- * Reads the text patterns currently defined by extensions.
- */
- private static void initializePluginPatterns() {
- TeamPlugin plugin = TeamPlugin.getPlugin();
- if (plugin != null) {
- IExtensionPoint extension = plugin.getDescriptor().getExtensionPoint(TeamPlugin.FILE_TYPES_EXTENSION);
- if (extension != null) {
- IExtension[] extensions = extension.getExtensions();
- for (int i = 0; i < extensions.length; i++) {
- IConfigurationElement[] configElements = extensions[i].getConfigurationElements();
- for (int j = 0; j < configElements.length; j++) {
- String ext = configElements[j].getAttribute("extension"); //$NON-NLS-1$
- if (ext != null) {
- String type = configElements[j].getAttribute("type"); //$NON-NLS-1$
- // If the extension doesn't already exist, add it.
- if (!table.containsKey(ext)) {
- if (type.equals("text")) { //$NON-NLS-1$
- table.put(ext, new Integer(TEXT));
- } else if (type.equals("binary")) { //$NON-NLS-1$
- table.put(ext, new Integer(BINARY));
- }
- }
- }
- }
- }
- }
- }
- }
-
- /*
- * TEXT
- *
- * Read the saved file type state from the given input stream.
- *
- * @param dis the input stream to read the saved state from
- * @throws IOException if an I/O problem occurs
- */
- private static void readTextState(DataInputStream dis) throws IOException {
- table = new Hashtable(11);
- int extensionCount = 0;
- try {
- extensionCount = dis.readInt();
- } catch (EOFException e) {
- // Ignore the exception, it will occur if there are no
- // patterns stored in the state file.
- return;
- }
- for (int i = 0; i < extensionCount; i++) {
- String extension = dis.readUTF();
- int type = dis.readInt();
- table.put(extension, new Integer(type));
- }
- }
-
- /*
- * TEXT
- *
- * Write the current state to the given output stream.
- *
- * @param dos the output stream to write the saved state to
- * @throws IOException if an I/O problem occurs
- */
- private static void writeTextState(DataOutputStream dos) throws IOException {
- dos.writeInt(table.size());
- Iterator it = table.keySet().iterator();
- while (it.hasNext()) {
- String extension = (String)it.next();
- dos.writeUTF(extension);
- Integer integer = (Integer)table.get(extension);
- dos.writeInt(integer.intValue());
- }
- }
-
- /*
- * TEXT
- *
- * Load the file type registry saved state. This loads the previously saved
- * contents, as well as discovering any values contributed by plug-ins.
- */
- private static void loadTextState() {
- IPath pluginStateLocation = TeamPlugin.getPlugin().getStateLocation().append(STATE_FILE);
- File f = pluginStateLocation.toFile();
- if (f.exists()) {
- try {
- DataInputStream dis = new DataInputStream(new FileInputStream(f));
- readTextState(dis);
- dis.close();
- } catch (IOException ex) {
- TeamPlugin.log(Status.ERROR, ex.getMessage(), ex);
- }
- }
- // Read values contributed by plugins
- initializePluginPatterns();
- }
-
- /*
- * TEXT
- *
- * Save the file type registry state.
- */
- private static void saveTextState() {
- IPath pluginStateLocation = TeamPlugin.getPlugin().getStateLocation();
- File tempFile = pluginStateLocation.append(STATE_FILE + ".tmp").toFile(); //$NON-NLS-1$
- File stateFile = pluginStateLocation.append(STATE_FILE).toFile();
- try {
- DataOutputStream dos = new DataOutputStream(new FileOutputStream(tempFile));
- writeTextState(dos);
- dos.close();
- if (stateFile.exists() && !stateFile.delete()) {
- TeamPlugin.log(Status.ERROR, Policy.bind("Team.Could_not_delete_state_file_1"), null); //$NON-NLS-1$
- return;
- }
- boolean renamed = tempFile.renameTo(stateFile);
- if (!renamed) {
- TeamPlugin.log(Status.ERROR, Policy.bind("Team.Could_not_rename_state_file_2"), null); //$NON-NLS-1$
- return;
- }
- } catch (Exception e) {
- TeamPlugin.log(Status.ERROR, e.getMessage(), e);
- }
- }
-
- /*
- * IGNORE
- *
- * Reads the ignores currently defined by extensions.
- */
- private static void initializePluginIgnores() {
- TeamPlugin plugin = TeamPlugin.getPlugin();
- if (plugin != null) {
- IExtensionPoint extension = plugin.getDescriptor().getExtensionPoint(TeamPlugin.IGNORE_EXTENSION);
- if (extension != null) {
- IExtension[] extensions = extension.getExtensions();
- for (int i = 0; i < extensions.length; i++) {
- IConfigurationElement [] configElements = extensions[i].getConfigurationElements();
- for (int j = 0; j < configElements.length; j++) {
- String pattern = configElements[j].getAttribute("pattern"); //$NON-NLS-1$
- if (pattern != null) {
- String selected = configElements[j].getAttribute("selected"); //$NON-NLS-1$
- boolean enabled = selected != null && selected.equalsIgnoreCase("true"); //$NON-NLS-1$
- // if this ignore doesn't already exist, add it to the global list
- if (!globalIgnore.containsKey(pattern)) {
- globalIgnore.put(pattern, new Boolean(enabled));
- }
- }
- }
- }
- }
- }
- }
-
- /*
- * IGNORE
- *
- * Save global ignore file
- */
- private static void saveIgnoreState() throws TeamException {
- // save global ignore list to disk
- IPath pluginStateLocation = TeamPlugin.getPlugin().getStateLocation();
- File tempFile = pluginStateLocation.append(GLOBALIGNORE_FILE + ".tmp").toFile(); //$NON-NLS-1$
- File stateFile = pluginStateLocation.append(GLOBALIGNORE_FILE).toFile();
- try {
- DataOutputStream dos = new DataOutputStream(new FileOutputStream(tempFile));
- writeIgnoreState(dos);
- dos.close();
- if (stateFile.exists())
- stateFile.delete();
- boolean renamed = tempFile.renameTo(stateFile);
- if (!renamed)
- throw new TeamException(new Status(IStatus.ERROR, TeamPlugin.ID, 0, Policy.bind("TeamPlugin_renaming_21"), null)); //$NON-NLS-1$
- } catch (IOException ex) {
- throw new TeamException(new Status(IStatus.ERROR, TeamPlugin.ID, 0, Policy.bind("TeamPlugin_closing_stream_22"), ex)); //$NON-NLS-1$
- }
- }
-
- /*
- * IGNORE
- *
- * Write the global ignores to the stream
- */
- private static void writeIgnoreState(DataOutputStream dos) throws IOException {
- // write the global ignore list
- int ignoreLength = globalIgnore.size();
- dos.writeInt(ignoreLength);
- Iterator e = globalIgnore.keySet().iterator();
- while (e.hasNext()) {
- String pattern = (String)e.next();
- boolean enabled = ((Boolean)globalIgnore.get(pattern)).booleanValue();
- dos.writeUTF(pattern);
- dos.writeBoolean(enabled);
- }
- }
-
- /*
- * IGNORE
- *
- * Reads the global ignore file
- */
- private static void readIgnoreState() throws TeamException {
- // read saved repositories list and ignore list from disk, only if the file exists
- IPath pluginStateLocation = TeamPlugin.getPlugin().getStateLocation().append(GLOBALIGNORE_FILE);
- File f = pluginStateLocation.toFile();
- if(f.exists()) {
- try {
- DataInputStream dis = new DataInputStream(new FileInputStream(f));
- globalIgnore = new Hashtable(11);
- int ignoreCount = 0;
- try {
- ignoreCount = dis.readInt();
- } catch (EOFException e) {
- // Ignore the exception, it will occur if there are no ignore
- // patterns stored in the provider state file.
- return;
- }
- for (int i = 0; i < ignoreCount; i++) {
- String pattern = dis.readUTF();
- boolean enabled = dis.readBoolean();
- globalIgnore.put(pattern, new Boolean(enabled));
- }
- } catch (FileNotFoundException e) {
- // not a fatal error, there just happens not to be any state to read
- } catch (IOException ex) {
- throw new TeamException(new Status(IStatus.ERROR, TeamPlugin.ID, 0, Policy.bind("TeamPlugin_closing_stream_23"), ex)); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Initialize the registry, restoring its state.
- *
- * This method is called by the plug-in upon startup, clients should not call this method
- */
- public static void startup() throws CoreException {
- try {
- table = new Hashtable(11);
- loadTextState();
- readIgnoreState();
- initializePluginIgnores();
- } catch (TeamException e) {
- throw new CoreException(e.getStatus());
- }
- }
-
- /**
- * Shut down the registry, persisting its state.
- *
- * This method is called by the plug-in upon shutdown, clients should not call this method
- */
- public static void shutdown() {
- saveTextState();
- try {
- // make sure that we update our state on disk
- saveIgnoreState();
- } catch (TeamException ex) {
- TeamPlugin.log(IStatus.WARNING, Policy.bind("TeamPlugin_setting_global_ignore_7"), ex); //$NON-NLS-1$
- }
- }
- public static IProjectSetSerializer getProjectSetSerializer(String id) {
- TeamPlugin plugin = TeamPlugin.getPlugin();
- if (plugin != null) {
- IExtensionPoint extension = plugin.getDescriptor().getExtensionPoint(TeamPlugin.PROJECT_SET_EXTENSION);
- if (extension != null) {
- IExtension[] extensions = extension.getExtensions();
- for (int i = 0; i < extensions.length; i++) {
- IConfigurationElement [] configElements = extensions[i].getConfigurationElements();
- for (int j = 0; j < configElements.length; j++) {
- String extensionId = configElements[j].getAttribute("id"); //$NON-NLS-1$
- if (extensionId != null && extensionId.equals(id)) {
- try {
- return (IProjectSetSerializer)configElements[j].createExecutableExtension("class"); //$NON-NLS-1$
- } catch (CoreException e) {
- TeamPlugin.log(e.getStatus());
- return null;
- }
- }
- }
- }
- }
- }
- return null;
- }
- private static TeamException wrapException(String message, CoreException e) {
- MultiStatus status = new MultiStatus(TeamPlugin.ID, 0, message, e);
- status.merge(e.getStatus());
- return new TeamException(status);
- }
-
- private static String getFileExtension(String name) {
- if (name == null) return null;
- int index = name.lastIndexOf('.');
- if (index == -1)
- return null;
- if (index == (name.length() - 1))
- return ""; //$NON-NLS-1$
- return name.substring(index + 1);
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/TeamException.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/TeamException.java
deleted file mode 100644
index 78b29ef75..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/TeamException.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.core;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.team.internal.core.TeamPlugin;
-
-/**
- * This exception is thrown by the team provider API. It represents a failure in an API call.
- * Since some API calls take multiple arguments, the exception is capable of returning multiple
- * statuses. The API definition determinies if the exception represents a single or multiple status
- * response; this can also be tested on the exception instance itself.
- * <p>
- * To determine the exact cause of the failure the caller should look at each status in detail.</p>
- *
- * @since 2.0
- */
-public class TeamException extends Exception {
-
- protected IStatus status = null;
-
- // The operation completed successfully.
- public static final int OK = 0;
-
- // The operation failed because the resource is not checked-in.
- public static final int NOT_CHECKED_IN = -1;
-
- // The operation failed because the resource is not checked-out.
- public static final int NOT_CHECKED_OUT = -2;
-
- // The corresponding remote resource no longer exists or was never created.
- public static final int NO_REMOTE_RESOURCE = -3;
-
- // The provider suffered an IO failure, the operation may be retried.
- public static final int IO_FAILED = -4;
-
- // The user is not authorized to execute the attempted operation.
- public static final int NOT_AUTHORIZED = -5;
-
- // The provider was unable to complete the operation for an unspecified reason.
- public static final int UNABLE = -6;
-
- // The operation cannot be performed due to a conflict with other work.
- public static final int CONFLICT = -7;
-
- /**
- * Single status constructor for a <code>TeamProviderException</code>.
- */
- public TeamException(IStatus status) {
- super(status.getMessage());
- this.status = status;
- }
-
- /**
- * Answer the single status resulting from the attempted API call.
- *
- * @return the single status of the result, or <code>null</code> if this is a multi-status
- * response.
- */
- public IStatus getStatus() {
- return status;
- }
-
- public TeamException(String message, Exception e) {
- super(e.getMessage());
- this.status = new Status(IStatus.ERROR, TeamPlugin.ID, 0, message, e);
- }
-
- public TeamException(String message) {
- super(message);
- this.status = new Status(IStatus.ERROR, TeamPlugin.ID, 0, message, null);
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/ILocalSyncElement.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/ILocalSyncElement.java
deleted file mode 100644
index 654d24d42..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/ILocalSyncElement.java
+++ /dev/null
@@ -1,186 +0,0 @@
-package org.eclipse.team.core.sync;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-
-/**
- * A <code>ILocalSyncElement</code> describes the relative synchronization of a <b>local</b>
- * resource using a <b>base</b> resource for comparison.
- * <p>
- * Differences between the base and local resources are classified as <b>outgoing changes</b>;
- * if there is a difference, the local resource is considered the <b>outgoing resource</b>. </p>
- *
- * @see IRemoteSyncElement
- */
-public interface ILocalSyncElement {
-
- /*====================================================================
- * Constants defining synchronization types:
- *====================================================================*/
-
- /**
- * Sync constant (value 0) indicating element is in sync.
- */
- public static final int IN_SYNC = 0;
-
- /**
- * Sync constant (value 1) indicating that one side was added.
- */
- public static final int ADDITION = 1;
-
- /**
- * Sync constant (value 2) indicating that one side was deleted.
- */
- public static final int DELETION = 2;
-
- /**
- * Sync constant (value 3) indicating that one side was changed.
- */
- public static final int CHANGE = 3;
-
- /**
- * Bit mask for extracting the change type.
- */
- public static final int CHANGE_MASK = CHANGE;
-
- /*====================================================================
- * Constants defining synchronization direction:
- *====================================================================*/
-
- /**
- * Sync constant (value 4) indicating a change to the local resource.
- */
- public static final int OUTGOING = 4;
-
- /**
- * Sync constant (value 8) indicating a change to the remote resource.
- */
- public static final int INCOMING = 8;
-
- /**
- * Sync constant (value 12) indicating a change to both the remote and local resources.
- */
- public static final int CONFLICTING = 12;
-
- /**
- * Bit mask for extracting the synchronization direction.
- */
- public static final int DIRECTION_MASK = CONFLICTING;
-
- /*====================================================================
- * Constants defining synchronization conflict types:
- *====================================================================*/
-
- /**
- * Sync constant (value 16) indication that both the local and remote resources have changed
- * relative to the base but their contents are the same.
- */
- public static final int PSEUDO_CONFLICT = 16;
-
- /**
- * Sync constant (value 32) indicating that both the local and remote resources have changed
- * relative to the base but their content changes do not conflict (e.g. source file changes on different
- * lines). These conflicts could be merged automatically.
- */
- public static final int AUTOMERGE_CONFLICT = 32;
-
- /**
- * Sync constant (value 64) indicating that both the local and remote resources have changed relative
- * to the base and their content changes conflict (e.g. local and remote resource have changes on
- * same lines). These conflicts can only be correctly resolved by the user.
- */
- public static final int MANUAL_CONFLICT = 64;
-
- /*====================================================================
- * Constants defining synchronization granularity:
- *====================================================================*/
-
- /**
- * Constant (value 1) to only consider timestamp comparisons (e.g. isDirty) when
- * calculating the synchronization kind. This is the faster sync compare option but it can result in false
- * conflicts.
- */
- public static final int GRANULARITY_TIMESTAMP = 1;
-
- /**
- * Constant (value 2) indicating to consider file contents when calculating the synchronization kind. This
- * synchronization mode will perform a content comparison only after timestamp operations (isDirty)
- * indicate a change. This mode allows conflicts types to be correctly identified.
- */
- public static final int GRANULARITY_CONTENTS = 2;
-
- /**
- * Constant (value 4) indicating to consider file contents (potentially ignoring whitespace)
- * when calculating the synchronization kind. This synchronization mode will perform a content
- * comparison only after timestamp operations (isDirty) indicate a change.
- * This mode allows conflicts types to be correctly identified.
- */
- public static final int GRANULARITY_CONTENTS_IGNORE_WHITESPACE = 4;
-
- /**
- * Answer a string that describes the simple name of the sync node, which is suitable
- * for display to a user. The name will be used in UI operations, so it is expected that
- * implementations will cache this value.
- *
- * @return the simple name that identifies the resource within its parent container.
- */
- public String getName();
-
- /**
- * Answer if the sync node is a container and may have children.
- *
- * @return <code>true</code> if the remote resource is a container, and <code>
- * false</code> if it is not.
- */
- public boolean isContainer();
-
- /**
- * Answers the local sync element of this node. Returns a non-existing local
- * resource handle if the local resource does not exist in the workspace.
- *
- * @return the local resource handle in this node. There should always be a local
- * resource available, however the resource may not exist.
- */
- public IResource getLocal();
-
- /**
- * Answers the base sync element of this node. Returns <code>null</code>
- * if there is no base (e.g. conflicting add).
- *
- * @return the base resource in this node, or <code>null</code> is there
- * is none.
- */
- public IRemoteResource getBase();
-
- /**
- * Answers and array of <code>ILocalSyncElement</code> elements that are immediate
- * children of this sync element, in no particular order. The returned sync nodes are
- * a combination of the nodes represented by the sync element (e.g. local, base, remote).
- *
- * @param progress a progress monitor to indicate the duration of the operation, or
- * <code>null</code> if progress reporting is not required.
- *
- * @return array of immediate children of this sync node.
- */
- public ILocalSyncElement[] members(IProgressMonitor monitor) throws TeamException;
-
- /**
- * Performs a synchronization calculation on the given element based on the local and base
- * resources. Returns an integer describing the synchronization state of this element.
- *
- * @param granularity the granularity at which the elements of this sync element
- * should be compared. On of <code>GRANULARITY_TIMESTAMP</code>, or
- * <code>GRANULARITY_CONTENTS</code>.
- * @param progress a progress monitor to indicate the duration of the operation, or
- * <code>null</code> if progress reporting is not required.
- *
- * @return an integer describing the synchronization state of this element.
- */
- public int getSyncKind(int granularity, IProgressMonitor progress);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/IRemoteResource.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/IRemoteResource.java
deleted file mode 100644
index 1bfd5d90f..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/IRemoteResource.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.core.sync;
-
-import java.io.InputStream;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-
-/**
- * Interface for resources that are not local.
- */
-public interface IRemoteResource extends IAdaptable {
-
- /**
- * Answers a string that describes the name of the remote resource. The name may be
- * displayed to the user.
- *
- * @return name of the remote resource.
- */
- public String getName();
-
- /**
- * Answers and array of <code>IRemoteResource</code> elements that are immediate
- * children of this remote resource, in no particular order.
- *
- * @param progress a progress monitor to indicate the duration of the operation, or
- * <code>null</code> if progress reporting is not required.
- *
- * @return array of immediate children of this remote resource.
- */
- public IRemoteResource[] members(IProgressMonitor progress) throws TeamException;
-
- /**
- * Returns a stream over the contents of this remote element.
- *
- * @param progress a progress monitor to indicate the duration of the operation, or
- * <code>null</code> if progress reporting is not required.
- */
- public InputStream getContents(IProgressMonitor progress) throws TeamException;
-
- /**
- * Answers if the remote element may have children.
- *
- * @return <code>true</code> if the remote element may have children and
- * <code>false</code> otherwise.
- */
- public boolean isContainer();
-}
-
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/IRemoteSyncElement.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/IRemoteSyncElement.java
deleted file mode 100644
index 3089f8d18..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/IRemoteSyncElement.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package org.eclipse.team.core.sync;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.team.core.TeamException;
-
-/**
- * A <code>ILocalSyncElement</code> describes the relative synchronization of a <b>local</b>
- * and <b>remote</b> resource using a <b>base</b> resource for comparison.
- * <p>
- * Differences between the base and remote resources are classified as <b>incoming changes</b>;
- * if there is a difference, the remote resource is considered the <b>incoming resource</b>. </p>
- *
- * @see ILocalSyncElement
- * @see ISyncProvider
- */
-public interface IRemoteSyncElement extends ILocalSyncElement {
-
- /**
- * Answer the remote sync element of this node. Returns <code>null</code>
- * if there is no remote.
- *
- * @return the remote resource in this sync element, or <code>null</code> is there
- * is none.
- */
- public IRemoteResource getRemote();
-
- /**
- * Answers <code>true</code> if the base tree is not to be considered during sync
- * comparisons and <code>false</code> if it should. If the base tree is ignored the
- * sync comparison can be based on isOutOfDate and isDirty methods only.
- */
- public boolean isThreeWay();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/LocalSyncElement.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/LocalSyncElement.java
deleted file mode 100644
index 7df9ea35e..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/LocalSyncElement.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package org.eclipse.team.core.sync;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-
-/**
- * A standard abstract class that provides implementations for <code>ILocalSyncElement</code>
- * methods.
- */
-public abstract class LocalSyncElement implements ILocalSyncElement {
-
- /**
- * Creates a client specific sync element from a <b>local</b> and <b>base</b>
- * resources. The <b>base</b> resource may be <code>null</code> and should be
- * intialized by the client if available.
- *
- * @param local the local resource in the workbench. Will never be <code>null</code>.
- * @param base the base resource, may me <code>null</code>.
- * @param data client specific data.
- *
- * @return a client specific sync element.
- */
- public abstract ILocalSyncElement create(IResource local, IRemoteResource base, Object data);
-
- /**
- * Client data that is passed to every <code>create()</code> call.
- *
- * @return client specific data that will be passed to create.
- */
- protected abstract Object getData();
-
- /**
- * Client can decide is a specific element should be ignored from this sync element's
- * children.
- *
- * @param resource the resource to be queried.
- *
- * @return <code>true</code> if this element should be ignored and not considered an
- * immediate child of this element, and <code>false</code> otherwise.
- */
- protected abstract boolean isIgnored(IResource resource);
-
- /*
- * @see ILocalSyncElement#getSyncKind(int, IProgressMonitor)
- */
- public int getSyncKind(int granularity, IProgressMonitor progress) {
-
- // XXX not sure how local sync will be used?
- int sync = IN_SYNC;
- return sync;
- }
-
- /*
- * @see ILocalSyncElement#getName()
- */
- public String getName() {
- return getLocal().getName();
- }
-
- /*
- * @see ILocalSyncElement#isContainer()
- */
- public boolean isContainer() {
- return getLocal().getType() != IResource.FILE;
- }
-
- /*
- * @see ILocalSyncElement#members(IProgressMonitor)
- */
- public ILocalSyncElement[] members(IProgressMonitor monitor) throws TeamException {
- try {
- if(getLocal().getType() != IResource.FILE) {
- IResource[] members = ((IContainer)getLocal()).members();
- List syncElements = new ArrayList(5);
- for (int i = 0; i < members.length; i++) {
- IResource iResource = members[i];
- // the base is initialy set to null, however the concrete subclass should
- // initialize the base if one is available.
- if(!isIgnored(iResource)) {
- syncElements.add(create(iResource, null, getData()));
- }
- }
- return (ILocalSyncElement[]) syncElements.toArray(new ILocalSyncElement[syncElements.size()]);
- } else {
- return new ILocalSyncElement[0];
- }
- } catch(CoreException e) {
- throw new TeamException(e.getStatus());
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/RemoteSyncElement.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/RemoteSyncElement.java
deleted file mode 100644
index 66dc61217..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/RemoteSyncElement.java
+++ /dev/null
@@ -1,425 +0,0 @@
-package org.eclipse.team.core.sync;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.io.BufferedInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.core.Assert;
-import org.eclipse.team.internal.core.Policy;
-
-/**
- * A standard abstract class that provides implementations for interesting
- * <code>IRemoteSyncElement</code> methods. The <code>members</code> method
- * provided will create a unified tree based on the local, base, and remote
- * children. The <code>getSyncKind</code> method will calculate the relative
- * sync kind of the remote node.
- */
-public abstract class RemoteSyncElement extends LocalSyncElement implements IRemoteSyncElement {
-
- /**
- * Creates a client specific sync element from a <b>local</b>, <b>base</b>, and
- * <b>remote</b> resources. The <b>base</b> and <b>remote</b> resource may be
- * <code>null</code>.
- *
- * @param local the local resource in the workbench. Will never be <code>null</code>.
- * @param base the base resource, may me <code>null</code>.
- * @param remote the remote resource, may be <code>null</code>.
- * @param data client specific data.
- *
- * @return a client specific sync element.
- */
- public abstract IRemoteSyncElement create(boolean isThreeWay, IResource local, IRemoteResource base, IRemoteResource remote, Object data);
-
- /*
- * @see ILocalSyncElement#members()
- */
- public ILocalSyncElement[] members(IProgressMonitor progress) throws TeamException {
- // create union of the local, base, and remote trees
- IRemoteResource remote = getRemote();
- IRemoteResource base = getBase();
- IResource local = getLocal();
-
- IRemoteResource[] remoteChildren =
- remote != null ? remote.members(progress) : new IRemoteResource[0];
-
- IRemoteResource[] baseChildren =
- base != null ? base.members(progress) : new IRemoteResource[0];
-
- IResource[] localChildren;
- try {
- if( local.getType() != IResource.FILE && local.exists() ) {
- localChildren = ((IContainer)local).members();
- } else {
- localChildren = new IResource[0];
- }
- } catch(CoreException e) {
- throw new TeamException(e.getStatus());
- }
-
- if (remoteChildren.length > 0 || localChildren.length > 0) {
- List syncChildren = new ArrayList(10);
- Set allSet = new HashSet(20);
- Map localSet = null;
- Map remoteSet = null;
- Map baseSet = null;
-
- if (localChildren.length > 0) {
- localSet = new HashMap(10);
- for (int i = 0; i < localChildren.length; i++) {
- IResource localChild = localChildren[i];
- String name = localChild.getName();
- localSet.put(name, localChild);
- allSet.add(name);
- }
- }
-
- if (remoteChildren.length > 0) {
- remoteSet = new HashMap(10);
- for (int i = 0; i < remoteChildren.length; i++) {
- IRemoteResource remoteChild = remoteChildren[i];
- String name = remoteChild.getName();
- remoteSet.put(name, remoteChild);
- allSet.add(name);
- }
- }
-
- if (baseChildren.length > 0) {
- baseSet = new HashMap(10);
- for (int i = 0; i < baseChildren.length; i++) {
- IRemoteResource baseChild = baseChildren[i];
- String name = baseChild.getName();
- baseSet.put(name, baseChild);
- allSet.add(name);
- }
- }
-
- Iterator e = allSet.iterator();
- while (e.hasNext()) {
- String keyChildName = (String) e.next();
-
- if (progress != null) {
- if (progress.isCanceled()) {
- throw new OperationCanceledException();
- }
- // XXX show some progress?
- }
-
- IResource localChild =
- localSet != null ? (IResource) localSet.get(keyChildName) : null;
-
- IRemoteResource remoteChild =
- remoteSet != null ? (IRemoteResource) remoteSet.get(keyChildName) : null;
-
- IRemoteResource baseChild =
- baseSet != null ? (IRemoteResource) baseSet.get(keyChildName) : null;
-
-
- if (localChild == null) {
- // there has to be a remote resource available if we got this far
- Assert.isTrue(remoteChild != null || baseChild != null);
- boolean isContainer = remoteChild != null ? remoteChild.isContainer() : baseChild.isContainer();
-
- localChild = getResourceChild(local /* parent */, keyChildName, isContainer);
- }
-
- if(!localChild.exists() || !isIgnored(localChild)) {
- syncChildren.add(create(isThreeWay(), localChild, baseChild, remoteChild, getData()));
- }
- }
- return (IRemoteSyncElement[]) syncChildren.toArray(new IRemoteSyncElement[syncChildren.size()]);
- }
- else {
- return new IRemoteSyncElement[0];
- }
- }
-
- /*
- * @see ILocalSyncElement#getSyncKind(int, IProgressMonitor)
- */
- public int getSyncKind(int granularity, IProgressMonitor progress) {
- int description = IN_SYNC;
-
- IResource local = getLocal();
- IRemoteResource remote = getRemote();
- IRemoteResource base = getBase();
-
- boolean localExists = getLocal().exists();
-
- if (isThreeWay()) {
- if (base == null) {
- if (remote == null) {
- if (!localExists) {
- Assert.isTrue(false);
- } else {
- description = OUTGOING | ADDITION;
- }
- } else {
- if (!localExists) {
- description = INCOMING | ADDITION;
- } else {
- description = CONFLICTING | ADDITION;
- try {
- progress.beginTask(null, 60);
- if (isGranularityContents(granularity) &&
- compare(granularity, true, local, remote, Policy.subMonitorFor(progress, 30))) {
- description |= PSEUDO_CONFLICT;
- }
- } finally {
- progress.done();
- }
- }
- }
- } else {
- if (!localExists) {
- if (remote == null) {
- description = CONFLICTING | DELETION | PSEUDO_CONFLICT;
- } else {
- if (compare(granularity, false, base, remote, progress))
- description = OUTGOING | DELETION;
- else
- description = CONFLICTING | CHANGE;
- }
- } else {
- if (remote == null) {
- if (compare(granularity, false, local, base, progress))
- description = INCOMING | DELETION;
- else
- description = CONFLICTING | CHANGE;
- } else {
- progress.beginTask(null, 90);
- boolean ay = compare(granularity, false, local, base, Policy.subMonitorFor(progress, 30));
- boolean am = compare(granularity, false, base, remote, Policy.subMonitorFor(progress, 30));
- if (ay && am) {
- ;
- } else if (ay && !am) {
- description = INCOMING | CHANGE;
- } else if (!ay && am) {
- description = OUTGOING | CHANGE;
- } else {
- description = CONFLICTING | CHANGE;
- if (isGranularityContents(granularity) &&
- compare(granularity, true, local, remote, Policy.subMonitorFor(progress, 30))) {
- description |= PSEUDO_CONFLICT;
- }
- }
- progress.done();
- }
- }
- }
- } else { // two compare without access to base contents
- if (remote == null) {
- if (!localExists) {
- Assert.isTrue(false);
- // shouldn't happen
- } else {
- description= DELETION;
- }
- } else {
- if (!localExists) {
- description= ADDITION;
- } else {
- if (! compare(granularity, false, local, remote, Policy.subMonitorFor(progress, 30)))
- description= CHANGE;
- }
- }
- }
- return description;
- }
-
- /**
- * Helper methods for comparisons that returns true if the resource contents are the same.
- *
- * If timestampDiff is true then the timestamps don't differ and there's no point checking the
- * contents.
- */
- protected boolean compare(int granularity, boolean force, IResource e1, IRemoteResource e2, IProgressMonitor monitor) {
- boolean timestampEquals;
- if (force) {
- timestampEquals = false;
- } else {
- timestampEquals = timestampEquals(e1, e2);
- }
- if (!timestampEquals && isGranularityContents(granularity)) {
- try {
- monitor.beginTask(null, 100);
- return contentsEqual(
- getContents(e1, Policy.subMonitorFor(monitor, 50)),
- getContents(e2, Policy.subMonitorFor(monitor, 50)),
- granularity == GRANULARITY_CONTENTS_IGNORE_WHITESPACE);
- } finally {
- monitor.done();
- }
- } else {
- return timestampEquals;
- }
- }
-
- protected boolean compare(int granularity, boolean force, IRemoteResource e1, IRemoteResource e2, IProgressMonitor monitor) {
- boolean timestampEquals;
- if (force) {
- timestampEquals = false;
- } else {
- timestampEquals = timestampEquals(e1, e2);
- }
- if (!timestampEquals && isGranularityContents(granularity)) {
- try {
- monitor.beginTask(null, 100);
- return contentsEqual(
- getContents(e1, Policy.subMonitorFor(monitor, 50)),
- getContents(e2, Policy.subMonitorFor(monitor, 50)),
- granularity == GRANULARITY_CONTENTS_IGNORE_WHITESPACE);
- } finally {
- monitor.done();
- }
- } else {
- return timestampEquals;
- }
- }
-
- protected abstract boolean timestampEquals(IResource e1, IRemoteResource e2);
- protected abstract boolean timestampEquals(IRemoteResource e1, IRemoteResource e2);
-
- protected boolean isGranularityContents(int granularity) {
- return granularity != GRANULARITY_TIMESTAMP;
- }
-
- private InputStream getContents(IResource resource, IProgressMonitor monitor) {
- try {
- if (resource instanceof IStorage)
- return new BufferedInputStream(((IStorage) resource).getContents());
- return null;
- } catch (CoreException e) {
- return null;
- }
- }
-
- private InputStream getContents(IRemoteResource remote, IProgressMonitor monitor) {
- try {
- if (!remote.isContainer())
- return new BufferedInputStream(remote.getContents(monitor));
- return null;
- } catch (TeamException exception) {
- // The remote node has gone away .
- return null;
- }
- }
-
- /**
- * Returns <code>true</code> if both input streams byte contents is identical.
- *
- * @param input1 first input to contents compare
- * @param input2 second input to contents compare
- * @return <code>true</code> if content is equal
- */
- private boolean contentsEqual(InputStream is1, InputStream is2, boolean ignoreWhitespace) {
- if (is1 == is2)
- return true;
-
- if (is1 == null && is2 == null) // no byte contents
- return true;
-
- try {
- if (is1 == null || is2 == null) // only one has contents
- return false;
-
- while (true) {
- int c1 = is1.read();
- while (ignoreWhitespace && isWhitespace(c1)) c1 = is1.read();
- int c2 = is2.read();
- while (ignoreWhitespace && isWhitespace(c2)) c2 = is2.read();
- if (c1 == -1 && c2 == -1)
- return true;
- if (c1 != c2)
- break;
-
- }
- } catch (IOException ex) {
- } finally {
- if (is1 != null) {
- try {
- is1.close();
- } catch (IOException ex) {
- }
- }
- if (is2 != null) {
- try {
- is2.close();
- } catch (IOException ex) {
- }
- }
- }
- return false;
- }
-
- /*
- * Only skip CRs for now.
- */
- private boolean isWhitespace(int c) {
- if (c == -1) return false;
- return Character.isWhitespace((char)c);
- }
-
- /*
- * Returns a handle to a non-existing resource.
- */
- private IResource getResourceChild(IResource parent, String childName, boolean isContainer) {
- if (parent.getType() == IResource.FILE) {
- return null;
- }
- if (isContainer) {
- return ((IContainer) parent).getFolder(new Path(childName));
- } else {
- return ((IContainer) parent).getFile(new Path(childName));
- }
- }
-
- /*
- * @see Object#toString()
- */
- public String toString() {
- return getName() + kindToString(getSyncKind(GRANULARITY_TIMESTAMP, null));
- }
-
- static public String kindToString(int kind) {
- StringBuffer buffer = new StringBuffer();
- buffer.append("["); //$NON-NLS-1$
- if(kind==IN_SYNC) {
- buffer.append("in-sync"); //$NON-NLS-1$
- } else {
- switch(kind & DIRECTION_MASK) {
- case CONFLICTING: buffer.append("conflicting"); break; //$NON-NLS-1$
- case OUTGOING: buffer.append("outgoing"); break; //$NON-NLS-1$
- case INCOMING: buffer.append("incoming"); break; //$NON-NLS-1$
- }
- switch(kind & CHANGE_MASK) {
- case CHANGE: buffer.append("change"); break; //$NON-NLS-1$
- case ADDITION: buffer.append("addition"); break; //$NON-NLS-1$
- case DELETION: buffer.append("deletion"); break; //$NON-NLS-1$
- }
- if((kind & MANUAL_CONFLICT) != 0) buffer.append("{manual}"); //$NON-NLS-1$
- if((kind & AUTOMERGE_CONFLICT) != 0) buffer.append("{auto}"); //$NON-NLS-1$
- }
- buffer.append("]"); //$NON-NLS-1$
- return buffer.toString();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/IRemoteTargetResource.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/IRemoteTargetResource.java
deleted file mode 100644
index a637c80a9..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/IRemoteTargetResource.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.core.target;
-
-import java.net.URL;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteResource;
-
-/**
- * Interface for target resources that are not local. This is a handle to a
- * clients-side 'proxy' for the server resource. There are no guarantees that
- * the handle is not stale or invalid.
- * <p>
- * Use <code>exists()</code> to verify is the associated server resource
- * exists.</p>
- * <p>
- * Methods that take progress monitors are expected to be long running and
- * may contact the server. Progress and cancellation will be provided. Clients
- * can assume that methods that don't take progress monitors are responsive
- * and won't contact the server.
- * </p>
- *
- * @see IRemoteResource
- */
-public interface IRemoteTargetResource extends IRemoteResource {
- /**
- * Returns the URL of this remote resource.
- */
- public URL getURL();
-
- /**
- * Returns the size of the resource.
- */
- public int getSize(IProgressMonitor monitor) throws TeamException;
-
- /**
- * Returns the last modified time
- */
- public String getLastModified(IProgressMonitor monitor) throws TeamException;
-
- /**
- * Return a boolean value indicating whether or not this resource exists on the
- * remote server.
- */
- public boolean exists(IProgressMonitor monitor) throws TeamException;
-
- /**
- * Creates the directory named by this URL, including any necessary but non-existant
- * parent directories.
- */
- public void mkdirs(IProgressMonitor monitor) throws TeamException;
-
- /**
- * Returns a handle to the remote file identified by the given path in this
- * folder.
- * <p>
- * This is a remote resource handle operation; neither the resource nor
- * the result need exist on the server.</p>
- * <p>
- * The supplied path may be absolute or relative; in either case, it is
- * interpreted as relative to this resource and is appended
- * to this container's full path to form the full path of the resultant resource.
- * A trailing separator is ignored.
- * </p>
- *
- * @param name the path of the remote member file
- * @return the (handle of the) remote file
- * @see #getFolder
- */
- public IRemoteTargetResource getFile(String name);
-
- /**
- * Returns a handle to the remote folder identified by the given path in this
- * folder.
- * <p>
- * This is a remote resource handle operation; neither the resource nor
- * the result need exist on the server.</p>
- * <p>
- * The supplied path may be absolute or relative; in either case, it is
- * interpreted as relative to this resource and is appended
- * to this container's full path to form the full path of the resultant resource.
- * A trailing separator is ignored.
- * </p>
- *
- * @param path the path of the remote member file
- * @return the (handle of the) remote file
- * @see #getFolder
- */
- public IRemoteTargetResource getFolder(String name);
-
- /**
- * Return the site where this remote resource exists
- */
- public Site getSite();
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/ISiteFactory.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/ISiteFactory.java
deleted file mode 100644
index 9b9d05dc0..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/ISiteFactory.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.core.target;
-
-import java.io.ObjectInputStream;
-import java.util.Properties;
-
-/**
- * The <code>ISiteFactory</code> interface must be implemented by any plug-in
- * that is providing target management. It provides mechanisms for creating
- * concrete <code>Site</code> instances for it's target type.
- *
- * @see Site
- */
-public interface ISiteFactory {
- /**
- * Responsible for reading from the stream and restoring the classes fields
- * then returning a new <code>Site</code> instance. The <code>Site</code>
- * instances are written using the <code>Site#writeObject</code> method.
- *
- * @param is the input stream that contains the output of Site#writeObject
- * @return a new target site
- */
- public Site newSite(ObjectInputStream is);
-
- /**
- * Returns a new target site for the given target specific properties. This
- * is mainly used for testing purposes.
- *
- * @param properties the target specific location encoded in properties
- * @return a new target site
- */
- public Site newSite(Properties properties);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/ISiteListener.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/ISiteListener.java
deleted file mode 100644
index 44d95e113..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/ISiteListener.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.core.target;
-
-public interface ISiteListener {
- public void siteAdded(Site site);
- public void siteRemoved(Site site);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/ITargetRunnable.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/ITargetRunnable.java
deleted file mode 100644
index 82f8e4694..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/ITargetRunnable.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.core.target;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-
-public interface ITargetRunnable {
- public void run(IProgressMonitor monitor) throws TeamException;
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/Site.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/Site.java
deleted file mode 100644
index ee1e0eb73..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/Site.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.core.target;
-
-import java.io.ObjectOutputStream;
-import java.net.URL;
-import java.security.Provider;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteResource;
-
-/**
- * A <code>Site</code> is a place where resources can be deployed and
- * retrieved via a target provider.
- *
- * @see ISiteFactory
- */
-public abstract class Site {
-
- /**
- * Answers a <code>TargetProvider</code> instance for the given path at
- * this site.
- */
- public abstract TargetProvider newProvider(IPath intrasitePath)
- throws TeamException;
-
- /**
- * Answers the type identifier for this site. For example:
- * <blockquote><pre>
- * org.eclipse.team.target.webdav
- * </pre></blockquote>
- *
- * @return string identifier for this site
- */
- public abstract String getType();
-
- /**
- * Answers the location of this site as a URL. For example:
- * <blockquote><pre>
- * http://www.mysite.com:14356/dav
- * </pre></blockquote>
- *
- * @return URL location of this site
- */
- public abstract URL getURL();
-
- /**
- * Answers a string that can be displayed to the user that represents
- * this site. For example:
- * <blockquote><pre>
- * http://usename@www.mysite.com/dav (WebDav)
- * </pre></blockquote>
- */
- public abstract String getDisplayName();
-
- /**
- * Writes the state of this site such that the corresponding concrete
- * <code>ISiteFactory</code> class can restore the site.
- *
- * @param os the object stream into which to write it's state
- */
- public abstract void writeObject(ObjectOutputStream os);
-
- /**
- * Returns a handle to the remote resource that represents this site
- * on the server.
- *
- * @return a remote handle to this site that may or may not exist
- */
- public IRemoteTargetResource getRemoteResource() throws TeamException {
- return newProvider(Path.EMPTY).getRemoteResource();
- }
-
- /**
- * Compares two Sites. The result is <code>true</code> if and only if
- * the argument is not <code>null</code> and is a Site object that
- * represents the same Site as this object. Two Site objects are equal
- * if they have the same types and URLs.
- *
- * @param other the Site to compare with
- *
- * @return <code>true</code> if the Sites are the same; <code>false</code>
- * otherwise
- *
- * @see Object#equals(Object)
- */
- public boolean equals(Object other) {
- if(this == other) return true;
- if(! (other instanceof Site)) return false;
- Site location = (Site)other;
- return getType().equals(location.getType()) &&
- getURL().equals(location.getURL());
- }
-
- public int hashCode() {
- return getURL().hashCode();
- }
-
- /**
- * Debugging helper
- *
- * @see Object#toString()
- */
- public String toString() {
- return getDisplayName();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/TargetManager.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/TargetManager.java
deleted file mode 100644
index 576d16ade..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/TargetManager.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.core.target;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ISynchronizer;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.core.Policy;
-import org.eclipse.team.internal.core.TeamPlugin;
-import org.eclipse.team.internal.core.target.LocationMapping;
-
-public class TargetManager {
- private static final String TARGET_SITES_FILE = ".targetSites"; //$NON-NLS-1$
-
- private static final QualifiedName TARGET_MAPPINGS =
- new QualifiedName("org.eclipse.team.core.target", "mappings"); //$NON-NLS-1$ //$NON-NLS-2$
-
- private static Map factories = new Hashtable();
- private static List sites = new ArrayList();
- private static List listeners = new ArrayList();
-
- //Key for persistent property to denote the project as having target management
- private static final QualifiedName PROP_KEY =
- new QualifiedName("org.eclipse.team", "target"); //$NON-NLS-1$ //$NON-NLS-2$
-
- //Key to signify the kind of target. We only have one at the moment
- private static final String BASIC_TARGET_KEY = "basic"; //$NON-NLS-1$
-
- public static void startup() {
- ResourcesPlugin.getWorkspace().getSynchronizer().add(TARGET_MAPPINGS);
- readLocations();
- }
-
- public static Site[] getSites() {
- return (Site[]) sites.toArray(
- new Site[sites.size()]);
- }
-
- public static void addSite(Site site) {
- sites.add(site);
- save();
- for (Iterator it = listeners.iterator(); it.hasNext();) {
- ISiteListener element = (ISiteListener) it.next();
- element.siteAdded(site);
- }
- }
-
- public static void removeSite(Site site) {
- sites.remove(site);
- save();
- for (Iterator it = listeners.iterator(); it.hasNext();) {
- ISiteListener element = (ISiteListener) it.next();
- element.siteRemoved(site);
- }
- }
-
- /**
- * @see TargetProvider#map(IProject)
- */
- public static void map(IProject project, Site site, IPath path) throws TeamException {
- try {
- ISynchronizer s = ResourcesPlugin.getWorkspace().getSynchronizer();
- byte[] mappingBytes = s.getSyncInfo(TARGET_MAPPINGS, project);
- if (mappingBytes != null) {
- throw new TeamException(Policy.bind("TargetManager.Problems_mapping_project._Project_is_already_mapped._4")); //$NON-NLS-1$
- }
- LocationMapping mapping = new LocationMapping(site, path);
- s.setSyncInfo(
- TARGET_MAPPINGS,
- project,
- mapping.encode());
- project.setPersistentProperty(PROP_KEY, BASIC_TARGET_KEY);
- } catch (CoreException e) {
- throw new TeamException(Policy.bind("TargetManager.Problems_mapping_project", project.getName()), e); //$NON-NLS-1$
- } catch (IOException e) {
- throw new TeamException(Policy.bind("TargetManager.Problems_mapping_project", project.getName()), e); //$NON-NLS-1$
- }
- }
-
- /**
- * @see TargetProvider#unmap(IProject)
- */
- public static void unmap(IProject project) throws TeamException {
- try {
- ISynchronizer s = ResourcesPlugin.getWorkspace().getSynchronizer();
- byte[] mappingBytes = s.getSyncInfo(TARGET_MAPPINGS, project);
- if (mappingBytes == null) {
- throw new TeamException(Policy.bind("TargetManager.unableToUnmap", project.getName()), null); //$NON-NLS-1$
- } else {
- TargetProvider provider = getProvider(project);
- provider.deregister(project);
- s.flushSyncInfo(TARGET_MAPPINGS, project, IResource.DEPTH_ZERO);
- }
- project.setPersistentProperty(PROP_KEY, null); // null arg removes
- } catch (CoreException e) {
- throw new TeamException(Policy.bind("TargetManager.problemsUnmapping", project.getName()), e); //$NON-NLS-1$
- }
- }
-
- public static TargetProvider getProvider(IProject project) throws TeamException {
- try {
- ISynchronizer s = ResourcesPlugin.getWorkspace().getSynchronizer();
- byte[] mappingBytes = s.getSyncInfo(TARGET_MAPPINGS, project);
- if (mappingBytes == null) {
- return null;
- } else {
- LocationMapping mapping = new LocationMapping(mappingBytes);
- Site site =
- getSite(mapping.getType(), mapping.getURL());
- if (site != null) {
- return site.newProvider(mapping.getPath());
- }
- }
- return null;
- } catch (CoreException e) {
- throw new TeamException(Policy.bind("TargetManager.problemsGettingProvider", project.getName()), e); //$NON-NLS-1$
- } catch (IOException e) {
- throw new TeamException(Policy.bind("TargetManager.problemsGettingProvider", project.getName()), e); //$NON-NLS-1$
- }
- }
-
- public static Site getSite(String type, URL url) {
- return getSite(type, url.toExternalForm());
- }
-
- public static Site getSite(String type, String urlID) {
- for (Iterator it = sites.iterator(); it.hasNext();) {
- Site element = (Site) it.next();
- if (element.getType().equals(type)
- && element.getURL().toExternalForm().equals(urlID)) {
- return element;
- }
- }
- return null;
- }
-
- public static void addSiteListener(ISiteListener listener) {
- listeners.add(listener);
- }
-
- public static void removeSiteListener(ISiteListener listener) {
- listeners.remove(listener);
- }
-
- private static void readLocations() {
- // read saved locations list from disk, only if the file exists
- IPath pluginStateLocation =
- TeamPlugin.getPlugin().getStateLocation().append(
- TARGET_SITES_FILE);
- File f = pluginStateLocation.toFile();
- if (f.exists()) {
- try {
- DataInputStream dis =
- new DataInputStream(new FileInputStream(f));
- readLocations(dis);
- } catch (IOException e) {
- TeamPlugin.log(new Status(Status.ERROR, TeamPlugin.ID, 0, Policy.bind("Config.error"), e)); //$NON-NLS-1$
- }
- }
- }
-
- private static void writeLocations() {
- // save repositories to disk
- IPath pluginStateLocation = TeamPlugin.getPlugin().getStateLocation();
- File tempFile = pluginStateLocation.append(TARGET_SITES_FILE + ".tmp").toFile(); //$NON-NLS-1$
- File stateFile =
- pluginStateLocation.append(TARGET_SITES_FILE).toFile();
- try {
- DataOutputStream dos =
- new DataOutputStream(new FileOutputStream(tempFile));
- writeLocations(dos);
- dos.close();
- if (stateFile.exists())
- stateFile.delete();
- boolean renamed = tempFile.renameTo(stateFile);
- if (!renamed) {
- //todo: log the error
- }
- } catch (IOException e) {
- TeamPlugin.log(new Status(Status.ERROR, TeamPlugin.ID, 0, Policy.bind("Config.error"), e)); //$NON-NLS-1$
- }
- }
-
- private static void save() {
- writeLocations();
- }
-
- private static void readLocations(DataInputStream dis) throws IOException {
- int repoCount = dis.readInt();
- for (int i = 0; i < repoCount; i++) {
- String id = dis.readUTF();
- ISiteFactory factory =
- (ISiteFactory) getSiteFactory(id);
- if (factory == null) {
- //todo: log error
- return;
- }
- Site site = factory.newSite(new ObjectInputStream(dis));
- sites.add(site);
- }
- }
-
- private static void writeLocations(DataOutputStream dos)
- throws IOException {
- dos.writeInt(sites.size());
- Iterator iter = sites.iterator();
- while (iter.hasNext()) {
- Site site = (Site) iter.next();
- dos.writeUTF(site.getType());
- site.writeObject(new ObjectOutputStream(dos));
- }
- dos.flush();
- dos.close();
- }
-
- public static ISiteFactory getSiteFactory(String id) {
- TeamPlugin plugin = TeamPlugin.getPlugin();
- if (plugin != null) {
- IExtensionPoint extension =
- plugin.getDescriptor().getExtensionPoint(
- TeamPlugin.TARGETS_EXTENSION);
- if (extension != null) {
- IExtension[] extensions = extension.getExtensions();
- for (int i = 0; i < extensions.length; i++) {
- IConfigurationElement[] configElements =
- extensions[i].getConfigurationElements();
- for (int j = 0; j < configElements.length; j++) {
- String extensionId = configElements[j].getAttribute("id"); //$NON-NLS-1$
- if (extensionId != null && extensionId.equals(id)) {
- try {
- return (ISiteFactory) configElements[j].createExecutableExtension("class"); //$NON-NLS-1$
- } catch (CoreException e) {
- TeamPlugin.log(e.getStatus());
- return null;
- }
- }
- }
- }
- }
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/TargetProvider.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/TargetProvider.java
deleted file mode 100644
index b6ca9a1eb..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/target/TargetProvider.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.core.target;
-
-import java.net.URL;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-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.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-
-public abstract class TargetProvider {
- /**
- * Answers the site which this target is associated with
- * @return a printable string
- */
- public abstract Site getSite();
-
- /**
- * Answers the full path where the provider stores/retrieves to/from.
- * @return a printable string
- */
- public abstract URL getURL();
-
- /**
- * Updates the local resource to have the same content as the corresponding remote
- * resource. Where the local resource does not exist, this method will create it.
- * Where, the remote resource does not exist and the local does, this method will delete
- * the local resource.
- * <p>
- * If the remote resource is a container (e.g. folder or project) this operation is equivalent
- * to getting each member of the remote resource, thereby updating the
- * content of existing local members, creating local members to receive new remote resources,
- * and deleting local members that no longer have a corresponding remote resource.</p>
- * <p>
- * Interrupting the method (via the progress monitor) may lead to partial, but consistent, results.</p>
- *
- * @param resources an array of local resources to update from the corresponding remote
- * resources.
- * @param progress a progress monitor to indicate the duration of the operation, or
- * <code>null</code> if progress reporting is not required.
- * @throws TeamException if there is a problem getting one or more of the resources. The
- * exception will contain multiple statuses, one for each resource in the <code>resources</code>
- * array.
- */
- public abstract void get(IResource[] resources, IProgressMonitor progress) throws TeamException;
-
- /**
- * Updates the local resource to have the same content as the given remote
- * resource. Where the local resource does not exist, this method will create it.
- * <p>
- * If the remote resource is a container (e.g. folder or project) this operation is equivalent
- * to getting each non-container member of the remote resource, thereby updating the
- * content of existing local members, creating local members to receive new remote resources,
- * and deleting local members that no longer have a corresponding remote resource.</p>
- * <p>
- * Interrupting the method (via the progress monitor) may lead to partial, but consistent, results.</p>
- *
- * @param resources an array of local resources to update from the corresponding remote
- * resources.
- * @param progress a progress monitor to indicate the duration of the operation, or
- * <code>null</code> if progress reporting is not required.
- * @throws TeamException if there is a problem getting one or more of the resources. The
- * exception will contain multiple statuses, one for each resource in the <code>resources</code>
- * array.
- */
- public abstract void get(IResource resource, IRemoteTargetResource remote, IProgressMonitor progress) throws TeamException;
-
- /**
- * Transfers the content of the local resource to the corresponding remote resource.
- * <p>
- * If a remote resource does not exist this method creates a new remote resource with the same content
- * as the given local resource. The local resource is said to <i>correspond</i> to the new remote resource.
- * If the local resource doesn't exist and a remote does, the remote resource will be deleted.
- * </p>
- * <p>
- * If the local resource is a container (e.g. folder or project) this operation is equivalent
- * to putting each member of the local resource, thereby updating the
- * content of existing remote members, creating remote members to receive new local resources,
- * and deleting remote members that no longer have a corresponding local resource.</p>
- * <p>
- * @param resources an array of local resources to be put.
- * @param progress a progress monitor to indicate the duration of the operation, or
- * <code>null</code> if progress reporting is not required.
- * @throws TeamException if there is a problem put'ing one or more of the resources.
- * The exception will contain multiple status', one for each resource in the <code>resources</code>
- * array.
- */
- public abstract void put(IResource[] resources, IProgressMonitor progress) throws TeamException;
-
- /**
- * Returns a remote resource handle at the path of the given local resource.
- *
- * @param resource local resource path to be used to construct the remote handle's path
- * @return a handle to a remote resource that may or may not exist
- */
- public abstract IRemoteTargetResource getRemoteResourceFor(IResource resource);
-
- /**
- * Returns a remote resource handle at the path of this target provider's URL.
- * @return a handle to a remote resource that may or may not exist
- */
- public abstract IRemoteTargetResource getRemoteResource();
-
- /**
- * Replies true if its believed possible to get the given resource.
- * This intended to be a relatively quick operation, presumably based on local state of the provider
- * or it may be used to indicate that the provider only supports data transfer in one direction.
- * It is not intended to indicate the existance of a remote resource. Hence, this method may return true
- * even if there is no remote resource.
- */
- public boolean canGet(IResource resource) {
- return true;
- }
-
- /**
- * Replies true if its believed possible to put the given resource.
- * This intended to be a relatively quick operation, presumably based on local state of the provider
- * or it may be used to indicate that the provider only supports data transfer in one direction.
- */
- public boolean canPut(IResource resource) {
- return true;
- }
-
- /**
- * Answers true if the base identifier of the given resource is different to the
- * current released state of the resource. Answer false if there is no correspondence
- * between the local and remote resources (i.e. hasBase(resource) returns false).
- *
- * @param resource the resource to test
- * @param monitor a progress monitor
- *
- * @throws TeamException if there is a problem getting this information from the server.
- */
- public abstract boolean isOutOfDate(IResource resource, IProgressMonitor monitor) throws TeamException;
-
- /**
- * Answer true if the local resource currently has a different timestamp to the
- * base timestamp for this resource. Answer true for local resources that no longer exist
- * (i.e. the local resource did exist and corresponded to a remote resource) and false if the
- * local resource does not exist and was never mapped to a remote resource.
- *
- * @param resource the resource to test
- */
- public abstract boolean isDirty(IResource resource);
-
- /**
- * Answer true if the given resource at one time had a remote counterpart and still does
- * to the knowledge of the provider.
- *
- * @param resource the resource to test
- */
- public abstract boolean hasBase(IResource resource);
-
- public abstract void deregister(IProject project);
-
- /**
- * This method provides a mechanism for allowing a target provider to optimize connections
- * over a set of operations. The default behavior of the method is to run the provided runnable
- * and to supply it with the provided progress monitor. Specific target providers may override this
- * method in order to ensure that the number of connections made to a remote server is minimized.
- * Calls to this method are nestable and it is up to the target provider to ensure that this is
- * supported.
- */
- public void run(final ITargetRunnable runnable, IProgressMonitor monitor) throws TeamException {
- try {
- ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- try {
- runnable.run(monitor);
- } catch (TeamException e) {
- throw new CoreException(e.getStatus());
- }
- }
- }, monitor);
- } catch (CoreException e) {
- throw new TeamException(e.getStatus());
- }
- }
-
- /**
- * Return an IRemoteSyncElement for the given resource. This element is used to
- * compare the state of the local and remote resources.
- */
- public abstract IRemoteSyncElement getRemoteSyncElement(IResource resource);
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Assert.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Assert.java
deleted file mode 100644
index 5b73a8353..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Assert.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package org.eclipse.team.internal.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.team.core.*;
-
-public final class Assert {
- public static class AssertionFailedException extends RuntimeException {
- public AssertionFailedException() {
- }
- public AssertionFailedException(String detail) {
- super(Policy.bind("Assert.assertionFailed", detail)); //$NON-NLS-1$
- }
- }
-/* This class is not intended to be instantiated. */
-private Assert() {
-}
-/** Asserts that an argument is legal. If the given boolean is
- * not <code>true</code>, an <code>IllegalArgumentException</code>
- * is thrown.
- *
- * @param expression the outcode of the check
- * @return <code>true</code> if the check passes (does not return
- * if the check fails)
- * @exception IllegalArgumentException if the legality test failed
- */
-public static boolean isLegal(boolean expression) {
- return isLegal(expression, ""); //$NON-NLS-1$
-}
-/** Asserts that an argument is legal. If the given boolean is
- * not <code>true</code>, an <code>IllegalArgumentException</code>
- * is thrown.
- * The given message is included in that exception, to aid debugging.
- *
- * @param expression the outcode of the check
- * @param message the message to include in the exception
- * @return <code>true</code> if the check passes (does not return
- * if the check fails)
- * @exception IllegalArgumentException if the legality test failed
- */
-public static boolean isLegal(boolean expression, String message) {
- if (!expression)
- throw new IllegalArgumentException(message);
- return expression;
-}
-/** Asserts that the given object is not <code>null</code>. If this
- * is not the case, some kind of unchecked exception is thrown.
- *
- * @param object the value to test
- * @exception IllegalArgumentException if the object is <code>null</code>
- */
-public static void isNotNull(Object object) {
- if (object == null)
- throw new AssertionFailedException("null argument"); //$NON-NLS-1$
-}
-/** Asserts that the given object is not <code>null</code>. If this
- * is not the case, some kind of unchecked exception is thrown.
- * The given message is included in that exception, to aid debugging.
- *
- * @param object the value to test
- * @param message the message to include in the exception
- * @exception IllegalArgumentException if the object is <code>null</code>
- */
-public static void isNotNull(Object object, String message) {
- if (object == null)
- throw new AssertionFailedException("null argument:" /*non NLS*/ + message); //$NON-NLS-1$
-}
-/** Asserts that the given boolean is <code>true</code>. If this
- * is not the case, some kind of unchecked exception is thrown.
- *
- * @param expression the outcode of the check
- * @return <code>true</code> if the check passes (does not return
- * if the check fails)
- */
-public static boolean isTrue(boolean expression) {
- return isTrue(expression, ""/*nonNLS*/); //$NON-NLS-1$
-}
-/** Asserts that the given boolean is <code>true</code>. If this
- * is not the case, some kind of unchecked exception is thrown.
- * The given message is included in that exception, to aid debugging.
- *
- * @param expression the outcode of the check
- * @param message the message to include in the exception
- * @return <code>true</code> if the check passes (does not return
- * if the check fails)
- */
-public static boolean isTrue(boolean expression, String message) {
- if (!expression)
- throw new AssertionFailedException("assert failed:" /*non NLS*/ + message); //$NON-NLS-1$
- return expression;
-}
-/**
- * Indicates that the caller has not implemented the method.
- * Usually this is a temporary condition.
- */
-public static void notYetImplemented() {
-}
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultFileModificationValidator.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultFileModificationValidator.java
deleted file mode 100644
index 7576010e5..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultFileModificationValidator.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.core;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFileModificationValidator;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Status;
-
-public class DefaultFileModificationValidator implements IFileModificationValidator {
- private static final Status OK = new Status(Status.OK, TeamPlugin.ID, Status.OK, Policy.bind("FileModificationValidator.ok"), null); //$NON-NLS-1$
-
- private IStatus getDefaultStatus(IFile file) {
- return file.isReadOnly()
- ? new Status(Status.ERROR, TeamPlugin.ID, Status.ERROR, Policy.bind("FileModificationValidator.fileIsReadOnly", file.getFullPath().toString()), null) //$NON-NLS-1$
- : OK;
- }
-
- /**
- * @see IFileModificationValidator#validateEdit(IFile[], Object)
- */
- public IStatus validateEdit(IFile[] files, Object context) {
- if (files.length == 1) {
- return getDefaultStatus(files[0]);
- }
-
- IStatus[] stati = new Status[files.length];
- boolean allOK = true;
-
- for (int i = 0; i < files.length; i++) {
- stati[i] = getDefaultStatus(files[i]);
- if(! stati[i].isOK())
- allOK = false;
- }
-
- return new MultiStatus(TeamPlugin.ID,
- 0, stati,
- Policy.bind(
- allOK
- ? "FileModificationValidator.ok" //$NON-NLS-1$
- : "FileModificationValidator.someReadOnly" ), //$NON-NLS-1$
- null);
- }
-
- /**
- * @see IFileModificationValidator#validateSave(IFile)
- */
- public IStatus validateSave(IFile file) {
- return getDefaultStatus(file);
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultMoveDeleteHook.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultMoveDeleteHook.java
deleted file mode 100644
index b35fa8136..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/DefaultMoveDeleteHook.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package org.eclipse.team.internal.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.team.IMoveDeleteHook;
-import org.eclipse.core.resources.team.IResourceTree;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * A class which provides the default behavior for resource deletions and moves.
- * This class can be overridden by providers to change some or all of the behavior
- * related to resources deletions or moves.
- *
- * @see org.eclipse.team.core.ResourceProvider#getMoveDeleteHook()
- */
-
-public class DefaultMoveDeleteHook implements IMoveDeleteHook {
-
- /**
- * @see IMoveDeleteHook#deleteFile(IResourceTree, IFile, int, IProgressMonitor)
- */
- public boolean deleteFile(
- IResourceTree tree,
- IFile file,
- int updateFlags,
- IProgressMonitor monitor) {
- return false;
- }
-
- /**
- * @see IMoveDeleteHook#deleteFolder(IResourceTree, IFolder, int, IProgressMonitor)
- */
- public boolean deleteFolder(
- IResourceTree tree,
- IFolder folder,
- int updateFlags,
- IProgressMonitor monitor) {
- return false;
- }
-
- /**
- * @see IMoveDeleteHook#deleteProject(IResourceTree, IProject, int, IProgressMonitor)
- */
- public boolean deleteProject(
- IResourceTree tree,
- IProject project,
- int updateFlags,
- IProgressMonitor monitor) {
- return false;
- }
-
- /**
- * @see IMoveDeleteHook#moveFile(IResourceTree, IFile, IFile, int, IProgressMonitor)
- */
- public boolean moveFile(
- IResourceTree tree,
- IFile source,
- IFile destination,
- int updateFlags,
- IProgressMonitor monitor) {
- return false;
- }
-
- /**
- * @see IMoveDeleteHook#moveFolder(IResourceTree, IFolder, IFolder, int, IProgressMonitor)
- */
- public boolean moveFolder(
- IResourceTree tree,
- IFolder source,
- IFolder destination,
- int updateFlags,
- IProgressMonitor monitor) {
- return false;
- }
-
- /**
- * @see IMoveDeleteHook#moveProject(IResourceTree, IProject, IProjectDescription, int, IProgressMonitor)
- */
- public boolean moveProject(
- IResourceTree tree,
- IProject source,
- IProjectDescription description,
- int updateFlags,
- IProgressMonitor monitor) {
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/FileModificationValidatorManager.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/FileModificationValidatorManager.java
deleted file mode 100644
index 9e5ddc619..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/FileModificationValidatorManager.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package org.eclipse.team.internal.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFileModificationValidator;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.team.core.RepositoryProvider;
-
-public class FileModificationValidatorManager implements IFileModificationValidator {
- private static final IFileModificationValidator DEFAULT_VALIDATOR =
- new DefaultFileModificationValidator();
-
- /*
- * @see IFileModificationValidator#validateEdit(IFile[], Object)
- * For all files, determine which provider.
- * Ask each provider once for its files.
- * Collect the resulting status' and return a MultiStatus.
- */
- public IStatus validateEdit(IFile[] files, Object context) {
- ArrayList returnStati = new ArrayList();
-
- //map provider to the files under that provider's control
- Map providersToFiles = new HashMap(files.length);
-
- //for each file, determine which provider, map providers to files
- for (int i = 0; i < files.length; i++) {
- IFile file = files[i];
- RepositoryProvider provider = RepositoryProvider.getProvider(file.getProject());
-
- if (!providersToFiles.containsKey(provider)) {
- providersToFiles.put(provider, new ArrayList());
- }
-
- ((ArrayList)providersToFiles.get(provider)).add(file);
- }
-
- Iterator providersIterator = providersToFiles.keySet().iterator();
-
- boolean allOK = true;
-
- //for each provider, validate its files
- while(providersIterator.hasNext()) {
- RepositoryProvider provider = (RepositoryProvider)providersIterator.next();
- ArrayList filesList = (ArrayList)providersToFiles.get(provider);
- IFile[] filesArray = (IFile[])filesList.toArray(new IFile[filesList.size()]);
- IFileModificationValidator validator = DEFAULT_VALIDATOR;
-
- //if no provider or no validator use the default validator
- if (provider != null) {
- IFileModificationValidator v = provider.getFileModificationValidator();
- if (v != null) validator = v;
- }
-
- IStatus status = validator.validateEdit(filesArray, context);
- if(!status.isOK())
- allOK = false;
-
- returnStati.add(status);
- }
-
- if (returnStati.size() == 1) {
- return (IStatus)returnStati.get(0);
- }
-
- return new MultiStatus(TeamPlugin.ID,
- 0,
- (IStatus[])returnStati.toArray(new IStatus[returnStati.size()]),
- Policy.bind(
- allOK
- ? "FileModificationValidator.ok" //$NON-NLS-1$
- : "FileModificationValidator.editFailed"), //$NON-NLS-1$
- null); //$NON-NLS-1$
- }
-
- /*
- * @see IFileModificationValidator#validateSave(IFile)
- */
- public IStatus validateSave(IFile file) {
- RepositoryProvider provider = RepositoryProvider.getProvider(file.getProject());
- IFileModificationValidator validator = DEFAULT_VALIDATOR;
-
- //if no provider or no validator use the default validator
- if (provider != null) {
- IFileModificationValidator v = provider.getFileModificationValidator();
- if (v != null) validator = v;
- }
-
- return validator.validateSave(file);
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/InfiniteSubProgressMonitor.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/InfiniteSubProgressMonitor.java
deleted file mode 100644
index e09373605..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/InfiniteSubProgressMonitor.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package org.eclipse.team.internal.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-
-/**
- * Provides an infinite progress monitor by subdividing by half repeatedly.
- *
- * The ticks parameter represents the number of ticks shown in the progress dialog.
- * However, the number of ticks that can actually be worked is n*ticks/2 where
- * 2^n = ticks. What this means is that if you provide a ticks of 32 (2^5) than
- * the maximum number of ticks is 5*32/2 = 80.
- *
- */
-public class InfiniteSubProgressMonitor extends SubProgressMonitor {
-
- int totalWork;
- int halfWay;
- int currentIncrement;
- int nextProgress;
- int worked;
-
- /**
- * Constructor for InfiniteSubProgressMonitor.
- * @param monitor
- * @param ticks
- */
- public InfiniteSubProgressMonitor(IProgressMonitor monitor, int ticks) {
- this(monitor, ticks, 0);
- }
-
- /**
- * Constructor for InfiniteSubProgressMonitor.
- * @param monitor
- * @param ticks
- * @param style
- */
- public InfiniteSubProgressMonitor(IProgressMonitor monitor, int ticks, int style) {
- super(monitor, ticks, style);
- }
-
- public void beginTask(String name, int totalWork) {
- super.beginTask(name, totalWork);
- this.totalWork = totalWork;
- this.halfWay = totalWork / 2;
- this.currentIncrement = 1;
- this.nextProgress = currentIncrement;
- this.worked = 0;
- }
-
- public void worked(int work) {
- if (worked >= totalWork) return;
- if (--nextProgress <= 0) {
- super.worked(1);
- worked++;
- if (worked >= halfWay) {
- // we have passed the current halfway point, so double the
- // increment and reset the halfway point.
- currentIncrement *= 2;
- halfWay += (totalWork - halfWay) / 2;
- }
- // reset the progress counter to another full increment
- nextProgress = currentIncrement;
- }
- }
-
- /**
- * Don't allow clearing of the subtask. This will stop the flickering
- * of the subtask in the progress dialogs.
- *
- * @see IProgressMonitor#subTask(String)
- */
- public void subTask(String name) {
- if(name != null && ! name.equals("")) { //$NON-NLS-1$
- super.subTask(name);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/MoveDeleteManager.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/MoveDeleteManager.java
deleted file mode 100644
index ef1e1eea6..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/MoveDeleteManager.java
+++ /dev/null
@@ -1,110 +0,0 @@
-package org.eclipse.team.internal.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.team.IMoveDeleteHook;
-import org.eclipse.core.resources.team.IResourceTree;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.RepositoryProvider;
-
-public class MoveDeleteManager implements IMoveDeleteHook {
-
- private static final IMoveDeleteHook DEFAULT_HOOK = new DefaultMoveDeleteHook();
-
- private IMoveDeleteHook getHookFor(IResource resource) {
- IProject project = resource.getProject();
- RepositoryProvider provider = RepositoryProvider.getProvider(project);
- if(provider==null) {
- return DEFAULT_HOOK;
- }
- IMoveDeleteHook hook = provider.getMoveDeleteHook();
- if (hook == null) {
- return DEFAULT_HOOK;
- }
- return hook;
- }
-
- /*
- * @see IMoveDeleteHook#deleteFile(IResourceTree, IFile, int, IProgressMonitor)
- */
- public boolean deleteFile(
- IResourceTree tree,
- IFile file,
- int updateFlags,
- IProgressMonitor monitor) {
-
- return getHookFor(file).deleteFile(tree, file, updateFlags, monitor);
- }
-
- /*
- * @see IMoveDeleteHook#deleteFolder(IResourceTree, IFolder, int, IProgressMonitor)
- */
- public boolean deleteFolder(
- IResourceTree tree,
- IFolder folder,
- int updateFlags,
- IProgressMonitor monitor) {
-
- return getHookFor(folder).deleteFolder(tree, folder, updateFlags, monitor);
- }
-
- /*
- * @see IMoveDeleteHook#deleteProject(IResourceTree, IProject, int, IProgressMonitor)
- */
- public boolean deleteProject(
- IResourceTree tree,
- IProject project,
- int updateFlags,
- IProgressMonitor monitor) {
-
- return getHookFor(project).deleteProject(tree, project, updateFlags, monitor);
- }
-
- /*
- * @see IMoveDeleteHook#moveFile(IResourceTree, IFile, IFile, int, IProgressMonitor)
- */
- public boolean moveFile(
- IResourceTree tree,
- IFile source,
- IFile destination,
- int updateFlags,
- IProgressMonitor monitor) {
-
- return getHookFor(source).moveFile(tree, source, destination, updateFlags, monitor);
- }
-
- /*
- * @see IMoveDeleteHook#moveFolder(IResourceTree, IFolder, IFolder, int, IProgressMonitor)
- */
- public boolean moveFolder(
- IResourceTree tree,
- IFolder source,
- IFolder destination,
- int updateFlags,
- IProgressMonitor monitor) {
-
- return getHookFor(source).moveFolder(tree, source, destination, updateFlags, monitor);
- }
-
- /*
- * @see IMoveDeleteHook#moveProject(IResourceTree, IProject, IProjectDescription, int, IProgressMonitor)
- */
- public boolean moveProject(
- IResourceTree tree,
- IProject source,
- IProjectDescription description,
- int updateFlags,
- IProgressMonitor monitor) {
-
- return getHookFor(source).moveProject(tree, source, description, updateFlags, monitor);
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/NullSubProgressMonitor.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/NullSubProgressMonitor.java
deleted file mode 100644
index 91507fa05..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/NullSubProgressMonitor.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.core;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-
-/**
- * This sub-progress monitor can be used to ignore progress indication for
- * methods but allow cancellation.
- * <p>
- * This implementation supports cancelation. The default implementations of the
- * other methods do nothing.
- * </p>
- * @see NullProgressMonitor
- * @see SubProgressMonitor
- */
-public class NullSubProgressMonitor extends SubProgressMonitor {
- /**
- * Constructor for InfiniteSubProgressMonitor.
- * @param monitor
- * @param ticks
- */
- public NullSubProgressMonitor(IProgressMonitor monitor) {
- super(monitor, 0, 0);
- }
-
- /**
- * @see IProgressMonitor#beginTask(String, int)
- */
- public void beginTask(String name, int totalWork) {
- }
-
- /**
- * @see IProgressMonitor#done()
- */
- public void done() {
- }
-
- /**
- * @see IProgressMonitor#internalWorked(double)
- */
- public void internalWorked(double work) {
- }
-
- /**
- * @see IProgressMonitor#subTask(String)
- */
- public void subTask(String name) {
- }
-
- /**
- * @see IProgressMonitor#worked(int)
- */
- public void worked(int work) {
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Policy.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Policy.java
deleted file mode 100644
index 7d63beedb..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Policy.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.core;
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.SubProgressMonitor;
-
-public class Policy {
- protected static ResourceBundle bundle = null;
-
- //debug constants
- public static boolean DEBUG_STREAMS = false;
-
- static {
- //init debug options
- if (TeamPlugin.getPlugin().isDebugging()) {
- DEBUG_STREAMS = "true".equalsIgnoreCase(Platform.getDebugOption(TeamPlugin.ID + "/streams"));//$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Creates a NLS catalog for the given locale.
- */
- 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.
- */
- 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.
- */
- public static String bind(String id, String binding1, String binding2) {
- return bind(id, new String[] { binding1, binding2 });
- }
-
- /**
- * Gets a string from the resource bundle. We don't want to crash because of a missing String.
- * Returns the key if not found.
- */
- 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.
- */
- 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$
- }
- }
-
- /**
- * Progress monitor helpers
- */
- public static void checkCanceled(IProgressMonitor monitor) {
- if (monitor.isCanceled())
- throw new OperationCanceledException();
- }
- 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);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/StringMatcher.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/StringMatcher.java
deleted file mode 100644
index 0f0c8ad5a..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/StringMatcher.java
+++ /dev/null
@@ -1,389 +0,0 @@
-package org.eclipse.team.internal.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.*;
-
-/**
- * A string pattern matcher, suppporting * and ? wildcards.
- * Note: code copied from org.eclipse.jdt.internal.core.util.StringMatcher on April 3, 2001
- * (version 0.1 - 010901H18 [rename jbl]).
- */
-public class StringMatcher {
- protected String fPattern;
- protected int fLength; // pattern length
- protected boolean fIgnoreWildCards;
- protected boolean fIgnoreCase;
- protected boolean fHasLeadingStar;
- protected boolean fHasTrailingStar;
- protected String fSegments[]; //the given pattern is split into * separated segments
-
- /* boundary value beyond which we don't need to search in the text */
- protected int fBound = 0;
-
-
- protected static final char fSingleWildCard = '\u0000';
-
- public static class Position {
- int start; //inclusive
- int end; //exclusive
- public Position(int start, int end) {
- this.start = start;
- this.end = end;
- }
- public int getStart() {
- return start;
- }
- public int getEnd() {
- return end;
- }
- }
- /**
- * Find the first occurrence of the pattern between <code>start</code)(inclusive)
- * and <code>end</code>(exclusive).
- * @param <code>text</code>, the String object to search in
- * @param <code>start</code>, the starting index of the search range, inclusive
- * @param <code>end</code>, the ending index of the search range, exclusive
- * @return an <code>StringMatcher.Position</code> object that keeps the starting
- * (inclusive) and ending positions (exclusive) of the first occurrence of the
- * pattern in the specified range of the text; return null if not found or subtext
- * is empty (start==end). A pair of zeros is returned if pattern is empty string
- * Note that for pattern like "*abc*" with leading and trailing stars, position of "abc"
- * is returned. For a pattern like"*??*" in text "abcdf", (1,3) is returned
- */
-
- public StringMatcher.Position find(String text, int start, int end) {
- if (fPattern == null|| text == null)
- throw new IllegalArgumentException();
-
- int tlen = text.length();
- if (start < 0)
- start = 0;
- if (end > tlen)
- end = tlen;
- if (end < 0 ||start >= end )
- return null;
- if (fLength == 0)
- return new Position(start, start);
- if (fIgnoreWildCards) {
- int x = posIn(text, start, end);
- if (x < 0)
- return null;
- return new Position(x, x+fLength);
- }
-
- int segCount = fSegments.length;
- if (segCount == 0)//pattern contains only '*'(s)
- return new Position (start, end);
-
- int curPos = start;
- int matchStart = -1;
- int i;
- for (i = 0; i < segCount && curPos < end; ++i) {
- String current = fSegments[i];
- int nextMatch = regExpPosIn(text, curPos, end, current);
- if (nextMatch < 0 )
- return null;
- if(i == 0)
- matchStart = nextMatch;
- curPos = nextMatch + current.length();
- }
- if (i < segCount)
- return null;
- return new Position(matchStart, curPos);
- }
- /**
- * StringMatcher constructor takes in a String object that is a simple
- * pattern which may contain *  for 0 and many characters and
- * ?  for exactly one character.
- *
- * Literal '*' and '?' characters must be escaped in the pattern
- * e.g., "\*" means literal "*", etc.
- *
- * Escaping any other character (including the escape character itself),
- * just results in that character in the pattern.
- * e.g., "\a" means "a" and "\\" means "\"
- *
- * If invoking the StringMatcher with string literals in Java, don't forget
- * escape characters are represented by "\\".
- *
- * @param aPattern the pattern to match text with
- * @param ignoreCase if true, case is ignored
- * @param ignoreWildCards if true, wild cards and their escape sequences are ignored
- * (everything is taken literally).
- */
- public StringMatcher(String aPattern, boolean ignoreCase, boolean ignoreWildCards) {
- fIgnoreCase = ignoreCase;
- fIgnoreWildCards = ignoreWildCards;
- fLength = aPattern.length();
-
- /* convert case */
- if (fIgnoreCase) {
- fPattern = aPattern.toUpperCase();
- } else {
- fPattern = aPattern;
- }
-
- if (fIgnoreWildCards) {
- parseNoWildCards();
- } else {
- parseWildCards();
- }
- }
- /**
- * Given the starting (inclusive) and the ending (exclusive) poisitions in the
- * <code>text</code>, determine if the given substring matches with aPattern
- * @return true if the specified portion of the text matches the pattern
- * @param String <code>text</code>, a String object that contains the substring to match
- * @param int <code>start<code> marks the starting position (inclusive) of the substring
- * @param int <code>end<code> marks the ending index (exclusive) of the substring
- */
- public boolean match(String text, int start, int end) {
- if (null == fPattern || null == text)
- throw new IllegalArgumentException();
-
- if (start >= end)
- return false;
-
- if (fIgnoreWildCards)
- return fPattern.regionMatches(fIgnoreCase, 0, text, start, fLength);
- int segCount = fSegments.length;
- if (segCount == 0)//pattern contains only '*'(s) or empty pattern
- return true;
- if (start == end)
- return fLength == 0;
- if (fLength == 0)
- return start == end;
-
- int tlen = text.length();
- if (start < 0)
- start = 0;
- if (end > tlen)
- end = tlen;
-
- int tCurPos = start;
- int bound = end - fBound;
- if ( bound < 0)
- return false;
- int i=0;
- String current = fSegments[i];
- int segLength = current.length();
-
- /* process first segment */
- if (!fHasLeadingStar){
- if(!regExpRegionMatches(text, start, current, 0, segLength)) {
- return false;
- } else {
- ++i;
- tCurPos = tCurPos + segLength;
- }
- }
-
- /* process middle segments */
- while ( i < segCount) {
- current = fSegments[i];
- int currentMatch;
- int k = current.indexOf(fSingleWildCard);
- if (k < 0) {
- currentMatch = textPosIn(text, tCurPos, end, current);
- if (currentMatch < 0)
- return false;
- } else {
- currentMatch = regExpPosIn(text, tCurPos, end, current);
- if (currentMatch < 0)
- return false;
- }
- tCurPos = currentMatch + current.length();
- i++;
- }
-
- /* process final segment */
- if (!fHasTrailingStar && tCurPos != end) {
- int clen = current.length();
- return regExpRegionMatches(text, end - clen, current, 0, clen);
- }
- return i == segCount ;
- }
- /**
- * match the given <code>text</code> with the pattern
- * @return true if matched eitherwise false
- * @param <code>text</code>, a String object
- */
- public boolean match(String text) {
- return match(text, 0, text.length());
- }
- /**
- * This method parses the given pattern into segments seperated by wildcard '*' characters.
- * Since wildcards are not being used in this case, the pattern consists of a single segment.
- */
- private void parseNoWildCards() {
- fSegments = new String[1];
- fSegments[0] = fPattern;
- fBound = fLength;
- }
- /**
- * This method parses the given pattern into segments seperated by wildcard '*' characters.
- * @param p, a String object that is a simple regular expression with *  and/or ? 
- */
- private void parseWildCards() {
- if(fPattern.startsWith("*"))//$NON-NLS-1$
- fHasLeadingStar = true;
- if(fPattern.endsWith("*")) {//$NON-NLS-1$
- /* make sure it's not an escaped wildcard */
- if (fLength > 1 && fPattern.charAt(fLength - 2) != '\\') {
- fHasTrailingStar = true;
- }
- }
-
- Vector temp = new Vector();
-
- int pos = 0;
- StringBuffer buf = new StringBuffer();
- while (pos < fLength) {
- char c = fPattern.charAt(pos++);
- switch (c) {
- case '\\':
- if (pos >= fLength) {
- buf.append(c);
- } else {
- char next = fPattern.charAt(pos++);
- /* if it's an escape sequence */
- if (next == '*' || next == '?' || next == '\\') {
- buf.append(next);
- } else {
- /* not an escape sequence, just insert literally */
- buf.append(c);
- buf.append(next);
- }
- }
- break;
- case '*':
- if (buf.length() > 0) {
- /* new segment */
- temp.addElement(buf.toString());
- fBound += buf.length();
- buf.setLength(0);
- }
- break;
- case '?':
- /* append special character representing single match wildcard */
- buf.append(fSingleWildCard);
- break;
- default:
- buf.append(c);
- }
- }
-
- /* add last buffer to segment list */
- if (buf.length() > 0) {
- temp.addElement(buf.toString());
- fBound += buf.length();
- }
-
- fSegments = new String[temp.size()];
- temp.copyInto(fSegments);
- }
- /**
- * @param <code>text</code>, a string which contains no wildcard
- * @param <code>start</code>, the starting index in the text for search, inclusive
- * @param <code>end</code>, the stopping point of search, exclusive
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int posIn(String text, int start, int end) {//no wild card in pattern
- int max = end - fLength;
-
- if (!fIgnoreCase) {
- int i = text.indexOf(fPattern, start);
- if (i == -1 || i > max)
- return -1;
- return i;
- }
-
- for (int i = start; i <= max; ++i) {
- if (text.regionMatches(true, i, fPattern, 0, fLength))
- return i;
- }
-
- return -1;
- }
- /**
- * @param <code>text</code>, a simple regular expression that may only contain '?'(s)
- * @param <code>start</code>, the starting index in the text for search, inclusive
- * @param <code>end</code>, the stopping point of search, exclusive
- * @param <code>p</code>, a simple regular expression that may contains '?'
- * @param <code>caseIgnored</code>, wether the pattern is not casesensitive
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int regExpPosIn(String text, int start, int end, String p) {
- int plen = p.length();
-
- int max = end - plen;
- for (int i = start; i <= max; ++i) {
- if (regExpRegionMatches(text, i, p, 0, plen))
- return i;
- }
- return -1;
- }
- /**
- *
- * @return boolean
- * @param <code>text</code>, a String to match
- * @param <code>start</code>, int that indicates the starting index of match, inclusive
- * @param <code>end</code> int that indicates the ending index of match, exclusive
- * @param <code>p</code>, String, String, a simple regular expression that may contain '?'
- * @param <code>ignoreCase</code>, boolean indicating wether code>p</code> is case sensitive
- */
- protected boolean regExpRegionMatches(String text, int tStart, String p, int pStart, int plen) {
- while (plen-- > 0) {
- char tchar = text.charAt(tStart++);
- char pchar = p.charAt(pStart++);
-
- /* process wild cards */
- if (!fIgnoreWildCards) {
- /* skip single wild cards */
- if (pchar == fSingleWildCard) {
- continue;
- }
- }
- if (pchar == tchar)
- continue;
- if (fIgnoreCase) {
- char tc = Character.toUpperCase(tchar);
- if (tc == pchar)
- continue;
- }
- return false;
- }
- return true;
- }
- /**
- * @param <code>text</code>, the string to match
- * @param <code>start</code>, the starting index in the text for search, inclusive
- * @param <code>end</code>, the stopping point of search, exclusive
- * @param code>p</code>, a string that has no wildcard
- * @param <code>ignoreCase</code>, boolean indicating wether code>p</code> is case sensitive
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int textPosIn(String text, int start, int end, String p) {
-
- int plen = p.length();
- int max = end - plen;
-
- if (!fIgnoreCase) {
- int i = text.indexOf(p, start);
- if (i == -1 || i > max)
- return -1;
- return i;
- }
-
- for (int i = start; i <= max; ++i) {
- if (text.regionMatches(true, i, p, 0, plen))
- return i;
- }
-
- return -1;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamPlugin.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamPlugin.java
deleted file mode 100644
index 9f0785f0b..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/TeamPlugin.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.core;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPluginDescriptor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.target.TargetManager;
-
-/**
- * <code>TeamPlugin</code> is the plug-in runtime class for the Team
- * resource management plugin.
- * <p>
- *
- * @see Team
- * @see RepositoryProvider
- *
- * @since 2.0
- */
-final public class TeamPlugin extends Plugin {
-
- // The id of the core team plug-in
- public static final String ID = "org.eclipse.team.core"; //$NON-NLS-1$
-
- // The id of the providers extension point
- public static final String PROVIDER_EXTENSION = "repository-provider-type"; //$NON-NLS-1$
-
- // The id of the file types extension point
- public static final String FILE_TYPES_EXTENSION = "fileTypes"; //$NON-NLS-1$
-
- // The id of the global ignore extension point
- public static final String IGNORE_EXTENSION = "ignore"; //$NON-NLS-1$
- // The id of the project set extension point
- public static final String PROJECT_SET_EXTENSION = "projectSets"; //$NON-NLS-1$
- // The id of the targets extension point
- public static final String REPOSITORY_EXTENSION = "repository"; //$NON-NLS-1$
- // The id of the targets extension point
- public static final String TARGETS_EXTENSION = "targets"; //$NON-NLS-1$
-
-
- // The one and only plug-in instance
- private static TeamPlugin plugin;
-
- /**
- * Constructs a plug-in runtime class for the given plug-in descriptor.
- */
- public TeamPlugin(IPluginDescriptor pluginDescriptor) {
- super(pluginDescriptor);
- plugin = this;
- }
-
- /**
- * @see Plugin#startup()
- */
- public void startup() throws CoreException {
- Policy.localize("org.eclipse.team.internal.core.messages"); //$NON-NLS-1$
- Team.startup();
- TargetManager.startup();
- }
-
- /**
- * @see Plugin#shutdown()
- */
- public void shutdown() {
- Team.shutdown();
- }
-
- /**
- * Returns the Team plug-in.
- *
- * @return the single instance of this plug-in runtime class
- */
- public static TeamPlugin getPlugin() {
- return plugin;
- }
-
- /**
- * Returns the plug-in's log
- */
- public static void log(int severity, String message, Throwable e) {
- plugin.getLog().log(new Status(severity, ID, 0, message, e));
- }
-
- /**
- * Returns the plug-in's log
- */
- public static void log(IStatus status) {
- plugin.getLog().log(status);
- }
-
- /*
- * Static helper methods for creating exceptions
- */
- public static TeamException wrapException(Exception e) {
- return new TeamException(new Status(IStatus.ERROR, ID, 0, e.getMessage() != null ? e.getMessage() : "", e)); //$NON-NLS-1$
- }
-
- public static TeamException wrapException(CoreException e) {
- IStatus status = e.getStatus();
- return new TeamException(new Status(status.getSeverity(), ID, status.getCode(), status.getMessage(), e));
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/messages.properties b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/messages.properties
deleted file mode 100644
index 556023450..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/messages.properties
+++ /dev/null
@@ -1,72 +0,0 @@
-
-Assert.assertionFailed=Assertion failed: {0}
-
-manager.providerAlreadyMapped=Error associating {0} with provider named {1}. The project is already associated with a provider.
-manager.errorFlushSync=Error flushing provider mapping information for {0}.
-manager.errorDeconfigure=Error deconfiguring provider named {0} from project {1}.
-manager.providerTypeInvalid=The provider type is not registered: {0}.
-manager.providerExtensionNotFound=TeamPlugin provider extension not found.
-manager.providerNoConfigElems=No configuration elements found for extension: {0}.
-manager.cannotInstantiateExt=Cannot instantiate extension: {0}.
-manager.errorSerialize=Error serializing provider mappings for {0}.
-manager.errorUnserializeProvider=Cannot unserialize association of {0} with provider of type: {1}. It is no longer a registered provider type.
-manager.errorUnserialize=Error un-serializing provider mappings {0}.
-manager.notTeamNature=Error setting nature: {0} is not a registered team nature.
-manager.errorSettingNature=Error setting nature {1} on project {0}.
-manager.errorRemovingNature=Error removing nature {1} on project {0}.
-
-manager.badClassType=Error creating validator decorator: bad class type
-manager.coreException=Error creating validator decorator: core exception
-
-FileModificationValidator.someReadOnly=Some files are read-only.
-FileModificationValidator.fileIsReadOnly=File {0} is read-only.
-FileModificationValidator.editFailed=Files are read-only.
-FileModificationValidator.ok=OK
-
-RepositoryProvider_Error_removing_nature_from_project___1=Error removing nature from project:
-RepositoryProvider_Too_many_providers_associated_with_project___2=Too many providers associated with project:
-RepositoryProviderTypeduplicate_provider_found_in_plugin.xml___1=duplicate provider found in plugin.xml:
-RepositoryProviderTypeRepositoryProvider_assigned_to_the_project_must_be_a_subclass_of_RepositoryProvider___2=RepositoryProvider assigned to the project must be a subclass of RepositoryProvider:
-RepositoryProviderTypeRepositoryProvider_not_registered_as_a_nature_id___3=RepositoryProvider not registered as a nature id: {0}.
-RepositoryProvider_providerTypeIdNotRegistered=Error configuring the RepositoryProvider the nature id is not registered as a valid RepositoryProviderType id.
-RepositoryProvider.couldNotInstantiateProvider=Could not instantiate provider {1} for project {0}.
-RepositoryProvider.No_Provider_Registered=No provider registered for {0}.
-RepositoryProvider.propertyMismatch=Inconsistent session/persistent property state looking up provider {1}.
-
-TeamPlugin_setting_global_ignore_7=setting global ignore
-TeamPlugin_renaming_21=renaming
-TeamPlugin_closing_stream_22=closing stream
-TeamPlugin_closing_stream_23=closing stream
-
-Team.Could_not_delete_state_file_1=Could not delete state file
-Team.Could_not_rename_state_file_2=Could not rename state file
-
-PollingInputStream.readTimeout=Timeout while reading from input stream
-PollingInputStream.closeTimeout=Timeout while closing input stream
-PollingOutputStream.writeTimeout=Timeout while writing to output stream
-PollingOutputStream.closeTimeout=Timeout while closing output stream
-TimeoutOutputStream.cannotWriteToStream=Cannot write to output stream
-
-TargetManager.Problems_mapping_project._Project_is_already_mapped._4=Problems mapping project. Project is already mapped.
-TargetManager.Problems_mapping_project=Problems mapping project {0}
-TargetManager.unableToUnmap=Unable to unmap project. It wasn't mapped to the location. {0}
-TargetManager.problemsUnmapping=Problems unmapping project {0}
-TargetManager.problemsGettingProvider=Problems getting default target provider for {0}
-
-Config.error=Error configuring the provider
-
-teamStatus.notCheckedOut=Not checked out.
-teamStatus.notCheckedIn=Not checked in.
-teamStatus.unmanagedResource=Unmanaged resource.
-teamStatus.noRemoteResource=Remote resource does not exist.
-teamStatus.ioFailed=An IO error occurred.
-teamStatus.conflict=A conflict occurred.
-
-multiStatus.errorsOccurred=Errors occurred.
-provider.configuration.missing=Required configuration value missing.
-provider.configuration.invalid=Configuration value is invalid.
-filetransfer.monitor={0} ({1}K of {2}K bytes)
-OK_1=OK
-
-SynchronizedTargetProvider.invalid_url_combination=Could not form a valid URL from {0} and {1}
-SynchronizedTargetProvider.invalidURLCombination=SynchronizedTargetProvider.invalid_url_combination
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/simpleAccess/SimpleAccessOperations.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/simpleAccess/SimpleAccessOperations.java
deleted file mode 100644
index 8373e0f14..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/simpleAccess/SimpleAccessOperations.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.core.simpleAccess;
-
-import org.eclipse.team.core.*;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-
-/*
- * This class represents provisional API. Its here to allow experimentation with 3rd party tools
- * calling providers in a repository neutral manner.
- *
- * 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.
- *
- * The <code>SimpleAccessOperations</code> class exposes a basic repository model that
- * providers may implement to allow third-party plugins to perform repository operations
- * programmatically. For example, a code generation tool may want to get source
- * files before generating the code, and check-in the results. If a provider plugin does
- * not adhere to the <i>semantics</i> of the <code>SimpleAccessOperations</code> class
- * as described, they are free to opt out of implementing it.
- *
- * @since 2.0
- */
-public interface SimpleAccessOperations {
- /*
- * Updates the local resource to have the same content as the corresponding remote
- * resource. Where the local resource does not exist, this method will create it.
- * <p>
- * If the remote resource is a container (e.g. folder or project) this operation is equivalent
- * to getting each non-container member of the remote resource, thereby updating the
- * content of existing local members, creating local members to receive new remote resources,
- * and deleting local members that no longer have a corresponding remote resource.</p>
- * <p>
- * The method is applied to all resources satisfying the depth parameter, described above.</p>
- * <p>
- * Interrupting the method (via the progress monitor) may lead to partial, but consistent, results.</p>
- *
- * @param resources an array of local resources to update from the corresponding remote
- * resources.
- * @param depth the depth to traverse the given resources, taken from <code>IResource</code>
- * static constants.
- * @param progress a progress monitor to indicate the duration of the operation, or
- * <code>null</code> if progress reporting is not required.
- * @throws TeamException if there is a problem getting one or more of the resources. The
- * exception will contain multiple statuses, one for each resource in the <code>resources</code>
- * array. Possible status codes include:
- * <ul>
- * <li>NO_REMOTE_RESOURCE</li>
- * <li>IO_FAILED</li>
- * <li>NOT_AUTHORIZED</li>
- * <li>UNABLE</li>
- * </ul>
- */
- public void get(IResource[] resources, int depth, IProgressMonitor progress) throws TeamException;
-
- /*
- * Changes the state of the local resource from checked-in to checked-out and transfers the content
- * of the remote resource to the local resource.
- * <p>
- * Where no corresponding local resource exists in the workspace, one is created (including any
- * intermediate parent containers) to receive the contents of the remote resource.</p>
- * <p>
- * Implementations may optimistically only flag the state change locally and rely on resolving conflicts
- * during check-in, or they may pessimistically also checkout or lock the remote resource during a
- * local resource checkout to avoid conflicts. The provider API does not subscribe to either model
- * and supports each equally.</p>
- * <p>
- * Where checkout is applied to a resource that is already checked-out the method has no
- * effect.</p>
- *
- * @param resources the array of local resources to be checked-out.
- * @param depth the depth to traverse the given resources, taken from <code>IResource</code>
- * constants.
- * @param progress a progress monitor to indicate the duration of the operation, or
- * <code>null</code> if progress reporting is not required.
- * @throws TeamProviderException if there is a problem checking-out one or more of the resources.
- * The exception will contain multiple statuses, one for each resource in the <code>resources</code>
- * array. Possible status codes include:
- * <ul>
- * <li>NOT_CHECKED_IN</li>
- * <li>NO_REMOTE_RESOURCE</li>
- * <li>IO_FAILED</li>
- * <li>NOT_AUTHORIZED</li>
- * <li>UNABLE</li>
- * </ul>
- * @see checkin(IResource[], int, IProgressMonitor)
- */
- public void checkout(IResource[] resources, int depth, IProgressMonitor progress) throws TeamException;
-
- /*
- * Transfers the content of the local resource to the corresponding remote resource, and changes the
- * state of the local resource from checked-out to checked-in.
- * <p>
- * If a remote resource does not exist this method creates a new remote resource with the same content
- * as the given local resource. The local resource is said to <i>correspond</i> to the new remote resource.</p>
- * <p>
- * Where providers deal with stores that check-out or lock resources this method is an opportunity
- * to transfer the content and make the corresponding remote check-in or unlock. It is envisaged that
- * where the server maintains resource versions, checkin creates a new version of the remote resource.</p>
- * <p>
- * Note that some providers may <em>require</em> that a resource is checked-out before it can be
- * checked-in. However, all providers must support the explicit checking out a resource before checking
- * it in (e.g., even if the check out is a no-op).</p>
- *
- * @param resources an array of local resources to be checked-in.
- * @param the depth to traverse the given resources, taken from <code>IResource</code>
- * constants.
- * @param progress a progress monitor to indicate the duration of the operation, or
- * <code>null</code> if progress reporting is not required.
- * @throws TeamException if there is a problem checking-in one or more of the resources.
- * The exception will contain multiple statuses, one for each resource in the <code>resources</code>
- * array. Possible status codes include:
- * <ul>
- * <li>NOT_CHECKED_OUT</li>
- * <li>IO_FAILED</li>
- * <li>NOT_AUTHORIZED</li>
- * <li>UNABLE</li>
- * </ul>
- * @see checkout(IResource[], int, IProgressMonitor)
- */
- public void checkin(IResource[] resources, int depth, IProgressMonitor progress) throws TeamException;
-
- /*
- * Changes the state of the local resource from checked-out to checked-in without updating the contents
- * of the remote resource.
- * <p>
- * Note that where the provider is a versioning provider, it is envisaged (though not required) that the
- * uncheckout operation does not create a new version.</p>
- * <p>
- * Note also that <code>uncheckout()</code> does not affect the content of the local resource. The
- * caller is required to perform a <code>get()</code> to revert the local resource if that is required
- * (otherwise the local resource will be left with the changes that were made while the remote resource
- * was checked-out. Furthermore, it is valid to call <code>uncheckout()</code> with an
- * <code>IResource</code> that does not exist locally.</p>
- *
- * @param resources an array of the local resources that are to be unchecked-out.
- * @param depth the depth to traverse the given resources, taken from <code>IResource</code>
- * constants.
- * @param progress a progress monitor to indicate the duration of the operation, or
- * <code>null</code> if progress reporting is not required.
- * @throws TeamProviderException if there is a problem undoing the check-out of one or more of
- * the resources. The exception will contain multiple statuses, one for each resource in the
- * <code>resources</code> array. Possible status codes include:
- * <ul>
- * <li>NOT_CHECKED_OUT</li>
- * <li>IO_FAILED</li>
- * <li>NOT_AUTHORIZED</li>
- * <li>UNABLE</li>
- * </ul>
- * @see checkin(IResource)
- * @see uncheckout(IResource)
- */
- public void uncheckout(IResource[] resources, int depth, IProgressMonitor progress) throws TeamException;
-
- /*
- * Deletes the remote resource corresponding to the given local resource.
- * <p>
- * The notion of delete is simply to make the remote resource unavailable. Where the provider
- * supports versioning it is not specified whether the delete operation makes the version
- * temporarily or forever unavailable, or indeed whether the entire history is made unavailable.</p>
- * <p>
- * Note that the <code>IResource</code>'s passed as arguments may be non-existant in the
- * workbench, the typical case is when such a resource has been received in a core callback.</p>
- * <p>
- * The resource may be checked-in or checked-out prior to deletion. The local resource is not
- * deleted by this method.</p>
- * <p>
- * Resource deletions are inherently deep.</p>
- *
- * @param resources the array of resources whose corresponding remote resources are to be deleted.
- * @param progress a progress monitor to indicate the duration of the operation, or
- * <code>null</code> if progress reporting is not required.
- * @throws TeamProviderException if there is a problem deleting one or more of
- * the resources. The exception will contain multiple statuses, one for each resource in the
- * <code>resources</code> array. Possible status codes include:
- * <ul>
- * <li>NO_REMOTE_RESOURCE</li>
- * <li>IO_FAILED</li>
- * <li>NOT_AUTHORIZED</li>
- * <li>UNABLE</li>
- * </ul>
- */
- public void delete(IResource[] resources, IProgressMonitor progress) throws TeamException;
-
- /*
- * Informs the provider that a local resource's name or path has changed.
- * <p>
- * Some providers, such as versioning providers, may require this information to track the resource
- * across name changes.</p>
- * <p>
- * Note that this method is always called <em>after</em> the local resource has been moved.</p>
- *
- * @param source the full name of the resource before it was moved.
- * @param target the resource that was moved.
- * @param progress a progress monitor to indicate the duration of the operation, or
- * <code>null</code> if progress reporting is not required.
- * @throws TeamProviderException if there is a problem recording the move. The exception will
- * contain a single status. Possible status codes are:
- * <ul>
- * <li>NO_REMOTE_RESOURCE</li>
- * <li>IO_FAILED</li>
- * <li>NOT_AUTHORIZED</li>
- * <li>UNABLE</li>
- * </ul>
- */
- public void moved(IPath source, IResource target, IProgressMonitor progress) throws TeamException;
-
- /*
- * Implementor's Note:
- * The following methods are required to return promptly (i.e., they may be used to determine the state of
- * a resource in a UI where long delays are unacceptable). Implementations may cache these values
- * and update the cache on an explicit call to #refreshState().
- *
- * They are currently listed in the provider API, however, they may be moved to a new or different
- * interface in the future to better reflect their UI-orientation.
- */
-
- /*
- * Answers if the remote resource state is checked-out. If the resource has never been checked in this
- * method will return <code>true</code>.
- * <p>
- * It is undefined whether this method tests for a resource being checked out to this workspace
- * or any workspace.</p>
- *
- * @param resource the local resource to test.
- * @return <code>true</code> if the resource is checked-out and <code>false</code> if it is not.
- * @see checkout(IResource[], int, IProgressMonitor)
- */
- public boolean isCheckedOut(IResource resource);
-
- /*
- * Answers whether the resource has a corresponding remote resource.
- * <p>
- * Before a resource is checked-in, the resource will occur locally but not remotely, and calls to this
- * method will return <code>false</code>. Once a local resource is checked in (and assuming the local
- * local resource is not moved or the remote resource deleted) there will be a corresponding remote
- * resource and this method returns <code>true</code>.</p>
- *
- * @param resource the local resource to test.
- * @return <code>true</code> if the local resource has a corresponding remote resource,
- * and <code>false</code> otherwise.
- * @see checkin(IResource[], int, IProgressMonitor)
- * @see refreshState(IResource[], int, IProgressMonitor)
- */
- public boolean hasRemote(IResource resource);
-
- /*
- * Answer if the local resource currently has a different timestamp to the base timestamp
- * for this resource.
- *
- * @param resource the resource to test.
- * @return <code>true</code> if the resource has a different modification
- * timestamp, and <code>false</code> otherwise.
- */
- public boolean isDirty(IResource resource);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/CRLFtoLFInputStream.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/CRLFtoLFInputStream.java
deleted file mode 100644
index 0719a99c1..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/CRLFtoLFInputStream.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.core.streams;
-
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InterruptedIOException;
-
-/**
- * Converts CR/LFs in the underlying input stream to LF.
- *
- * Supports resuming partially completed operations after an InterruptedIOException
- * if the underlying stream does. Check the bytesTransferred field to determine how
- * much of the operation completed; conversely, at what point to resume.
- */
-public class CRLFtoLFInputStream extends FilterInputStream {
- private boolean pendingByte = false;
- private int lastByte = -1;
-
- /**
- * Creates a new filtered input stream.
- * @param in the underlying input stream
- */
- public CRLFtoLFInputStream(InputStream in) {
- super(in);
- }
-
- /**
- * Wraps the underlying stream's method.
- * Translates CR/LF sequences to LFs transparently.
- * @throws InterruptedIOException if the operation was interrupted before all of the
- * bytes specified have been skipped, bytesTransferred will be zero
- * @throws IOException if an i/o error occurs
- */
- public int read() throws IOException {
- if (! pendingByte) {
- lastByte = in.read(); // ok if this throws
- pendingByte = true; // remember the byte in case we throw an exception later on
- }
- if (lastByte == '\r') {
- lastByte = in.read(); // ok if this throws
- if (lastByte != '\n') {
- if (lastByte == -1) pendingByte = false;
- return '\r'; // leaves the byte pending for later
- }
- }
- pendingByte = false;
- return lastByte;
- }
-
- /**
- * Wraps the underlying stream's method.
- * Translates CR/LF sequences to LFs transparently.
- * @throws InterruptedIOException if the operation was interrupted before all of the
- * bytes specified have been skipped, bytesTransferred may be non-zero
- * @throws IOException if an i/o error occurs
- */
- public int read(byte[] buffer, int off, int len) throws IOException {
- // handle boundary cases cleanly
- if (len == 0) {
- return 0;
- } else if (len == 1) {
- int b = read();
- if (b == -1) return -1;
- buffer[off] = (byte) b;
- return 1;
- }
- // read some bytes from the stream
- // prefix with pending byte from last read if any
- int count = 0;
- if (pendingByte) {
- buffer[off] = (byte) lastByte;
- pendingByte = false;
- count = 1;
- }
- InterruptedIOException iioe = null;
- try {
- len = in.read(buffer, off + count, len - count);
- if (len == -1) {
- return (count == 0) ? -1 : count;
- }
- } catch (InterruptedIOException e) {
- len = e.bytesTransferred;
- iioe = e;
- }
- count += len;
- // strip out CR's in CR/LF pairs
- // pendingByte will be true iff previous byte was a CR
- int j = off;
- for (int i = off; i < off + count; ++i) { // invariant: j <= i
- lastByte = buffer[i];
- if (lastByte == '\r') {
- if (pendingByte) {
- buffer[j++] = '\r'; // write out orphan CR
- } else {
- pendingByte = true;
- }
- } else {
- if (pendingByte) {
- if (lastByte != '\n') buffer[j++] = '\r'; // if LF, don't write the CR
- pendingByte = false;
- }
- buffer[j++] = (byte) lastByte;
- }
- }
- if (iioe != null) {
- iioe.bytesTransferred = j - off;
- throw iioe;
- }
- return j - off;
- }
-
- /**
- * Calls read() to skip the specified number of bytes
- * @throws InterruptedIOException if the operation was interrupted before all of the
- * bytes specified have been skipped, bytesTransferred may be non-zero
- * @throws IOException if an i/o error occurs
- */
- public long skip(long count) throws IOException {
- int actualCount = 0; // assumes count < Integer.MAX_INT
- try {
- while (count-- > 0 && read() != -1) actualCount++; // skip the specified number of bytes
- return actualCount;
- } catch (InterruptedIOException e) {
- e.bytesTransferred = actualCount;
- throw e;
- }
- }
-
- /**
- * Wraps the underlying stream's method.
- * Returns the number of bytes that can be read without blocking; accounts for
- * possible translation of CR/LF sequences to LFs in these bytes.
- * @throws IOException if an i/o error occurs
- */
- public int available() throws IOException {
- return in.available() / 2; // we can guarantee at least this amount after contraction
- }
-
- /**
- * Mark is not supported by the wrapper even if the underlying stream does, returns false.
- */
- public boolean markSupported() {
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/LFtoCRLFInputStream.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/LFtoCRLFInputStream.java
deleted file mode 100644
index 60e4ba561..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/LFtoCRLFInputStream.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.core.streams;
-
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InterruptedIOException;
-
-/**
- * Converts LFs in the underlying input stream to CR/LF.
- *
- * Supports resuming partially completed operations after an InterruptedIOException
- * if the underlying stream does. Check the bytesTransferred field to determine how
- * much of the operation completed; conversely, at what point to resume.
- */
-public class LFtoCRLFInputStream extends FilterInputStream {
- private boolean mustReturnLF = false;
-
- /**
- * Creates a new filtered input stream.
- * @param in the underlying input stream
- */
- public LFtoCRLFInputStream(InputStream in) {
- super(in);
- }
-
- /**
- * Wraps the underlying stream's method.
- * Translates LFs to CR/LF sequences transparently.
- * @throws InterruptedIOException if the operation was interrupted before all of the
- * bytes specified have been skipped, bytesTransferred will be zero
- * @throws IOException if an i/o error occurs
- */
- public int read() throws IOException {
- if (mustReturnLF) {
- mustReturnLF = false;
- return '\n';
- }
- int b = in.read(); // ok if this throws
- if (b == '\n') {
- mustReturnLF = true;
- b = '\r';
- }
- return b;
- }
-
- /**
- * Wraps the underlying stream's method.
- * Translates LFs to CR/LF sequences transparently.
- * @throws InterruptedIOException if the operation was interrupted before all of the
- * bytes specified have been skipped, bytesTransferred may be non-zero
- * @throws IOException if an i/o error occurs
- */
- public int read(byte[] buffer, int off, int len) throws IOException {
- // handle boundary cases cleanly
- if (len == 0) {
- return 0;
- } else if (len == 1) {
- int b = read();
- if (b == -1) return -1;
- buffer[off] = (byte) b;
- return 1;
- }
- // prefix with remembered \n from last read, but don't expand it a second time
- int count = 0;
- if (mustReturnLF) {
- mustReturnLF = false;
- buffer[off++] = '\n';
- --len;
- count = 1;
- if (len < 2) return count; // is there still enough room to expand more?
- }
- // read some bytes from the stream into the back half of the buffer
- // this guarantees that there is always room to expand
- len /= 2;
- int j = off + len;
- InterruptedIOException iioe = null;
- try {
- len = in.read(buffer, j, len);
- if (len == -1) {
- return (count == 0) ? -1 : count;
- }
- } catch (InterruptedIOException e) {
- len = e.bytesTransferred;
- iioe = e;
- }
- count += len;
- // copy bytes from the middle to the front of the array, expanding LF->CR/LF
- while (len-- > 0) {
- byte b = buffer[j++];
- if (b == '\n') {
- buffer[off++] = '\r';
- count++;
- }
- buffer[off++] = b;
- }
- if (iioe != null) {
- iioe.bytesTransferred = count;
- throw iioe;
- }
- return count;
- }
-
- /**
- * Calls read() to skip the specified number of bytes
- * @throws InterruptedIOException if the operation was interrupted before all of the
- * bytes specified have been skipped, bytesTransferred may be non-zero
- * @throws IOException if an i/o error occurs
- */
- public long skip(long count) throws IOException {
- int actualCount = 0; // assumes count < Integer.MAX_INT
- try {
- while (count-- > 0 && read() != -1) actualCount++; // skip the specified number of bytes
- return actualCount;
- } catch (InterruptedIOException e) {
- e.bytesTransferred = actualCount;
- throw e;
- }
- }
-
- /**
- * Wraps the underlying stream's method.
- * Returns the number of bytes that can be read without blocking; accounts for
- * possible translation of LFs to CR/LF sequences in these bytes.
- * @throws IOException if an i/o error occurs
- */
- public int available() throws IOException {
- return in.available(); // we can guarantee at least this amount after expansion
- }
-
- /**
- * Mark is not supported by the wrapper even if the underlying stream does, returns false.
- */
- public boolean markSupported() {
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/PollingInputStream.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/PollingInputStream.java
deleted file mode 100644
index 0bdcbb38e..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/PollingInputStream.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.core.streams;
-
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InterruptedIOException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.team.internal.core.Policy;
-import org.eclipse.team.internal.core.TeamPlugin;
-
-/**
- * Polls a progress monitor periodically and handles timeouts over extended durations.
- * For this class to be effective, a high numAttempts should be specified, and the
- * underlying stream should time out frequently on reads (every second or so).
- *
- * Supports resuming partially completed operations after an InterruptedIOException
- * if the underlying stream does. Check the bytesTransferred field to determine how
- * much of the operation completed; conversely, at what point to resume.
- */
-public class PollingInputStream extends FilterInputStream {
- private static final boolean DEBUG = Policy.DEBUG_STREAMS;
- private int numAttempts;
- private IProgressMonitor monitor;
-
- /**
- * Creates a new polling input stream.
- * @param in the underlying input stream
- * @param numAttempts the number of attempts before issuing an InterruptedIOException,
- * if 0, retries indefinitely until canceled
- * @param monitor the progress monitor to be polled for cancellation
- */
- public PollingInputStream(InputStream in, int numAttempts, IProgressMonitor monitor) {
- super(in);
- this.numAttempts = numAttempts;
- this.monitor = monitor;
- }
-
- /**
- * Wraps the underlying stream's method.
- * It may be important to wait for an input stream to be closed because it
- * holds an implicit lock on a system resoure (such as a file) while it is
- * open. Closing a stream may take time if the underlying stream is still
- * servicing a previous request.
- * @throws OperationCanceledException if the progress monitor is canceled
- * @throws InterruptedIOException if the underlying operation times out numAttempts times
- * @throws IOException if an i/o error occurs
- */
- public void close() throws IOException {
- int attempts = 0;
- try {
- readPendingInput();
- } catch (IOException e) {
- // We shouldn't get an exception when we're getting the available input.
- // If we do, just log it so we can close.
- TeamPlugin.log(new Status(IStatus.ERROR, TeamPlugin.ID, 0, e.getMessage(), e));
- } finally {
- for (;;) {
- try {
- in.close();
- return;
- } catch (InterruptedIOException e) {
- if (monitor.isCanceled()) throw new OperationCanceledException();
- if (++attempts == numAttempts)
- throw new InterruptedIOException(Policy.bind("PollingInputStream.closeTimeout")); //$NON-NLS-1$
- if (DEBUG) System.out.println("close retry=" + attempts); //$NON-NLS-1$
- }
- }
- }
- }
-
- /**
- * Wraps the underlying stream's method.
- * @throws OperationCanceledException if the progress monitor is canceled
- * @throws InterruptedIOException if the underlying operation times out numAttempts times
- * and no data was received, bytesTransferred will be zero
- * @throws IOException if an i/o error occurs
- */
- public int read() throws IOException {
- int attempts = 0;
- for (;;) {
- if (monitor.isCanceled()) throw new OperationCanceledException();
- try {
- return in.read();
- } catch (InterruptedIOException e) {
- if (++attempts == numAttempts)
- throw new InterruptedIOException(Policy.bind("PollingInputStream.readTimeout")); //$NON-NLS-1$
- if (DEBUG) System.out.println("read retry=" + attempts); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Wraps the underlying stream's method.
- * @throws OperationCanceledException if the progress monitor is canceled
- * @throws InterruptedIOException if the underlying operation times out numAttempts times
- * and no data was received, bytesTransferred will be zero
- * @throws IOException if an i/o error occurs
- */
- public int read(byte[] buffer, int off, int len) throws IOException {
- int attempts = 0;
- for (;;) {
- if (monitor.isCanceled()) throw new OperationCanceledException();
- try {
- return in.read(buffer, off, len);
- } catch (InterruptedIOException e) {
- if (e.bytesTransferred != 0) return e.bytesTransferred; // keep partial transfer
- if (++attempts == numAttempts)
- throw new InterruptedIOException(Policy.bind("PollingInputStream.readTimeout")); //$NON-NLS-1$
- if (DEBUG) System.out.println("read retry=" + attempts); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Wraps the underlying stream's method.
- * @throws OperationCanceledException if the progress monitor is canceled
- * @throws InterruptedIOException if the underlying operation times out numAttempts times
- * and no data was received, bytesTransferred will be zero
- * @throws IOException if an i/o error occurs
- */
- public long skip(long count) throws IOException {
- int attempts = 0;
- for (;;) {
- if (monitor.isCanceled()) throw new OperationCanceledException();
- try {
- return in.skip(count);
- } catch (InterruptedIOException e) {
- if (e.bytesTransferred != 0) return e.bytesTransferred; // keep partial transfer
- if (++attempts == numAttempts)
- throw new InterruptedIOException(Policy.bind("PollingInputStream.readTimeout")); //$NON-NLS-1$
- if (DEBUG) System.out.println("read retry=" + attempts); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Reads any pending input from the input stream so that
- * the stream can savely be closed.
- */
- protected void readPendingInput() throws IOException {
- byte[] buffer= new byte[2048];
- while (true) {
- int available = in.available();
- if (available < 1) break;
- if (available > buffer.length) available = buffer.length;
- if (in.read(buffer, 0, available) < 1) break;
- }
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/PollingOutputStream.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/PollingOutputStream.java
deleted file mode 100644
index 9d0dd4755..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/PollingOutputStream.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.core.streams;
-
-import java.io.FilterOutputStream;
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.io.OutputStream;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.team.internal.core.Policy;
-
-/**
- * Polls a progress monitor periodically and handles timeouts over extended durations.
- * For this class to be effective, a high numAttempts should be specified, and the
- * underlying stream should time out frequently on writes (every second or so).
- *
- * Supports resuming partially completed operations after an InterruptedIOException
- * if the underlying stream does. Check the bytesTransferred field to determine how
- * much of the operation completed; conversely, at what point to resume.
- */
-public class PollingOutputStream extends FilterOutputStream {
- private static final boolean DEBUG = Policy.DEBUG_STREAMS;
- private int numAttempts;
- private IProgressMonitor monitor;
-
- /**
- * Creates a new polling output stream.
- * @param in the underlying output stream
- * @param numAttempts the number of attempts before issuing an InterruptedIOException,
- * if 0, retries indefinitely until canceled
- * @param monitor the progress monitor to be polled for cancellation
- */
- public PollingOutputStream(OutputStream out, int numAttempts, IProgressMonitor monitor) {
- super(out);
- this.numAttempts = numAttempts;
- this.monitor = monitor;
- }
-
- /**
- * Wraps the underlying stream's method.
- * @throws OperationCanceledException if the progress monitor is canceled
- * @throws InterruptedIOException if the underlying operation times out numAttempts times
- * and no data was sent, bytesTransferred will be zero
- * @throws IOException if an i/o error occurs
- */
- public void write(int b) throws IOException {
- int attempts = 0;
- for (;;) {
- if (monitor.isCanceled()) throw new OperationCanceledException();
- try {
- out.write(b);
- return;
- } catch (InterruptedIOException e) {
- if (++attempts == numAttempts)
- throw new InterruptedIOException(Policy.bind("PollingOutputStream.writeTimeout")); //$NON-NLS-1$
- if (DEBUG) System.out.println("write retry=" + attempts); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Wraps the underlying stream's method.
- * @throws OperationCanceledException if the progress monitor is canceled
- * @throws InterruptedIOException if the underlying operation times out numAttempts times,
- * bytesTransferred will reflect the number of bytes sent
- * @throws IOException if an i/o error occurs
- */
- public void write(byte[] buffer, int off, int len) throws IOException {
- int count = 0;
- int attempts = 0;
- for (;;) {
- if (monitor.isCanceled()) throw new OperationCanceledException();
- try {
- out.write(buffer, off, len);
- return;
- } catch (InterruptedIOException e) {
- int amount = e.bytesTransferred;
- if (amount != 0) { // keep partial transfer
- len -= amount;
- if (len <= 0) return;
- off += amount;
- count += amount;
- attempts = 0; // made some progress, don't time out quite yet
- }
- if (++attempts == numAttempts) {
- e = new InterruptedIOException(Policy.bind("PollingOutputStream.writeTimeout")); //$NON-NLS-1$
- e.bytesTransferred = count;
- throw e;
- }
- if (DEBUG) System.out.println("write retry=" + attempts); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Wraps the underlying stream's method.
- * @throws OperationCanceledException if the progress monitor is canceled
- * @throws InterruptedIOException if the underlying operation times out numAttempts times,
- * bytesTransferred will reflect the number of bytes sent
- * @throws IOException if an i/o error occurs
- */
- public void flush() throws IOException {
- int count = 0;
- int attempts = 0;
- for (;;) {
- if (monitor.isCanceled()) throw new OperationCanceledException();
- try {
- out.flush();
- return;
- } catch (InterruptedIOException e) {
- int amount = e.bytesTransferred;
- if (amount != 0) { // keep partial transfer
- count += amount;
- attempts = 0; // made some progress, don't time out quite yet
- }
- if (++attempts == numAttempts) {
- e = new InterruptedIOException(Policy.bind("PollingOutputStream.writeTimeout")); //$NON-NLS-1$
- e.bytesTransferred = count;
- throw e;
- }
- if (DEBUG) System.out.println("write retry=" + attempts); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Calls flush() then close() on the underlying stream.
- * @throws OperationCanceledException if the progress monitor is canceled
- * @throws InterruptedIOException if the underlying operation times out numAttempts times,
- * bytesTransferred will reflect the number of bytes sent during the flush()
- * @throws IOException if an i/o error occurs
- */
- public void close() throws IOException {
- int attempts = numAttempts - 1; // fail fast if flush() does times out
- try {
- out.flush();
- attempts = 0;
- } finally {
- for (;;) {
- try {
- out.close();
- return;
- } catch (InterruptedIOException e) {
- if (monitor.isCanceled()) throw new OperationCanceledException();
- if (++attempts == numAttempts)
- throw new InterruptedIOException(Policy.bind("PollingOutputStream.closeTimeout")); //$NON-NLS-1$
- if (DEBUG) System.out.println("close retry=" + attempts); //$NON-NLS-1$
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/ProgressMonitorInputStream.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/ProgressMonitorInputStream.java
deleted file mode 100644
index 4febffd04..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/ProgressMonitorInputStream.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.core.streams;
-
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InterruptedIOException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-
-/**
- * Updates a progress monitor as bytes are read from the input stream.
- * Also starts a background thread to provide responsive cancellation on read().
- *
- * Supports resuming partially completed operations after an InterruptedIOException
- * if the underlying stream does. Check the bytesTransferred field to determine how
- * much of the operation completed; conversely, at what point to resume.
- */
-public abstract class ProgressMonitorInputStream extends FilterInputStream {
- private IProgressMonitor monitor;
- private int updateIncrement;
- private long bytesTotal;
- private long bytesRead = 0;
- private long lastUpdate = -1;
- private long nextUpdate = 0;
-
- /**
- * Creates a progress monitoring input stream.
- * @param in the underlying input stream
- * @param bytesTotal the number of bytes to read in total (passed to updateMonitor())
- * @param updateIncrement the number of bytes read between updates
- * @param monitor the progress monitor
- */
- public ProgressMonitorInputStream(InputStream in, long bytesTotal, int updateIncrement, IProgressMonitor monitor) {
- super(in);
- this.bytesTotal = bytesTotal;
- this.updateIncrement = updateIncrement;
- this.monitor = monitor;
- update(true);
- }
-
- protected abstract void updateMonitor(long bytesRead, long size, IProgressMonitor monitor);
-
- /**
- * Wraps the underlying stream's method.
- * Updates the progress monitor to the final number of bytes read.
- * @throws IOException if an i/o error occurs
- */
- public void close() throws IOException {
- try {
- in.close();
- } finally {
- update(true);
- }
- }
-
- /**
- * Wraps the underlying stream's method.
- * Updates the progress monitor if the next update increment has been reached.
- * @throws InterruptedIOException if the operation was interrupted before all of the
- * bytes specified have been skipped, bytesTransferred will be zero
- * @throws IOException if an i/o error occurs
- */
- public int read() throws IOException {
- int b = in.read();
- if (b != -1) {
- bytesRead += 1;
- update(false);
- }
- return b;
- }
-
- /**
- * Wraps the underlying stream's method.
- * Updates the progress monitor if the next update increment has been reached.
- * @throws InterruptedIOException if the operation was interrupted before all of the
- * bytes specified have been skipped, bytesTransferred may be non-zero
- * @throws IOException if an i/o error occurs
- */
- public int read(byte[] buffer, int offset, int length) throws IOException {
- try {
- int count = in.read(buffer, offset, length);
- if (count != -1) {
- bytesRead += count;
- update(false);
- }
- return count;
- } catch (InterruptedIOException e) {
- bytesRead += e.bytesTransferred;
- update(false);
- throw e;
- }
- }
-
- /**
- * Wraps the underlying stream's method.
- * Updates the progress monitor if the next update increment has been reached.
- * @throws InterruptedIOException if the operation was interrupted before all of the
- * bytes specified have been skipped, bytesTransferred may be non-zero
- * @throws IOException if an i/o error occurs
- */
- public long skip(long amount) throws IOException {
- try {
- long count = in.skip(amount);
- bytesRead += count;
- update(false);
- return count;
- } catch (InterruptedIOException e) {
- bytesRead += e.bytesTransferred;
- update(false);
- throw e;
- }
- }
-
- /**
- * Mark is not supported by the wrapper even if the underlying stream does, returns false.
- */
- public boolean markSupported() {
- return false;
- }
-
- private void update(boolean now) {
- if (bytesRead >= nextUpdate || now) {
- nextUpdate = bytesRead - (bytesRead % updateIncrement);
- if (nextUpdate != lastUpdate) updateMonitor(nextUpdate, bytesTotal, monitor);
- lastUpdate = nextUpdate;
- nextUpdate += updateIncrement;
- }
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/SizeConstrainedInputStream.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/SizeConstrainedInputStream.java
deleted file mode 100644
index 2781e8425..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/SizeConstrainedInputStream.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.core.streams;
-
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InterruptedIOException;
-
-import org.eclipse.core.runtime.OperationCanceledException;
-
-/**
- * Simulates a stream that represents only a portion of the underlying stream.
- * Will report EOF when this portion has been fully read and prevent further reads.
- * The underlying stream is not closed on close(), but the remaining unread input
- * may optionally be skip()'d.
- *
- * Supports resuming partially completed operations after an InterruptedIOException
- * if the underlying stream does. Check the bytesTransferred field to determine how
- * much of the operation completed; conversely, at what point to resume.
- */
-public class SizeConstrainedInputStream extends FilterInputStream {
- private boolean discardOnClose;
- private long bytesRemaining;
-
- /**
- * Creates a size contrained input stream.
- * @param in the underlying input stream, never actually closed by this filter
- * @param size the maximum number of bytes of the underlying input stream that
- * can be read through this filter
- * @param discardOnClose if true, discards remaining unread bytes on close()
- */
- public SizeConstrainedInputStream(InputStream in, long size, boolean discardOnClose) {
- super(in);
- this.bytesRemaining = size;
- this.discardOnClose = discardOnClose;
- }
-
- /**
- * Prevents further reading from the stream but does not close the underlying stream.
- * If discardOnClose, skip()'s over any remaining unread bytes in the constrained region.
- * @throws IOException if an i/o error occurs
- */
- public void close() throws IOException {
- try {
- if (discardOnClose) {
- while (bytesRemaining != 0 && skip(bytesRemaining) != 0);
- }
- } catch (OperationCanceledException e) {
- // The receiver is likely wrapping a PollingInputStream which could throw
- // an OperationCanceledException on a skip.
- // Since we're closing, just ignore the cancel and let the caller check the monitor
- } finally {
- bytesRemaining = 0;
- }
- }
-
- /**
- * Wraps the underlying stream's method.
- * Simulates an end-of-file condition if the end of the constrained region has been reached.
- * @throws IOException if an i/o error occurs
- */
- public int available() throws IOException {
- int amount = in.available();
- if (amount > bytesRemaining) amount = (int) bytesRemaining;
- return amount;
- }
-
- /**
- * Wraps the underlying stream's method.
- * Simulates an end-of-file condition if the end of the constrained region has been reached.
- * @throws InterruptedIOException if the operation was interrupted before all of the
- * bytes specified have been skipped, bytesTransferred will be zero
- * @throws IOException if an i/o error occurs
- */
- public int read() throws IOException {
- if (bytesRemaining == 0) return -1;
- int b = in.read();
- if (b != -1) bytesRemaining -= 1;
- return b;
- }
-
- /**
- * Wraps the underlying stream's method.
- * Simulates an end-of-file condition if the end of the constrained region has been reached.
- * @throws InterruptedIOException if the operation was interrupted before all of the
- * bytes specified have been skipped, bytesTransferred may be non-zero
- * @throws IOException if an i/o error occurs
- */
- public int read(byte[] buffer, int offset, int length) throws IOException {
- if (length > bytesRemaining) {
- if (bytesRemaining == 0) return -1;
- length = (int) bytesRemaining;
- }
- try {
- int count = in.read(buffer, offset, length);
- if (count != -1) bytesRemaining -= count;
- return count;
- } catch (InterruptedIOException e) {
- bytesRemaining -= e.bytesTransferred;
- throw e;
- }
- }
-
- /**
- * Wraps the underlying stream's method.
- * Simulates an end-of-file condition if the end of the constrained region has been reached.
- * @throws InterruptedIOException if the operation was interrupted before all of the
- * bytes specified have been skipped, bytesTransferred may be non-zero
- * @throws IOException if an i/o error occurs
- */
- public long skip(long amount) throws IOException {
- if (amount > bytesRemaining) amount = bytesRemaining;
- try {
- long count = in.skip(amount);
- bytesRemaining -= count;
- return count;
- } catch (InterruptedIOException e) {
- bytesRemaining -= e.bytesTransferred;
- throw e;
- }
- }
-
- /**
- * Mark is not supported by the wrapper even if the underlying stream does, returns false.
- */
- public boolean markSupported() {
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/TimeoutInputStream.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/TimeoutInputStream.java
deleted file mode 100644
index b82a6134e..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/TimeoutInputStream.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.core.streams;
-
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InterruptedIOException;
-
-/**
- * Wraps an input stream that blocks indefinitely to simulate timeouts on read(),
- * skip(), and close(). The resulting input stream is buffered and supports
- * retrying operations that failed due to an InterruptedIOException.
- *
- * Supports resuming partially completed operations after an InterruptedIOException
- * REGARDLESS of whether the underlying stream does unless the underlying stream itself
- * generates InterruptedIOExceptions in which case it must also support resuming.
- * Check the bytesTransferred field to determine how much of the operation completed;
- * conversely, at what point to resume.
- */
-public class TimeoutInputStream extends FilterInputStream {
- // unsynchronized variables
- private final long readTimeout; // read() timeout in millis
- private final long closeTimeout; // close() timeout in millis, or -1
-
- // requests for the thread (synchronized)
- private boolean closeRequested = false; // if true, close requested
-
- // responses from the thread (synchronized)
- private Thread thread; // if null, thread has terminated
- private byte[] iobuffer; // circular buffer
- private int head = 0; // points to first unread byte
- private int length = 0; // number of remaining unread bytes
- private IOException ioe = null; // if non-null, contains a pending exception
- private boolean waitingForClose = false; // if true, thread is waiting for close()
-
- /**
- * Creates a timeout wrapper for an input stream.
- * @param in the underlying input stream
- * @param bufferSize the buffer size in bytes; should be large enough to mitigate
- * Thread synchronization and context switching overhead
- * @param readTimeout the number of milliseconds to block for a read() or skip() before
- * throwing an InterruptedIOException; 0 blocks indefinitely
- * @param closeTimeout the number of milliseconds to block for a close() before throwing
- * an InterruptedIOException; 0 blocks indefinitely, -1 closes the stream in the background
- */
- public TimeoutInputStream(InputStream in, int bufferSize, long readTimeout, long closeTimeout) {
- super(in);
- this.readTimeout = readTimeout;
- this.closeTimeout = closeTimeout;
- this.iobuffer = new byte[bufferSize];
- thread = new Thread(new Runnable() {
- public void run() {
- runThread();
- }
- }, "TimeoutInputStream");//$NON-NLS-1$
- thread.setDaemon(true);
- thread.start();
- }
-
- /**
- * Wraps the underlying stream's method.
- * It may be important to wait for a stream to actually be closed because it
- * holds an implicit lock on a system resoure (such as a file) while it is
- * open. Closing a stream may take time if the underlying stream is still
- * servicing a previous request.
- * @throws InterruptedIOException if the timeout expired
- * @throws IOException if an i/o error occurs
- */
- public void close() throws IOException {
- Thread oldThread;
- synchronized (this) {
- if (thread == null) return;
- oldThread = thread;
- closeRequested = true;
- thread.interrupt();
- checkError();
- }
- if (closeTimeout == -1) return;
- try {
- oldThread.join(closeTimeout);
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt(); // we weren't expecting to be interrupted
- }
- synchronized (this) {
- checkError();
- if (thread != null) throw new InterruptedIOException();
- }
- }
-
- /**
- * Returns the number of unread bytes in the buffer.
- * @throws IOException if an i/o error occurs
- */
- public synchronized int available() throws IOException {
- if (length == 0) checkError();
- return length > 0 ? length : 0;
- }
-
- /**
- * Reads a byte from the stream.
- * @throws InterruptedIOException if the timeout expired and no data was received,
- * bytesTransferred will be zero
- * @throws IOException if an i/o error occurs
- */
- public synchronized int read() throws IOException {
- if (! syncFill()) return -1; // EOF reached
- int b = iobuffer[head++] & 255;
- if (head == iobuffer.length) head = 0;
- length--;
- notify();
- return b;
- }
-
- /**
- * Reads multiple bytes from the stream.
- * @throws InterruptedIOException if the timeout expired and no data was received,
- * bytesTransferred will be zero
- * @throws IOException if an i/o error occurs
- */
- public synchronized int read(byte[] buffer, int off, int len) throws IOException {
- if (! syncFill()) return -1; // EOF reached
- int pos = off;
- if (len > length) len = length;
- while (len-- > 0) {
- buffer[pos++] = iobuffer[head++];
- if (head == iobuffer.length) head = 0;
- length--;
- }
- notify();
- return pos - off;
- }
-
- /**
- * Skips multiple bytes in the stream.
- * @throws InterruptedIOException if the timeout expired before all of the
- * bytes specified have been skipped, bytesTransferred may be non-zero
- * @throws IOException if an i/o error occurs
- */
- public synchronized long skip(long count) throws IOException {
- long amount = 0;
- try {
- do {
- if (! syncFill()) break; // EOF reached
- int skip = (int) Math.min(count - amount, length);
- head = (head + skip) % iobuffer.length;
- length -= skip;
- amount += skip;
- } while (amount < count);
- } catch (InterruptedIOException e) {
- e.bytesTransferred = (int) amount; // assumes amount < Integer.MAX_INT
- throw e;
- }
- notify();
- return amount;
- }
-
- /**
- * Mark is not supported by the wrapper even if the underlying stream does, returns false.
- */
- public boolean markSupported() {
- return false;
- }
-
- /**
- * Waits for the buffer to fill if it is empty and the stream has not reached EOF.
- * @return true if bytes are available, false if EOF has been reached
- * @throws InterruptedIOException if EOF not reached but no bytes are available
- */
- private boolean syncFill() throws IOException {
- if (length != 0) return true;
- checkError(); // check errors only after we have read all remaining bytes
- if (waitingForClose) return false;
- notify();
- try {
- wait(readTimeout);
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt(); // we weren't expecting to be interrupted
- }
- if (length != 0) return true;
- checkError(); // check errors only after we have read all remaining bytes
- if (waitingForClose) return false;
- throw new InterruptedIOException();
- }
-
- /**
- * If an exception is pending, throws it.
- */
- private void checkError() throws IOException {
- if (ioe != null) {
- IOException e = ioe;
- ioe = null;
- throw e;
- }
- }
-
- /**
- * Runs the thread in the background.
- */
- private void runThread() {
- try {
- readUntilDone();
- } catch (IOException e) {
- synchronized (this) { ioe = e; }
- } finally {
- waitUntilClosed();
- try {
- in.close();
- } catch (IOException e) {
- synchronized (this) { ioe = e; }
- } finally {
- synchronized (this) {
- thread = null;
- notify();
- }
- }
- }
- }
-
- /**
- * Waits until we have been requested to close the stream.
- */
- private synchronized void waitUntilClosed() {
- waitingForClose = true;
- notify();
- while (! closeRequested) {
- try {
- wait();
- } catch (InterruptedException e) {
- closeRequested = true; // alternate quit signal
- }
- }
- }
-
- /**
- * Reads bytes into the buffer until EOF, closed, or error.
- */
- private void readUntilDone() throws IOException {
- for (;;) {
- int off, len;
- synchronized (this) {
- for (;;) {
- if (closeRequested) return; // quit signal
- if (length != iobuffer.length) break;
- try {
- wait();
- } catch (InterruptedException e) {
- closeRequested = true; // alternate quit signal
- }
- }
- off = (head + length) % iobuffer.length;
- len = ((head > off) ? head : iobuffer.length) - off;
- }
- int count;
- try {
- // the i/o operation might block without releasing the lock,
- // so we do this outside of the synchronized block
- count = in.read(iobuffer, off, len);
- if (count == -1) return; // EOF encountered
- } catch (InterruptedIOException e) {
- count = e.bytesTransferred; // keep partial transfer
- }
- synchronized (this) {
- length += count;
- notify();
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/TimeoutOutputStream.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/TimeoutOutputStream.java
deleted file mode 100644
index 99a91fdf1..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/TimeoutOutputStream.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.core.streams;
-
-import java.io.FilterOutputStream;
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.io.OutputStream;
-
-import org.eclipse.team.internal.core.Policy;
-
-/**
- * Wraps an output stream that blocks indefinitely to simulate timeouts on write(),
- * flush(), and close(). The resulting output stream is buffered and supports
- * retrying operations that failed due to an InterruptedIOException.
- *
- * Supports resuming partially completed operations after an InterruptedIOException
- * REGARDLESS of whether the underlying stream does unless the underlying stream itself
- * generates InterruptedIOExceptions in which case it must also support resuming.
- * Check the bytesTransferred field to determine how much of the operation completed;
- * conversely, at what point to resume.
- */
-public class TimeoutOutputStream extends FilterOutputStream {
- // unsynchronized variables
- private final long writeTimeout; // write() timeout in millis
- private final long closeTimeout; // close() timeout in millis, or -1
-
- // requests for the thread (synchronized)
- private byte[] iobuffer; // circular buffer
- private int head = 0; // points to first unwritten byte
- private int length = 0; // number of remaining unwritten bytes
- private boolean closeRequested = false; // if true, close requested
- private boolean flushRequested = false; // if true, flush requested
-
- // responses from the thread (synchronized)
- private Thread thread;
- private boolean waitingForClose = false; // if true, the thread is waiting for close()
- private IOException ioe = null;
-
- /**
- * Creates a timeout wrapper for an output stream.
- * @param out the underlying input stream
- * @param bufferSize the buffer size in bytes; should be large enough to mitigate
- * Thread synchronization and context switching overhead
- * @param writeTimeout the number of milliseconds to block for a write() or flush() before
- * throwing an InterruptedIOException; 0 blocks indefinitely
- * @param closeTimeout the number of milliseconds to block for a close() before throwing
- * an InterruptedIOException; 0 blocks indefinitely, -1 closes the stream in the background
- */
- public TimeoutOutputStream(OutputStream out, int bufferSize, long writeTimeout, long closeTimeout) {
- super(out);
- this.writeTimeout = writeTimeout;
- this.closeTimeout = closeTimeout;
- this.iobuffer = new byte[bufferSize];
- thread = new Thread(new Runnable() {
- public void run() {
- runThread();
- }
- }, "TimeoutOutputStream");//$NON-NLS-1$
- thread.setDaemon(true);
- thread.start();
- }
-
- /**
- * Wraps the underlying stream's method.
- * It may be important to wait for a stream to actually be closed because it
- * holds an implicit lock on a system resoure (such as a file) while it is
- * open. Closing a stream may take time if the underlying stream is still
- * servicing a previous request.
- * @throws InterruptedIOException if the timeout expired, bytesTransferred will
- * reflect the number of bytes flushed from the buffer
- * @throws IOException if an i/o error occurs
- */
- public void close() throws IOException {
- Thread oldThread;
- synchronized (this) {
- if (thread == null) return;
- oldThread = thread;
- closeRequested = true;
- thread.interrupt();
- checkError();
- }
- if (closeTimeout == -1) return;
- try {
- oldThread.join(closeTimeout);
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt(); // we weren't expecting to be interrupted
- }
- synchronized (this) {
- checkError();
- if (thread != null) throw new InterruptedIOException();
- }
- }
-
- /**
- * Writes a byte to the stream.
- * @throws InterruptedIOException if the timeout expired and no data was sent,
- * bytesTransferred will be zero
- * @throws IOException if an i/o error occurs
- */
- public synchronized void write(int b) throws IOException {
- syncCommit(true);
- iobuffer[(head + length) % iobuffer.length] = (byte) b;
- length++;
- notify();
- }
-
- /**
- * Writes multiple bytes to the stream.
- * @throws InterruptedIOException if the timeout expired, bytesTransferred will
- * reflect the number of bytes sent
- * @throws IOException if an i/o error occurs
- */
- public synchronized void write(byte[] buffer, int off, int len) throws IOException {
- int amount = 0;
- try {
- do {
- syncCommit(true);
- while (amount < len && length != iobuffer.length) {
- iobuffer[(head + length) % iobuffer.length] = buffer[off++];
- length++;
- amount++;
- }
- } while (amount < len);
- } catch (InterruptedIOException e) {
- e.bytesTransferred = amount;
- throw e;
- }
- notify();
- }
-
- /**
- * Flushes the stream.
- * @throws InterruptedIOException if the timeout expired, bytesTransferred will
- * reflect the number of bytes flushed from the buffer
- * @throws IOException if an i/o error occurs
- */
- public synchronized void flush() throws IOException {
- int oldLength = length;
- flushRequested = true;
- try {
- syncCommit(false);
- } catch (InterruptedIOException e) {
- e.bytesTransferred = oldLength - length;
- throw e;
- }
- notify();
- }
-
- /**
- * Waits for the buffer to drain if it is full.
- * @param partial if true, waits until the buffer is partially empty, else drains it entirely
- * @throws InterruptedIOException if the buffer could not be drained as requested
- */
- private void syncCommit(boolean partial) throws IOException {
- checkError(); // check errors before allowing the addition of new bytes
- if (partial && length != iobuffer.length || length == 0) return;
- if (waitingForClose) throw new IOException(Policy.bind("TimeoutOutputStream.cannotWriteToStream")); //$NON-NLS-1$
- notify();
- try {
- wait(writeTimeout);
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt(); // we weren't expecting to be interrupted
- }
- checkError(); // check errors before allowing the addition of new bytes
- if (partial && length != iobuffer.length || length == 0) return;
- throw new InterruptedIOException();
- }
-
- /**
- * If an exception is pending, throws it.
- */
- private void checkError() throws IOException {
- if (ioe != null) {
- IOException e = ioe;
- ioe = null;
- throw e;
- }
- }
-
- /**
- * Runs the thread in the background.
- */
- private void runThread() {
- try {
- writeUntilDone();
- } catch (IOException e) {
- synchronized (this) { ioe = e; }
- } finally {
- waitUntilClosed();
- try {
- out.close();
- } catch (IOException e) {
- synchronized (this) { ioe = e; }
- } finally {
- synchronized (this) {
- thread = null;
- notify();
- }
- }
- }
- }
-
- /**
- * Waits until we have been requested to close the stream.
- */
- private synchronized void waitUntilClosed() {
- waitingForClose = true;
- notify();
- while (! closeRequested) {
- try {
- wait();
- } catch (InterruptedException e) {
- closeRequested = true; // alternate quit signal
- }
- }
- }
-
- /**
- * Writes bytes from the buffer until closed and buffer is empty
- */
- private void writeUntilDone() throws IOException {
- int bytesUntilFlush = -1; // if > 0, then we will flush after that many bytes have been written
- for (;;) {
- int off, len;
- synchronized (this) {
- for (;;) {
- if (closeRequested && length == 0) return; // quit signal
- if (length != 0 || flushRequested) break;
- try {
- wait();
- } catch (InterruptedException e) {
- closeRequested = true; // alternate quit signal
- }
- }
- off = head;
- len = iobuffer.length - head;
- if (len > length) len = length;
- if (flushRequested && bytesUntilFlush < 0) {
- flushRequested = false;
- bytesUntilFlush = length;
- }
- }
- if (len != 0) {
- // write out all remaining bytes from the buffer before flushing
- try {
- // the i/o operation might block without releasing the lock,
- // so we do this outside of the synchronized block
- out.write(iobuffer, off, len);
- } catch (InterruptedIOException e) {
- len = e.bytesTransferred;
- }
- synchronized (this) {
- head = (head + len) % iobuffer.length;
- length -= len;
- notify();
- }
- }
- if (bytesUntilFlush >= 0) {
- bytesUntilFlush -= len;
- if (bytesUntilFlush <= 0) {
- // flush the buffer now
- try {
- out.flush();
- } catch (InterruptedIOException e) {
- }
- bytesUntilFlush = -1; // might have been 0
- }
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/BaseIdentifierNotInitializedException.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/BaseIdentifierNotInitializedException.java
deleted file mode 100644
index be6b5cc7f..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/BaseIdentifierNotInitializedException.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.core.target;
-
-public class BaseIdentifierNotInitializedException extends Exception {
- /**
- * Default constructor for a <code>TeamProviderException</code>.
- */
- public BaseIdentifierNotInitializedException() {
- super();
- }
-
- /**
- * Constructor for a <code>TeamProviderException</code> that takes
- * a string description of the cause of the exception.
- *
- * @param message a message describing the cause of the exception.
- */
- public BaseIdentifierNotInitializedException(String message) {
- super(message);
- }
-}
-
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/ITeamStatusConstants.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/ITeamStatusConstants.java
deleted file mode 100644
index e6500a226..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/ITeamStatusConstants.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.core.target;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.core.Policy;
-import org.eclipse.team.internal.core.TeamPlugin;
-
-public interface ITeamStatusConstants {
-
- public static final IStatus OK_STATUS =
- new Status(IStatus.OK, TeamPlugin.ID, TeamException.OK, Policy.bind("OK_1"), null); //$NON-NLS-1$
-
- public static final IStatus NOT_CHECKED_OUT_STATUS =
- new Status(
- IStatus.ERROR,
- TeamPlugin.ID,
- TeamException.NOT_CHECKED_OUT,
- Policy.bind("teamStatus.notCheckedOut"), //$NON-NLS-1$
- null);
-
- public static final IStatus NOT_CHECKED_IN_STATUS =
- new Status(
- IStatus.ERROR,
- TeamPlugin.ID,
- TeamException.NOT_CHECKED_IN,
- Policy.bind("teamStatus.notCheckedIn"), //$NON-NLS-1$
- null);
-
- public static final IStatus NO_REMOTE_RESOURCE_STATUS =
- new Status(
- IStatus.ERROR,
- TeamPlugin.ID,
- TeamException.NO_REMOTE_RESOURCE,
- Policy.bind("teamStatus.noRemoteResource"), //$NON-NLS-1$
- null);
-
- public static final IStatus IO_FAILED_STATUS =
- new Status(
- IStatus.ERROR,
- TeamPlugin.ID,
- TeamException.IO_FAILED,
- Policy.bind("teamStatus.ioFailed"), //$NON-NLS-1$
- null);
-
- public static final IStatus CONFLICT_STATUS =
- new Status(
- IStatus.ERROR,
- TeamPlugin.ID,
- TeamException.CONFLICT,
- Policy.bind("teamStatus.conflict"), //$NON-NLS-1$
- null);
-
- public static final IStatus REQUIRED_CONFIGURATION_MISSING =
- new Status(
- IStatus.ERROR,
- TeamPlugin.ID,
- -100,
- Policy.bind("provider.configuration.missing"), //$NON-NLS-1$
- null);
-
- public static final IStatus INVALID_CONFIGURATION =
- new Status(
- IStatus.ERROR,
- TeamPlugin.ID,
- -101,
- Policy.bind("provider.configuration.invalid"), //$NON-NLS-1$
- null);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/LocationMapping.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/LocationMapping.java
deleted file mode 100644
index 834777b8f..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/LocationMapping.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.core.target;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.core.target.Site;
-
-public class LocationMapping {
-
- private final long SERIAL_ID = 1;
-
- private String type;
- private URL url;
- private IPath path;
-
- public LocationMapping(Site site, IPath path) {
- this.type = site.getType();
- this.url = site.getURL();
- this.path = path;
- }
-
- public LocationMapping(String type, URL url, IPath path) {
- this.type = type;
- this.url = url;
- this.path = path;
- }
-
- public LocationMapping(byte[] bytes) throws IOException {
- ByteArrayInputStream bis = new ByteArrayInputStream(bytes);
- DataInputStream is = new DataInputStream(bis);
- long id = is.readLong();
- this.type = is.readUTF();
- this.url = new URL(is.readUTF());
- this.path = new Path(is.readUTF());
- }
-
-
- /**
- * Gets the type.
- * @return Returns a String
- */
- public String getType() {
- return type;
- }
-
- /**
- * Gets the locationId.
- * @return Returns a String
- */
- public URL getURL() {
- return url;
- }
-
- /**
- * @see Object#equals(Object)
- */
- public boolean equals(Object other) {
- if(this == other) return true;
- if(! (other instanceof LocationMapping)) return false;
- LocationMapping location = (LocationMapping)other;
- return getType().equals(location.getType()) &&
- getURL().equals(location.getURL()) &&
- getPath().equals(location.getPath());
- }
- /**
- * Gets the path.
- * @return Returns a IPath
- */
- public IPath getPath() {
- return path;
- }
-
-
- public byte[] encode() throws IOException {
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- DataOutputStream os = new DataOutputStream(bos);
- os.writeLong(SERIAL_ID);
- os.writeUTF(getType());
- os.writeUTF(getURL().toExternalForm());
- os.writeUTF(getPath().toString());
- return bos.toByteArray();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/RemoteTargetSyncElement.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/RemoteTargetSyncElement.java
deleted file mode 100644
index 4a8a16df4..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/RemoteTargetSyncElement.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.core.target;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.ILocalSyncElement;
-import org.eclipse.team.core.sync.IRemoteResource;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.core.sync.RemoteSyncElement;
-import org.eclipse.team.core.target.IRemoteTargetResource;
-import org.eclipse.team.core.target.TargetManager;
-import org.eclipse.team.core.target.TargetProvider;
-import org.eclipse.team.internal.core.Policy;
-import org.eclipse.team.internal.core.TeamPlugin;
-
-/**
- * Is a synchronization element that can calculate three-way sync
- * states based on timestamps. This is useful for synchronizing between
- * repositories without revision history and thus the base contents is
- * not available (e.g. non-versioning DAV, FTP...)
- *
- * @see IRemoteSyncElement
- */
-public class RemoteTargetSyncElement extends RemoteSyncElement {
-
- private IRemoteTargetResource remote;
- private IResource local;
- private TargetProvider provider;
-
- public RemoteTargetSyncElement(TargetProvider provider, IResource local, IRemoteTargetResource remote) {
- this.local = local;
- this.remote = remote;
- this.provider = provider;
- }
-
- /**
- * @see RemoteSyncElement#create(boolean, IResource, IRemoteResource, IRemoteResource, Object)
- */
- public IRemoteSyncElement create(boolean isThreeWay, IResource local, IRemoteResource base, IRemoteResource remote, Object data) {
- return new RemoteTargetSyncElement(provider, local, (IRemoteTargetResource)remote);
- }
-
- /**
- * @see RemoteSyncElement#timestampEquals(IResource, IRemoteResource)
- */
- protected boolean timestampEquals(IResource e1, IRemoteResource e2) {
- return false;
- }
-
- /**
- * @see RemoteSyncElement#timestampEquals(IRemoteResource, IRemoteResource)
- */
- protected boolean timestampEquals(IRemoteResource e1, IRemoteResource e2) {
- return false;
- }
-
- /**
- * @see LocalSyncElement#create(IResource, IRemoteResource, Object)
- */
- public ILocalSyncElement create(IResource local, IRemoteResource base, Object data) {
- return new RemoteTargetSyncElement(provider, local, (IRemoteTargetResource)base);
- }
-
- /**
- * @see LocalSyncElement#getData()
- */
- protected Object getData() {
- return null;
- }
-
- /**
- * @see LocalSyncElement#isIgnored(IResource)
- */
- protected boolean isIgnored(IResource resource) {
- return false;
- }
-
- /**
- * @see IRemoteSyncElement#getRemote()
- */
- public IRemoteResource getRemote() {
- return remote;
- }
-
- /**
- * @see IRemoteSyncElement#isThreeWay()
- */
- public boolean isThreeWay() {
- return true;
- }
-
- /**
- * @see ILocalSyncElement#getLocal()
- */
- public IResource getLocal() {
- return local;
- }
-
- /**
- * @see ILocalSyncElement#getBase()
- */
- public IRemoteResource getBase() {
- return null;
- }
-
- /**
- * @see ILocalSyncElement#getSyncKind(int, IProgressMonitor)
- */
- public int getSyncKind(int granularity, IProgressMonitor progress) {
- progress.beginTask(null, 100);
- int description = IN_SYNC;
- IResource local = getLocal();
- boolean localExists = local.exists();
- boolean hasBase = provider.hasBase(local);
- boolean isOutgoing;
- boolean isIncoming;
- if (hasBase) {
- isOutgoing = provider.isDirty(local);
- isIncoming = isOutOfDate(Policy.subMonitorFor(progress, 10));
- } else {
- // if there's no base, use existance to determine direction
- isOutgoing = localExists;
- isIncoming = remote != null;
- }
-
- if (remote == null) {
- if (!localExists) {
- // this should never happen
- // Assert.isTrue(false);
- } else {
- // no remote but a local
- if (!isOutgoing && isIncoming) {
- description = INCOMING | DELETION;
- } else if (isOutgoing && isIncoming) {
- description = CONFLICTING | CHANGE;
- } else if (!isOutgoing && !isIncoming) {
- description = OUTGOING | ADDITION;
- } else if (isOutgoing && !isIncoming) {
- description = OUTGOING | ADDITION;
- }
- }
- } else {
- if (!localExists) {
- // a remote but no local
- if (!isOutgoing /* and both out of date and not out of date */) {
- description = INCOMING | ADDITION;
- } else if (isOutgoing && !isIncoming) {
- description = OUTGOING | DELETION;
- } else if (isOutgoing && isIncoming) {
- description = CONFLICTING | CHANGE;
- }
- } else {
- // have a local and a remote
- if (!isOutgoing && !isIncoming) {
- // ignore, there is no change;
- } else if (!isOutgoing && isIncoming) {
- description = INCOMING | CHANGE;
- } else if (isOutgoing && !isIncoming) {
- description = OUTGOING | CHANGE;
- } else {
- description = CONFLICTING | CHANGE;
- }
- // if contents are the same, then mark as pseudo change
- if (description != IN_SYNC && compare(granularity, false, local, remote, Policy.subMonitorFor(progress, 90)))
- description |= PSEUDO_CONFLICT;
- }
- }
- return description;
- }
- /**
- * Returns the provider.
- * @return TargetProvider
- */
- protected TargetProvider getProvider() {
- return provider;
- }
-
- /**
- * Return true if the resource associated with the receiver is out-of-date
- */
- protected boolean isOutOfDate(IProgressMonitor monitor) {
- IResource local = getLocal();
- if (provider.hasBase(local)) {
- try{
- return provider.isOutOfDate(local, monitor);
- } catch(TeamException e) {
- TeamPlugin.log(e.getStatus());
- return true;
- }
- }
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/ResourceState.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/ResourceState.java
deleted file mode 100644
index 1795ddae0..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/ResourceState.java
+++ /dev/null
@@ -1,802 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.core.target;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.target.TargetManager;
-import org.eclipse.team.core.target.TargetProvider;
-import org.eclipse.team.internal.core.Assert;
-import org.eclipse.team.internal.core.NullSubProgressMonitor;
-import org.eclipse.team.internal.core.Policy;
-import org.eclipse.team.internal.core.TeamPlugin;
-
-/**
- * This abstract class implements the state of a local and corresponding remote resource,
- * and behavior of those resources.
- * <p>
- * Common state for all 'managed' resources includes:
- * <ul>
- * <li>the local resource and corresponding remote resource objects</li>
- * <li>the timestamp of the local resource as it was last in synch with the provider</li>
- * <li>an identifier for the remote resource as it was last in synch with the provider</li>
- */
-public abstract class ResourceState {
-
- /*
- * Serialization format identifier.
- * see toBytes() and fromBytes()
- */
- private static final int BYTES_FORMAT = 0;
-
- /*
- * These constants are used to indicate uninitialized values for the local
- * base timestamp and remote base identifier.
- */
- protected static final long EMPTY_LOCALBASETS = -1L;
- protected static final String EMPTY_REMOTEBASEID = "Undefined:"; //$NON-NLS-1$
-
- /*
- * The base state of the resource. The 'base' is the state of the resource
- * state that was fetched from (or put in) the provider.
- */
- protected long localBaseTimestamp = EMPTY_LOCALBASETS;
- protected String remoteBaseIdentifier = EMPTY_REMOTEBASEID;
-
- protected boolean checkedOut = true;
-
- /*
- * This is the local resource that the receiver represents. It is initialized by
- * the constructor. (The remote resource is maintained by specific subclasses
- * as it is type-dependent.)
- */
- protected IResource localResource;
-
- protected QualifiedName stateKey = new QualifiedName("org.eclipse.team.target", "state_info"); //$NON-NLS-1$ //$NON-NLS-2$
-
- protected URL rootUrl;
-
- /**
- * Constructor for a resource state given a local resource.
- * Remember which local resource this state represents.
- *
- * @param localResource the local part of a synchronized pair of resources.
- */
- public ResourceState(IResource localResource, URL rootUrl) {
- super();
- this.rootUrl = rootUrl;
- SynchronizedTargetProvider.getSynchronizer().add(stateKey);
- this.localResource = localResource;
- }
-
- /**
- * Get the timestamp that represents the base state of the local resource, that is
- * the state that the local resource had when it was initially fetched from the repository.
- *
- * @return the timestamp of the local state of the resource (as reported by
- * java.io.File.getLastModified()) at the point the resource was downloaded to the
- * workspace.
- * @throws BaseIdentifierNotInitializedException if the resource has not yet been
- * downloaded.
- */
- public long getLocalBaseTimestamp()
- throws BaseIdentifierNotInitializedException {
- if (localBaseTimestamp == EMPTY_LOCALBASETS)
- throw new BaseIdentifierNotInitializedException();
- return localBaseTimestamp;
- }
-
-
- /**
- * Get the identifier that represents the base state of the remote resource, that is
- * the state of the remote resource when it was fetched as the base state of the
- * local resource.
- * <p>
- * In general, repositories have arbitrary ways to distinguish resource states.
- * The result should only be used for equality comparison, there should be no
- * ordering or other information implied from the value returned. For example,
- * the value may be a version identifier, timestamp, ETag, etc. To ensure
- * schemes do not inadvertantly test equal it is recommended that the identifier
- * be a URI where the scheme denotes the value type,
- * e.g., date-rfc1123:Fri, 16 Nov 2001 06:25:24 GMT</p>
- *
- * @return an opaque identifier to the base state of the resource in the provider.
- * @throws BaseIdentifierNotInitializedException if the resource has not yet been
- * downloaded.
- */
- public String getRemoteBaseIdentifier()
- throws BaseIdentifierNotInitializedException {
- if (remoteBaseIdentifier.equals(EMPTY_REMOTEBASEID))
- throw new BaseIdentifierNotInitializedException();
- return remoteBaseIdentifier;
- }
-
-
- /**
- * Get the identifier that represents the released state of the resource,
- * that is the state that it currently has in the repository.
- * <p>
- * In general, repositories have arbitrary ways to distinguish resource states.
- * The result should only be used for equality comparison, there should be no
- * ordering or other information implied from the value returned. For example,
- * the value may be a version identifier, timestamp, ETag, etc. To ensure
- * schemes do not inadvertantly test equal it is recommended that the identifier
- * be a URI where the scheme denotes the value type,
- * e.g., date-rfc1123:Fri, 16 Nov 2001 06:25:24 GMT</p>
- *
- * @param progress a progress monitor to indicate the duration of the operation, or
- * <code>null</code> if progress reporting is not required.
- * @return an opaque identifier to the current released state of the resource in
- * the provider.
- * @throws TeamException if there is a problem getting the released state
- * identifier from the provider. Valid exception status codes include:
- * <ul>
- * <li>IO_FAILED</li>
- * <li>NO_REMOTE_RESOURCE</li>
- * </ul></p>
- */
- public abstract String getReleasedIdentifier(IProgressMonitor monitor) throws TeamException;
-
- /**
- * Check out the receiver. Return a status if the receiver is in the wrong state for the operation to be performed.
- *
- * @throws TeamException if there is a error communicating with the resource from the server.
- */
- public void checkout(IProgressMonitor progress) throws TeamException {
- progress.beginTask(null, 100);
- try {
- // Not going to allow branching.
- if (isOutOfDate(Policy.subMonitorFor(progress, 50)))
- throw new TeamException(ITeamStatusConstants.CONFLICT_STATUS);
-
- // Sanity check.
- if (!hasRemote(Policy.subMonitorFor(progress, 50)))
- throw new TeamException(ITeamStatusConstants.NO_REMOTE_RESOURCE_STATUS);
-
- // Legally, the resource must be checked in before it can be checked out.
- if (isCheckedOut())
- throw new TeamException(ITeamStatusConstants.NOT_CHECKED_IN_STATUS);
-
- // Do the provider specific action for check-out.
- basicCheckout(progress);
- } finally {
- progress.done();
- }
- }
-
- /**
- * A basic checkout is provider specific.
- * Unless overridden, work in an optimistic mode.
- */
- protected void basicCheckout(IProgressMonitor progress) throws TeamException {
- checkedOut = true;
- }
-
-
- /**
- * Check in the receiver.
- *
- * @throws TeamException if there is a error communicating with the resource from the server.
- */
- public void checkin(IProgressMonitor progress) throws TeamException {
- progress = Policy.monitorFor(progress);
- progress.beginTask(null, 100);
- try {
- // The resource must be checked out before it can be checked in.
- if (!isCheckedOut())
- throw new TeamException(ITeamStatusConstants.NOT_CHECKED_OUT_STATUS);
-
- if (!hasLocal()) {
- if (hasRemote(Policy.subMonitorFor(progress, 10))) {
- delete(Policy.subMonitorFor(progress, 80));
- }
- } else {
- // Ensure the necessary remote direcotories exist
- mkRemoteDirs(Policy.subMonitorFor(progress, 10));
- // Copy from the local resource to the repository.
- if (getLocal().getType() == IResource.FILE) {
- upload(Policy.subMonitorFor(progress, 80));
- }
- }
- //if we got to here the upload succeeded (didn't throw)
- checkedOut = false;
- } finally {
- progress.done();
- }
- }
-
- /**
- * Uncheckout the receiver.
- */
- public void uncheckout(IProgressMonitor progress) throws TeamException {
- // Has to be checked-out before it can be reversed.
- if (!isCheckedOut())
- throw new TeamException(ITeamStatusConstants.NOT_CHECKED_OUT_STATUS);
-
- // Nothing interesting to do since the API spec. requires that we do not reverse
- // any local changes.
- checkedOut = false;
- }
-
- /**
- * Answer whether the receiver is checked out or not.
- * <p>
- * Note that this is a quick operation that will be called from the UI, so providers are required
- * to cache information that is expensive to compute. Where the cache may get stale users
- * have the opportunity to force a refresh using ITeamProvider.refreshState().
- *
- * @return <code>true</code> if the receiver is checked in, and <code>false</code>
- * if it is not.
- * @see ITeamProvider#isCheckedOut(IResource)
- * @see ITeamProvider#refreshState(IResource[], int, IProgressMonitor)
- */
- public boolean isCheckedOut() {
- return checkedOut;
- }
-
- /**
- * Answer if the local resource currently has a different timestamp to the
- * base timestamp for this resource.
- *
- * @return <code>true</code> if the resource has a different modification
- * timestamp, and <code>false</code> otherwise.
- * @see ITeamProvider#isDirty(IResource)
- */
- public boolean isDirty() {
- if (!hasPhantom()) return false;
- if (!hasLocal()) return true;
- if (localBaseTimestamp == EMPTY_LOCALBASETS)
- return localResource.getType() == IResource.FILE;
- return localBaseTimestamp != localResource.getModificationStamp();
- }
-
- /**
- * Answers true if the base identifier of the given resource is different to the
- * current released state of the resource.
- */
- public boolean isOutOfDate(IProgressMonitor monitor) throws TeamException {
- if (!hasPhantom()) return false;
- if (remoteBaseIdentifier.equals(EMPTY_REMOTEBASEID)) return false;
- String releasedIdentifier = getReleasedIdentifier(monitor);
- return !remoteBaseIdentifier.equals(releasedIdentifier);
- }
-
- /**
- * Download the remote resource represented by the receiver state to the location
- * represented by the local resource (i.e., resource.getLocation().toFile()).
- * This copies from the provider to the workspace, <em>and</em> sets the local
- * base timestamp and remote base identifier.
- * The provider may (and should wherever possible) optimize the case where it
- * knows the local resource is identical to the remote resource.
- */
- public abstract void download(IProgressMonitor progress) throws TeamException;
-
- /**
- * Upload the resource represented by the local resource to the remote
- * resource represented by the receiver. This copies from the workspace to
- * the provider <em>and</em> sets the local base timestamp and remote base
- * identifier.
- */
- public abstract void upload(IProgressMonitor progress) throws TeamException;
-
- /**
- * Delete the remote resource.
- */
- public abstract void delete(IProgressMonitor progress) throws TeamException;
-
- /**
- * Answer if the remote resource exists.
- */
- public abstract boolean hasRemote(IProgressMonitor monitor) throws TeamException;
-
- /**
- * Answer the type of the remote resource (if it exists).
- * The type should correspond to the IResource enumerated types.
- */
- public abstract int getRemoteType();
-
- /**
- * Answer the array of resource states for each member of the receiver.
- * If the receiver has no members (or is incapable of having members)
- * answer an empty array.
- */
- public abstract ResourceState[] getRemoteChildren(IProgressMonitor monitor) throws TeamException;
-
- /**
- * Create the necessary remote directories corresponding to the local resource.
- * That is, if the resource is a folder, create it and its parents if they don't
- * already exist. If the resource is a file, create its parents if they don't
- * already exist.
- */
- protected abstract void mkRemoteDirs(IProgressMonitor monitor) throws TeamException;
-
- /**
- */
- public IResource getLocal() {
- return localResource;
- }
-
- /**
- * Get the file underlying the local resource.
- */
- protected File getLocalFile() {
- return localResource.getLocation().toFile();
- }
-
- /**
- * Answer if the local resource exists.
- */
- protected boolean hasLocal() {
- return localResource.exists();
- }
-
- /**
- * Answer if the local resource has a phantom, which indicates that the respource had both a local
- * and remote version at one time.
- */
- protected boolean hasPhantom() {
- try {
- return SynchronizedTargetProvider.getSynchronizer().getSyncInfo(stateKey, localResource) != null;
- } catch (CoreException e) {
- TeamPlugin.log(e.getStatus());
- return false;
- }
- }
-
- /**
- * Initializes the resource state instance from the given serialized state.
- * The format of the serialized state is that produced by <code>toBytes()</code>.
- *
- * @param bytes the serialized resource state.
- */
- public final void loadState() throws TeamException {
- try {
- byte[] storedState =
- SynchronizedTargetProvider.getSynchronizer().getSyncInfo(stateKey, localResource);
- if (storedState != null)
- fromBytes(storedState);
- } catch (CoreException e) {
- throw TeamPlugin.wrapException(e);
- }
- }
-
- /**
- * Initializes the resource state instance from the given serialized state.
- * The format of the serialized state is that produced by <code>toBytes()</code>.
- *
- * @param bytes the serialized resource state.
- */
- protected void fromBytes(byte[] bytes) throws TeamException{
- try {
- DataInputStream dataStream =
- new DataInputStream(new ByteArrayInputStream(bytes));
- if (BYTES_FORMAT != dataStream.readByte())
- return;
-
- // Restore common resource state values.
- remoteBaseIdentifier = dataStream.readUTF();
- localBaseTimestamp = dataStream.readLong();
-
- } catch (IOException e) {
- throw TeamPlugin.wrapException(e);
- }
- };
-
- public final void storeState() throws TeamException {
- try {
- SynchronizedTargetProvider.getSynchronizer().setSyncInfo(
- stateKey,
- localResource,
- toBytes());
- // Ensure that the parent has base info recorded (otherwise deleting the parent will cause the lose of sync info)
- if (localResource.getType() == IResource.PROJECT) return;
- IContainer parent = localResource.getParent();
- if (parent != null && parent.getType() != IResource.PROJECT &&
- SynchronizedTargetProvider.getSynchronizer().getSyncInfo(stateKey, parent) == null) {
- getParent().storeState();
- } else {
- ResourcesPlugin.getWorkspace().save(false, null);
- }
- } catch (CoreException e) {
- throw TeamPlugin.wrapException(e);
- }
- }
-
- /**
- * Answer the resource state as a sequence of bytes, in a format that can be used to
- * reconstruct an equivalent resource state using the <code>fromBytes(byte[])</code>
- * method.
- * <p>
- * Subclasses should implement <code>storeState(DataOutputStream)</code> to
- * store provider specific state information.</p>
- *
- * @return the resource state as a byte array.
- * @see #storeState(DataOutputStream)
- * @see fromBytes(byte[])
- */
- protected byte[] toBytes() throws TeamException {
- try {
- // Create a stream to store the byte representation of the receiver's state.
- ByteArrayOutputStream byteStream = new ByteArrayOutputStream(32);
- // Guess ~32 bytes
- DataOutputStream dataStream = new DataOutputStream(byteStream);
- dataStream.writeByte(BYTES_FORMAT);
-
- // Store data common to all resource states.
- dataStream.writeUTF(remoteBaseIdentifier);
- dataStream.writeLong(localBaseTimestamp);
-
- dataStream.close();
- return byteStream.toByteArray();
- } catch (IOException e) {
- throw TeamPlugin.wrapException(e);
- }
- }
-
- final public void removeState() throws TeamException {
- try {
- if (localResource.exists() || localResource.isPhantom()) {
- SynchronizedTargetProvider.getSynchronizer().flushSyncInfo(
- stateKey,
- localResource,
- IResource.DEPTH_INFINITE);
- }
- } catch (CoreException e) {
- throw TeamPlugin.wrapException(e);
- }
- }
-
- /**
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(Class)
- */
- public Object getAdapter(Class adapter) {
- return Platform.getAdapterManager().getAdapter(this, adapter);
- }
-
- /**
- * Method getRoot.
- * @return URL of this resource's parent
- */
- public URL getRoot() {
- return rootUrl;
- }
-
- private ResourceState getParent() throws TeamException {
- return getResourceStateFor(localResource.getParent());
- }
-
- private ResourceState getResourceStateFor(IResource resource) throws TeamException {
- TargetProvider provider = TargetManager.getProvider(resource.getProject());
- return ((SynchronizedTargetProvider)provider).getState(resource);
- }
-
- /**
- * Get the resource corresponding to the receiver to the specified depth.
- */
- protected final void get(int depth, IProgressMonitor progress) throws TeamException {
-
- progress = Policy.monitorFor(progress);
-
- // the no progress monitor is used to control the progress given to
- // other methods and ensures that the progress monitor is not overloaded
- // with subtask messages and work. The null monitor does propagate
- // cancellation.
- IProgressMonitor noProgress = new NullSubProgressMonitor(progress);
- try {
- progress.beginTask(null, 100);
- Policy.checkCanceled(progress);
-
- // If remote does not exist then simply ensure no local resource exists.
- if (!hasRemote(noProgress)) {
- if (hasLocal())
- deleteLocal(noProgress);
- return;
- }
-
- // Ensure that the required local folders exist
- if (!hasLocal()) {
- mkLocalDirs(noProgress);
- }
-
- // If the remote resource is a file, download the remote contents
- if (getRemoteType() == IResource.FILE) {
- download(Policy.subMonitorFor(progress, 100));
- return;
- }
-
- // The remote resource is a container.
-
- // If the local resource is a file, we must remove it first.
- if (getLocal().getType() == IResource.FILE) {
- if (hasLocal()) {
- deleteLocal(noProgress); // May not exist.
- }
- // change the local resource to a folder and create it
- localResource = localResource.getParent().getFolder(new Path(localResource.getName()));
- mkLocalDirs(noProgress);
- }
-
- // Finally, resolve the collection membership based upon the depth parameter.
- switch (depth) {
- case IResource.DEPTH_ZERO :
- // If we are not considering members of the collection then we are done.
- return;
- case IResource.DEPTH_ONE :
- // If we are considering only the immediate members of the collection
- getFolderShallow(Policy.subMonitorFor(progress, 100));
- return;
- case IResource.DEPTH_INFINITE :
- // We are going in deep.
- getFolderDeep(Policy.subMonitorFor(progress, 100));
- return;
- default :
- // We have covered all the legal cases.
- Assert.isLegal(false);
- return; // Never reached.
- } // end switch
- } finally {
- progress.done();
- }
- }
-
- /**
- * Get the folder resource represented by the receiver deeply.
- */
- protected final void getFolderDeep(IProgressMonitor progress) throws TeamException {
- progress = Policy.monitorFor(progress);
- try {
- progress.beginTask(null, 10);
- // Could throw if problem getting the folder at this level.
- ResourceState[] childFolders = getFolderShallow(Policy.subMonitorFor(progress, 7));
-
- // If there are no further children then we are done.
- if (childFolders.length == 0)
- return;
-
- IProgressMonitor subProgress = Policy.subMonitorFor(progress, 3);
- // Collect the responses in the multistatus.
- try {
- subProgress.beginTask(null, childFolders.length);
- for (int i = 0; i < childFolders.length; i++) {
- childFolders[i].get(IResource.DEPTH_INFINITE, Policy.subMonitorFor(subProgress, 1));
- }
- } finally {
- subProgress.done();
- }
-
- return;
- } finally {
- progress.done();
- }
- }
-
- /**
- * Synchronize from the remote provider to the workspace.
- * Assume that the 'remote' folder is correct, and change the local
- * folder to look like the remote folder.
- *
- * returns an array of children of the remote resource that are themselves
- * collections.
- */
- protected final ResourceState[] getFolderShallow(IProgressMonitor progress) throws TeamException {
- progress = Policy.monitorFor(progress);
- IProgressMonitor noProgress = new NullProgressMonitor();
- try {
- // We are assuming that the resource is a container.
- Assert.isLegal(getLocal() instanceof IContainer);
- IContainer localContainer = (IContainer)getLocal();
-
- // Get list of all _remote_ children.
- ResourceState[] remoteChildren = getRemoteChildren(noProgress);
-
- // This will be the list of remote children that are themselves containers.
- Set remoteChildFolders = new HashSet();
-
- // Make a list of _local_ children that have not yet been processed,
- IResource[] localChildren = getLocalChildren();
- Set surplusLocalChildren = new HashSet(localChildren.length);
- surplusLocalChildren.addAll(Arrays.asList(localChildren));
-
- progress.beginTask(null, remoteChildren.length * 100);
- // For each remote child that is a file, make the local file content equivalent.
- for (int i = 0; i < remoteChildren.length; i++) {
- Policy.checkCanceled(progress);
- ResourceState remoteChildState = remoteChildren[i];
- // If the remote child is a container add it to the list, and ensure that the local child
- // is a folder if it exists.
- if (remoteChildState.getRemoteType() == IResource.FILE) {
- // The remote resource is a file. Copy the content of the remote file
- // to the local file, overwriting any existing content that may exist, and
- // creating the file if it doesn't.
- remoteChildState.download(Policy.subMonitorFor(progress, 100));
- // Remember that we have processed this child.
- surplusLocalChildren.remove(remoteChildState.getLocal());
- } else {
- // The remote resource is a container.
- remoteChildFolders.add(remoteChildState);
- // If the local child is not a container then it must be deleted.
- IResource localChild = remoteChildState.getLocal();
- if (localChild.exists() && (!(localChild instanceof IContainer)))
- remoteChildState.deleteLocal(noProgress);
- } // end if
- } // end for
-
- // Remove each local child that does not have a corresponding remote resource.
- TargetProvider provider = TargetManager.getProvider(localContainer.getProject());
- Iterator childrenItr = surplusLocalChildren.iterator();
- while (childrenItr.hasNext()) {
- IResource unseenChild = (IResource) childrenItr.next();
- ((SynchronizedTargetProvider)provider).newState(unseenChild).deleteLocal(noProgress);
- } // end-while
-
- // Answer the array of children seen on the remote collection that are
- // themselves collections (to support depth operations).
- return (ResourceState[]) remoteChildFolders.toArray(
- new ResourceState[remoteChildFolders.size()]);
- } finally {
- progress.done();
- }
- }
-
- /**
- * Delete the local resource represented by the resource state. Do not complain if the resource does not exist.
- */
- protected final void deleteLocal(IProgressMonitor progress) throws TeamException {
- try {
- getLocal().delete(IResource.KEEP_HISTORY, progress);
- removeState();
- } catch (CoreException exception) {
- throw TeamPlugin.wrapException(exception);
- }
- }
-
- /**
- * Make the local directories matching the description of the local resource state.
- */
- protected final void mkLocalDirs(IProgressMonitor progress) throws TeamException {
- try {
- IResource resource = getLocal();
- if (resource.getType() == IResource.FILE) {
- resource = resource.getParent();
- }
- if (resource.getType() == IResource.FOLDER && ! resource.exists()) {
- ((IFolder)resource).create(false /* force */, true /* make local */, progress);
- // Mark the folders as having a base
- storeState();
- }
-
- } catch (CoreException exception) {
- // The creation failed.
- throw TeamPlugin.wrapException(exception);
- }
- }
-
- /**
- * Get an array of local children of the given container, or an empty array if the
- * container does not exist or has no children.
- */
- protected final IResource[] getLocalChildren() throws TeamException {
- // We are assuming that the resource is a container.
- Assert.isLegal(getLocal() instanceof IContainer);
- IContainer container = (IContainer)getLocal();
- if (container.exists())
- try {
- return container.members();
- } catch (CoreException exception) {
- throw TeamPlugin.wrapException(exception);
- }
- return new IResource[0];
- }
-
- /**
- * Put the resource from the workspace to the remote provider.
- * Assume that the 'local' resource is correct, and change the remote
- * resource to look like the local resource. This includes removing any
- * child resources that exist remotely but do not exist locally.
- */
- protected final void put(IProgressMonitor progress) throws TeamException {
-
- progress = Policy.monitorFor(progress);
-
- // the no progress monitor is used to control the progress given to
- // other methods and ensures that the progress monitor is not overloaded
- // with subtask messages and work. The null monitor does propagate
- // cancellation.
- IProgressMonitor noProgress = new NullSubProgressMonitor(progress);
- try {
- // Check cancellation
- progress.beginTask(null, 100);
- Policy.checkCanceled(progress);
-
- // Ensure that the remote type matches the local type
- boolean hasRemote = hasRemote(noProgress);
- if ((getRemoteType() != localResource.getType() && localResource.getType() != IResource.PROJECT)) {
- if (hasRemote) delete(noProgress);
- hasRemote = false;
- }
-
- // Upload the resource (this is a shallow operation for folders)
- checkin(Policy.subMonitorFor(progress, 75));
-
- // If we're putting a file, we're done
- if (localResource.getType() == IResource.FILE) return;
-
- // If the local doesn't exist then we just deleted the remote so we're done
- if (!hasLocal()) return;
-
- // Make a list of _remote_ children that have not yet been processed,
- Map surplusRemoteChildren = new HashMap();
- if (hasRemote) {
- ResourceState[] remoteChildren = remoteChildren = getRemoteChildren(progress);
- for (int i = 0; i < remoteChildren.length; i++) {
- ResourceState resourceState = remoteChildren[i];
- surplusRemoteChildren.put(resourceState.getLocal(), resourceState);
- }
- }
-
- // For each local child that is a file, make the remote file content equivalent.
- IResource[] localChildren = getLocalChildren();
- IProgressMonitor subMonitor = Policy.subMonitorFor(progress, 25);
- try {
- subMonitor.beginTask(null, localChildren.length * 100);
- for (int i = 0; i < localChildren.length; i++) {
- IResource localChild = localChildren[i];
- // Get the resource state corresponding to the local resource
- ResourceState state = (ResourceState)surplusRemoteChildren.get(localChild);
- if (state == null) {
- // There is no remote corresponding to the local
- state = getResourceStateFor(localChild);
- } else {
- // There is a remote. Remember that we have processed this child.
- surplusRemoteChildren.remove(localChild);
- }
- // Put the child (this is a deep operation for folders)
- state.put(Policy.subMonitorFor(subMonitor, 100));
- }
- } finally {
- subMonitor.done();
- }
-
- // Remove each remote child that does not have a corresponding local resource.
- Iterator childrenItr = surplusRemoteChildren.values().iterator();
- while (childrenItr.hasNext()) {
- ResourceState unseenChild = (ResourceState) childrenItr.next();
- unseenChild.delete(noProgress);
- }
- } finally {
- progress.done();
-
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/SynchronizedTargetProvider.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/SynchronizedTargetProvider.java
deleted file mode 100644
index cb7e5f2b3..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/SynchronizedTargetProvider.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.core.target;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.resources.ISynchronizer;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.core.target.IRemoteTargetResource;
-import org.eclipse.team.core.target.ITargetRunnable;
-import org.eclipse.team.core.target.Site;
-import org.eclipse.team.core.target.TargetProvider;
-import org.eclipse.team.internal.core.Policy;
-import org.eclipse.team.internal.core.TeamPlugin;
-
-public abstract class SynchronizedTargetProvider extends TargetProvider {
-
- private static final int CONFIG_FORMAT_VERSION = 2;
-
- // The location where the target reads/writes against
- protected Site site;
- // The path relative to the site where the target reads/writes against
- protected IPath intrasitePath;
- // The URL which combines the site and relative path
- protected URL targetURL;
-
- /*
- * Answers the synchronizer.
- */
- final protected static ISynchronizer getSynchronizer() {
- return ResourcesPlugin.getWorkspace().getSynchronizer();
- }
-
- public SynchronizedTargetProvider(Site site, IPath intrasitePath) throws TeamException {
- this.intrasitePath = intrasitePath;
- this.site = site;
- // Create the combined URL here so we know it's good
- String root = getSite().getURL().toExternalForm();
- try {
- targetURL = UrlUtil.concat(root, intrasitePath);
- } catch (MalformedURLException e) {
- throw new TeamException(Policy.bind(Policy.bind("SynchronizedTargetProvider.invalidURLCombination"), root, intrasitePath.toString()), e); //$NON-NLS-1$
- }
- }
-
- /*
- * Answers a new state based on an existing local resource.
- */
- abstract public ResourceState newState(IResource resource);
-
- /*
- * Answers a new state based on an existing local resource and
- * an associated existing remote resource.
- */
- abstract public ResourceState newState(IResource resource, IRemoteTargetResource remote);
-
- /**
- * @see TargetProvider#getSite()
- */
- public Site getSite() {
- return site;
- }
-
- /**
- * @see TargetProvider#getURL()
- */
- public URL getURL() {
- return targetURL;
- }
-
- /*
- * Get the state descriptor for a given resource.
- */
- public ResourceState getState(IResource resource) throws TeamException {
- // Create a new resource state with default values.
- ResourceState state = newState(resource);
- state.loadState();
- return state;
- }
-
- /*
- * Get the state descriptor for a given resource.
- */
- public ResourceState getState(IResource resource, IRemoteTargetResource remote) throws TeamException {
- // Create a new resource state with default values.
- ResourceState state = newState(resource, remote);
- state.loadState();
- return state;
- }
-
- /**
- * Get the resource from the provider to the workspace, and remember the fetched
- * state as the base state of the resource.
- *
- * @see TargetProvider.get(IResource[], int, IProgressMonitor)
- */
- public void get(final IResource[] resources, IProgressMonitor progress) throws TeamException {
- run(new ITargetRunnable() {
- public void run(IProgressMonitor monitor) throws TeamException {
- monitor = Policy.monitorFor(monitor);
- try {
- monitor.beginTask(null, resources.length * 100);
- for (int i = 0; i < resources.length; i++) {
- getState(resources[i]).get(IResource.DEPTH_INFINITE, Policy.subMonitorFor(monitor, 100));
- }
- } finally {
- monitor.done();
- }
- }
- }, Policy.monitorFor(progress));
- }
-
- /**
- * Get the resource from the provider to the workspace, and remember the fetched
- * state as the base state of the resource.
- *
- * @see TargetProvider.get(IResource, IRemoteTargetResource, IProgressMonitor)
- */
- public void get(final IResource resource, final IRemoteTargetResource remote, IProgressMonitor progress) throws TeamException {
- run(new ITargetRunnable() {
- public void run(IProgressMonitor monitor) throws TeamException {
- getState(resource, remote).get(IResource.DEPTH_INFINITE, monitor);
- }
- }, Policy.monitorFor(progress));
- }
-
-
- /**
- * Put the resources to the remote.
- *
- * @see TargetProvider.put(IResource[], IProgressMonitor)
- */
- public void put(final IResource[] resources, IProgressMonitor progress) throws TeamException {
- run(new ITargetRunnable() {
- public void run(IProgressMonitor monitor) throws TeamException {
- monitor = Policy.monitorFor(monitor);
- try {
- monitor.beginTask(null, resources.length * 100);
- for (int i = 0; i < resources.length; i++) {
- getState(resources[i]).put(Policy.subMonitorFor(monitor, 100));
- }
- } finally {
- monitor.done();
- }
- }
- }, Policy.monitorFor(progress));
- }
-
- /**
- * Answer if the local resource currently has a different timestamp to the
- * base timestamp for this resource.
- *
- * @param resource the resource to test.
- * @return <code>true</code> if the resource has a different modification
- * timestamp, and <code>false</code> otherwise.
- *
- * @see TargetProvider#isDirty(IResource)
- */
- public boolean isDirty(IResource resource) {
- try {
- return getState(resource).isDirty();
- } catch (TeamException e) {
- TeamPlugin.log(e.getStatus());
- return true;
- }
- }
-
- /**
- * Answers true if the base identifier of the given resource is different to the
- * current released state of the resource.
- *
- * @param resource the resource state to test.
- * @return <code>true</code> if the resource base identifier is different to the
- * current released state of the resource, and <code>false</code> otherwise.
- *
- * @see TargetProvider#isOutOfDate(IResource, IProgressMonitor)
- */
- public boolean isOutOfDate(IResource resource, IProgressMonitor monitor) throws TeamException {
- ResourceState state = getState(resource);
- return state.isOutOfDate(monitor);
- }
-
- /**
- * @see TargetProvider#deregister(IProject)
- */
- public void deregister(IProject project) {
- try {
- newState(project).removeState();
- } catch (TeamException e) {
- TeamPlugin.log(e.getStatus());
- }
- }
-
- /**
- * @see TargetProvider#getRemoteSyncElement(IResource)
- */
- public IRemoteSyncElement getRemoteSyncElement(IResource resource) {
- return new RemoteTargetSyncElement(this, resource, getRemoteResourceFor(resource));
- }
-
-
- /**
- * @see TargetProvider#hasBase(IResource)
- */
- public boolean hasBase(IResource resource) {
- // the project always has a base
- if (resource.getType() == IResource.PROJECT) return true;
- try {
- return getState(resource).hasPhantom();
- } catch (TeamException e) {
- TeamPlugin.log(e.getStatus());
- return true;
- }
- }
-
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/UrlUtil.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/UrlUtil.java
deleted file mode 100644
index 990adc8ad..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/UrlUtil.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.core.target;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-
-public class UrlUtil {
-
- public static IPath getTrailingPath(URL fullURL, URL startingURL) {
- IPath fullPath = new Path(fullURL.getPath());
- IPath startingPath = new Path(startingURL.getPath());
- int matchingCount = fullPath.matchingFirstSegments(startingPath);
- return fullPath.removeFirstSegments(matchingCount);
- }
-
- public static URL concat(String root, IPath end) throws MalformedURLException {
- return new URL(concatString(root, end));
- }
-
- public static String concatString(String root, IPath end) {
- if(end.isEmpty())
- return root;
- if(root.length() == 0)
- return end.toString();
- boolean rootHasTrailing = root.charAt(root.length() - 1) == Path.SEPARATOR; //has trailing '/'
- boolean endHasLeading = end.isAbsolute(); // has leading '/'
-
- if(rootHasTrailing && endHasLeading) //http://mysite/ + /myFolder
- return root + end.toString().substring(1); // we have two seperators, drop one
-
- if(!rootHasTrailing && !endHasLeading) //http://mysite + myFolder
- return root + Path.SEPARATOR + end.toString();
-
- return root + end.toString(); //have one separator between the two, just concat end
- }
-
- /*
- * Return a string that is like url but guaranteed to end with a '/'
- */
- public static String makeAbsolute(String url) {
- boolean hasTrailing = url.charAt(url.length() - 1) == Path.SEPARATOR; //has trailing '/'
- if(hasTrailing)
- return url;
- return url + Path.SEPARATOR;
- }
-
- /*
- * @see toTruncatedPath(URL, int)
- */
- public static String toTruncatedPath(URL url, int split) {
- return toTruncatedPath(url.getPath(), split);
- }
-
- /*
- * If the number of segments in the url path is greater than <code>split</code> then
- * the returned path is truncated to <code>split</code> number of segments and '...'
- * is shown as the first segment of the path.
- */
- public static String toTruncatedPath(String url, int split) {
- IPath path = new Path(url);
- path = path.setDevice(null); // clear the device id, in this case the http:
- int segments = path.segmentCount();
- if(segments>split) {
- IPath last = path.removeFirstSegments(segments - split);
- return "..." + path.SEPARATOR + last.toString(); //$NON-NLS-1$
- }
- return path.toString();
- }
-}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/messages.properties b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/messages.properties
deleted file mode 100644
index eb507c645..000000000
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/target/messages.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-
-teamStatus.notCheckedOut=Not checked out.
-teamStatus.notCheckedIn=Not checked in.
-teamStatus.unmanagedResource=Unmanaged resource.
-teamStatus.noRemoteResource=Remote resource does not exist.
-teamStatus.ioFailed=An IO error occurred.
-teamStatus.conflict=A conflict occurred.
-provider.configuration.missing=Required configuration value missing.
-provider.configuration.invalid=Configuration value is invalid.
-filetransfer.monitor={0} ({1}K of {2}K bytes)
-multiStatus.errorsOccurred=Errors occurred \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/.classpath b/bundles/org.eclipse.team.cvs.core/.classpath
deleted file mode 100644
index 8eeac83f2..000000000
--- a/bundles/org.eclipse.team.cvs.core/.classpath
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="/org.eclipse.team.core"/>
- <classpathentry kind="src" path="/org.apache.xerces"/>
- <classpathentry kind="src" path="/org.eclipse.core.resources"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.team.cvs.core/.cvsignore b/bundles/org.eclipse.team.cvs.core/.cvsignore
deleted file mode 100644
index c5e82d745..000000000
--- a/bundles/org.eclipse.team.cvs.core/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/.options b/bundles/org.eclipse.team.cvs.core/.options
deleted file mode 100644
index c0c488d97..000000000
--- a/bundles/org.eclipse.team.cvs.core/.options
+++ /dev/null
@@ -1,12 +0,0 @@
-# Debugging options for the org.eclipse.team.cvs.core plugin.
-
-# Turn on debugging for the plugin.
-org.eclipse.team.cvs.core/debug=true
-
-# Shows when meta-files are modified by a 3rd party
-org.eclipse.team.cvs.core/metafiles=false
-
-# Shows cvs client/server protocol
-org.eclipse.team.cvs.core/cvsprotocol=true
-# Shows stream debugging information
-org.eclipse.team.cvs.core/threading=false \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/.project b/bundles/org.eclipse.team.cvs.core/.project
deleted file mode 100644
index 0912111b7..000000000
--- a/bundles/org.eclipse.team.cvs.core/.project
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.team.cvs.core</name>
- <comment></comment>
- <projects>
- <project>org.apache.xerces</project>
- <project>org.eclipse.core.resources</project>
- <project>org.eclipse.core.runtime</project>
- <project>org.eclipse.team.core</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.team.cvs.core.cvsnature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.team.cvs.core/about.html b/bundles/org.eclipse.team.cvs.core/about.html
deleted file mode 100644
index 833a8b7e9..000000000
--- a/bundles/org.eclipse.team.cvs.core/about.html
+++ /dev/null
@@ -1,93 +0,0 @@
-<html>
-<head>
-<title>About</title>
-<style type="text/css">
-p, table, td, th { font-family: arial, helvetica, geneva; font-size: 10pt}
-pre { font-family: "Courier New", Courier, mono; font-size: 10pt}
-h2 { font-family: arial, helvetica, geneva; font-size: 18pt; font-weight: bold ; line-height: 14px}
-code { font-family: "Courier New", Courier, mono; font-size: 10pt}
-sup { font-family: arial,helvetica,geneva; font-size: 10px}
-h3 { font-family: arial, helvetica, geneva; font-size: 14pt; font-weight: bold}
-li { font-family: arial, helvetica, geneva; font-size: 10pt}
-h1 { font-family: arial, helvetica, geneva; font-size: 28px; font-weight: bold}
-body { font-family: arial, helvetica, geneva; font-size: 10pt; clip: rect( ); margin-top: 5mm; margin-left: 3mm}
-</style>
-</head>
-<body lang="EN-US" link="blue" vlink="purple">
-<table border="0" cellspacing="5" cellpadding="2" width="100%" >
- <tr>
- <td align="LEFT" valign="TOP" colspan="2" bgcolor="#0080C0"><b><font color="#FFFFFF">About This Content</font></b></td>
- </tr>
- <tr>
- <td>
-<p>11th December, 2001</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in &quot;Content&quot;. Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-<a href="http://www.eclipse.org/legal/cpl-v05.html">Common Public License Version 0.5</a> &quot;CPL&quot;. For purposes of the CPL, &quot;Program&quot; will mean the Content.</p>
-
-<h3>Third Party Content</h3>
-
-<p>The Content includes items that have been sourced from third parties as follows:</p>
-
-<p><b>Ant 1.4.1</b></p>
-<p>The plug-in is based on software developed by The Apache Software Foundation as part of the Jakarta project.</p>
-
-<p>The class PServerConnection &quot;Ant Derivative Work&quot; contained in teamcvs.jar and teamcvssrc.zip is based on Ant code.</p>
-
-<p>The Ant Derivative Work is:</p>
-
-<blockquote>Copyright (c) 1999 The Apache Software Foundation. All rights reserved.</blockquote>
-
-<p>Your use of the Ant Derivative Work, is subject to the terms and conditions of the
-<a href="http://jakarta.apache.org/ant/manual/LICENSE">Apache Software License 1.1</a>.
-More specifically:</p>
-<blockquote>
- 1. Redistributions of source code must retain the above copyright notice, this list of<br />
- conditions and the following disclaimer.<br />
-<br />
- 2. Redistributions in binary form must reproduce the above copyright notice, this list of<br />
- conditions and the following disclaimer in the documentation and/or other materials<br />
- provided with the distribution.<br />
-<br />
- 3. The end-user documentation included with the redistribution, if any, must include the<br />
- following acknowledgment:<br />
- <blockquote>
- &quot;This product includes software developed by the Apache Software Foundation<br />
- (<a href="http://www.apache.org/">http://www.apache.org/</a>).&quot;
- </blockquote>
- Alternately, this acknowledgment may appear in the software itself, if and wherever such<br />
- third-party acknowledgments normally appear.<br />
-<br />
- 4. The names &quot;Ant&quot; and &quot;Apache Software Foundation&quot; must not be used to endorse or<br />
- promote products derived from this software without prior written permission. For written<br />
- permission, please contact <a href="mailto:apache@apache.org">apache@apache.org</a>.<br />
-<br />
- 5. Products derived from this software may not be called &quot;Apache&quot;, nor may &quot;Apache&quot; appear<br />
- in their name, without prior written permission of the Apache Software Foundation.<br />
-<br />
- THIS SOFTWARE IS PROVIDED &quot;AS IS&quot; AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT<br />
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR<br />
- PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS<br />
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR<br />
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR<br />
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON<br />
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING<br />
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF<br />
- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-</blockquote>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL &quot;Other License&quot;, any modifications, enhancements and/or
-other code and/or documentation &quot;Modifications&quot; uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-</td></tr></table>
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/build.properties b/bundles/org.eclipse.team.cvs.core/build.properties
deleted file mode 100644
index 5e8a060ff..000000000
--- a/bundles/org.eclipse.team.cvs.core/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-# Eclipse build contribution
-bin.includes=about.html,plugin.xml,plugin.properties,*.jar
-source.cvs.jar=src/
-src.includes=about.html
diff --git a/bundles/org.eclipse.team.cvs.core/buildnotes_cvs.html b/bundles/org.eclipse.team.cvs.core/buildnotes_cvs.html
deleted file mode 100644
index 6bcff5189..000000000
--- a/bundles/org.eclipse.team.cvs.core/buildnotes_cvs.html
+++ /dev/null
@@ -1,665 +0,0 @@
-<!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en">
-<html xmlns:v="urn:schemas-microsoft-com:vml"
- xmlns:o="urn:schemas-microsoft-com:office:office"
- xmlns:w="urn:schemas-microsoft-com:office:word"
- xmlns="http://www.w3.org/TR/REC-html40">
-<head>
-
- <meta http-equiv="Content-Type"
- content="text/html; charset=iso-8859-1">
-
- <meta name="ProgId" content="Word.Document">
-
- <meta name="Generator" content="Microsoft Word 9">
-
- <meta name="Originator" content="Microsoft Word 9">
-
- <link rel="File-List" href="filelist">
- <title>Eclipse Platform Release Notes - VCM</title>
-
-
- <style>
-<!--
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-h1
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-outline-level:1;
- font-size:24.0pt;
- font-family:"Times New Roman";
- mso-font-kerning:18.0pt;
- font-weight:bold;}
-h2
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-outline-level:2;
- font-size:18.0pt;
- font-family:"Times New Roman";
- font-weight:bold;}
-h3
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- mso-outline-level:3;
- font-size:13.5pt;
- font-family:"Times New Roman";
- font-weight:bold;}
-a:link, span.MsoHyperlink
- {color:blue;
- text-decoration:underline;
- text-underline:single;}
-a:visited, span.MsoHyperlinkFollowed
- {color:purple;
- text-decoration:underline;
- text-underline:single;}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
- /* List Definitions */
-@list l0
- {mso-list-id:180434102;
- mso-list-type:hybrid;
- mso-list-template-ids:-764372184 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
-@list l1
- {mso-list-id:1311859295;
- mso-list-type:hybrid;
- mso-list-template-ids:838519152 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
-@list l1:level1
- {mso-level-number-format:bullet;
- mso-level-text:\F0B7;
- mso-level-tab-stop:.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- font-family:Symbol;}
-@list l2
- {mso-list-id:1618483892;
- mso-list-type:hybrid;
- mso-list-template-ids:1638689998 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
-@list l2:level1
- {mso-level-number-format:bullet;
- mso-level-text:\F0B7;
- mso-level-tab-stop:.5in;
- mso-level-number-position:left;
- text-indent:-.25in;
- font-family:Symbol;}
-ol
- {margin-bottom:0in;}
-ul
- {margin-bottom:0in;}
--->
- </style>
- <!--[if gte mso 9]><xml>
- <u1:DocumentProperties>
- <u1:Author>johnart</u1:Author>
- <u1:LastAuthor>johnart</u1:LastAuthor>
- <u1:Revision>2</u1:Revision>
- <u1:TotalTime>14</u1:TotalTime>
- <u1:Created>2001-05-14T20:34:00Z</u1:Created>
- <u1:LastSaved>2001-05-14T20:58:00Z</u1:LastSaved>
- <u1:Pages>9</u1:Pages>
- <u1:Words>3732</u1:Words>
- <u1:Characters>21276</u1:Characters>
- <u1:Lines>177</u1:Lines>
- <u1:Paragraphs>42</u1:Paragraphs>
- <u1:CharactersWithSpaces>26128</u1:CharactersWithSpaces>
- <u1:Version>9.3821</u1:Version>
- </u1:DocumentProperties>
-</xml><![endif]-->
-</head>
- <body lang="EN-US" link="blue" vlink="purple" style="">
-
-<div class="Section1">
-<h1 style=""> </h1>
-
-<h1 style=""> </h1>
-
-<h1 style=""> </h1>
-
-<h1 style=""> </h1>
-
-<h1 style=""> </h1>
-
-<h1 style=""> </h1>
-
-<h1 style=""> </h1>
-<h1 style="">
-<h1 style="">Eclipse Platform Build Notes &#8211; CVS Support</h1>
- </h1>
-<p class="MsoNormal">CVS build I20020517 May 17 2002</p>
-
-<p class="MsoNormal">Build submission for Integration Build 20020517</p>
-
-<h2>What's new in this build</h2>
-
-<p>Starting with this build, if you "Check Out As..." on a project from the
-repository which has no .project file, you will be prompted to specify what
-type of project you would like to create. (A typical example is to create
-a Java project at this point).<br>
-</p>
-<p>Also new in this build is the ability to select "Share Project..." on
-a project for which remote content already exists. Previously, sharing the
-project would automatically try to import your files into the repository;
-now, it detects that remote files already exists and opens the sync view
-for you to reconcile the differences.<br>
-</p>
-<p>Numerous other bugs are fixed. As always, you can check in Bugzilla.<br>
- </p>
-
-<h1 style="">Eclipse Platform Build Notes &#8211; CVS Support</h1>
-
-<p class="MsoNormal">CVS build I20020430 April 30 2002</p>
-
-<p class="MsoNormal">Build submission for Integration Build 20020430</p>
-
-<h2>What's new in this build</h2>
-
-<p>Added support for moving CVS tags. Ths fuctionality is available in the
-Repositories view under "Tag with Existing Tag". This allows one to change
-a version lineup.<br>
- </p>
-
-<h1 style="">Eclipse Platform Build Notes &#8211; CVS Support</h1>
-
-<p class="MsoNormal">CVS build I20020423 April 23 2002</p>
-
-<p class="MsoNormal">Build submission for Integration Build 20020423</p>
-
-<h2>What's new in this build</h2>
-
-<p class="MsoNormal">Branching/Merging changes:<br>
- </p>
-
-<ul>
- <li>merge allowed on multiple selection of non-overlapping resources,
- merge results show in same merge editor (e.g. you no longer need X editors
- to merge X projects). We should do the same for compare.</li>
-
-</ul>
-
-<p class="MsoNormal"></p>
-
-<ul>
- <li>merge allowed on all resource types</li>
-
-</ul>
-
-<p class="MsoNormal"></p>
-
-<ul>
- <li>branching allowed on all resource types</li>
-
-</ul>
-
-<p class="MsoNormal"></p>
-
-<ul>
- <li>"replace with" allowed on all resource types with multiple selection</li>
-
-</ul>
-
-<p class="MsoNormal"></p>
-
-<ul>
- <li>warning dialog added when ever a user creates a project with mixed
- tags. It warns about the implied CVS behavior. Can be turned off.</li>
-
-</ul>
-
-<p class="MsoNormal"></p>
-
-<ul>
- <li>tags only shown if different than parent tag (reduces tag clutter
- and makes it more obvious when a tag is different)<br>
- </li>
-
-</ul>
-
-<p class="MsoNormal"></p>
-
-<ul>
- <li>get revision for files allowed from history/replace/compare dialogs,
- to revert from a sticky revision use "replace with tag" and select the branch
- you are working on<br>
- </li>
-
-</ul>
-
-<p class="MsoNormal"></p>
-
-<ul>
- <li>CVS text decorations consolidated and as a result the text decorations
- in the sync view will follow the users preferences (except for the dirty
-flag which is not shown in the sync view.</li>
-
-</ul>
-
-<h1 style="">Eclipse Platform Build Notes &#8211; CVS Support</h1>
-
-<p class="MsoNormal">CVS build I20020409 April 9 2002</p>
-
-<p class="MsoNormal">Build submission for Integration Build 20020409</p>
-
-<h2>What's new in this build</h2>
-
-<p class="MsoNormal">GZIP compression support for CVS communication has been
- introduced in this build. It is turned on by default and can be configured
- on the CVS preference page.<br>
- </p>
-
-<p class="MsoNormal"><br>
- Support for communicating with CVS NT servers has been improved. Note
- that CVS NT is still not a supported platform. CVS support should now work
- much better with CVS NT versions 1.11.1.1 and higher, including 1.11.1.3.<br>
- </p>
-
-<p class="MsoNormal"><br>
- Support for branch and version tags in the UI has been improved. See
-the "Configure Tags" dialog, which is available nearly anywhere in the UI
-where tags are needed. (e.g. in the Compare With Tag action, Replace With
-Tag action, and in the Repositories View).<br>
- </p>
-
-<p class="MsoNormal"><br>
- Cancellation and progress have been greatly improved. For example, it
- should be possible to cancel connections to unresponsive servers without
- waiting for operations to time out.<br>
- </p>
-
-<p class="MsoNormal"><br>
- The CVS Console is much more usable. Output from different actions is
- easily distinguished, and color coding of server responses has been added.<br>
- </p>
- <br>
-
-<h1 style="">Eclipse Platform Build Notes &#8211; CVS Support</h1>
-
-<p class="MsoNormal">CVS build I20020402 April 2 2002</p>
-
-<p class="MsoNormal">Build submission for Integration Build 20020402</p>
-
-<h2>What's new in this build</h2>
-
-<p class="MsoNormal">The CVS plug-ins are now turned on by default. The old
- VCM plug-ins are still included in the build but are turned off by default.<br>
- <br>
- </p>
-
-<p class="MsoNormal">Additions, deletions and moved resorces are handled
-differently in this build:</p>
-
-<p class="MsoNormal"><br>
- </p>
-
-<p class="MsoNormal">1) The user will be prompted with a warning on deletion
- of files to<br>
- indicate that the file will be marked as an outgoing deletion. An<br>
- information marker will appear in the task view which indicates this.
- The<br>
- user can use the Auto Fix item in the task's context menu to restore
- the<br>
- file (from the server or local history) or commit the deletion. The
-user<br>
- can also commit the deletion as before (Commit on ancestor in Team
-menu or<br>
- Sync view) as well.<br>
- <br>
- 2) A similar warning will appear for folder deletions. However, the
-folders<br>
- themselves will not be deleted and files in the folders will appear
-as<br>
- outgoing deletions. On commit, any empty folders that contained outgoing<br>
- deletions will be pruned.<br>
- <br>
- 3) When files are added to a folder shared with CVS, an information
-marker<br>
- will appear in the task view until the file is either added to CVS
-control<br>
- or ignored (Autofix items are available for this).<br>
- <br>
- Options are available in the CVS preferences page to disable both the<br>
- prompting and markers.<br>
- </p>
-
-<p class="MsoNormal"><br>
- </p>
-
-<p class="MsoNormal"><br>
- The CVS support now takes advantage of the new Core facilities for
-private resources. As such, CVS/ folders will be marked as private and
-should not show up anywhere in the UI. Also, if you copy or move a folder
-structure in the workspace, the CVS/ folders will be removed from the destination.<br>
- </p>
-
-<p class="MsoNormal"><br>
- In order for the CVS/ folders to be marked as private, you will need
- to delete the projects in your workspace and check them out from the repository
- again. Failure to do so will simply result in CVS/ folders showing up in
- the UI.<br>
- </p>
-
-<h1 style="">Eclipse Platform Build Notes &#8211; CVS Support</h1>
-
-<p class="MsoNormal">CVS build I20020312 &#8211; March 12, 2002</p>
-
-<p class="MsoNormal">Build submission for Integration Build 20020312</p>
-
-<h2>What's new in this build</h2>
-
-<p class="MsoNormal">The CVS plug-ins are now turned on by default. The old
- VCM plug-ins are still included in the build but are turned off by default.<br>
- More performance improvements for the decorators.</p>
-
-<p class="MsoNormal">The actions in the Sync view have been changed. A summary:</p>
-
-<p class="MsoNormal"><br>
- Incoming mode:<br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Update from Repository
-(operates ONLY on incoming nodes that are not conflicting)<br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Override and Update (operates
- on conflicts)<br>
- Outgoing mode:<br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Commit (operates only
-on outgoing nodes that are not conflicting)<br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Override and Commit (operates
- on conflicts)<br>
- Both mode:<br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Update from Repository
-(operates ONLY on incoming nodes that are not conflicting)<br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Override and Update (operates
- on conflicts *and* on outgoing <br>
- changes)<br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Commit (operates only
-on outgoing nodes that are not conflicting)<br>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Override and Commit (operates
- on conflicts *and* on incoming <br>
- changes)</p>
-
-<p class="MsoNormal"> </p>
-
-<p class="MsoNormal"><br>
- </p>
-
-<p class="MsoNormal">A preference was added that allows the user to more
-accurately determine how files are compared.</p>
-
-<p class="MsoNormal">A new action was added to the merge view which allows
- the user to correctly merge conflicting files automatically (previously
- we had a bug which prevented this).</p>
-
-<p class="MsoNormal"><br>
- Resolved 54 bugs.</p>
-
-<p class="MsoNormal"><br>
- <a
- href="http://dev.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;resolution=FIXED&amp;resolution=INVALID&amp;resolution=WONTFIX&amp;resolution=DUPLICATE&amp;resolution=WORKSFORME&amp;email1=&amp;emailtype1=substring&amp;emailassigned_to1=1&amp;email2=&amp;emailtype2=substring&amp;emailreporter2=1&amp;bugidtype=include&amp;bug_id=&amp;changedin=&amp;votes=&amp;chfield=resolution&amp;chfieldfrom=2002-03-06+&amp;chfieldto=2002-03-12&amp;chfieldvalue=&amp;product=Platform&amp;component=VCM&amp;short_desc=&amp;short_desc_type=allwordssubstr&amp;long_desc=&amp;long_desc_type=allwordssubstr&amp;keywords=&amp;keywords_type=anywords&amp;field0-0-0=noop&amp;type0-0-0=noop&amp;value0-0-0=&amp;cmdtype=doit&amp;namedcmd=Bugs+I%27ve+Logged&amp;newqueryname=&amp;order=Reuse+same+sort+as+last+time">
- Click here</a> to see the bugs that were fixed.</p>
-
-<p class="MsoNormal"><br>
- </p>
-
-<h1 style="">Eclipse Platform Build Notes &#8211; CVS Support</h1>
-
-<p class="MsoNormal">CVS build I20020305 &#8211; March 5, 2002</p>
-
-<p class="MsoNormal">Build submission for Integration Build 20020305</p>
-
-<h2>What's new in this drop</h2>
-
-<p class="MsoNormal">CVS Decorators have been greatly improved - images are
- now cached and disposed. </p>
-
-<p class="MsoNormal"> Resolved 74 bugs, fixing 47.</p>
-
-<p class="MsoNormal"><br>
- <a
- href="http://dev.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;resolution=FIXED&amp;resolution=INVALID&amp;resolution=WONTFIX&amp;resolution=DUPLICATE&amp;resolution=WORKSFORME&amp;email1=&amp;emailtype1=substring&amp;emailassigned_to1=1&amp;email2=&amp;emailtype2=substring&amp;emailreporter2=1&amp;bugidtype=include&amp;bug_id=&amp;changedin=&amp;votes=&amp;chfield=resolution&amp;chfieldfrom=2002-02-26+&amp;chfieldto=2002-03-06&amp;chfieldvalue=&amp;product=Platform&amp;component=VCM&amp;short_desc=&amp;short_desc_type=allwordssubstr&amp;long_desc=&amp;long_desc_type=allwordssubstr&amp;keywords=&amp;keywords_type=anywords&amp;field0-0-0=noop&amp;type0-0-0=noop&amp;value0-0-0=&amp;cmdtype=doit&amp;namedcmd=Bugs+I%27ve+Logged&amp;newqueryname=&amp;order=Reuse+same+sort+as+last+time">
- Click here</a> to see the bugs that were fixed.</p>
-
-<p class="MsoNormal"><br>
- All Team plug-ins are turned off by default. If you wish to
-use Team support,</p>
-
-<ol style="margin-top: 0in;" start="1" type="1">
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.ui/plugin.xml.off
- to plugins/org.eclipse.team.ui/plugin.xml </li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.ui/plugin.xml.off
- to plugins/org.eclipse.team.cvs.ui/plugin.xml </li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.core/plugin.xml.off
- to plugins/org.eclipse.team.core/plugin.xml </li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.core/plugin.xml.off
- to plugins/org.eclipse.team.cvs.core/plugin.xml </li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.ssh/plugin.xml.off
- to plugins/org.eclipse.team.cvs.ssh/plugin.xml </li>
-
-</ol>
-
-<h1 style="">Eclipse Platform Build Notes &#8211; CVS Support</h1>
-
-<p class="MsoNormal">CVS build I20020226 &#8211; February 26, 2002</p>
-
-<p class="MsoNormal">Build submission for Integration Build 20020226</p>
-
-<h2>What's new in this drop</h2>
-
-<p class="MsoNormal">Added :ext: support, similar to the support that was
- in 1.0. See the CVS-&gt;Ext Connection Method preferences page to configure
- ext support.</p>
-
-<p class="MsoNormal"><br>
- Fixed 25 bugs.</p>
-
-<p class="MsoNormal"><br>
- <a
- href="http://dev.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&amp;resolution=FIXED&amp;resolution=INVALID&amp;resolution=WONTFIX&amp;resolution=DUPLICATE&amp;resolution=WORKSFORME&amp;email1=&amp;emailtype1=substring&amp;email2=&amp;emailtype2=substring&amp;bugidtype=include&amp;bug_id=&amp;changedin=&amp;votes=&amp;chfield=resolution&amp;chfieldfrom=2002-02-15+&amp;chfieldto=Now&amp;chfieldvalue=&amp;product=Platform&amp;version=2.0&amp;component=VCM&amp;short_desc=&amp;short_desc_type=allwordssubstr&amp;long_desc=&amp;long_desc_type=allwordssubstr&amp;keywords=&amp;keywords_type=anywords&amp;field0-0-0=noop&amp;type0-0-0=noop&amp;value0-0-0=&amp;cmdtype=doit&amp;namedcmd=Fixed+since+last+date&amp;newqueryname=Fixed+since+last+date&amp;order=Reuse+same+sort+as+last+time">
- Click here</a> to see the bugs that were fixed.</p>
-
-<p class="MsoNormal"><br>
- All Team plug-ins are turned off by default. If you wish to
-use Team support,</p>
-
-<ol style="margin-top: 0in;" start="1" type="1">
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.ui/plugin.xml.off
- to plugins/org.eclipse.team.ui/plugin.xml </li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.ui/plugin.xml.off
- to plugins/org.eclipse.team.cvs.ui/plugin.xml </li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.core/plugin.xml.off
- to plugins/org.eclipse.team.core/plugin.xml </li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.core/plugin.xml.off
- to plugins/org.eclipse.team.cvs.core/plugin.xml </li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.ssh/plugin.xml.off
- to plugins/org.eclipse.team.cvs.ssh/plugin.xml </li>
-
-</ol>
- <!--[if !supportEmptyParas]-->
-<h1 style="">Eclipse Platform Build Notes &#8211; CVS Support</h1>
-
-<p class="MsoNormal">CVS build I20020214 &#8211; February 14, 2002</p>
-
-<p class="MsoNormal">Build submission for Integration Build 20020214</p>
-
-<h2>What's new in this drop</h2>
-
-<p class="MsoNormal">Bug fixes:</p>
-
-<p class="MsoNormal">Outgoing changes show up in Merge editor (9746)</p>
-
-<p class="MsoNormal">Incoming additions from another branch have wrong timestamp
- (9748)</p>
-
-<p class="MsoNormal">Bin folders show up as outgoing additions! (9788)</p>
-
-<p class="MsoNormal">Create<span style="">&nbsp; </span> branch dialog
- says "Name must not be null" for a project version, even if the version
- option is disabled (9691)</p>
-
-<p class="MsoNormal">Should not ignore managed resources (9502)</p>
-
-<p class="MsoNormal">Directory named core ignored!!! (9486)</p>
-
-<p class="MsoNormal">Change in semantics to validateEdit (9802)</p>
-
-<p class="MsoNormal"><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]-->&lt;&gt;</p>
-
-<p class="MsoNormal">All Team plug-ins are turned off by default. If you wish
-to use Team support,</p>
-
-<ol style="margin-top: 0in;" start="1" type="1">
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.ui/plugin.xml.off
- to plugins/org.eclipse.team.ui/plugin.xml </li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.ui/plugin.xml.off
- to plugins/org.eclipse.team.cvs.ui/plugin.xml </li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.core/plugin.xml.off
- to plugins/org.eclipse.team.core/plugin.xml </li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.core/plugin.xml.off
- to plugins/org.eclipse.team.cvs.core/plugin.xml </li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.ssh/plugin.xml.off
- to plugins/org.eclipse.team.cvs.ssh/plugin.xml </li>
-
-</ol>
-
-<p class="MsoNormal"><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]-->&lt;&gt;</p>
-
-<h1 style="">Eclipse Platform Build Notes &#8211; CVS Support</h1>
-
-<p class="MsoNormal">CVS build V2_0_6 &#8211; February 12, 2002</p>
-
-<p class="MsoNormal">Build submission for Integration Build 20020212</p>
-
-<h2>What's new in this drop</h2>
-
-<p class="MsoNormal">48 bugs fixed.</p>
-
-<p class="MsoNormal">Global ignore facility added.</p>
-
-<p class="MsoNormal">Extensive sync view rewrite. Workflow has been improved,
- and in incoming/outgoing mode the user can override the direction of
- any change. Auto-merging of conflicts is now supported as well.</p>
-
-<p class="MsoNormal">User can add files/directories to .cvsignore automatically
- from the sync view or navigator by right clicking and selecting &#8220;Ignore&#8221;.</p>
-
-<p class="MsoNormal">Many bug fixes and improvements.</p>
-
-<p class="MsoNormal"><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]-->&lt;&gt;</p>
-
-<p class="MsoNormal">All Team plug-ins are turned off by default. If you wish
-to use Team support,</p>
-
-<ol style="margin-top: 0in;" start="6" type="1">
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.ui/plugin.xml.off
- to plugins/org.eclipse.team.ui/plugin.xml </li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.ui/plugin.xml.off
- to plugins/org.eclipse.team.cvs.ui/plugin.xml </li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.core/plugin.xml.off
- to plugins/org.eclipse.team.core/plugin.xml </li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.core/plugin.xml.off
- to plugins/org.eclipse.team.cvs.core/plugin.xml </li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.ssh/plugin.xml.off
- to plugins/org.eclipse.team.cvs.ssh/plugin.xml </li>
-
-</ol>
-
-<p class="MsoNormal"><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]-->&lt;&gt;</p>
-
-<h1 style="">Eclipse Platform Build Notes &#8211; CVS Support</h1>
-
-<p class="MsoNormal">CVS build V2_0_2 &#8211; January 15, 2002</p>
-
-<p class="MsoNormal">Build submission for Integration Build 20020115</p>
-
-<h2>What's new in this drop</h2>
-
-<p class="MsoNormal">This is the initial release for the CVS support plug-ins.</p>
-
-<p class="MsoNormal"><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]-->&lt;&gt;</p>
-
-<p class="MsoNormal">The plug-ins are turned off by default. If you wish to
-use CVS support,</p>
-
-<ol style="margin-top: 0in;" start="11" type="1">
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.ui/plugin.xml.off
- to plugins/org.eclipse.team.ui/plugin.xml</li>
- <li class="MsoNormal" style=""> Rename plugins/org.eclipse.team.cvs.ui/plugin.xml.off
- to plugins/org.eclipse.team.cvs.ui/plugin.xml</li>
-
-</ol>
-
-<p class="MsoNormal"><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]-->&lt;&gt;</p>
-
-<p class="MsoNormal">Please report any problems to the VCM team, and use the
-VCM component for bug tracking.</p>
-
-<p class="MsoNormal"><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]-->&lt;&gt;</p>
-
-<p class="MsoNormal">The following features are operating near their 1.0 level
-of functionality:</p>
-
-<ul style="margin-top: 0in;" type="disc">
- <li class="MsoNormal" style=""> The Synchronize
-view</li>
- <li class="MsoNormal" style=""> The Resource History
- view</li>
- <li class="MsoNormal" style=""> The Repositories
- view</li>
-
-</ul>
-
-<p class="MsoNormal"><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]-->&lt;&gt;</p>
-
-<p class="MsoNormal">The following features differ from the 1.0 functionality:</p>
-
-<ul style="margin-top: 0in;" type="disc">
- <li class="MsoNormal" style=""> Decorators. To
-see version history in the Navigator, use Window-&gt;Decorators-&gt;CVS</li>
- <li class="MsoNormal" style=""> CVS metadata. The
- metadata now resides in CVS/ folders in every shared folder. These
- folders are hidden by default in the Navigator. If you copy entire
- directories from within the Navigator, you MUST remove the CVS/
- directories from the target after copying, otherwise CVS operations
- will behave unexpectedly.</li>
-
-</ul>
-
-<p class="MsoNormal"><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]-->&lt;&gt;</p>
-
-<p class="MsoNormal">Run <a
- href="http://dev.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;resolution=FIXED&amp;priority=P1&amp;priority=P2&amp;priority=P3&amp;priority=P4&amp;email1=&amp;emailtype1=substring&amp;emailassigned_to1=1&amp;email2=&amp;emailtype2=substring&amp;emailreporter2=1&amp;bugi%20">
- this</a> query to determine which bugs have been fixed since
-January 7<sup> th</sup>. If you wish to narrow the search, edit the
-query and change the dates.</p>
-
-<h1 style=""><!--[if !supportEmptyParas]--> &nbsp;<!--[endif]-->&lt;&gt;</h1>
- </div>
-
-</body>
-</html>
diff --git a/bundles/org.eclipse.team.cvs.core/doc/hglegal.htm b/bundles/org.eclipse.team.cvs.core/doc/hglegal.htm
deleted file mode 100644
index c59811321..000000000
--- a/bundles/org.eclipse.team.cvs.core/doc/hglegal.htm
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.73 [en] (Win98; U) [Netscape]">
- <title>Legal Notices</title>
-</head>
-<body>
-
-<h3>
-<a NAME="Notices"></a>Notices</h3>
-(c) Copyright IBM Corp. 2000, 2001. All Rights Reserved.
-</body>
-</html>
diff --git a/bundles/org.eclipse.team.cvs.core/doc/ngibmcpy.gif b/bundles/org.eclipse.team.cvs.core/doc/ngibmcpy.gif
deleted file mode 100644
index 5fe4f35a2..000000000
--- a/bundles/org.eclipse.team.cvs.core/doc/ngibmcpy.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.core/doc/org_eclipse_team_cvs_core.html b/bundles/org.eclipse.team.cvs.core/doc/org_eclipse_team_cvs_core.html
deleted file mode 100644
index cb91e1cda..000000000
--- a/bundles/org.eclipse.team.cvs.core/doc/org_eclipse_team_cvs_core.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="Build">
- <title>Eclipse CVS Core Extension Points</title>
-</head>
-<body link="#0000FF" vlink="#800080">
-
-<center><h1>Eclipse CVS Core</h1></center>
-The extension points declared by this plug-in are for internal use only.
-<p>
-<a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2001" BORDER=0 height=12 width=195></a>
-</body>
-</html>
diff --git a/bundles/org.eclipse.team.cvs.core/plugin.properties b/bundles/org.eclipse.team.cvs.core/plugin.properties
deleted file mode 100644
index 17c6bc23d..000000000
--- a/bundles/org.eclipse.team.cvs.core/plugin.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-providerName=Eclipse.org
-pluginName=CVS Team Provider Core
-cvsNature=CVS Team Nature
-vcmMetaMarker=VCM meta file \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/plugin.xml b/bundles/org.eclipse.team.cvs.core/plugin.xml
deleted file mode 100644
index 5a4aaf4c0..000000000
--- a/bundles/org.eclipse.team.cvs.core/plugin.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin
- name="%pluginName"
- id="org.eclipse.team.cvs.core"
- version="2.0.0"
- provider-name="%providerName"
- class="org.eclipse.team.internal.ccvs.core.CVSProviderPlugin">
-
- <requires>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.team.core"/>
- <import plugin="org.apache.xerces"/>
- </requires>
-
- <runtime>
- <library name="cvs.jar">
- <export name="*"/>
- </library>
- </runtime>
-
- <!-- *************** Extension Points **************** -->
- <extension-point name="Authenticator" id="authenticator"/>
- <extension-point name="ConnectionMethods" id="connectionmethods"/>
-
- <!-- *************** Connection Methods **************** -->
- <extension id="pserver" point="org.eclipse.team.cvs.core.connectionmethods">
- <adapter>
- <run class="org.eclipse.team.internal.ccvs.core.connection.PServerConnectionMethod">
- <parameter name="trace" value="false" />
- </run>
- </adapter>
- </extension>
-
- <extension id="ext" point="org.eclipse.team.cvs.core.connectionmethods">
- <adapter>
- <run class="org.eclipse.team.internal.ccvs.core.connection.ExtConnectionMethod">
- <parameter name="trace" value="false" />
- </run>
- </adapter>
- </extension>
-
- <!-- *************** Repository Provider **************** -->
- <extension
- point="org.eclipse.team.core.repository">
- <repository
- class="org.eclipse.team.internal.ccvs.core.CVSTeamProvider"
- id="org.eclipse.team.cvs.core.cvsnature">
- </repository>
- </extension>
-
- <!-- *************** Project Nature **************** -->
- <extension point="org.eclipse.core.resources.natures" id="cvsnature" name="%cvsNature">
- <runtime>
- <run class="org.eclipse.team.internal.ccvs.core.CVSTeamProvider"/>
- </runtime>
- <one-of-nature id="org.eclipse.team.repository-provider"/>
- </extension>
-
- <!-- *************** Resource patterns ignored by CVS **************** -->
- <extension point="org.eclipse.team.core.ignore">
- <ignore pattern = ".#*" selected = "true"/>
- </extension>
-
- <!-- *************** Markers **************** -->
- <extension id="cvsmarker" point="org.eclipse.core.resources.markers"/>
- <extension id="vcmmeta" point="org.eclipse.core.resources.markers" name="%vcmMetaMarker">
- <super type="org.eclipse.core.resources.problemmarker"/>
- <super type="org.eclipse.team.cvs.core.cvsmarker"/>
- <persistent value="true"/>
- </extension>
- <extension id="cvsremove" point="org.eclipse.core.resources.markers" name="CVS Remove">
- <super type="org.eclipse.core.resources.problemmarker"/>
- <super type="org.eclipse.team.cvs.core.cvsmarker"/>
- <attribute name="name"/>
- <persistent value="true"/>
- </extension>
- <extension id="cvsadd" point="org.eclipse.core.resources.markers" name="CVS Add">
- <super type="org.eclipse.core.resources.problemmarker"/>
- <super type="org.eclipse.team.cvs.core.cvsmarker"/>
- <persistent value="true"/>
- </extension>
-
- <!-- ************ File Types *************** -->
- <extension point="org.eclipse.team.core.fileTypes">
- <fileTypes extension="cvsignore" type="text"/>
- </extension>
-
-</plugin> \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSException.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSException.java
deleted file mode 100644
index 8f05aba39..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSException.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package org.eclipse.team.internal.ccvs.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.io.IOException;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.team.core.TeamException;
-
-/**
- * A checked expection representing a failure in the CVS plugin.
- * <p>
- * CVS exceptions contain a status object describing the cause of
- * the exception.
- * </p>
- *
- * @see IStatus
- */
-public class CVSException extends TeamException {
-
- /*
- * Helpers for creating CVS exceptions
- */
- public CVSException(int severity, int code, String message, Exception e) {
- super(new CVSStatus(severity, code, message, null));
- }
-
- public CVSException(int severity, int code, String message) {
- this(severity, code, message, null);
- }
-
- public CVSException(String message) {
- super(new CVSStatus(IStatus.ERROR, UNABLE, message, null));
- }
-
- public CVSException(String message, Exception e) {
- this(IStatus.ERROR, UNABLE, message, e);
- }
-
- public CVSException(IStatus status) {
- super(status);
- }
-
- /*
- * Static helper methods for creating exceptions
- */
- public static CVSException wrapException(
- IResource resource,
- String message,
- IOException e) {
- // NOTE: we should record the resource somehow
- // We should also inlcude the IO message
- return new CVSException(new CVSStatus(IStatus.ERROR, IO_FAILED, message, e));
- }
-
- /*
- * Static helper methods for creating exceptions
- */
- public static CVSException wrapException(IResource resource, String message, CoreException e) {
- return new CVSException(new CVSStatus(IStatus.ERROR, e.getStatus().getCode(), message, e));
- }
-
- /*
- * Static helper methods for creating exceptions
- */
- public static CVSException wrapException(Exception e) {
- return new CVSException(new CVSStatus(IStatus.ERROR, UNABLE, e.getMessage() != null ? e.getMessage() : "", e)); //$NON-NLS-1$
- }
-
- public static CVSException wrapException(CoreException e) {
- IStatus status = e.getStatus();
- // If the exception is not a multi-status, wrap the exception to keep the original stack trace.
- // If the exception is a maulit-status, the interesting stack traces should eb in the childen already
- if ( ! status.isMultiStatus()) {
- status = new CVSStatus(status.getSeverity(), status.getCode(), status.getMessage(), e);
- }
- return new CVSException(status);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProvider.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProvider.java
deleted file mode 100644
index 546a10cc4..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProvider.java
+++ /dev/null
@@ -1,632 +0,0 @@
-package org.eclipse.team.internal.ccvs.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.client.Checkout;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Import;
-import org.eclipse.team.internal.ccvs.core.client.Request;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.client.Update;
-import org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.QuietOption;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.connection.CVSServerException;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolder;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolderTree;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteModule;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-public class CVSProvider implements ICVSProvider {
-
- private static final String STATE_FILE = ".cvsProviderState"; //$NON-NLS-1$
-
- private static CVSProvider instance;
- private Map repositories;
-
- private List listeners = new ArrayList();
-
- private CVSProvider() {
- repositories = new HashMap();
- }
-
- /*
- * Add the repository location to the cahced locations
- */
- private void addToCache(ICVSRepositoryLocation repository) {
- repositories.put(repository.getLocation(), repository);
- }
-
- private void repositoryAdded(ICVSRepositoryLocation repository) {
- Iterator it = listeners.iterator();
- while (it.hasNext()) {
- ICVSListener listener = (ICVSListener)it.next();
- listener.repositoryAdded(repository);
- }
- }
-
- public void addRepositoryListener(ICVSListener listener) {
- listeners.add(listener);
- }
-
- public void removeRepositoryListener(ICVSListener listener) {
- listeners.remove(listener);
- }
-
- /**
- * @see ICVSProvider#checkout(ICVSRepositoryLocation, IProject, String, String, IProgressMonitor)
- */
- public void checkout(
- ICVSRepositoryLocation repository,
- IProject project,
- String sourceModule,
- CVSTag tag,
- IProgressMonitor monitor)
- throws TeamException {
-
- if (sourceModule == null)
- sourceModule = project.getName();
- checkout(new ICVSRemoteFolder[] { new RemoteFolder(null, repository, new Path(sourceModule), tag)},
- new IProject[] { project }, monitor);
- }
-
- /*
- * Delete the target projects before checking out
- */
- private void scrubProjects(IProject[] projects, IProgressMonitor monitor) throws CVSException {
- if (projects == null) {
- monitor.done();
- return;
- }
- monitor.beginTask(Policy.bind("CVSProvider.Scrubbing_projects_1"), projects.length * 100); //$NON-NLS-1$
- try {
- for (int i=0;i<projects.length;i++) {
- IProject project = projects[i];
- if (project != null && project.exists()) {
- if(!project.isOpen()) {
- project.open(Policy.subMonitorFor(monitor, 10));
- }
- // XXX: temporary code to support creating a java project for sources in CVS
- // should be removed once nature support is added to the UI.
- // delete children, keep project
- monitor.subTask(Policy.bind("CVSProvider.Scrubbing_local_project_1")); //$NON-NLS-1$
- EclipseSynchronizer.getInstance().prepareForDeletion(project);
- IResource[] children = project.members(IContainer.INCLUDE_TEAM_PRIVATE_MEMBERS);
- IProgressMonitor subMonitor = Policy.subMonitorFor(monitor, 80);
- subMonitor.beginTask(null, children.length * 100);
- try {
- for (int j = 0; j < children.length; j++) {
- if ( ! children[j].getName().equals(".project")) {//$NON-NLS-1$
- children[j].delete(true /*force*/, Policy.subMonitorFor(subMonitor, 100));
- }
- }
- } finally {
- subMonitor.done();
- }
- CVSWorkspaceRoot.getCVSFolderFor(project).unmanage(Policy.subMonitorFor(monitor, 10));
- } else if (project != null) {
- // Make sure there is no directory in the local file system.
- File location = new File(project.getParent().getLocation().toFile(), project.getName());
- if (location.exists()) {
- deepDelete(location);
- }
- }
- }
- } catch (CoreException e) {
- throw wrapException(e);
- } finally {
- monitor.done();
- }
- }
-
- private void deepDelete(File resource) {
- if (resource.isDirectory()) {
- File[] fileList = resource.listFiles();
- for (int i = 0; i < fileList.length; i++) {
- deepDelete(fileList[i]);
- }
- }
- resource.delete();
- }
-
- /*
- * Bring the provied projects into the workspace
- */
- private void refreshProjects(IProject[] projects, IProgressMonitor monitor) throws CoreException, TeamException {
- monitor.beginTask(Policy.bind("CVSProvider.Creating_projects_2"), projects.length * 100); //$NON-NLS-1$
- try {
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- // Register the project with Team
- RepositoryProvider.map(project, CVSProviderPlugin.getTypeId());
- }
-
- } finally {
- monitor.done();
- }
- }
-
-
- /**
- * @see ICVSProvider#checkout(ICVSRemoteResource[], IProject[], IProgressMonitor)
- */
- public void checkout(final ICVSRemoteFolder[] resources, final IProject[] projects, final IProgressMonitor monitor) throws TeamException {
- final TeamException[] eHolder = new TeamException[1];
- try {
- IWorkspaceRunnable workspaceRunnable = new IWorkspaceRunnable() {
- public void run(IProgressMonitor pm) throws CoreException {
- try {
- pm.beginTask(null, 1000 * resources.length);
-
- // Get the location of the workspace root
- ICVSFolder root = CVSWorkspaceRoot.getCVSFolderFor(ResourcesPlugin.getWorkspace().getRoot());
-
- for (int i=0;i<resources.length;i++) {
- IProject project = null;
- RemoteFolder resource = (RemoteFolder)resources[i];
-
- // Determine the provided target project if there is one
- if (projects != null)
- project = projects[i];
-
- // Determine the remote module to be checked out
- String moduleName;
- if (resource instanceof RemoteModule) {
- moduleName = ((RemoteModule)resource).getName();
- } else {
- moduleName = resource.getRepositoryRelativePath();
- }
-
- // Open a connection session to the repository
- ICVSRepositoryLocation repository = resource.getRepository();
- Session session = new Session(repository, root);
- try {
- session.open(Policy.subMonitorFor(pm, 50));
-
- // Determine the local target projects (either the project provider or the module expansions)
- final Set targetProjects = new HashSet();
- if (project == null) {
-
- // Fetch the module expansions
- IStatus status = Request.EXPAND_MODULES.execute(session, new String[] {moduleName}, Policy.subMonitorFor(pm, 50));
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- // XXX Should we cleanup any partially checked out projects?
- throw new CVSServerException(status);
- }
-
- // Convert the module expansions to local projects
- String[] expansions = session.getModuleExpansions();
- for (int j = 0; j < expansions.length; j++) {
- targetProjects.add(ResourcesPlugin.getWorkspace().getRoot().getProject(new Path(expansions[j]).segment(0)));
- }
-
- } else {
- targetProjects.add(project);
- }
-
- // Prepare the target projects to receive resources
- root.run(new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- scrubProjects((IProject[]) targetProjects.toArray(new IProject[targetProjects.size()]), monitor);
- }
- }, Policy.subMonitorFor(pm, 100));
-
- // Build the local options
- List localOptions = new ArrayList();
- // Add the option to load into the target project if one was supplied
- if (project != null) {
- localOptions.add(Checkout.makeDirectoryNameOption(project.getName()));
- }
- // Prune empty directories if pruning enabled
- if (CVSProviderPlugin.getPlugin().getPruneEmptyDirectories())
- localOptions.add(Checkout.PRUNE_EMPTY_DIRECTORIES);
- // Add the options related to the CVSTag
- CVSTag tag = resource.getTag();
- if (tag == null) {
- // A null tag in a remote resource indicates HEAD
- tag = CVSTag.DEFAULT;
- }
- localOptions.add(Update.makeTagOption(tag));
-
- // Perform the checkout
- IStatus status = Command.CHECKOUT.execute(session,
- getDefaultGlobalOptions(),
- (LocalOption[])localOptions.toArray(new LocalOption[localOptions.size()]),
- new String[]{moduleName},
- null,
- Policy.subMonitorFor(pm, 800));
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- // XXX Should we cleanup any partially checked out projects?
- throw new CVSServerException(status);
- }
-
- // Bring the project into the workspace
- refreshProjects((IProject[])targetProjects.toArray(new IProject[targetProjects.size()]), Policy.subMonitorFor(pm, 100));
-
- } finally {
- session.close();
- }
- }
- }
- catch (TeamException e) {
- // Pass it outside the workspace runnable
- eHolder[0] = e;
- } finally {
- pm.done();
- }
- // CoreException and OperationCanceledException are propagated
- }
- };
- ResourcesPlugin.getWorkspace().run(workspaceRunnable, monitor);
- } catch (CoreException e) {
- throw wrapException(e);
- } finally {
- monitor.done();
- }
- // Re-throw the TeamException, if one occurred
- if (eHolder[0] != null) {
- throw eHolder[0];
- }
- }
-
- /**
- * @see ICVSProvider#createRepository(Properties)
- */
- public ICVSRepositoryLocation createRepository(Properties configuration) throws CVSException {
- // Create a new repository location
- CVSRepositoryLocation location = CVSRepositoryLocation.fromProperties(configuration);
-
- // Check the cache for an equivalent instance and if there is one, throw an exception
- CVSRepositoryLocation existingLocation = (CVSRepositoryLocation)repositories.get(location.getLocation());
- if (existingLocation != null) {
- throw new CVSException(new CVSStatus(CVSStatus.ERROR, Policy.bind("CVSProvider.alreadyExists"))); //$NON-NLS-1$
- }
-
- return location;
- }
-
- /**
- * @see ICVSProvider#addRepository(ICVSRepositoryLocation)
- */
- public void addRepository(ICVSRepositoryLocation repository) throws CVSException {
- // Check the cache for an equivalent instance and if there is one, just update the cache
- CVSRepositoryLocation existingLocation = (CVSRepositoryLocation)repositories.get(repository.getLocation());
- if (existingLocation != null) {
- ((CVSRepositoryLocation)repository).updateCache();
- } else {
- // Cache the password and register the repository location
- addToCache(repository);
- ((CVSRepositoryLocation)repository).updateCache();
- repositoryAdded(repository);
- }
- try {
- saveState();
- } catch (TeamException e) {
- CVSProviderPlugin.log(e.getStatus());
- }
- }
-
- /**
- * @see ICVSProvider#disposeRepository(ICVSRepositoryLocation)
- */
- public void disposeRepository(ICVSRepositoryLocation repository) throws CVSException {
- ((CVSRepositoryLocation)repository).dispose();
- removeFromCache(repository);
- }
-
- public boolean isKnownRepository(String location) {
- return repositories.get(location) != null;
- }
-
- public static GlobalOption[] getDefaultGlobalOptions() {
- QuietOption option = CVSProviderPlugin.getPlugin().getQuietness();
- if (option == null)
- return Command.NO_GLOBAL_OPTIONS;
- else
- return new GlobalOption[] {option};
- }
-
- /**
- * Return the singleton instance of CVSProvider
- */
- public static CVSProvider getInstance() {
- return instance;
- }
-
- public String[] getExpansions(ICVSRemoteFolder[] resources, IProgressMonitor monitor) throws CVSException {
-
- if (resources.length == 0) return new String[0];
-
- // Get the location of the workspace root
- ICVSFolder root = CVSWorkspaceRoot.getCVSFolderFor(ResourcesPlugin.getWorkspace().getRoot());
-
- // Get the command arguments
- String[] arguments = new String[resources.length];
- for (int i = 0; i < resources.length; i++) {
- if (resources[i] instanceof RemoteModule) {
- arguments[i] = ((RemoteModule)resources[i]).getName();
- } else {
- arguments[i] = resources[i].getRepositoryRelativePath();
- }
- }
-
- // Perform the Expand-Modules command
- IStatus status;
- Session s = new Session(resources[0].getRepository(), root);
- s.open(monitor);
- try {
- status = Request.EXPAND_MODULES.execute(s, arguments, monitor);
- } finally {
- s.close();
- }
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSServerException(status);
- }
-
- return s.getModuleExpansions();
- }
-
- /**
- * @see ICVSProvider#getKnownRepositories()
- */
- public ICVSRepositoryLocation[] getKnownRepositories() {
- return (ICVSRepositoryLocation[])repositories.values().toArray(new ICVSRepositoryLocation[repositories.size()]);
- }
-
-
-
- /**
- * @see ICVSProvider#getRepository(String)
- */
- public ICVSRepositoryLocation getRepository(String location) throws CVSException {
- ICVSRepositoryLocation repository = (ICVSRepositoryLocation)repositories.get(location);
- if (repository == null) {
- repository = CVSRepositoryLocation.fromString(location);
- addToCache(repository);
- repositoryAdded(repository);
- }
- return repository;
- }
-
- /**
- * @see ICVSProvider#getSupportedConnectionMethods()
- */
- public String[] getSupportedConnectionMethods() {
- IConnectionMethod[] methods = CVSRepositoryLocation.getPluggedInConnectionMethods();
- String[] result = new String[methods.length];
- for (int i=0;i<methods.length;i++)
- result[i] = methods[i].getName();
- return result;
- }
-
- /**
- * @see ICVSProvider#createModule()
- */
- public void createModule(ICVSRepositoryLocation location, IProject project, String moduleName, IProgressMonitor monitor) throws TeamException {
-
- // Determine if the repository is known
- boolean alreadyExists = isCached(location);
- // Set the folder sync info of the project to point to the remote module
- ICVSFolder folder = (ICVSFolder)CVSWorkspaceRoot.getCVSResourceFor(project);
-
- try {
- // Get the import properties
- String message = Policy.bind("CVSProvider.initialImport"); //$NON-NLS-1$
- String vendor = "vendor"; //$NON-NLS-1$
- String tag = "start"; //$NON-NLS-1$
- String projectName = project.getName();
- if (moduleName == null)
- moduleName = projectName;
-
- // Perform the import using a dummy root so the local project is not traversed
- Session s = new Session(location, new RemoteFolderTree(null, location, Path.EMPTY, null));
- s.open(monitor);
- try {
- IStatus status = Command.IMPORT.execute(s,
- getDefaultGlobalOptions(),
- new LocalOption[] {Import.makeArgumentOption(Command.MESSAGE_OPTION, message)},
- new String[] { moduleName, vendor, tag },
- null,
- monitor);
- // If we get a warning, the operation most likely failed so check that the status is OK
- if (status.getCode() == CVSStatus.SERVER_ERROR || ! status.isOK()) {
- throw new CVSServerException(status);
- }
- } finally {
- s.close();
- }
-
- folder.setFolderSyncInfo(new FolderSyncInfo(moduleName, location.getLocation(), null, false));
-
- //Register it with Team. If it already is, no harm done.
- RepositoryProvider.map(project, CVSProviderPlugin.getTypeId());
- } catch (TeamException e) {
- // The checkout may have triggered password caching
- // Therefore, if this is a newly created location, we want to clear its cache
- if ( ! alreadyExists)
- disposeRepository(location);
- throw e;
- }
- // Add the repository if it didn't exist already
- if ( ! alreadyExists)
- addRepository(location);
- }
-
- private CVSTag getTagFromProperties(Properties configuration) {
- String date = configuration.getProperty("date"); //$NON-NLS-1$
- String tagName = configuration.getProperty("tag"); //$NON-NLS-1$
- if (tagName == null)
- tagName = configuration.getProperty("branch"); //$NON-NLS-1$
- if (tagName == null)
- return CVSTag.DEFAULT;
- return new CVSTag(tagName, CVSTag.BRANCH);
- }
-
- private boolean isCached(ICVSRepositoryLocation repository) {
- return repositories.containsKey(repository.getLocation());
- }
-
- public static boolean isText(IFile file) {
- return Team.getType(file) == Team.TEXT;
- }
-
- private void removeFromCache(ICVSRepositoryLocation repository) {
- if (repositories.remove(repository.getLocation()) != null) {
- Iterator it = listeners.iterator();
- while (it.hasNext()) {
- ICVSListener listener = (ICVSListener)it.next();
- listener.repositoryRemoved(repository);
- }
- }
- }
-
- public void setSharing(IProject project, FolderSyncInfo info, IProgressMonitor monitor) throws TeamException {
-
- // Ensure provided info matches that of the project
- ICVSFolder folder = (ICVSFolder)CVSWorkspaceRoot.getCVSResourceFor(project);
- FolderSyncInfo folderInfo = folder.getFolderSyncInfo();
- if ( ! info.equals(folderInfo)) {
- throw new CVSException(new CVSStatus(CVSStatus.ERROR, Policy.bind("CVSProvider.infoMismatch", project.getName())));//$NON-NLS-1$
- }
-
- // Ensure that the provided location is managed
- ICVSRepositoryLocation location = getRepository(info.getRoot());
- if (! isCached(location)) {
- addToCache(location);
- repositoryAdded(location);
- }
-
- // Register the project with Team
- RepositoryProvider.map(project, CVSProviderPlugin.getTypeId());
- }
-
- private CVSException wrapException(CoreException e) {
- return new CVSException(e.getStatus()); //$NON-NLS-1$
- }
-
- public static void startup() {
- if (instance == null) {
- instance = new CVSProvider();
- }
- try {
- getInstance().loadState();
- } catch (TeamException e) {
- Util.logError(Policy.bind("CVSProvider.errorSaving"), e);//$NON-NLS-1$
- }
- }
-
- public static void shutdown() {
- try {
- getInstance().saveState();
- } catch (TeamException e) {
- Util.logError(Policy.bind("CVSProvider.errorLoading"), e);//$NON-NLS-1$
- }
- }
-
- private void loadState() throws TeamException {
- IPath pluginStateLocation = CVSProviderPlugin.getPlugin().getStateLocation().append(STATE_FILE);
- File file = pluginStateLocation.toFile();
- if (file.exists()) {
- try {
- DataInputStream dis = new DataInputStream(new FileInputStream(file));
- readState(dis);
- dis.close();
- } catch (IOException e) {
- throw new TeamException(new Status(Status.ERROR, CVSProviderPlugin.ID, TeamException.UNABLE, Policy.bind("CVSProvider.ioException"), e)); //$NON-NLS-1$
- }
- } else {
- // If the file did not exist, then prime the list of repositories with
- // the providers with which the projects in the workspace are shared.
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- for (int i = 0; i < projects.length; i++) {
- RepositoryProvider provider = RepositoryProvider.getProvider(projects[i], CVSProviderPlugin.getTypeId());
- if (provider!=null) {
- ICVSFolder folder = (ICVSFolder)CVSWorkspaceRoot.getCVSResourceFor(projects[i]);
- FolderSyncInfo info = folder.getFolderSyncInfo();
- if (info != null) {
- ICVSRepositoryLocation result = getRepository(info.getRoot());
- }
- }
- }
- saveState();
- }
- }
-
- private void saveState() throws TeamException {
- IPath pluginStateLocation = CVSProviderPlugin.getPlugin().getStateLocation();
- File tempFile = pluginStateLocation.append(STATE_FILE + ".tmp").toFile(); //$NON-NLS-1$
- File stateFile = pluginStateLocation.append(STATE_FILE).toFile();
- try {
- DataOutputStream dos = new DataOutputStream(new FileOutputStream(tempFile));
- writeState(dos);
- dos.close();
- if (stateFile.exists()) {
- stateFile.delete();
- }
- boolean renamed = tempFile.renameTo(stateFile);
- if (!renamed) {
- throw new TeamException(new Status(Status.ERROR, CVSProviderPlugin.ID, TeamException.UNABLE, Policy.bind("CVSProvider.rename", tempFile.getAbsolutePath()), null)); //$NON-NLS-1$
- }
- } catch (IOException e) {
- throw new TeamException(new Status(Status.ERROR, CVSProviderPlugin.ID, TeamException.UNABLE, Policy.bind("CVSProvider.save",stateFile.getAbsolutePath()), e)); //$NON-NLS-1$
- }
- }
- private void readState(DataInputStream dis) throws IOException, CVSException {
- int count = dis.readInt();
- for (int i = 0; i < count; i++) {
- getRepository(dis.readUTF());
- }
- }
-
- private void writeState(DataOutputStream dos) throws IOException {
- // Write the repositories
- Collection repos = repositories.values();
- dos.writeInt(repos.size());
- Iterator it = repos.iterator();
- while (it.hasNext()) {
- ICVSRepositoryLocation root = (ICVSRepositoryLocation)it.next();
- dos.writeUTF(root.getLocation());
- }
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java
deleted file mode 100644
index 24ad316a2..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java
+++ /dev/null
@@ -1,519 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-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.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IPluginDescriptor;
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.QuietOption;
-import org.eclipse.team.internal.ccvs.core.client.listeners.IConsoleListener;
-import org.eclipse.team.internal.ccvs.core.util.AddDeleteMoveListener;
-import org.eclipse.team.internal.ccvs.core.util.MoveDeleteHook;
-import org.eclipse.team.internal.ccvs.core.util.ProjectDescriptionManager;
-import org.eclipse.team.internal.ccvs.core.util.SyncFileChangeListener;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-public class CVSProviderPlugin extends Plugin {
-
- // external command to run for ext connection method
- public static final String DEFAULT_CVS_RSH = "ssh"; //$NON-NLS-1$
- // remote command to run for ext connection method
- public static final String DEFAULT_CVS_SERVER = "cvs"; //$NON-NLS-1$
- // determines if empty directories received from the server should be pruned.
- public static final boolean DEFAULT_PRUNE = true;
- // determines if new directories should be discovered during update.
- public static final boolean DEFAULT_FETCH = true;
- // communication timeout with the server
- public static final int DEFAULT_TIMEOUT = 60;
- // file transfer compression level (0 - 9)
- public static final int DEFAULT_COMPRESSION_LEVEL = 0;
- // default text keyword substitution mode
- public static final KSubstOption DEFAULT_TEXT_KSUBST_OPTION = Command.KSUBST_TEXT;
-
- // cvs plugin extension points and ids
- public static final String ID = "org.eclipse.team.cvs.core"; //$NON-NLS-1$
- public static final String PT_AUTHENTICATOR = "authenticator"; //$NON-NLS-1$
- public static final String PT_CONNECTIONMETHODS = "connectionmethods"; //$NON-NLS-1$
-
- // Directory to cache file contents
- private static final String CACHE_DIRECTORY = ".cache"; //$NON-NLS-1$
-
- private QuietOption quietness;
- private int compressionLevel = DEFAULT_COMPRESSION_LEVEL;
- private KSubstOption defaultTextKSubstOption = DEFAULT_TEXT_KSUBST_OPTION;
- private int communicationsTimeout = DEFAULT_TIMEOUT;
- private boolean pruneEmptyDirectories = DEFAULT_PRUNE;
- private boolean fetchAbsentDirectories = DEFAULT_FETCH;
- private boolean promptOnFileDelete = true;
- private boolean promptOnFolderDelete = true;
- private boolean showTasksOnAddAndDelete = false;
- private boolean replaceUnmanaged = true;
- private String cvsRshCommand = DEFAULT_CVS_RSH;
- private String cvsServer = DEFAULT_CVS_SERVER;
- private IConsoleListener consoleListener;
-
- private static CVSProviderPlugin instance;
-
- // CVS specific resource delta listeners
- private IResourceChangeListener projectDescriptionListener;
- private IResourceChangeListener metaFileSyncListener;
- private AddDeleteMoveListener addDeleteMoveListener;
-
- /**
- * The identifier for the CVS nature
- * (value <code>"org.eclipse.team.cvs.core.nature"</code>).
- * The presence of this nature on a project indicates that it is
- * CVS-capable.
- *
- * @see org.eclipse.core.resources.IProject#hasNature
- */
- private static final String NATURE_ID = ID + ".cvsnature"; //$NON-NLS-1$
-
- /**
- * Constructor for CVSProviderPlugin.
- * @param descriptor
- */
- public CVSProviderPlugin(IPluginDescriptor descriptor) {
- super(descriptor);
- instance = this;
- }
-
- /**
- * Convenience method for logging CVSExceptiuons to the plugin log
- */
- public static void log(TeamException e) {
- // For now, we'll log the status. However we should do more
- instance.getLog().log(e.getStatus());
- }
- public static void log(IStatus status) {
- // For now, we'll log the status. However we should do more
- instance.getLog().log(status);
- }
-
- /**
- * Returns the singleton plug-in instance.
- *
- * @return the plugin instance
- */
- public static CVSProviderPlugin getPlugin() {
- return instance;
- }
-
- /**
- * Get the ICVSProvider
- */
- public static ICVSProvider getProvider() {
- return CVSProvider.getInstance();
- }
-
- /**
- * Answers the repository provider type id for the cvs plugin
- */
- public static String getTypeId() {
- return NATURE_ID;
- }
-
- /**
- * Sets the file transfer compression level. (if supported)
- * Valid levels are: 0 (disabled), 1 (worst/fastest) - 9 (best/slowest)
- */
- public void setCompressionLevel(int level) {
- compressionLevel = level;
- }
-
- /**
- * Gets the file transfer compression level.
- */
- public int getCompressionLevel() {
- return compressionLevel;
- }
-
- /**
- * Sets the default keyword substitution mode for text files.
- */
- public void setDefaultTextKSubstOption(KSubstOption ksubst) {
- defaultTextKSubstOption = ksubst;
- }
-
-
- /**
- * Gets the default keyword substitution mode for text files.
- */
- public KSubstOption getDefaultTextKSubstOption() {
- return defaultTextKSubstOption;
- }
-
- /**
- * Should the CVS adapter prune empty directories
- */
- public boolean getPruneEmptyDirectories() {
- return pruneEmptyDirectories;
- }
-
- /**
- * Set whether the CVS adapter should prune empty directories
- */
- public void setPruneEmptyDirectories(boolean prune) {
- pruneEmptyDirectories = prune;
- }
-
- /**
- * Get the communications timeout value in seconds
- */
- public int getTimeout() {
- return communicationsTimeout;
- }
-
- /**
- * Set the timeout value for communications to a value in seconds.
- * The value must be greater than or equal 0. If is it 0, there is no timeout.
- */
- public void setTimeout(int timeout) {
- this.communicationsTimeout = Math.max(0, timeout);
- }
-
- /**
- * Set the quietness option to use with cvs commands.
- * Can be "", "-q" or "-Q"
- */
- public void setQuietness(QuietOption option) {
- this.quietness = option;
- }
-
- /**
- * Get the quietness option for commands
- */
- public QuietOption getQuietness() {
- return quietness;
- }
-
- /**
- * Set the console listener for commands.
- * @param consoleListener the listener
- */
- public void setConsoleListener(IConsoleListener consoleListener) {
- this.consoleListener = consoleListener;
- }
-
- /**
- * Get the console listener for commands.
- * @return the consoleListener, or null
- */
- public IConsoleListener getConsoleListener() {
- return consoleListener;
- }
-
- /**
- * @see Plugin#startup()
- */
- public void startup() throws CoreException {
- super.startup();
- Policy.localize("org.eclipse.team.internal.ccvs.core.messages"); //$NON-NLS-1$
-
- // Start the synchronizer first as the startup of CVSProvider may use it.
- CVSProvider.startup();
-
- // Initialize CVS change listeners. Note tha the report type is important.
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- projectDescriptionListener = new ProjectDescriptionManager();
- metaFileSyncListener = new SyncFileChangeListener();
- addDeleteMoveListener = new AddDeleteMoveListener();
- workspace.addResourceChangeListener(projectDescriptionListener, IResourceChangeEvent.PRE_AUTO_BUILD);
- workspace.addResourceChangeListener(metaFileSyncListener, IResourceChangeEvent.PRE_AUTO_BUILD);
- workspace.addResourceChangeListener(addDeleteMoveListener, IResourceChangeEvent.POST_AUTO_BUILD);
- CVSProviderPlugin.getPlugin().addResourceStateChangeListener(addDeleteMoveListener);
-
- createCacheDirectory();
-
- CVSTeamProvider.setMoveDeleteHook(new MoveDeleteHook());
- }
-
- /**
- * @see Plugin#shutdown()
- */
- public void shutdown() throws CoreException {
- super.shutdown();
- CVSProvider.shutdown();
-
- // remove listeners
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- workspace.removeResourceChangeListener(projectDescriptionListener);
- workspace.removeResourceChangeListener(metaFileSyncListener);
- workspace.removeResourceChangeListener(addDeleteMoveListener);
-
- deleteCacheDirectory();
- }
-
- /*
- * Add a resource change listener to the workspace in order to respond to
- * resource deletions and moves and to ensure or project desription file is up to date.
- */
- private void initializeChangeListener() {
-
- // Build a change listener for changes to thr project meta-information
- IResourceChangeListener projectChangeListener = new IResourceChangeListener() {
- public void resourceChanged(IResourceChangeEvent event) {
- try {
- IResourceDelta root = event.getDelta();
- IResourceDelta[] projectDeltas = root.getAffectedChildren(IResourceDelta.CHANGED);
- for (int i = 0; i < projectDeltas.length; i++) {
- IResourceDelta delta = projectDeltas[i];
- IResource resource = delta.getResource();
- if (resource.getType() == IResource.PROJECT) {
- IProject project = (IProject)resource;
- // Get the team provider for the project and
- RepositoryProvider provider = RepositoryProvider.getProvider(project, getTypeId());
- if(provider==null) continue;
- /* Check if the project description changed. */
- if ((delta.getFlags() & IResourceDelta.DESCRIPTION) != 0) {
- /* The project description changed. Write the file. */
- ProjectDescriptionManager.writeProjectDescriptionIfNecessary((CVSTeamProvider)provider, project, Policy.monitorFor(null));
- }
-
- /* Check if the .vcm_meta file for the project is in the delta. */
- IResourceDelta[] children = delta.getAffectedChildren(IResourceDelta.REMOVED);
- for (int j = 0; j < children.length; j++) {
- IResourceDelta childDelta = children[j];
- IResource childResource = childDelta.getResource();
- if (ProjectDescriptionManager.isProjectDescription(childResource)) {
- ProjectDescriptionManager.writeProjectDescriptionIfNecessary((CVSTeamProvider)provider, project, Policy.monitorFor(null));
- }
- }
- }
- }
- } catch (CVSException ex) {
- Util.logError(Policy.bind("CVSProviderPlugin.cannotUpdateDescription"), ex); //$NON-NLS-1$
- }
- }
- };
- ResourcesPlugin.getWorkspace().addResourceChangeListener(projectChangeListener, IResourceChangeEvent.POST_AUTO_BUILD);
- }
-
- /**
- * Gets the cvsRshCommand.
- * @return Returns a String
- */
- public String getCvsRshCommand() {
- return cvsRshCommand;
- }
-
- /**
- * Sets the cvsRshCommand.
- * @param cvsRshCommand The cvsRshCommand to set
- */
- public void setCvsRshCommand(String cvsRshCommand) {
- this.cvsRshCommand = cvsRshCommand;
- }
-
- /**
- * Gets the cvsServer.
- * @return Returns a String
- */
- public String getCvsServer() {
- return cvsServer;
- }
-
- /**
- * Sets the cvsServer.
- * @param cvsServer The cvsServer to set
- */
- public void setCvsServer(String cvsServer) {
- this.cvsServer = cvsServer;
- }
-
- /**
- * Gets the etchAbsentDirectories.
- * @return Returns a boolean
- */
- public boolean getFetchAbsentDirectories() {
- return fetchAbsentDirectories;
- }
-
- /**
- * Sets the fetchAbsentDirectories.
- * @param etchAbsentDirectories The etchAbsentDirectories to set
- */
- public void setFetchAbsentDirectories(boolean fetchAbsentDirectories) {
- this.fetchAbsentDirectories = fetchAbsentDirectories;
- }
-
- public boolean getPromptOnFileDelete() {
- return promptOnFileDelete;
- }
-
- public void setPromptOnFileDelete(boolean prompt) {
- promptOnFileDelete = prompt;
- }
-
- public boolean getPromptOnFolderDelete() {
- return promptOnFolderDelete;
- }
-
- public void setPromptOnFolderDelete(boolean prompt) {
- promptOnFolderDelete = prompt;
- }
-
- private static List listeners = new ArrayList();
-
- /*
- * @see ITeamManager#addResourceStateChangeListener(IResourceStateChangeListener)
- */
- public static void addResourceStateChangeListener(IResourceStateChangeListener listener) {
- listeners.add(listener);
- }
-
- /*
- * @see ITeamManager#removeResourceStateChangeListener(IResourceStateChangeListener)
- */
- public static void removeResourceStateChangeListener(IResourceStateChangeListener listener) {
- listeners.remove(listener);
- }
-
- /*
- * @see ITeamManager#broadcastResourceStateChanges(IResource[])
- */
- public static void broadcastResourceStateChanges(final IResource[] resources) {
- for(Iterator it=listeners.iterator(); it.hasNext();) {
- final IResourceStateChangeListener listener = (IResourceStateChangeListener)it.next();
- ISafeRunnable code = new ISafeRunnable() {
- public void run() throws Exception {
- listener.resourceStateChanged(resources);
- }
- public void handleException(Throwable e) {
- // don't log the exception....it is already being logged in Platform#run
- }
- };
- Platform.run(code);
- }
- }
-
- protected static void broadcastProjectConfigured(final IProject project) {
- for(Iterator it=listeners.iterator(); it.hasNext();) {
- final IResourceStateChangeListener listener = (IResourceStateChangeListener)it.next();
- ISafeRunnable code = new ISafeRunnable() {
- public void run() throws Exception {
- listener.projectConfigured(project);
- }
- public void handleException(Throwable e) {
- // don't log the exception....it is already being logged in Platform#run
- }
- };
- Platform.run(code);
- }
- }
- protected static void broadcastProjectDeconfigured(final IProject project) {
- for(Iterator it=listeners.iterator(); it.hasNext();) {
- final IResourceStateChangeListener listener = (IResourceStateChangeListener)it.next();
- ISafeRunnable code = new ISafeRunnable() {
- public void run() throws Exception {
- listener.projectDeconfigured(project);
- }
- public void handleException(Throwable e) {
- // don't log the exception....it is already being logged in Platform#run
- }
- };
- Platform.run(code);
- }
- }
-
- /**
- * Gets the showTasksOnAddAndDelete.
- * @return Returns a boolean
- */
- public boolean getShowTasksOnAddAndDelete() {
- return showTasksOnAddAndDelete;
- }
-
- /**
- * Sets the showTasksOnAddAndDelete.
- * @param showTasksOnAddAndDelete The showTasksOnAddAndDelete to set
- */
- public void setShowTasksOnAddAndDelete(boolean showTasksOnAddAndDelete) {
- this.showTasksOnAddAndDelete = showTasksOnAddAndDelete;
- }
- /**
- * Gets the replaceUnmanaged.
- * @return Returns a boolean
- */
- public boolean isReplaceUnmanaged() {
- return replaceUnmanaged;
- }
-
- /**
- * Sets the replaceUnmanaged.
- * @param replaceUnmanaged The replaceUnmanaged to set
- */
- public void setReplaceUnmanaged(boolean replaceUnmanaged) {
- this.replaceUnmanaged = replaceUnmanaged;
- }
-
- private void createCacheDirectory() {
- try {
- IPath cacheLocation = getStateLocation().append(CACHE_DIRECTORY);
- File file = cacheLocation.toFile();
- if (file.exists()) {
- deleteFile(file);
- }
- file.mkdir();
- } catch (IOException e) {
- log(new Status(IStatus.ERROR, ID, 0, Policy.bind("CVSProviderPlugin.errorCreatingCache", e.getMessage()), e)); //$NON-NLS-1$
- }
- }
-
- private void deleteCacheDirectory() {
- try {
- IPath cacheLocation = getStateLocation().append(CACHE_DIRECTORY);
- File file = cacheLocation.toFile();
- if (file.exists()) {
- deleteFile(file);
- }
- } catch (IOException e) {
- log(new Status(IStatus.ERROR, ID, 0, Policy.bind("CVSProviderPlugin.errorDeletingCache", e.getMessage()), e)); //$NON-NLS-1$
- }
- }
-
- private void deleteFile(File file) throws IOException {
- if (file.isDirectory()) {
- File[] children = file.listFiles();
- for (int i = 0; i < children.length; i++) {
- deleteFile(children[i]);
- }
- }
- file.delete();
- }
-
- public File getCacheFileFor(String path) throws IOException {
- return new File(getStateLocation().append(CACHE_DIRECTORY).toFile(), path);
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSStatus.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSStatus.java
deleted file mode 100644
index be426b379..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSStatus.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Status;
-
-public class CVSStatus extends Status {
-
- /*** Status codes ***/
- public static final int SERVER_ERROR = -10; // XXX What should this number be?
- public static final int NO_SUCH_TAG = -11;
- public static final int CONFLICT = -12;
- public static final int ERROR_LINE = -14; // generic uninterpreted E line from the server
- public static final int TAG_ALREADY_EXISTS = -15;
- public static final int COMMITTING_SYNC_INFO_FAILED = -16;
- public static final int DOES_NOT_EXIST = -17;
- public static final int FOLDER_NEEDED_FOR_FILE_DELETIONS = -18;
- public static final int CASE_VARIANT_EXISTS = -19;
- public static final int UNSUPPORTED_SERVER_VERSION = -20;
- public static final int SERVER_IS_CVSNT = -21;
- public static final int SERVER_IS_UNKNOWN = -22;
-
- // Path for resource related status
- private ICVSFolder commandRoot;
-
- public CVSStatus(int severity, int code, String message, Throwable t) {
- super(severity, CVSProviderPlugin.ID, code, message, t);
- }
-
- public CVSStatus(int severity, int code, String message) {
- this(severity, code, message, null);
- }
-
- public CVSStatus(int severity, int code, ICVSFolder commandRoot, String message) {
- this(severity, code, message, null);
- this.commandRoot = commandRoot;
- }
-
- public CVSStatus(int severity, String message, Throwable t) {
- this(severity, message);
- }
-
- public CVSStatus(int severity, String message) {
- this(severity, severity, message, null);
- }
- /**
- * @see IStatus#getMessage()
- */
- public String getMessage() {
- String message = super.getMessage();
- if (commandRoot != null) {
- message = Policy.bind("CVSStatus.messageWithRoot", commandRoot.getName(), message);
- }
- return message;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTag.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTag.java
deleted file mode 100644
index 7b667286c..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTag.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package org.eclipse.team.internal.ccvs.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * A tag in CVS gives a label to a collection of revisions. The labels can represent a version, a branch,
- * or a date.
- */
-public class CVSTag {
-
- public final static int HEAD = 0;
- public final static int BRANCH = 1;
- public final static int VERSION = 2;
- public final static int DATE = 3;
-
- public static final CVSTag DEFAULT = new CVSTag();
- public static final CVSTag BASE = new CVSTag("BASE", VERSION); //$NON-NLS-1$
-
- protected String name;
- protected int type;
-
- public CVSTag() {
- this("HEAD", HEAD); //$NON-NLS-1$
- }
-
- public CVSTag(String name, int type) {
- this.name = name;
- this.type = type;
- }
-
- public boolean equals(Object other) {
- if(other == this) return true;
- if (!(other instanceof CVSTag)) return false;
-
- CVSTag tag = ((CVSTag)other);
- if (getType() != tag.getType()) return false;
- if (!getName().equals(tag.getName())) return false;
- return true;
- }
-
- public String getName() {
- return name;
- }
-
- public int getType() {
- return type;
- }
-
- public int hashCode() {
- return name.hashCode();
- }
-
- public int compareTo(CVSTag other) {
- return getName().compareTo(other.getName());
- }
-
- public static boolean equalTags(CVSTag tag1, CVSTag tag2) {
- if (tag1 == null) tag1 = CVSTag.DEFAULT;
- if (tag2 == null) tag2 = CVSTag.DEFAULT;
- return tag1.equals(tag2);
- }
-
- public static IStatus validateTagName(String tagName) {
- if (tagName == null)
- return new CVSStatus(CVSStatus.ERROR, Policy.bind("CVSTag.nullName")); //$NON-NLS-1$
- if (tagName.equals("")) //$NON-NLS-1$
- return new CVSStatus(CVSStatus.ERROR, Policy.bind("CVSTag.emptyName")); //$NON-NLS-1$
- if (!Character. isLetter(tagName.charAt(0)))
- return new CVSStatus(CVSStatus.ERROR, Policy.bind("CVSTag.beginName")); //$NON-NLS-1$
-
- for (int i = 0; i < tagName.length(); i++) {
- char c = tagName.charAt(i);
- if ( Character.isSpaceChar(c) || c == '$' || c == ',' || c == '.' || c == ':' || c == ';' || c == '@' || c == '|')
- return new CVSStatus(CVSStatus.ERROR, Policy.bind("CVSTag.badCharName")); //$NON-NLS-1$
- }
- return new CVSStatus(CVSStatus.OK, Policy.bind("ok")); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProvider.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProvider.java
deleted file mode 100644
index 7a1607b25..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProvider.java
+++ /dev/null
@@ -1,1146 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core;
-
-import java.io.BufferedInputStream;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceVisitor;
-import org.eclipse.core.resources.team.IMoveDeleteHook;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Commit;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.client.Tag;
-import org.eclipse.team.internal.ccvs.core.client.Update;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.client.listeners.AdminKSubstListener;
-import org.eclipse.team.internal.ccvs.core.client.listeners.DiffListener;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.connection.CVSServerException;
-import org.eclipse.team.internal.ccvs.core.resources.CVSRemoteSyncElement;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.MutableResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Assert;
-import org.eclipse.team.internal.ccvs.core.util.PrepareForReplaceVisitor;
-import org.eclipse.team.internal.ccvs.core.util.ReplaceWithBaseVisitor;
-import org.eclipse.team.internal.core.streams.CRLFtoLFInputStream;
-import org.eclipse.team.internal.core.streams.LFtoCRLFInputStream;
-
-/**
- * This class acts as both the ITeamNature and the ITeamProvider instances
- * required by the Team core.
- *
- * The current stat of this class and it's plugin is EXPERIMENTAL.
- * As such, it is subject to change except in it's conformance to the
- * TEAM API which it implements.
- *
- * Questions:
- *
- * How should a project/reource rename/move effect the provider?
- *
- * Currently we always update with -P. Is this OK?
- * - A way to allow customizable options would be nice
- *
- * Is the -l option valid for commit and does it work properly for update and commit?
- *
- * Do we need an IUserInteractionProvider in the CVS core
- * - prompt for user info (caching could be separate)
- * - get release comments
- * - prompt for overwrite of unmanaged files
- *
- * Need a mechanism for communicating meta-information (provided by Team?)
- *
- * Should pass null when there are no options for a cvs command
- *
- * We currently write the files to disk and do a refreshLocal to
- * have them appear in Eclipse. This may be changed in the future.
- */
-public class CVSTeamProvider extends RepositoryProvider {
- private static final boolean IS_CRLF_PLATFORM = Arrays.equals(
- System.getProperty("line.separator").getBytes(), new byte[] { '\r', '\n' }); //$NON-NLS-1$
-
- private CVSWorkspaceRoot workspaceRoot;
- private IProject project;
- private String comment = ""; //$NON-NLS-1$
-
- private static IMoveDeleteHook moveDeleteHook;
-
- /**
- * No-arg Constructor for IProjectNature conformance
- */
- public CVSTeamProvider() {
- }
-
-
-
- /**
- * @see IProjectNature#deconfigure()
- */
- public void deconfigure() throws CoreException {
- // when a nature is removed from the project, notify the synchronizer that
- // we no longer need the sync info cached. This does not affect the actual CVS
- // meta directories on disk, and will remain unless a client calls unmanage().
- try {
- EclipseSynchronizer.getInstance().flush(getProject(), true, true /*flush deep*/, null);
- } catch(CVSException e) {
- throw new CoreException(e.getStatus());
- } finally {
- CVSProviderPlugin.broadcastProjectDeconfigured(getProject());
- }
- }
-
- /**
- * @see IProjectNature#getProject()
- */
- public IProject getProject() {
- return project;
- }
-
-
-
- /**
- * @see IProjectNature#setProject(IProject)
- */
- public void setProject(IProject project) {
- this.project = project;
- try {
- this.workspaceRoot = new CVSWorkspaceRoot(project);
- // Ensure that the project has CVS info
- if (workspaceRoot.getLocalRoot().getFolderSyncInfo() == null) {
- throw new CVSException(new CVSStatus(CVSStatus.ERROR, Policy.bind("CVSTeamProvider.noFolderInfo", project.getName()))); //$NON-NLS-1$
- }
- } catch (CVSException e) {
- // Log any problems creating the CVS managed resource
- CVSProviderPlugin.log(e);
- }
- }
-
-
-
- /**
- * Add the given resources to the project.
- * <p>
- * The sematics follow that of CVS in the sense that any folders
- * being added are created remotely as a result of this operation
- * while files are created remotely on the next commit.
- * </p>
- * <p>
- * This method uses the team file type registry to determine the type
- * of added files. If the extension of the file is not in the registry,
- * the file is assumed to be binary.
- * </p>
- * <p>
- * NOTE: for now we do three operations: one each for folders, text files and binary files.
- * We should optimize this when time permits to either use one operations or defer server
- * contact until the next commit.
- * </p>
- *
- * <p>
- * There are special semantics for adding the project itself to the repo. In this case, the project
- * must be included in the resources array.
- * </p>
- */
- public void add(IResource[] resources, int depth, IProgressMonitor progress) throws TeamException {
-
- // Visit the children of the resources using the depth in order to
- // determine which folders, text files and binary files need to be added
- // A TreeSet is needed for the folders so they are in the right order (i.e. parents created before children)
- final SortedSet folders = new TreeSet();
- // Sets are required for the files to ensure that files will not appear twice if there parent was added as well
- // and the depth isn't zero
- final Map /* from KSubstOption to Set */ files = new HashMap();
- final TeamException[] eHolder = new TeamException[1];
- for (int i=0; i<resources.length; i++) {
-
- final IResource currentResource = resources[i];
-
- // Throw an exception if the resource is not a child of the receiver
- checkIsChild(currentResource);
-
- try {
- // Auto-add parents if they are not already managed
- IContainer parent = currentResource.getParent();
- ICVSResource cvsParentResource = CVSWorkspaceRoot.getCVSResourceFor(parent);
- while (parent.getType() != IResource.ROOT && parent.getType() != IResource.PROJECT && ! cvsParentResource.isManaged()) {
- folders.add(cvsParentResource);
- parent = parent.getParent();
- cvsParentResource = cvsParentResource.getParent();
- }
-
- // Auto-add children
- final TeamException[] exception = new TeamException[] { null };
- currentResource.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) {
- try {
- ICVSResource mResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- // Add the resource is its not already managed and it was either
- // added explicitly (is equal currentResource) or is not ignored
- if (! mResource.isManaged() && (currentResource.equals(resource) || ! mResource.isIgnored())) {
- if (resource.getType() == IResource.FILE) {
- KSubstOption ksubst = KSubstOption.fromFile((IFile) resource);
- Set set = (Set) files.get(ksubst);
- if (set == null) {
- set = new HashSet();
- files.put(ksubst, set);
- }
- set.add(mResource);
- } else {
- folders.add(mResource);
- }
- }
- // Always return true and let the depth determine if children are visited
- return true;
- } catch (CVSException e) {
- exception[0] = e;
- return false;
- }
- }
- }, depth, false);
- if (exception[0] != null) {
- throw exception[0];
- }
- } catch (CoreException e) {
- throw new CVSException(new Status(IStatus.ERROR, CVSProviderPlugin.ID, TeamException.UNABLE, Policy.bind("CVSTeamProvider.visitError", new Object[] {resources[i].getFullPath()}), e)); //$NON-NLS-1$
- }
- }
- // If an exception occured during the visit, throw it here
- if (eHolder[0] != null)
- throw eHolder[0];
-
- // Add the folders, followed by files!
- progress.beginTask(null, files.size() * 10 + (folders.isEmpty() ? 0 : 10));
- try {
- if (!folders.isEmpty()) {
- Session.run(workspaceRoot.getRemoteLocation(), workspaceRoot.getLocalRoot(), true, new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- IStatus status = Command.ADD.execute(
- Command.NO_GLOBAL_OPTIONS,
- Command.NO_LOCAL_OPTIONS,
- (ICVSResource[])folders.toArray(new ICVSResource[folders.size()]),
- null,
- monitor);
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSServerException(status);
- }
- }
- }, Policy.subMonitorFor(progress, 10));
- }
- for (Iterator it = files.entrySet().iterator(); it.hasNext();) {
- Map.Entry entry = (Map.Entry) it.next();
- final KSubstOption ksubst = (KSubstOption) entry.getKey();
- final Set set = (Set) entry.getValue();
- Session.run(workspaceRoot.getRemoteLocation(), workspaceRoot.getLocalRoot(), true, new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- IStatus status = Command.ADD.execute(
- Command.NO_GLOBAL_OPTIONS,
- new LocalOption[] { ksubst },
- (ICVSResource[])set.toArray(new ICVSResource[set.size()]),
- null,
- monitor);
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSServerException(status);
- }
- }
- }, Policy.subMonitorFor(progress, 10));
- }
- } finally {
- progress.done();
- }
- }
-
- /**
- * Checkin any local changes using "cvs commit ...".
- *
- * @see ITeamProvider#checkin(IResource[], int, IProgressMonitor)
- */
- public void checkin(IResource[] resources, int depth, IProgressMonitor progress) throws TeamException {
-
- // Build the local options
- List localOptions = new ArrayList();
- localOptions.add(Commit.makeArgumentOption(Command.MESSAGE_OPTION, comment));
-
- // If the depth is not infinite, we want the -l option
- if (depth != IResource.DEPTH_INFINITE) {
- localOptions.add(Commit.DO_NOT_RECURSE);
- }
- LocalOption[] commandOptions = (LocalOption[])localOptions.toArray(new LocalOption[localOptions.size()]);
-
- // Build the arguments list
- String[] arguments = getValidArguments(resources, commandOptions);
-
- // Commit the resources
- IStatus status;
- Session s = new Session(workspaceRoot.getRemoteLocation(), workspaceRoot.getLocalRoot());
- progress.beginTask(null, 100);
- try {
- // Opening the session takes 20% of the time
- s.open(Policy.subMonitorFor(progress, 20));
- status = Command.COMMIT.execute(s,
- Command.NO_GLOBAL_OPTIONS,
- commandOptions,
- arguments, null,
- Policy.subMonitorFor(progress, 80));
- } finally {
- s.close();
- progress.done();
- }
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSServerException(status);
- }
- }
-
- /**
- * Checkout the provided resources so they can be modified locally and committed.
- *
- * Currently, we support only the optimistic model so checkout does nothing.
- *
- * @see ITeamProvider#checkout(IResource[], int, IProgressMonitor)
- */
- public void checkout(IResource[] resources, int depth, IProgressMonitor progress) throws TeamException {
- }
-
- /**
- * @see ITeamProvider#delete(IResource[], int, IProgressMonitor)
- */
- public void delete(IResource[] resources, final IProgressMonitor progress) throws TeamException {
- try {
- progress.beginTask(null, 100);
-
- // Delete any files locally and record the names.
- // Use a resource visitor to ensure the proper depth is obtained
- final IProgressMonitor subProgress = Policy.infiniteSubMonitorFor(progress, 30);
- subProgress.beginTask(null, 256);
- final List files = new ArrayList(resources.length);
- final TeamException[] eHolder = new TeamException[1];
- for (int i=0;i<resources.length;i++) {
- IResource resource = resources[i];
- checkIsChild(resource);
- try {
- if (resource.exists()) {
- resource.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) {
- try {
- ICVSResource cvsResource = workspaceRoot.getCVSResourceFor(resource);
- if (cvsResource.isManaged()) {
- String name = resource.getProjectRelativePath().toString();
- if (resource.getType() == IResource.FILE) {
- files.add(name);
- ((IFile)resource).delete(false, true, subProgress);
- }
- }
- } catch (TeamException e) {
- eHolder[0] = e;
- } catch (CoreException e) {
- eHolder[0] = wrapException(e);
- // If there was a problem, don't visit the children
- return false;
- }
- // Always return true and let the depth determine if children are visited
- return true;
- }
- }, IResource.DEPTH_INFINITE, false);
- } else if (resource.getType() == IResource.FILE) {
- // If the resource doesn't exist but is a file, queue it for removal
- files.add(resource.getProjectRelativePath().toString());
- }
- } catch (CoreException e) {
- throw wrapException(e);
- }
- }
- subProgress.done();
- // If an exception occured during the visit, throw it here
- if (eHolder[0] != null) throw eHolder[0];
- // If there are no files to delete, we are done
- if (files.isEmpty()) return;
-
- // Remove the files remotely
- IStatus status;
- Session s = new Session(workspaceRoot.getRemoteLocation(), workspaceRoot.getLocalRoot());
- s.open(progress);
- try {
- status = Command.REMOVE.execute(s,
- Command.NO_GLOBAL_OPTIONS,
- Command.NO_LOCAL_OPTIONS,
- (String[])files.toArray(new String[files.size()]),
- null,
- Policy.subMonitorFor(progress, 70));
- } finally {
- s.close();
- }
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSServerException(status);
- }
- } finally {
- progress.done();
- }
- }
-
- /**
- * Diff the resources with the repository and write the output to the provided
- * PrintStream in a form that is usable as a patch. The patch is rooted at the
- * project.
- */
- public void diff(IResource resource, LocalOption[] options, PrintStream stream,
- IProgressMonitor progress) throws TeamException {
-
- // Determine the command root and arguments arguments list
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- ICVSFolder commandRoot;
- String[] arguments;
- if (cvsResource.isFolder()) {
- commandRoot = (ICVSFolder)cvsResource;
- arguments = new String[] {Session.CURRENT_LOCAL_FOLDER};
- } else {
- commandRoot = cvsResource.getParent();
- arguments = new String[] {cvsResource.getName()};
- }
-
- Session s = new Session(workspaceRoot.getRemoteLocation(), commandRoot);
- progress.beginTask(null, 100);
- try {
- s.open(Policy.subMonitorFor(progress, 20));
- Command.DIFF.execute(s,
- Command.NO_GLOBAL_OPTIONS,
- options,
- arguments,
- new DiffListener(stream),
- Policy.subMonitorFor(progress, 80));
- } finally {
- s.close();
- progress.done();
- }
- }
-
- /**
- * Replace the local version of the provided resources with the remote using "cvs update -C ..."
- *
- * @see ITeamProvider#get(IResource[], int, IProgressMonitor)
- */
- public void get(IResource[] resources, final int depth, IProgressMonitor progress) throws TeamException {
- get(resources, depth, null, progress);
- }
-
- public void get(final IResource[] resources, final int depth, CVSTag tag, IProgressMonitor progress) throws TeamException {
- try {
- progress.beginTask(null, 100);
-
- // Handle the retrival of the base in a special way
- if (tag != null && tag.equals(CVSTag.BASE)) {
- new ReplaceWithBaseVisitor().replaceWithBase(getProject(), resources, depth, Policy.subMonitorFor(progress, 100)); //$NON-NLS-1$
- return;
- }
-
- // Prepare for the replace (special handling for "cvs added" and "cvs removed" resources
- new PrepareForReplaceVisitor().visitResources(getProject(), resources, "CVSTeamProvider.scrubbingResource", depth, Policy.subMonitorFor(progress, 30)); //$NON-NLS-1$
-
- // Perform an update, ignoring any local file modifications
- List options = new ArrayList();
- options.add(Update.IGNORE_LOCAL_CHANGES);
- if(depth != IResource.DEPTH_INFINITE) {
- options.add(Command.DO_NOT_RECURSE);
- }
- LocalOption[] commandOptions = (LocalOption[]) options.toArray(new LocalOption[options.size()]);
- update(resources, commandOptions, tag, true /*createBackups*/, Policy.subMonitorFor(progress, 70));
- } finally {
- progress.done();
- }
- }
-
- /**
- * Return the remote location to which the receiver's project is mapped.
- */
- public ICVSRepositoryLocation getRemoteLocation() throws CVSException {
- try {
- return workspaceRoot.getRemoteLocation();
- } catch (CVSException e) {
- // If we can't get the remote location, we should disconnect since nothing can be done with the provider
- try {
- RepositoryProvider.unmap(project);
- } catch (TeamException ex) {
- CVSProviderPlugin.log(ex);
- }
- // We need to trigger a decorator refresh
- throw e;
- }
- }
-
- /**
- * @see ITeamProvider#hasRemote(IResource)
- * XXX to be removed when sync methods are removed from ITeamProvider
- */
- public boolean hasRemote(IResource resource) {
- try {
- ICVSResource cvsResource = workspaceRoot.getCVSResourceFor(resource);
- int type = resource.getType();
- if(type!=IResource.FILE) {
- if(type==IResource.PROJECT) {
- return ((ICVSFolder)cvsResource).isCVSFolder();
- } else {
- return cvsResource.isManaged();
- }
- } else {
- ResourceSyncInfo info = cvsResource.getSyncInfo();
- if(info!=null) {
- return !info.isAdded();
- } else {
- return false;
- }
- }
- } catch(CVSException e) {
- return false;
- }
- }
-
- /*
- * Use specialiazed tagging to move all local changes (including additions and
- * deletions) to the specified branch.
- */
- public void makeBranch(IResource[] resources, CVSTag versionTag, CVSTag branchTag, boolean moveToBranch, boolean eclipseWay, IProgressMonitor monitor) throws TeamException {
-
- // Determine the total amount of work
- int totalWork = 10 + (versionTag!= null ? 60 : 40) + (moveToBranch ? 20 : 0);
- monitor.beginTask(Policy.bind("CVSTeamProvider.makeBranch"), totalWork); //$NON-NLS-1$
- try {
-
- // Determine which tag command to used depending on whether the Eclipse specific
- // method of branching is requested
- Tag tagCommand = Command.TAG;
- if (eclipseWay) {
- tagCommand = Command.CUSTOM_TAG;
- }
-
- // Build the arguments list
- String[] arguments = getValidArguments(resources, Command.NO_LOCAL_OPTIONS);
-
- // Tag the remote resources
- Session s = new Session(workspaceRoot.getRemoteLocation(), workspaceRoot.getLocalRoot());
- try {
- s.open(Policy.subMonitorFor(monitor, 10));
-
- IStatus status;
- if (versionTag != null) {
- // Version using tag and branch using rtag
- status = tagCommand.execute(s,
- Command.NO_GLOBAL_OPTIONS,
- Command.NO_LOCAL_OPTIONS,
- versionTag,
- arguments,
- null,
- Policy.subMonitorFor(monitor, 40));
- if (status.isOK()) {
- // XXX Could use RTAG here when it works
- status = tagCommand.execute(s,
- Command.NO_GLOBAL_OPTIONS,
- Command.NO_LOCAL_OPTIONS,
- branchTag,
- arguments,
- null,
- Policy.subMonitorFor(monitor, 20));
- }
- } else {
- // Just branch using tag
- status = tagCommand.execute(s,
- Command.NO_GLOBAL_OPTIONS,
- Command.NO_LOCAL_OPTIONS,
- branchTag,
- arguments,
- null,
- Policy.subMonitorFor(monitor, 40));
-
- }
- if ( ! status.isOK()) {
- throw new CVSServerException(status);
- }
- } finally {
- s.close();
- }
-
- // Set the tag of the local resources to the branch tag (The update command will not
- // properly update "cvs added" and "cvs removed" resources so a custom visitor is used
- if (moveToBranch) {
- if (eclipseWay) {
- setTag(resources, branchTag, Policy.subMonitorFor(monitor, 20));
- } else {
- update(resources, Command.NO_LOCAL_OPTIONS, branchTag, true /*createBackups*/, Policy.subMonitorFor(monitor, 20));
- }
- }
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Update the sync info of the local resource associated with the sync element such that
- * the revision of the local resource matches that of the remote resource.
- * This will allow commits on the local resource to succeed.
- *
- * Only file resources can be merged.
- */
- public void merged(IRemoteSyncElement[] elements) throws TeamException {
- for (int i=0;i<elements.length;i++) {
- ((CVSRemoteSyncElement)elements[i]).makeOutgoing(Policy.monitorFor(null));
- }
- }
-
- /**
- * @see ITeamProvider#move(IResource, IPath, IProgressMonitor)
- */
- public void moved(IPath source, IResource resource, IProgressMonitor progress) throws TeamException {
- }
-
- /**
- * Set the comment to be used on the next checkin
- */
- public void setComment(String comment) {
- this.comment = comment;
- }
-
- /**
- * Set the connection method for the given resource's
- * project. If the conection method name is invalid (i.e.
- * no corresponding registered connection method), false is returned.
- */
- public boolean setConnectionInfo(IResource resource, String methodName, IUserInfo userInfo, IProgressMonitor monitor) throws TeamException {
- checkIsChild(resource);
- try {
- monitor.beginTask(Policy.bind("CVSTeamProvider.connectionInfo", project.getName()), 100); //$NON-NLS-1$
-
- if (!CVSRepositoryLocation.validateConnectionMethod(methodName))
- return false;
-
- // Get the original location
- ICVSRepositoryLocation location = workspaceRoot.getRemoteLocation();
-
- // Make a copy to work on
- CVSRepositoryLocation newLocation = CVSRepositoryLocation.fromString(location.getLocation());
- newLocation.setMethod(methodName);
- newLocation.setUserInfo(userInfo);
-
- // Validate that a connection can be made with the new location
- try {
- newLocation.validateConnection(Policy.subMonitorFor(monitor, 20));
- } catch (CVSException e) {
- // XXX We should really only do this if it didn't exist previously
- CVSProviderPlugin.getProvider().disposeRepository(newLocation);
- throw e;
- }
-
- // Add the location to the provider
- CVSProvider.getInstance().addRepository(newLocation);
-
- // Set the project to use the new Locations
- setRemoteRoot(newLocation, Policy.subMonitorFor(monitor, 80));
- return true;
- } finally {
- monitor.done();
- }
- }
-
- /*
- * This method sets the tag for a project.
- * It expects to be passed an InfiniteSubProgressMonitor
- */
- private void setTag(final IResource[] resources, final CVSTag tag, IProgressMonitor monitor) throws TeamException {
-
- workspaceRoot.getLocalRoot().run(new ICVSRunnable() {
- public void run(IProgressMonitor progress) throws CVSException {
- try {
- // 512 ticks gives us a maximum of 2048 which seems reasonable for folders and files in a project
- progress.beginTask(null, 100);
- final IProgressMonitor monitor = Policy.infiniteSubMonitorFor(progress, 100);
- monitor.beginTask(Policy.bind("CVSTeamProvider.folderInfo", project.getName()), 512); //$NON-NLS-1$
-
- // Visit all the children folders in order to set the root in the folder sync info
- for (int i = 0; i < resources.length; i++) {
- CVSWorkspaceRoot.getCVSResourceFor(resources[i]).accept(new ICVSResourceVisitor() {
- public void visitFile(ICVSFile file) throws CVSException {
- monitor.worked(1);
- ResourceSyncInfo info = file.getSyncInfo();
- if (info != null) {
- monitor.subTask(Policy.bind("CVSTeamProvider.updatingFile", info.getName())); //$NON-NLS-1$
- MutableResourceSyncInfo newInfo = info.cloneMutable();
- newInfo.setTag(tag);
- file.setSyncInfo(newInfo);
- }
- };
- public void visitFolder(ICVSFolder folder) throws CVSException {
- monitor.worked(1);
- FolderSyncInfo info = folder.getFolderSyncInfo();
- if (info != null) {
- monitor.subTask(Policy.bind("CVSTeamProvider.updatingFolder", info.getRepository())); //$NON-NLS-1$
- folder.setFolderSyncInfo(new FolderSyncInfo(info.getRepository(), info.getRoot(), tag, info.getIsStatic()));
- folder.acceptChildren(this);
- }
- };
- });
- }
- } finally {
- progress.done();
- }
- }
- }, monitor);
- }
-
- /**
- * Tag the resources in the CVS repository with the given tag.
- *
- * The returned IStatus will be a status containing any errors or warnings.
- * If the returned IStatus is a multi-status, the code indicates the severity.
- * Possible codes are:
- * CVSStatus.OK - Nothing to report
- * CVSStatus.SERVER_ERROR - The server reported an error
- * any other code - warning messages received from the server
- */
- public IStatus tag(IResource[] resources, int depth, CVSTag tag, IProgressMonitor progress) throws CVSException {
-
- // Build the local options
- List localOptions = new ArrayList();
- // If the depth is not infinite, we want the -l option
- if (depth != IResource.DEPTH_INFINITE)
- localOptions.add(Tag.DO_NOT_RECURSE);
- LocalOption[] commandOptions = (LocalOption[])localOptions.toArray(new LocalOption[localOptions.size()]);
-
- // Build the arguments list
- String[] arguments = getValidArguments(resources, commandOptions);
-
- // Execute the command
- Session s = new Session(workspaceRoot.getRemoteLocation(), workspaceRoot.getLocalRoot());
- progress.beginTask(null, 100);
- try {
- // Opening the session takes 20% of the time
- s.open(Policy.subMonitorFor(progress, 20));
- return Command.TAG.execute(s,
- Command.NO_GLOBAL_OPTIONS,
- commandOptions,
- tag,
- arguments,
- null,
- Policy.subMonitorFor(progress, 80));
- } finally {
- s.close();
- progress.done();
- }
- }
-
- /**
- * Currently, we support only the optimistic model so uncheckout dores nothing.
- *
- * @see ITeamProvider#uncheckout(IResource[], int, IProgressMonitor)
- */
- public void uncheckout(IResource[] resources, int depth, IProgressMonitor progress) throws TeamException {
- }
-
- /**
- * Generally useful update.
- *
- * The tag parameter determines any stickyness after the update is run. If tag is null, any tagging on the
- * resources being updated remain the same. If the tag is a branch, version or date tag, then the resources
- * will be appropriatly tagged. If the tag is HEAD, then there will be no tag on the resources (same as -A
- * clear sticky option).
- *
- * @param createBackups if true, creates .# files for updated files
- */
- public void update(IResource[] resources, LocalOption[] options, CVSTag tag, boolean createBackups, IProgressMonitor progress) throws TeamException {
- // Build the local options
- List localOptions = new ArrayList();
-
- // Use the appropriate tag options
- if (tag != null) {
- localOptions.add(Update.makeTagOption(tag));
- }
-
- // Build the arguments list
- localOptions.addAll(Arrays.asList(options));
- LocalOption[] commandOptions = (LocalOption[])localOptions.toArray(new LocalOption[localOptions.size()]);
- String[] arguments = getValidArguments(resources, commandOptions);
-
- IStatus status;
- Session s = new Session(workspaceRoot.getRemoteLocation(), workspaceRoot.getLocalRoot());
- progress.beginTask(null, 100);
- try {
- // Opening the session takes 20% of the time
- s.open(Policy.subMonitorFor(progress, 20));
- status = Command.UPDATE.execute(s, Command.NO_GLOBAL_OPTIONS, commandOptions, arguments,
- null, Policy.subMonitorFor(progress, 80), createBackups);
- } finally {
- progress.done();
- s.close();
- }
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- // XXX diff errors??
- throw new CVSServerException(status);
- }
- }
-
- public static String getMessageFor(Exception e) {
- String message = Policy.bind(e.getClass().getName(), new Object[] {e.getMessage()});
- if (message.equals(e.getClass().getName()))
- message = Policy.bind("CVSTeamProvider.exception", new Object[] {e.toString()}); //$NON-NLS-1$
- return message;
- }
-
-
- /*
- * @see ITeamProvider#refreshState(IResource[], int, IProgressMonitor)
- */
- public void refreshState(IResource[] resources, int depth, IProgressMonitor progress) throws TeamException {
- Assert.isTrue(false);
- }
- /*
- * @see ITeamProvider#isOutOfDate(IResource)
- * XXX to be removed when sync methods are removed from ITeamProvider
- */
- public boolean isOutOfDate(IResource resource) {
- Assert.isTrue(false);
- return false;
- }
-
- /*
- * @see ITeamProvider#isDirty(IResource)
- */
- public boolean isDirty(IResource resource) {
- Assert.isTrue(false);
- return false;
- }
-
- public CVSWorkspaceRoot getCVSWorkspaceRoot() {
- return workspaceRoot;
- }
-
- /*
- * Generate an exception if the resource is not a child of the project
- */
- private void checkIsChild(IResource resource) throws CVSException {
- if (!isChildResource(resource))
- throw new CVSException(new Status(IStatus.ERROR, CVSProviderPlugin.ID, TeamException.UNABLE,
- Policy.bind("CVSTeamProvider.invalidResource", //$NON-NLS-1$
- new Object[] {resource.getFullPath().toString(), project.getName()}),
- null));
- }
-
- /*
- * Get the arguments to be passed to a commit or update
- */
- private String[] getValidArguments(IResource[] resources, LocalOption[] options) throws CVSException {
- List arguments = new ArrayList(resources.length);
- for (int i=0;i<resources.length;i++) {
- checkIsChild(resources[i]);
- IPath cvsPath = resources[i].getFullPath().removeFirstSegments(1);
- if (cvsPath.segmentCount() == 0) {
- arguments.add(Session.CURRENT_LOCAL_FOLDER);
- } else {
- arguments.add(cvsPath.toString());
- }
- }
- return (String[])arguments.toArray(new String[arguments.size()]);
- }
-
- /*
- * This method expects to be passed an InfiniteSubProgressMonitor
- */
- public void setRemoteRoot(ICVSRepositoryLocation location, IProgressMonitor monitor) throws TeamException {
-
- // Check if there is a differnece between the new and old roots
- final String root = location.getLocation();
- if (root.equals(workspaceRoot.getRemoteLocation()))
- return;
-
- try {
- workspaceRoot.getLocalRoot().run(new ICVSRunnable() {
- public void run(IProgressMonitor progress) throws CVSException {
- try {
- // 256 ticks gives us a maximum of 1024 which seems reasonable for folders is a project
- progress.beginTask(null, 100);
- final IProgressMonitor monitor = Policy.infiniteSubMonitorFor(progress, 100);
- monitor.beginTask(Policy.bind("CVSTeamProvider.folderInfo", project.getName()), 256); //$NON-NLS-1$
-
- // Visit all the children folders in order to set the root in the folder sync info
- workspaceRoot.getLocalRoot().accept(new ICVSResourceVisitor() {
- public void visitFile(ICVSFile file) throws CVSException {};
- public void visitFolder(ICVSFolder folder) throws CVSException {
- monitor.worked(1);
- FolderSyncInfo info = folder.getFolderSyncInfo();
- if (info != null) {
- monitor.subTask(Policy.bind("CVSTeamProvider.updatingFolder", info.getRepository())); //$NON-NLS-1$
- folder.setFolderSyncInfo(new FolderSyncInfo(info.getRepository(), root, info.getTag(), info.getIsStatic()));
- folder.acceptChildren(this);
- }
- };
- });
- } finally {
- progress.done();
- }
- }
- }, monitor);
- } finally {
- monitor.done();
- }
- }
-
- /*
- * Helper to indicate if the resource is a child of the receiver's project
- */
- private boolean isChildResource(IResource resource) {
- return resource.getProject().getName().equals(project.getName());
- }
-
- private static TeamException wrapException(CoreException e) {
- return new TeamException(statusFor(e));
- }
-
- private static IStatus statusFor(CoreException e) {
- // We should be taking out any status from the CVSException
- // and creating an array of IStatus!
- return new Status(IStatus.ERROR, CVSProviderPlugin.ID, TeamException.UNABLE, getMessageFor(e), e);
- }
-
- public void configureProject() throws CoreException {
- CVSProviderPlugin.broadcastProjectConfigured(getProject());
- }
- /**
- * Sets the keyword substitution mode for the specified resources.
- * <p>
- * Applies the following rules in order:<br>
- * <ul>
- * <li>If a file is not managed, skips it.</li>
- * <li>If a file is not changing modes, skips it.</li>
- * <li>If a file is being changed from binary to text, corrects line delimiters
- * then commits it, then admins it.</li>
- * <li>If a file is added, changes the resource sync information locally.</li>
- * <li>Otherwise commits the file (with FORCE to create a new revision), then admins it.</li>
- * </ul>
- * All files that are admin'd are committed with FORCE to prevent other developers from
- * casually trying to commit pending changes to the repository without first checking out
- * a new copy. This is not a perfect solution, as they could just as easily do an UPDATE
- * and not obtain the new keyword sync info.
- * </p>
- *
- * @param changeSet a map from IFile to KSubstOption
- * @param monitor the progress monitor
- * @return a status code indicating success or failure of the operation
- *
- * @throws TeamException
- */
- public IStatus setKeywordSubstitution(final Map /* from IFile to KSubstOption */ changeSet,
- IProgressMonitor monitor) throws TeamException {
- final IStatus[] result = new IStatus[] { ICommandOutputListener.OK };
- workspaceRoot.getLocalRoot().run(new ICVSRunnable() {
- public void run(final IProgressMonitor monitor) throws CVSException {
- final Map /* from KSubstOption to List of String */ filesToAdmin = new HashMap();
- final List /* of String */ filesToCommit = new ArrayList();
- final Collection /* of ICVSFile */ filesToCommitAsText = new HashSet(); // need fast lookup
-
- /*** determine the resources to be committed and/or admin'd ***/
- for (Iterator it = changeSet.entrySet().iterator(); it.hasNext();) {
- Map.Entry entry = (Map.Entry) it.next();
- IFile file = (IFile) entry.getKey();
- KSubstOption toKSubst = (KSubstOption) entry.getValue();
-
- // only set keyword substitution if resource is a managed file
- checkIsChild(file);
- ICVSFile mFile = CVSWorkspaceRoot.getCVSFileFor(file);
- if (! mFile.isManaged()) continue;
-
- // only set keyword substitution if new differs from actual
- ResourceSyncInfo info = mFile.getSyncInfo();
- KSubstOption fromKSubst = info.getKeywordMode();
- if (toKSubst.equals(fromKSubst)) continue;
-
- // change resource sync info immediately for an outgoing addition
- if (info.isAdded()) {
- MutableResourceSyncInfo newInfo = info.cloneMutable();
- newInfo.setKeywordMode(toKSubst);
- mFile.setSyncInfo(newInfo);
- continue;
- }
-
- // nothing do to for deletions
- if (info.isDeleted()) continue;
-
- // file exists remotely so we'll have to commit it
- String remotePath = mFile.getRelativePath(workspaceRoot.getLocalRoot());
- if (fromKSubst.isBinary() && ! toKSubst.isBinary()) {
- // converting from binary to text
- cleanLineDelimiters(file, IS_CRLF_PLATFORM, new NullProgressMonitor()); // XXX need better progress monitoring
- // remember to commit the cleaned resource as text before admin
- filesToCommitAsText.add(mFile);
- }
- // force a commit to bump the revision number
- makeDirty(file);
- filesToCommit.add(remotePath);
- // remember to admin the resource
- List list = (List) filesToAdmin.get(toKSubst);
- if (list == null) {
- list = new ArrayList();
- filesToAdmin.put(toKSubst, list);
- }
- list.add(remotePath);
- }
-
- /*** commit then admin the resources ***/
- // compute the total work to be performed
- int totalWork = filesToCommit.size();
- for (Iterator it = filesToAdmin.values().iterator(); it.hasNext();) {
- List list = (List) it.next();
- totalWork += list.size();
- }
- if (totalWork != 0) {
- Session s = new Session(workspaceRoot.getRemoteLocation(), workspaceRoot.getLocalRoot());
- monitor.beginTask(Policy.bind("CVSTeamProvider.settingKSubst"), 5 + totalWork); //$NON-NLS-1$
- try {
- s.open(Policy.subMonitorFor(monitor, 5));
-
- // commit files that changed from binary to text
- // NOTE: The files are committed as text with conversions even if the
- // resource sync info still says "binary".
- if (filesToCommit.size() != 0) {
- String keywordChangeComment = Policy.bind("CVSTeamProvider.changingKeywordComment"); //$NON-NLS-1$
- s.setTextTransferOverride(filesToCommitAsText);
- result[0] = Command.COMMIT.execute(s, Command.NO_GLOBAL_OPTIONS,
- new LocalOption[] { Commit.DO_NOT_RECURSE, Commit.FORCE,
- Commit.makeArgumentOption(Command.MESSAGE_OPTION, keywordChangeComment) },
- (String[]) filesToCommit.toArray(new String[filesToCommit.size()]),
- null, Policy.subMonitorFor(monitor, filesToCommit.size()));
- s.setTextTransferOverride(null);
- // if errors were encountered, abort
- if (! result[0].isOK()) return;
- }
-
- // admin files that changed keyword substitution mode
- // NOTE: As confirmation of the completion of a command, the server replies
- // with the RCS command output if a change took place. Rather than
- // assume that the command succeeded, we listen for these lines
- // and update the local ResourceSyncInfo for the particular files that
- // were actually changed remotely.
- for (Iterator it = filesToAdmin.entrySet().iterator(); it.hasNext();) {
- Map.Entry entry = (Map.Entry) it.next();
- KSubstOption toKSubst = (KSubstOption) entry.getKey();
- List list = (List) entry.getValue();
- // do it
- result[0] = Command.ADMIN.execute(s, Command.NO_GLOBAL_OPTIONS,
- new LocalOption[] { toKSubst },
- (String[]) list.toArray(new String[list.size()]),
- new AdminKSubstListener(toKSubst),
- Policy.subMonitorFor(monitor, list.size()));
- // if errors were encountered, abort
- if (! result[0].isOK()) return;
- }
- } finally {
- s.close();
- monitor.done();
- }
- }
- }
- }, Policy.monitorFor(monitor));
- return result[0];
- }
-
- /**
- * Fixes the line delimiters in the local file to reflect the platform's
- * native encoding. Performs CR/LF -> LF or LF -> CR/LF conversion
- * depending on the platform but does not affect delimiters that are
- * already correctly encoded.
- */
- public static void cleanLineDelimiters(IFile file, boolean useCRLF, IProgressMonitor progress)
- throws CVSException {
- try {
- // convert delimiters in memory
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- InputStream is = new BufferedInputStream(file.getContents());
- try {
- is = new CRLFtoLFInputStream(is);
- if (useCRLF) is = new LFtoCRLFInputStream(is);
- for (int b; (b = is.read()) != -1;) bos.write(b);
- bos.close();
- } finally {
- is.close();
- }
- // write file back to disk with corrected delimiters if changes were made
- ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
- file.setContents(bis, false /*force*/, false /*keepHistory*/, progress);
- } catch (CoreException e) {
- throw CVSException.wrapException(file, Policy.bind("CVSTeamProvider.cleanLineDelimitersException"), e); //$NON-NLS-1$
- } catch (IOException e) {
- throw CVSException.wrapException(file, Policy.bind("CVSTeamProvider.cleanLineDelimitersException"), e); //$NON-NLS-1$
- }
- }
-
- /*
- * Marks a file as dirty.
- */
- private static void makeDirty(IFile file) throws CVSException {
- ICVSFile mFile = CVSWorkspaceRoot.getCVSFileFor(file);
- mFile.setTimeStamp(null /*set the timestamp to current time*/);
- }
-
- /*
- * @see RepositoryProvider#getID()
- */
- public String getID() {
- return CVSProviderPlugin.getTypeId();
- }
-
- /*
- * @see RepositoryProvider#getMoveDeleteHook()
- */
- public IMoveDeleteHook getMoveDeleteHook() {
- return moveDeleteHook;
- }
-
- /*
- * Return the currently registered Move/Delete Hook
- */
- public static IMoveDeleteHook getRegisteredMoveDeleteHook() {
- return moveDeleteHook;
- }
-
- /*
- * Set the Move/Delete hook of the CVS Team Provider. This is for internal use by CVS only.
- * It is not to be used by other clients
- */
- public static void setMoveDeleteHook(IMoveDeleteHook hook) {
- moveDeleteHook = hook;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/DateUtil.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/DateUtil.java
deleted file mode 100644
index c49174fb5..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/DateUtil.java
+++ /dev/null
@@ -1,82 +0,0 @@
-package org.eclipse.team.internal.ccvs.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import java.util.TimeZone;
-
-/**
- * Utilities to handle time stamps in a cvs client.
- */
-public class DateUtil {
-
- private static final String ENTRY_TIMESTAMP_FORMAT= "EEE MMM dd HH:mm:ss yyyy";//$NON-NLS-1$
- private static final String ENTRY_TIMESTAMP_TIME_ZONE= "GMT";//$NON-NLS-1$
- private static final Locale ENTRY_TIMESTAMP_LOCALE= Locale.US;
-
- private static final String MODTIME_TIMESTAMP_FORMAT= "dd MMM yyyy HH:mm:ss zz";//$NON-NLS-1$
- private static final Locale MODTIME_TIMESTAMP_LOCALE= Locale.US;
-
- private static final String LOG_TIMESTAMP_FORMAT= "yyyy/MM/dd HH:mm:ss zzz";//$NON-NLS-1$
- private static final Locale LOG_TIMESTAMP_LOCALE= Locale.US;
-
- private static final String HISTORY_TIMESTAMP_FORMAT= "yyyy-MM-dd HH:mm zzzz";//$NON-NLS-1$
- private static final Locale HISTORY_TIMESTAMP_LOCALE= Locale.US;
-
- /**
- * Converts a time stamp as sent from a cvs server for a "log" command into a
- * <code>Date</code>.
- */
- public static Date convertFromLogTime(String modTime) {
- SimpleDateFormat format= new SimpleDateFormat(LOG_TIMESTAMP_FORMAT,
- LOG_TIMESTAMP_LOCALE);
- try {
- return format.parse(modTime);
- } catch (ParseException e) {
- // fallback is to return null
- return null;
- }
- }
- /**
- * Converts a modifcation time stamp as send from a cvs server into a
- * <code>Date</code>. The format of the modification time stamp is defined
- * in the document CVS Client/Server for CVS 1.11 section 5.6 Dates
- */
- public static Date convertFromModTime(String modTime) {
- SimpleDateFormat format= new SimpleDateFormat(MODTIME_TIMESTAMP_FORMAT,
- MODTIME_TIMESTAMP_LOCALE);
- try {
- return format.parse(modTime);
- } catch (ParseException e) {
- // fallback is to return null
- return null;
- }
- }
- /**
- * Converts a history time stamp as sent from a cvs server into a
- * <code>Date</code>.
- */
- public static Date convertFromHistoryTime(String historyTime) {
- SimpleDateFormat format= new SimpleDateFormat(HISTORY_TIMESTAMP_FORMAT,
- HISTORY_TIMESTAMP_LOCALE);
- try {
- return format.parse(historyTime);
- } catch (ParseException e) {
- // fallback is to return null
- return null;
- }
- }
- /**
- * Converts a date into an entry time format as specified in the document
- * Version Management with CVS for CVS 1.10.6 page 14. Note that the
- * time format is always in GMT also not specified in the document.
- */
- public static String toEntryFormat(Date date) {
- SimpleDateFormat format= new SimpleDateFormat(ENTRY_TIMESTAMP_FORMAT,
- ENTRY_TIMESTAMP_LOCALE);
- format.setTimeZone(TimeZone.getTimeZone(ENTRY_TIMESTAMP_TIME_ZONE));
- return format.format(date);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFile.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFile.java
deleted file mode 100644
index 3e5508e41..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFile.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package org.eclipse.team.internal.ccvs.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.io.InputStream;
-import java.util.Date;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-
-/**
- * The CVS analog of a file. CVS files have access to synchronization information
- * that describes their association with the CVS repository. CVS files also provide
- * mechanisms for sending and receiving content.
- *
- * @see ICVSResource
- */
-public interface ICVSFile extends ICVSResource {
-
- // Constants used to indicate the type of updated response from the server
- public static final int UPDATED = 1;
- public static final int MERGED = 2;
- public static final int UPDATE_EXISTING = 3;
- public static final int CREATED = 4;
-
- /**
- * Answers the size of the file.
- */
- long getSize();
-
- /**
- * Gets an input stream for reading from the file.
- * It is the responsibility of the caller to close the stream when finished.
- */
- InputStream getContents() throws CVSException;
-
- /**
- * Set the contents of the file to the contents of the provided input stream
- *
- * @param responseType the type of reponse that was received from the server
- *
- * UPDATED - could be a new file or an existing file
- * MERGED - merging remote changes with local changes. Failure could result in loss of local changes
- * CREATED - contents for a file that doesn't exist locally
- * UPDATE_EXISTING - Replacing a local file with no local changes with remote changes.
- */
- public void setContents(InputStream stream, int responseType, boolean keepLocalHistory, IProgressMonitor monitor) throws CVSException;
-
- /**
- * Sets the file's read-only permission.
- */
- void setReadOnly(boolean readOnly) throws CVSException;
-
- /**
- * Answers if the file is read-only.
- */
- boolean isReadOnly() throws CVSException;
-
- /**
- * Move the resource to another location. Does overwrite without
- * promting.
- */
- void copyTo(String filename) throws CVSException;
-
- /**
- * Answers the current timestamp for this file with second precision.
- */
- Date getTimeStamp();
-
- /**
- * If the date is <code>null</code> then the current time is used.
- */
- void setTimeStamp(Date date) throws CVSException;
-
- /**
- * Answers <code>true</code> if the file has changed since it was last updated
- * from the repository, if the file does not exist, or is not managed. And <code>false</code>
- * if it has not changed.
- */
- boolean isModified() throws CVSException;
-
- /**
- * Answers the revision history for this file. This is similar to the
- * output of the log command.
- */
- public ILogEntry[] getLogEntries(IProgressMonitor monitor) throws TeamException;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFolder.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFolder.java
deleted file mode 100644
index 304bf34c0..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFolder.java
+++ /dev/null
@@ -1,154 +0,0 @@
-package org.eclipse.team.internal.ccvs.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-
-/**
- * The CVS analog of a directory. CVS folders have access to synchronization information
- * that describes the association between the folder and the remote repository.
- *
- * @see ICVSResource
- * @see ICVSFile
- */
-public interface ICVSFolder extends ICVSResource {
-
- public static final int FILE_MEMBERS = 1;
- public static final int FOLDER_MEMBERS = 2;
- public static final int IGNORED_MEMBERS = 4;
- public static final int UNMANAGED_MEMBERS = 8;
- public static final int MANAGED_MEMBERS = 16;
- public static final int ALL_MEMBERS = FILE_MEMBERS | FOLDER_MEMBERS | IGNORED_MEMBERS | UNMANAGED_MEMBERS | MANAGED_MEMBERS;
-
- /**
- * Answers and array of <code>ICVSResource</code> elements that are immediate
- * children of this remote resource, in no particular order. The server may be contacted.
- *
- * @param monitor a progress monitor to indicate the duration of the operation, or
- * <code>null</code> if progress reporting is not required.
- *
- * @return array of immediate children of this remote resource.
- */
- public ICVSResource[] fetchChildren(IProgressMonitor monitor) throws CVSException;
-
- /**
- * Answer the immediate children of the resource that are known
- * at the time of invocation. The server is never contacted.
- * The flags indicate the type of members to be included.
- * Here are the rules for specifying just one flag:
- *
- * a) FILE_MEMBERS and FOLDER_MEMBERS will return managed
- * and unmanaged resource of the corresponding type
- * b) IGNORED_MEMBERS, MANAGED_RESOURCES and UNMANAGED_RESOURCES
- * will return files and folders of the given type
- *
- * Note: Unmanaged resources are those tat are neither managed
- * or ignored.
- *
- * If all of the flags from either group a) or group b)
- * are not present, the same rule for default types applies.
- * For example,
- * - FILE_MEMBERS | FOLDER_MEMBERS will return all managed
- * and unmanaged files and folders.
- * - IGNORED_MEMBERS | UNMANAGED_MEMBERS will return all
- * ignored or unmanaged files and folders
- * If a flag from each group is present, the result is the
- * union of the sets. For example,
- * - FILE_MEMBERS | IGNORED_MEMBERS will return all
- * ignored files.
- */
- public ICVSResource[] members(int flags) throws CVSException;
-
- /**
- * Answers a child folder of this resource with the given name or <code>null</code> if
- * the given folder does not have a child with that name.
- */
- public ICVSFolder getFolder(String name) throws CVSException;
-
- /**
- * Answers a child file of this resource with the given name or <code>null</code> if
- * the given folder does not have a child with that name.
- */
- public ICVSFile getFile(String name) throws CVSException;
-
- /**
- * Return the child resource at the given path relative to
- * the receiver.
- */
- public ICVSResource getChild(String path) throws CVSException;
-
- /**
- * Create the folder if it did not exist before. Does only
- * work if the direct subfolder did exist.
- *
- * @throws CVSException if for some reason it was not possible to create the folder
- */
- public void mkdir() throws CVSException;
-
- /**
- * Answers the folder's synchronization information or <code>null</code> if the folder
- * is not a CVS folder.
- * <p>
- * To modify the folder sync info the caller must call <code>setFolderSyncInfo</code> with
- * new sync information.</p>
- */
- public FolderSyncInfo getFolderSyncInfo() throws CVSException;
-
- /**
- * Set the folder sync information for this folder. Setting the folder information
- * to <code>null</code> is not supported. The only mechanism for removing an existing
- * CVS folder is to delete the resource.
- */
- public void setFolderSyncInfo(FolderSyncInfo folderInfo) throws CVSException;
-
- /**
- * Accepts the visitor on all files and all subFolder in the folder. Files are
- * visited first, then all the folders..
- */
- public void acceptChildren(ICVSResourceVisitor visitor) throws CVSException;
-
- /**
- * Answers <code>true</code> if the folder has valid CVS synchronization information and
- * <code>false</code> otherwise.
- *
- * Note: This method does not throw an exception so this method does not differentiate
- * between a folder not be shared with CVS and a folder that is shared but whose sync info has
- * become corrupt. Use getFolderSyncInfo() to differentiate between these situations.
- *
- * Also Note: A folder that is a CVS folder may not exist in the workspace. The purpose of
- * such a folder is to act as a remotely existing folder that does not exist locally.
- * This is normally done in order to remember outgoing file deletions when a parent
- * folder is deleted.
- * Creating the folder will result in a folder that is mapped to a remote folder.
- */
- public boolean isCVSFolder() throws CVSException;
-
- /**
- * Runs the given action as an atomic cvs local workspace operation
- * rooted at this cvs folder.
- * <p>
- * After running a method that modifies cvs resource state in the
- * local workspace, registered listeners receive after-the-fact
- * notification in the form of a resource state change event. In addition,
- * any resource state information persistance is batched.
- * This method allows clients to call a number of
- * methods that modify resources and only have resource
- * change event notifications reported at the end of the entire
- * batch.
- * </p>
- * <p>
- * If this method is called in the dynamic scope of another such
- * call, this method simply runs the action.
- * </p>
- *
- * @param action the action to perform
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- * @exception CVSException if the operation failed.
- */
- public void run(ICVSRunnable job, IProgressMonitor monitor) throws CVSException;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSListener.java
deleted file mode 100644
index fa957c20d..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSListener.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.eclipse.team.internal.ccvs.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-
-public interface ICVSListener {
- public void repositoryAdded(ICVSRepositoryLocation root);
- public void repositoryRemoved(ICVSRepositoryLocation root);
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSProvider.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSProvider.java
deleted file mode 100644
index fa76e2d6b..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSProvider.java
+++ /dev/null
@@ -1,155 +0,0 @@
-package org.eclipse.team.internal.ccvs.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.io.PrintStream;
-import java.util.Properties;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-
-/**
- * The ICVSProvider interface provides access to CVS operations that create repository locations,
- * support retrieval of repository information and import and checkout CVS modules
- */
-public interface ICVSProvider {
-
- /**
- * Register to receive notification of repository creation and disposal
- */
- public void addRepositoryListener(ICVSListener listener);
-
- /**
- * De-register a listener
- */
- public void removeRepositoryListener(ICVSListener listener);
-
- /**
- * Checkout a CVS module.
- *
- * The provided project represents the target project. Any existing contents
- * may or may not get overwritten. If project is <code>null</code> then a project
- * will be created based on the provided sourceModule. If soureModule is null,
- * then the project name will be used as the module to
- * check out. If both are absent, an exception is thrown.
- *
- * Resources existing in the local file system at the target project location but now
- * known to the workbench will be overwritten.
- *
- * After the successful completion of this method, the project will exist
- * and be open.
- */
- public void checkout(ICVSRepositoryLocation repository, IProject project, String sourceModule, CVSTag tag, IProgressMonitor monitor) throws TeamException;
-
- /**
- * Checkout the remote resources into the local workspace. Each resource will
- * be checked out into the corresponding project. If the corresponding project is
- * null or if projects is null, the name of the remote resource is used as the name of the project.
- *
- * Resources existing in the local file system at the target project location but now
- * known to the workbench will be overwritten.
- */
- public void checkout(ICVSRemoteFolder[] resources, IProject[] projects, IProgressMonitor monitor) throws TeamException;
-
- /**
- * Create a remote module in the CVS repository and link the project directory to this remote module.
- * The contents of the project are not imported.
- *
- * Consideration: What if the project already exists?
- */
- public void createModule(ICVSRepositoryLocation location, IProject project, String moduleName, IProgressMonitor monitor) throws TeamException;
-
- /**
- * Create a repository instance from the given properties.
- * The supported properties are:
- *
- * connection The connection method to be used
- * user The username for the connection
- * password The password used for the connection (optional)
- * host The host where the repository resides
- * port The port to connect to (optional)
- * root The server directory where the repository is located
- *
- * The created instance is not known by the provider and it's user information is not cached.
- * The purpose of the created location is to allow connection validation before adding the
- * location to the provider.
- *
- * This method will throw a CVSException if the location for the given configuration already
- * exists.
- */
- public ICVSRepositoryLocation createRepository(Properties configuration) throws CVSException;
-
- /**
- * Add the repository to the receiver's list of known repositories. Doing this will enable
- * password caching accross platform invokations.
- */
- public void addRepository(ICVSRepositoryLocation repository) throws CVSException;
-
- /**
- * Dispose of the repository location
- *
- * Removes any cached information about the repository such as a remembered password.
- */
- public void disposeRepository(ICVSRepositoryLocation repository) throws CVSException;
-
- /**
- * Answer whether the provided repository location is known by the provider or not.
- * The location string corresponds to the Strin returned by ICVSRepositoryLocation#getLocation()
- */
- public boolean isKnownRepository(String location);
-
- /**
- * Answer the list of directories that a checkout of the given resources would expand to.
- * In other words, the returned strings represent the root paths that the given resources would
- * be loaded into.
- */
- public String[] getExpansions(ICVSRemoteFolder[] resources, IProgressMonitor monitor) throws CVSException;
-
- /**
- * Return a list of the know repository locations
- */
- public ICVSRepositoryLocation[] getKnownRepositories();
-
- /**
- * Get the repository instance which matches the given String. The format of the String is
- * the same as that returned by ICVSRepositoryLocation#getLocation().
- * The format is:
- *
- * connection:user[:password]@host[#port]:root
- *
- * where [] indicates optional and the identier meanings are:
- *
- * connection The connection method to be used
- * user The username for the connection
- * password The password used for the connection (optional)
- * host The host where the repository resides
- * port The port to connect to (optional)
- * root The server directory where the repository is located
- *
- * It is expected that the instance requested by using this method exists.
- * If the repository location does not exist, it will be automatically created
- * and cached with the provider.
- *
- * WARNING: Providing the password as part of the String will result in the password being part
- * of the location permanently. This means that it cannot be modified by the authenticator.
- */
- public ICVSRepositoryLocation getRepository(String location) throws CVSException;
-
- /**
- * Set the sharing for a project to enable it to be used with the CVSTeamProvider.
- * This method only sets the folder sync info for the project folder and the info
- * is only set to the provided parameters if there is no sync info already.
- */
- public void setSharing(IProject project, FolderSyncInfo info, IProgressMonitor monitor) throws TeamException;
-
- /**
- * Get the names of the registered connection methods.
- */
- public String[] getSupportedConnectionMethods();
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteFile.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteFile.java
deleted file mode 100644
index ffe7fcab7..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteFile.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package org.eclipse.team.internal.ccvs.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.io.InputStream;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-
- /**
- * This interface represents a file in a repository.
- * Instances of this interface can be used to fetch the contents
- * of the remote file.
- *
- * In the future, additional information should be available (tags, revisions, etc.)
- *
- * Clients are not expected to implement this interface.
- */
-public interface ICVSRemoteFile extends ICVSRemoteResource, ICVSFile {
-
- /**
- * Get the log entry for the revision the remote file represents.
- * This method will return null until after the getContents(IProgressMonitor)
- * method is called (i.e. the call to getContents also fetches the entry.
- */
- public ILogEntry getLogEntry(IProgressMonitor monitor) throws TeamException;
-
- /**
- * Get all the log entries of the remote file
- */
- public ILogEntry[] getLogEntries(IProgressMonitor monitor) throws TeamException;
-
- /**
- * Get the revision of the remote file (e.g. 1.1)
- *
- * The revision depends on any tagging associated with the remote parent used
- * to access the file.
- */
- public String getRevision() throws TeamException;
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteFolder.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteFolder.java
deleted file mode 100644
index 3aa5e9378..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteFolder.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.eclipse.team.internal.ccvs.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-
- /**
- * This interface represents a remote folder in a repository. It provides
- * access to the members (remote files and folders) of a remote folder
- *
- * Clients are not expected to implement this interface.
- */
-public interface ICVSRemoteFolder extends ICVSRemoteResource, ICVSFolder {
-
- /**
- * Allows a client to change the context of a remote folder handle. For
- * example, if a remote folder was created with the HEAD context (e.g. can
- * be used to browse the main branch) use this method to change the
- * context to another branch tag or to a version tag.
- */
- public void setTag(CVSTag tagName);
-
- /**
- * Return the context of this handle. The returned tag can be a branch or
- * version tag.
- */
- public CVSTag getTag();
-
- /**
- * Return the local options that are used to determine how memebers are retrieved.
- *
- * Interesting options are:
- * Checkout.ALIAS
- * Command.DO_NOT_RECURSE
- */
- public LocalOption[] getLocalOptions();
-
- /**
- * Indicates whether the remote folder can be expanded.
- *
- * This is a temporary (hopefully) means of indicating certain types of folders
- * (i.e. module definitions) that are not expandable due to lack of mdoule expansion.
- * They can still be checked out.
- */
- public boolean isExpandable();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteResource.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteResource.java
deleted file mode 100644
index 0351337b9..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteResource.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.eclipse.team.internal.ccvs.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteResource;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-
-/**
- * The interface represents a resource that exists in a CVS repository.
- * It purpose is to provide information about the remote resource from
- * the repository.
- *
- * Clients are not expected to implement this interface.
- */
-public interface ICVSRemoteResource extends IRemoteResource, ICVSResource {
-
- /**
- * Return the repository
- */
- public ICVSRepositoryLocation getRepository();
-
- /**
- * Returns the parent of this remote resource or <code>null</code> if the
- * remote resource does not have a parent.
- */
- public ICVSRemoteResource getRemoteParent();
-
- /**
- * Does the remote resource represented by this handle exist on the server. This
- * method may contact the server and be long running.
- */
- public boolean exists(IProgressMonitor monitor) throws TeamException;
-
- /**
- * Answers the repository relative path of this remote folder.
- */
- public String getRepositoryRelativePath();
-
- /**
- * Compares two objects for equality; for cvs remote resources, equality is defined in
- * terms of their handles: same cvs resource type, equal relative paths, and
- * for files, identical revision numbers. Remote resources are not equal to objects other
- * than cvs remote resources.
- *
- * @param other the other object
- * @return an indication of whether the objects are equals
- */
- public boolean equals(Object other);
-
- /**
- * Tag the remote resources referenced by the receiver (using rtag)
- */
- public IStatus tag(CVSTag tag, LocalOption[] localOptions, IProgressMonitor monitor) throws CVSException;
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRepositoryLocation.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRepositoryLocation.java
deleted file mode 100644
index 54eee64e1..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRepositoryLocation.java
+++ /dev/null
@@ -1,102 +0,0 @@
-package org.eclipse.team.internal.ccvs.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.sync.IRemoteResource;
-
-/**
- * This interface provides access to the specific portions of
- * the repository location string for use by connection methods
- * and the user authenticator.
- *
- * It is not intended to implemented by clients.
- *
- * @see IUserAuthenticator
- * @see IConnectionMethod
- */
-public interface ICVSRepositoryLocation extends IAdaptable {
-
- /**
- * port value which indicates to a connection method to use the default port
- */
- public static int USE_DEFAULT_PORT = 0;
-
- /**
- * Return the connection method for making the connection
- */
- public IConnectionMethod getMethod();
-
- /**
- * Returns the host where the repository is located
- */
- public String getHost();
-
- /**
- * Returns the port to connect to or USE_DEFAULT_PORT if
- * the connection method is to use its default port.
- */
- public int getPort();
-
- /**
- * Returns the root directory of the repository.
- */
- public String getRootDirectory();
-
- /**
- * Returns the string representing the receiver. This string
- * should contain enough information to recreate the receiver.
- */
- public String getLocation();
-
- /**
- * Returns the immediate children of this location. If tag is <code>null</code> the
- * HEAD branch is assumed.
- *
- * If modules is true, then the module definitions from the CVSROOT/modules file are returned.
- * Otherwise, the root level projects are returned.
- *
- * @param tag the context in which to return the members (e.g. branch or version).
- */
- public ICVSRemoteResource[] members(CVSTag tag, boolean modules, IProgressMonitor progress) throws CVSException;
-
- /**
- * Returns a handle to a remote folder at this repository location using the given tag as the
- * context. The corresponding remote folder may not exist.
- */
- public ICVSRemoteFolder getRemoteFolder(String remotePath, CVSTag tag);
-
- /**
- * Return the conection timeout value in milliseconds.
- * A value of 0 means there is no timeout value.
- */
- public int getTimeout();
-
- /**
- * Return the username
- */
- public String getUsername();
-
- /**
- * Returns the user information for the location.
- */
- public IUserInfo getUserInfo(boolean allowModificationOfUsername);
-
- /**
- * Flush any cahced user information related to the repository location
- */
- public void flushUserInfo() throws CVSException;
-
- /**
- * Validate that the receiver can be used to connect to a repository.
- * An exception is thrown if connection fails
- *
- * @param monitor the progress monitor used while validating
- */
- public void validateConnection(IProgressMonitor monitor) throws CVSException;
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSResource.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSResource.java
deleted file mode 100644
index 1e79b6be6..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSResource.java
+++ /dev/null
@@ -1,138 +0,0 @@
-package org.eclipse.team.internal.ccvs.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.syncinfo.*;
-
-/**
- * The CVS analog of file system files and directories. These are handles to
- * state maintained by a CVS client. That is, the CVS resource does not
- * actually contain data but rather represents CVS state and behavior. You are
- * free to manipulate handles for CVS resources that do not exist but be aware
- * that some methods require that an actual resource be available.
- * <p>
- * The CVS client has been designed to work on these handles uniquely. As such, the
- * handle could be to a remote resource or a local resource and the client could
- * perform CVS operations ignoring the actual location of the resources.</p>
- *
- * @see ICVSFolder
- * @see ICVSFile
- */
-public interface ICVSResource {
-
- /**
- * Answers the name of the resource.
- *
- * @return the name of the resource this handle represents. It can never
- * be <code>null</code>.
- */
- public String getName();
-
- /**
- * Answers if this resource has CVS synchronization information associated
- * with it.
- *
- * @return <code>true</code> if the resource is
- */
- public boolean isManaged() throws CVSException;
-
- /**
- * Unmanage the given resource by purging any CVS synchronization associated with the
- * resource. The only way a resource can become managed is by running the
- * appropriate CVS commands (e.g. add/commit/update).
- */
- public void unmanage(IProgressMonitor monitor) throws CVSException;
-
- /**
- * Answer whether the resource could be ignored because it is in the one of the
- * ignore lists maintained by CVS. Even if a resource is ignored, it can still be
- * added to a repository, at which time it should never be ignored by the CVS
- * client.
- *
- * @return <code>true</code> if this resource is listed in one of the ignore
- * files maintained by CVS and <code>false</code> otherwise.
- */
- public boolean isIgnored() throws CVSException;
-
- /**
- * Add the following file to the parent's ignore list
- */
- public void setIgnored() throws CVSException;
-
- /**
- * Add the following pattern to the file's parent ignore list
- */
- public void setIgnoredAs(String pattern) throws CVSException;
-
- /**
- * Answers if the handle is a file or a folder handle.
- *
- * @return <code>true</code> if this is a folder handle and <code>false</code> if
- * it is a file handle.
- */
- public boolean isFolder();
-
- /**
- * Answers if the resource identified by this handle exists.
- *
- * @return <code>true</code> if the resource represented by this handle
- * exists and <code>false</code> false otherwise.
- */
- public boolean exists() throws CVSException;
-
- /**
- * Answers the local relative path from the given ancestor to the receiver.
- *
- * @return the ancestor relative path for this resource.
- */
- public String getRelativePath(ICVSFolder ancestor) throws CVSException;
-
- /**
- * Get the remote location of a resource.
- *
- * @return the remote location.
- */
- public String getRemoteLocation(ICVSFolder stopSearching) throws CVSException;
-
- /**
- * Answers the workspace synchronization information for this resource. This would
- * typically include information from the <b>Entries</b> file that is used to track
- * the base revisions of local CVS resources.
- *
- * @return the synchronization information for this resource, or <code>null</code>
- * if the resource does not have synchronization information available.
- */
- public ResourceSyncInfo getSyncInfo() throws CVSException;
-
- /**
- * Called to set the workspace synchronization information for a resource. To
- * clear sync information call <code>unmanage</code>. The sync info will
- * become the persisted between workbench sessions.
- *
- * @param info the resource synchronization to associate with this resource.
- */
- public void setSyncInfo(ResourceSyncInfo info) throws CVSException;
-
- /**
- * Deletes the resource represented by the handle.
- */
- public void delete() throws CVSException;
-
- /**
- * Give the folder that contains this resource. If the resource is not managed
- * then the result of the operation is not specified.
- *
- * @return a handle to the parent of this resource.
- */
- public ICVSFolder getParent();
-
- /**
- * Accept a vistor to this resource.
- */
- public void accept(ICVSResourceVisitor visitor) throws CVSException;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSResourceVisitor.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSResourceVisitor.java
deleted file mode 100644
index 28eaf953f..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSResourceVisitor.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.eclipse.team.internal.ccvs.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-
-
-/**
- * Interface for an visitor of the IManagedResources.
- */
-public interface ICVSResourceVisitor {
- public void visitFile(ICVSFile file) throws CVSException;
- public void visitFolder(ICVSFolder folder) throws CVSException;
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRunnable.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRunnable.java
deleted file mode 100644
index c102b4047..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRunnable.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.eclipse.team.internal.ccvs.core;
-
-/*
- * (c) Copyright IBM Corp. 2001, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * A runnable which executes as a batch operation within a specific cvs local
- * workspace.
- * The <code>ICVSRunnable</code> interface should be implemented by any class whose
- * instances are intended to be run by <code>IWorkspace.run</code>.
- * <p>
- * Clients may implement this interface.
- * </p>
- * @see
- */
-public interface ICVSRunnable {
- /**
- * Runs the operation reporting progress to and accepting
- * cancellation requests from the given progress monitor.
- * <p>
- * Implementors of this method should check the progress monitor
- * for cancellation when it is safe and appropriate to do so. The cancellation
- * request should be propagated to the caller by throwing
- * <code>OperationCanceledException</code>.
- * </p>
- *
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- * @exception CoreException if this operation fails.
- */
- public void run(IProgressMonitor monitor) throws CVSException;
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IConnectionMethod.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IConnectionMethod.java
deleted file mode 100644
index 98c360546..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IConnectionMethod.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.eclipse.team.internal.ccvs.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-/**
- * Implementators of this class can act as factories for creating connections to a CVS server
- * with the desired custom communication protocol. Providers of CVS connection methods must implement
- * this interface and register the implementation with the extension point:
- *
- * org.eclipse.team.cvs.core.connectionmethods
- *
- * The <code>createConnection()</code> method will be invoked by the CVS client when the user
- * is attempting to make a connection to the server using the connection name which matches
- * the <code>String</code> returned by <code>getName()</code> (e.g. "pserver", "ext", etc.).
- */
-public interface IConnectionMethod {
-
- /**
- * Returns the name of this connection method (e.g."local", "ext").
- */
- public String getName();
-
- /**
- * Creates a new server connection using the given repository root
- * (which includes the user name) and the given password.
- */
- public IServerConnection createConnection(ICVSRepositoryLocation location, String password);
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ILogEntry.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ILogEntry.java
deleted file mode 100644
index 2b5b5aa40..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ILogEntry.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.eclipse.team.internal.ccvs.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.Date;
-
-import org.eclipse.core.runtime.IAdaptable;
-
-/**
- * Instances of ILogEntry represent an entry for a CVS file that results
- * from the cvs log command.
- *
- * Clients are not expected to implement this interface
- */
-public interface ILogEntry extends IAdaptable {
-
- /**
- * Get the revision for the entry
- */
- public String getRevision();
-
- /**
- * Get the author of the revision
- */
- public String getAuthor();
-
- /**
- * Get the date the revision was committed
- */
- public Date getDate();
-
- /**
- * Get the comment for the revision
- */
- public String getComment();
-
- /**
- * Get the state
- */
- public String getState();
-
- /**
- * Get the tags associated with the revision
- */
- public CVSTag[] getTags();
-
- /**
- * Get the remote file for this entry
- */
- public ICVSRemoteFile getRemoteFile();
-
- /**
- * Does the log entry represent a deletion (stat = "dead")
- */
- public boolean isDeletion();
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IResourceStateChangeListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IResourceStateChangeListener.java
deleted file mode 100644
index a829c543a..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IResourceStateChangeListener.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.eclipse.team.internal.ccvs.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.EventListener;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-
-/**
- * A resource state change listener is notified of changes to resources
- * regarding their team state.
- * <p>
- * Clients may implement this interface.
- * </p>
- * @see ITeamManager#addResourceStateChangeListener(IResourceStateChangeListener)
- */
-public interface IResourceStateChangeListener extends EventListener{
-
- /**
- * Notifies this listener that some resource state changes have already
- * happened. For example, a resource's team state has changed from checked-in
- * to checked-out.
- * <p>
- * Note: This method is called by team core; it is not intended to be called
- * directly by clients.
- * </p>
- *
- * @param resources that have changed state
- *
- * [Note: The changed state event is purposely vague. For now it is only
- * a hint to listeners that they should query the provider to determine the
- * resources new team state.]
- */
- public void resourceStateChanged(IResource[] changedResources);
-
- /**
- * Notifies this listener that the project has just been configured
- * to be a CVS project (i.e has the CVS nature).
- * <p>
- * Note: This method is called by team core; it is not intended to be called
- * directly by clients.
- * </p>
- *
- * @param project The project that has just been configured
- */
- public void projectConfigured(IProject project);
-
- /**
- * Notifies this listener that the project has just been deconfigured
- * and no longer has the CVS nature.
- * <p>
- * Note: This method is called by team core; it is not intended to be called
- * directly by clients.
- * </p>
- *
- * @param project The project that has just been configured
- */
- public void projectDeconfigured(IProject project);
-
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IServerConnection.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IServerConnection.java
deleted file mode 100644
index 310f64180..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IServerConnection.java
+++ /dev/null
@@ -1 +0,0 @@
-package org.eclipse.team.internal.ccvs.core; /* * (c) Copyright IBM Corp. 2000, 2002. * All Rights Reserved. */ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.team.internal.ccvs.core.connection.CVSAuthenticationException; /** * CVS supports different connection methods for communicating between a client and the server. * Furthermore, custom connection methods can be added. Connection methods are added * to the CVS client as an IConnectionMethod, which can be used to create connections of * type IServerConnection. * * @see IConnectionMethod */ public interface IServerConnection { /** * Open a connection to the CVS server. * * Throw CVSAuthenticationException if the username or password is invalid. * Throw IOExceptions for other failures. */ public void open(IProgressMonitor monitor) throws IOException, CVSAuthenticationException; /** * Close the connection * * Throw IOException on failures */ public void close() throws IOException; /** * Get the input stream to receive responses from the server */ public InputStream getInputStream(); /** * Get the output stream to send requests to the server */ public OutputStream getOutputStream(); } \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IUserAuthenticator.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IUserAuthenticator.java
deleted file mode 100644
index 6eb4b8475..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IUserAuthenticator.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.eclipse.team.internal.ccvs.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-
-
-/**
- * IUserAuthenticators are used to ensure that the user
- * is validated for access to a given repository. The
- * user is prompted for a username and password as
- * appropriate for the given repository type.
- */
-public interface IUserAuthenticator {
- /**
- * Authenticates the user for access to a given repository.
- * The obtained values for user name and password will be placed
- * into the supplied user info object. Implementors are allowed to
- * save user names and passwords. The user should be prompted for
- * user name and password if there is no saved one, or if <code>retry</code>
- * is <code>true</code>.
- *
- * @param location The repository location to authenticate the user for.
- * @param info The object to place user validation information into.
- * @param retry <code>true</code> if a previous attempt to log in failed.
- * @param message An optional message to display if, e.g., previous authentication failed.
- * @return true if the validation was successful, and false otherwise.
- */
- public void promptForUserInfo(ICVSRepositoryLocation location, IUserInfo userInfo, String message) throws CVSException;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IUserInfo.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IUserInfo.java
deleted file mode 100644
index cfe65d0aa..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IUserInfo.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.eclipse.team.internal.ccvs.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-/**
- * Instances of this class represent a username password pair.
- * Both values can be set and the username can be retrieved.
- * However, it is possible that the username is not mutable.
- * Users must check before trying to set the username.
- *
- * Clients are not expected to implement this interface
- */
-public interface IUserInfo {
- /**
- * Get the username for this user.
- */
- public String getUsername();
- /**
- * Return true if the username is mutable. If not, setUsername should not be called.
- */
- public boolean isUsernameMutable();
- /**
- * Sets the password for this user.
- */
- public void setPassword(String password);
- /**
- * Sets the username for this user. This should not be called if
- * isUsernameMutable() returns false.
- */
- public void setUsername(String username);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/Policy.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/Policy.java
deleted file mode 100644
index 32efb8340..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/Policy.java
+++ /dev/null
@@ -1,122 +0,0 @@
-package org.eclipse.team.internal.ccvs.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.team.internal.core.InfiniteSubProgressMonitor;
-
-public class Policy {
- protected static ResourceBundle bundle = null;
-
- //debug constants
- public static boolean DEBUG_METAFILE_CHANGES = false;
- public static boolean DEBUG_CVS_PROTOCOL = false;
- public static boolean DEBUG_THREADING = false;
-
- static {
- //init debug options
- if (CVSProviderPlugin.getPlugin().isDebugging()) {
- DEBUG_METAFILE_CHANGES = "true".equalsIgnoreCase(Platform.getDebugOption(CVSProviderPlugin.ID + "/metafiles"));//$NON-NLS-1$ //$NON-NLS-2$
- DEBUG_CVS_PROTOCOL = "true".equalsIgnoreCase(Platform.getDebugOption(CVSProviderPlugin.ID + "/cvsprotocol"));//$NON-NLS-1$ //$NON-NLS-2$
- DEBUG_THREADING = "true".equalsIgnoreCase(Platform.getDebugOption(CVSProviderPlugin.ID + "/threading"));//$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Creates a NLS catalog for the given locale.
- */
- 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.
- */
- 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.
- */
- public static String bind(String id, String binding1, String binding2) {
- return bind(id, new String[] { binding1, binding2 });
- }
-
- /**
- * Gets a string from the resource bundle. We don't want to crash because of a missing String.
- * Returns the key if not found.
- */
- 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.
- */
- 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$
- }
- }
-
- /**
- * Progress monitor helpers
- */
- public static void checkCanceled(IProgressMonitor monitor) {
- if (monitor.isCanceled())
- throw new OperationCanceledException();
- }
- 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 subMonitorFor(IProgressMonitor monitor, int ticks, int style) {
- if (monitor == null)
- return new NullProgressMonitor();
- if (monitor instanceof NullProgressMonitor)
- return monitor;
- return new SubProgressMonitor(monitor, ticks, style);
- }
-
- public static IProgressMonitor infiniteSubMonitorFor(IProgressMonitor monitor, int ticks) {
- if (monitor == null)
- return new NullProgressMonitor();
- if (monitor instanceof NullProgressMonitor)
- return monitor;
- return new InfiniteSubProgressMonitor(monitor, ticks);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractMessageCommand.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractMessageCommand.java
deleted file mode 100644
index a517eb508..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractMessageCommand.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-
-/**
- * Superclass for commands that do not change the structure on
- * the local working copy (it can change the content of the files).<br>
- * Most of the subclasses are asking the server for response in
- * message format (log, status)
- */
-abstract class AbstractMessageCommand extends Command {
-
- protected void sendLocalResourceState(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor)
- throws CVSException {
-
- // Send all folders that are already managed to the server
- new FileStructureVisitor(session, false, false, monitor).visit(session, resources);
- }
-
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractStructureVisitor.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractStructureVisitor.java
deleted file mode 100644
index a46e08aef..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractStructureVisitor.java
+++ /dev/null
@@ -1,223 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResourceVisitor;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.resources.CVSEntryLineTag;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-/**
- * An ICVSResourceVisitor that is superclass to all ICVSResourceVisitor's used
- * by Command and it's subclasses.
- * Provides helper methods to send files and folders with modifications
- * to the server.
- */
-abstract class AbstractStructureVisitor implements ICVSResourceVisitor {
-
- protected Session session;
- private ICVSFolder lastFolderSent;
- protected IProgressMonitor monitor;
- protected boolean sendQuestionable;
- protected boolean sendModifiedContents;
-
- public AbstractStructureVisitor(Session session, boolean sendQuestionable, boolean sendModifiedContents, IProgressMonitor monitor) {
- this.session = session;
- this.sendQuestionable = sendQuestionable;
- this.sendModifiedContents = sendModifiedContents;
- this.monitor = Policy.infiniteSubMonitorFor(monitor, 256);
- }
-
- /**
- * Helper method to indicate if a directory has already been sent to the server
- */
- protected boolean isLastSent(ICVSFolder folder) {
- return folder.equals(lastFolderSent);
- }
-
- /**
- * Helper method to record if a directory has already been sent to the server
- */
- protected void recordLastSent(ICVSFolder folder) {
- lastFolderSent = folder;
- }
-
- /**
- * Helper which indicates if a folder is an orphaned subtree.
- * That is, a directory which contains a CVS subdirectory but is
- * not managed by its parent. The root directory of the session
- * is not considered orphaned even if it is not managed by its
- * parent.
- */
- protected boolean isOrphanedSubtree(ICVSFolder mFolder) throws CVSException {
- return mFolder.isCVSFolder() && ! mFolder.isManaged() && ! mFolder.equals(session.getLocalRoot()) && mFolder.getParent().isCVSFolder();
- }
-
- /**
- * Send the folder relative to the root to the server. Send all
- * appropiate modifier like Sticky, Questionable, Static-directory.
- * <br>
- * Folders will only be sent once.
- */
- protected void sendFolder(ICVSFolder mFolder) throws CVSException {
-
- Policy.checkCanceled(monitor);
-
- boolean exists = mFolder.exists();
- boolean isCVSFolder = mFolder.isCVSFolder();
-
- // We are only interested in folders that exist or are CVS folders
- // A folder could be a non-existant CVS folder if it is a holder for outgoing file deletions
- if ( ! exists && ! isCVSFolder) return;
-
- // Do not send the same folder twice
- if (isLastSent(mFolder)) return;
-
- String localPath = mFolder.getRelativePath(session.getLocalRoot());
-
- monitor.subTask(Policy.bind("AbstractStructureVisitor.sendingFolder", localPath)); //$NON-NLS-1$
-
- // Deal with questionable directories
- boolean isQuestionable = exists && (! isCVSFolder || isOrphanedSubtree(mFolder));
- if (isQuestionable) {
- if (sendQuestionable) {
- // We need to make sure the parent folder was sent
- sendFolder(mFolder.getParent());
- session.sendQuestionable(mFolder);
- }
- return;
- }
-
- // Send the directory to the server
- String remotePath = mFolder.getRemoteLocation(session.getLocalRoot());
- if (remotePath == null) {
- throw new CVSException(Policy.bind("AbstractStructureVisitor.noRemote")); //$NON-NLS-1$
- }
- session.sendDirectory(localPath, remotePath);
-
- // Send any directory properties to the server
- FolderSyncInfo info = mFolder.getFolderSyncInfo();
- if (info != null) {
-
- if (info.getIsStatic()) {
- session.sendStaticDirectory();
- }
-
- CVSEntryLineTag tag = info.getTag();
-
- if (tag != null && tag.getType() != tag.HEAD) {
- session.sendSticky(tag.toEntryLineFormat(false));
- }
- }
-
- // Record that we sent this folder
- recordLastSent(mFolder);
-
- monitor.worked(1);
- }
-
- /**
- * Send the information about the file to the server.
- *
- * If the file is modified, its contents are sent as well.
- */
- protected void sendFile(ICVSFile mFile) throws CVSException {
-
- Policy.checkCanceled(monitor);
-
- // Send the file's entry line to the server
- ResourceSyncInfo info = null;
- boolean isManaged = mFile.isManaged();
- if (isManaged) {
- info = mFile.getSyncInfo();
- session.sendEntry(info.getServerEntryLine(mFile.getTimeStamp()));
- } else {
- // If the file is not managed, send a questionable to the server if the file exists locally
- // A unmanaged, locally non-existant file results from the explicit use of the file name as a command argument
- if (sendQuestionable) {
- if (mFile.exists()) {
- session.sendQuestionable(mFile);
- }
- return;
- }
- }
-
- // If the file exists, send the appropriate indication to the server
- if (mFile.exists()) {
- if (mFile.isModified()) {
- boolean binary = info != null && info.getKeywordMode().isBinary();
- if (sendModifiedContents) {
- session.sendModified(mFile, binary, monitor);
- } else {
- session.sendIsModified(mFile, binary, monitor);
- }
- } else {
- session.sendUnchanged(mFile);
- }
- }
- }
-
- /**
- * This method is used to visit a set of ICVSResources. Using it ensures
- * that a common parent between the set of resources is only sent once
- */
- public void visit(Session session, ICVSResource[] resources) throws CVSException {
-
- // Sort the resources to avoid sending the same directory multiple times
- List resourceList = new ArrayList(resources.length);
- resourceList.addAll(Arrays.asList(resources));
- final ICVSFolder localRoot = session.getLocalRoot();
- Collections.sort(resourceList, new Comparator() {
- public int compare(Object object1, Object object2) {
- ICVSResource resource1 = (ICVSResource)object1;
- ICVSResource resource2 = (ICVSResource)object2;
- try {
- String path1 = resource1.getParent().getRelativePath(localRoot);
- String path2 = resource2.getParent().getRelativePath(localRoot);
- int pathCompare = path1.compareTo(path2);
- if (pathCompare == 0) {
- if (resource1.isFolder() == resource2.isFolder()) {
- return resource1.getName().compareTo(resource2.getName());
- } else if (resource1.isFolder()) {
- return 1;
- } else {
- return -1;
- }
- } else {
- return pathCompare;
- }
- } catch (CVSException e) {
- return resource1.getName().compareTo(resource2.getName());
- }
- }
- });
-
- // Visit all the resources
- session.setSendFileTitleKey(getSendFileTitleKey());
- for (int i = 0; i < resourceList.size(); i++) {
- ((ICVSResource)resourceList.get(i)).accept(this);
- }
-
- monitor.done();
- }
-
- protected String getSendFileTitleKey() {
- return "AbstractStructureVisitor.sendingFile"; //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Add.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Add.java
deleted file mode 100644
index 9c4d22554..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Add.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Assert;
-
-public class Add extends Command {
- /*** Local options: specific to add ***/
-
- protected Add() { }
- protected String getRequestId() {
- return "add"; //$NON-NLS-1$
- }
-
- protected void sendLocalResourceState(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor)
- throws CVSException {
-
- // Check that all the arguments can give you an
- // repo that you will need while traversing the
- // file-structure
- for (int i = 0; i < resources.length; i++) {
- Assert.isNotNull(resources[i].getRemoteLocation(session.getLocalRoot()));
- }
-
- // Get a vistor and use it on every resource we should
- // work on
- AddStructureVisitor visitor = new AddStructureVisitor(session, monitor);
- visitor.visit(session, resources);
- }
-
- /**
- * If the add succeeded then folders have to be initialized with the
- * sync info
- */
- protected void commandFinished(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor,
- boolean succeeded) throws CVSException {
-
- ICVSFolder mFolder;
- ICVSResource[] mWorkResources;
-
- if (! succeeded) {
- return;
- }
-
- for (int i = 0; i < resources.length; i++) {
- if (resources[i].isFolder()) {
- mFolder = (ICVSFolder) resources[i];
- FolderSyncInfo info = mFolder.getParent().getFolderSyncInfo();
- if (info == null)
- throw new CVSException(new CVSStatus(CVSStatus.ERROR, Policy.bind("Add.invalidParent", mFolder.getRelativePath(session.getLocalRoot())))); //$NON-NLS-1$
- String repository = info.getRepository() + "/" + mFolder.getName(); //$NON-NLS-1$
- mFolder.setFolderSyncInfo(new FolderSyncInfo(repository, info.getRoot(), info.getTag(), info.getIsStatic()));
- }
- }
- }
- /**
- * Since the arguments of the add are probably not managed, find a parent of at least
- * one argument that is a CVS folder.
- *
- * @see Command#getOpenSession(ICVSResource[])
- */
- protected Session getOpenSession(ICVSResource[] arguments) throws CVSException {
- for (int i = 0; i < arguments.length; i++) {
- ICVSResource cvsResource = arguments[i];
- if (cvsResource.isManaged()) {
- return super.getOpenSession(new ICVSResource[] { cvsResource });
- } else if (cvsResource.getParent().isCVSFolder()) {
- return super.getOpenSession(new ICVSResource[] { cvsResource.getParent() });
- }
- }
- // If no approrpiate resource was found, invoke the overriden method and let it fail.
- return super.getOpenSession(arguments);
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AddStructureVisitor.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AddStructureVisitor.java
deleted file mode 100644
index b517e58a1..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AddStructureVisitor.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.util.Assert;
-
-/**
- * This visitor is used by the Add command to ensure that the parent
- * folder is sent along with the added resource.
- */
-class AddStructureVisitor extends AbstractStructureVisitor {
- private boolean forceSend = false;
- private Set visitedFolders = new HashSet();
- private ICVSFolder lastVisitedFolder;
-
- public AddStructureVisitor(Session session, IProgressMonitor monitor) {
- super(session, false, true, monitor);
- }
-
- /**
- * @see ICVSResourceVisitor#visitFile(IManagedFile)
- */
- public void visitFile(ICVSFile mFile) throws CVSException {
-
- // Send the parent folder
- sendFolder(mFile.getParent());
-
- // Sends the Is-modified request if it is supported, otherwise
- // the file contents are sent as binary. The server does not
- // need the contents at this stage so this should not be a problem.
- session.sendIsModified(mFile, true, monitor);
-
- }
-
- /**
- * @see ICVSResourceVisitor#visitFolder(ICVSFolder)
- */
- public void visitFolder(ICVSFolder mFolder) throws CVSException {
-
- Assert.isNotNull(mFolder);
-
- // Send the parent folder
- sendFolder(mFolder.getParent());
-
- // Send the directory
- String localPath = mFolder.getRelativePath(session.getLocalRoot());
- String remotePath = mFolder.getRemoteLocation(session.getLocalRoot());
- session.sendDirectory(localPath, remotePath);
-
- // Record that we sent this folder
- recordLastSent(mFolder);
- }
-
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Admin.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Admin.java
deleted file mode 100644
index e985839d4..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Admin.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-public class Admin extends AbstractMessageCommand {
- /*** Local options: specific to admin ***/
-
- protected Admin() { }
- protected String getRequestId() {
- return "admin"; //$NON-NLS-1$
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CheckedInHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CheckedInHandler.java
deleted file mode 100644
index a70c78499..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CheckedInHandler.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-/**
- * Handles a "Checked-in" response from the CVS server.
- * <p>
- * Suppose as a result of performing a command the CVS server responds
- * as follows:<br>
- * <pre>
- * [...]
- * Checked-in ??? \n
- * [...]
- * </pre>
- * Then
- * </p>
- */
-class CheckedInHandler extends ResponseHandler {
- public String getResponseID() {
- return "Checked-in"; //$NON-NLS-1$
- }
-
- public void handle(Session session, String localDir,
- IProgressMonitor monitor) throws CVSException {
- // read additional data for the response
- String repositoryFile = session.readLine();
- String entryLine = session.readLine();
-
- // clear file update modifiers
- session.setModTime(null);
-
- // Get the local file
- String fileName = repositoryFile.substring(repositoryFile.lastIndexOf("/") + 1); //$NON-NLS-1$
- ICVSFolder mParent = session.getLocalRoot().getFolder(localDir);
- ICVSFile mFile = mParent.getFile(fileName);
-
- ResourceSyncInfo newInfo = mFile.getSyncInfo();
-
- if (newInfo==null) {
- // cvs add of a file
- newInfo = new ResourceSyncInfo(entryLine, null, null);
- } else {
- // commit of a changed file
- ResourceSyncInfo fileInfo = mFile.getSyncInfo();
- newInfo = new ResourceSyncInfo(entryLine, fileInfo.getPermissions(), mFile.getTimeStamp());
- }
-
- mFile.setSyncInfo(newInfo);
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Checkout.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Checkout.java
deleted file mode 100644
index 57cb39150..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Checkout.java
+++ /dev/null
@@ -1,180 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.util.Assert;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteModule;
-import org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.Option;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ModuleDefinitionsListener;
-import org.eclipse.team.internal.ccvs.core.client.listeners.UpdateListener;
-import org.eclipse.team.internal.ccvs.core.connection.CVSServerException;
-
-public class Checkout extends Command {
- /*** Local options: specific to checkout ***/
- public static final LocalOption DO_NOT_SHORTEN = new LocalOption("-N"); //$NON-NLS-1$
- public static final LocalOption FETCH_MODULE_ALIASES = new LocalOption("-c"); //$NON-NLS-1$
- public static LocalOption makeDirectoryNameOption(String moduleName) {
- return new LocalOption("-d", moduleName); //$NON-NLS-1$
- }
-
- /*** Default command output listener ***/
- private static final ICommandOutputListener DEFAULT_OUTPUT_LISTENER = new UpdateListener(null);
-
- /** Command options found in the CVSROOT/modules file */
- public static LocalOption ALIAS = new LocalOption("-a"); //$NON-NLS-1$
- public static LocalOption makeStatusOption(String status) {
- return new LocalOption("-s", status); //$NON-NLS-1$
- }
-
- protected Checkout() { }
- protected String getRequestId() {
- return "co"; //$NON-NLS-1$
- }
-
- protected ICommandOutputListener getDefaultCommandOutputListener() {
- return DEFAULT_OUTPUT_LISTENER;
- }
-
- protected ICVSResource[] computeWorkResources(Session session, LocalOption[] localOptions,
- String[] arguments) throws CVSException {
-
- // We shouldn't have any arguments if we're fetching the module definitions
- if (arguments.length < 1 && ! FETCH_MODULE_ALIASES.isElementOf(localOptions)) throw new IllegalArgumentException();
-
- // We can determine the local directories using either the -d option or the module expansions
- Option dOption = findOption(localOptions, "-d"); //$NON-NLS-1$
- if (dOption != null) {
- // XXX Should we append the expansions to the -d argument?
- return new ICVSResource[] {session.getLocalRoot().getFolder(dOption.argument)};
- }
- String[] modules = session.getModuleExpansions();
- ICVSResource[] resources = new ICVSResource[modules.length];
- for (int i = 0; i < resources.length; i++) {
- resources[i] = session.getLocalRoot().getFolder(modules[i]);
- }
- return resources;
- }
-
- /**
- * Start the Checkout command:
- * Send the module that is going to be checked-out to the server
- * by reading the name of the resource given
- * (This has to change to we give it the name of the modul and the
- * Checkout creates everything for us)
- */
- protected void sendLocalResourceState(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor)
- throws CVSException {
-
- // We need a folder to put the project(s) we checkout into
- Assert.isTrue(session.getLocalRoot().isFolder());
-
- // Send the information about the local workspace resources to the server
- List resourcesToSend = new ArrayList(resources.length);
- for (int i = 0; i < resources.length; i++) {
- ICVSResource resource = resources[i];
- if (resource.exists() && resource.isFolder() && ((ICVSFolder)resource).isCVSFolder()) {
- resourcesToSend.add(resource);
- }
- }
- if ( ! resourcesToSend.isEmpty()) {
- resources = (ICVSResource[]) resourcesToSend.toArray(new ICVSResource[resourcesToSend.size()]);
- new FileStructureVisitor(session, true, true, monitor).visit(session, resources);
- }
- }
-
- protected void sendLocalWorkingDirectory(Session session) throws CVSException {
- session.sendConstructedRootDirectory();
- }
-
- /**
- * On sucessful finish, prune empty directories if
- * the -P option was specified (or is implied by -D or -r)
- */
- protected void commandFinished(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor,
- boolean succeeded) throws CVSException {
- // If we didn't succeed, don't do any post processing
- if (! succeeded) return;
-
- // If we are retrieving the modules file, ignore other options
- if (FETCH_MODULE_ALIASES.isElementOf(localOptions)) return;
-
- // If we are pruning (-P) or getting a sticky copy (-D or -r), then prune empty directories
- if (PRUNE_EMPTY_DIRECTORIES.isElementOf(localOptions) ||
- (findOption(localOptions, "-D") != null) || //$NON-NLS-1$
- (findOption(localOptions, "-r") != null)) { //$NON-NLS-1$
-
- // Prune empty directories
- new PruneFolderVisitor().visit(session, resources);
- }
-
- session.handleCaseCollisions();
- }
-
- /**
- * Override execute to perform a expand-modules before the checkout
- */
- protected IStatus doExecute(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, String[] arguments, ICommandOutputListener listener,
- IProgressMonitor monitor) throws CVSException {
- monitor.beginTask(null, 100);
-
- if ( ! FETCH_MODULE_ALIASES.isElementOf(localOptions)) {
- // Execute the expand-modules command.
- // This will put the expansions in the session for later retrieval
- IStatus status = Request.EXPAND_MODULES.execute(session, arguments, Policy.subMonitorFor(monitor, 10));
- if (status.getCode() == CVSStatus.SERVER_ERROR)
- return status;
-
- // If -d is not included in the local options, then send -N (do not shorten directory paths)
- // to the server (as is done by other cvs clients)
- if (findOption(localOptions, "-d") == null) { //$NON-NLS-1$
- if ( ! DO_NOT_SHORTEN.isElementOf(localOptions)) {
- LocalOption[] newLocalOptions = new LocalOption[localOptions.length + 1];
- newLocalOptions[0] = DO_NOT_SHORTEN;
- System.arraycopy(localOptions, 0, newLocalOptions, 1, localOptions.length);
- localOptions = newLocalOptions;
- }
- }
- }
-
- return super.doExecute(session, globalOptions, localOptions, arguments, listener, Policy.subMonitorFor(monitor, 90));
- }
-
- /**
- * Perform a checkout to get the module expansions defined in the CVSROOT/modules file
- */
- public RemoteModule[] getRemoteModules(Session session, CVSTag tag, IProgressMonitor monitor)
- throws CVSException {
-
- ModuleDefinitionsListener moduleDefinitionListener = new ModuleDefinitionsListener();
-
- IStatus status = super.execute(session, NO_GLOBAL_OPTIONS, new LocalOption[] {FETCH_MODULE_ALIASES}, NO_ARGUMENTS,
- moduleDefinitionListener, monitor);
-
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- // XXX diff errors??
- throw new CVSServerException(status);
- }
-
- return RemoteModule.createRemoteModules(moduleDefinitionListener.getModuleExpansions(), session.getCVSRepositoryLocation(), tag);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Command.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Command.java
deleted file mode 100644
index 10800731e..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Command.java
+++ /dev/null
@@ -1,727 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProvider;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.ICVSRunnable;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener;
-import org.eclipse.team.internal.ccvs.core.client.listeners.IConsoleListener;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-
-/**
- * Abstract base class for command requests.
- * Provides a framework for implementing command execution.
- */
-public abstract class Command extends Request {
- /*** Command singleton instances ***/
- public final static Add ADD = new Add();
- public final static Admin ADMIN = new Admin();
- public final static Checkout CHECKOUT = new Checkout();
- public final static Commit COMMIT = new Commit();
- public final static Diff DIFF = new Diff();
- public final static Import IMPORT = new Import();
- public final static Log LOG = new Log();
- public final static Remove REMOVE = new Remove();
- public final static Status STATUS = new Status();
- public final static Tag TAG = new Tag();
- // The CUSTOM_TAG command has special handling for added and removed resources.
- // This behavior supports branching with local changes in the workspace
- public final static Tag CUSTOM_TAG = new Tag(true);
- public final static RTag RTAG = new RTag();
- public final static Update UPDATE = new Update();
- public final static Version VERSION = new Version();
-
- // Empty argument array
- public final static String[] NO_ARGUMENTS = new String[0];
-
- /*** Global options ***/
- // Empty global option array
- public static final GlobalOption[] NO_GLOBAL_OPTIONS = new GlobalOption[0];
- // Do not change file contents
- public static final GlobalOption DO_NOT_CHANGE = new GlobalOption("-n"); //$NON-NLS-1$
- // Do not record this operation into CVS command history
- public static final GlobalOption DO_NOT_LOG = new GlobalOption("-l"); //$NON-NLS-1$
- // Make new working files read-only
- public static final GlobalOption MAKE_READ_ONLY = new GlobalOption("-r"); //$NON-NLS-1$
- // Trace command execution
- public static final GlobalOption TRACE_EXECUTION = new GlobalOption("-t"); //$NON-NLS-1$
-
- /*** Global options: quietness ***/
- // Don't be quiet (normal verbosity)
- public static final QuietOption VERBOSE = new QuietOption(""); //$NON-NLS-1$
- // Be somewhat quiet (suppress informational messages)
- public static final QuietOption PARTLY_QUIET = new QuietOption("-q"); //$NON-NLS-1$
- // Be really quiet (silent but for serious problems)
- public static final QuietOption SILENT = new QuietOption("-Q"); //$NON-NLS-1$
-
- /*** Local options: common to many commands ***/
- // Empty local option array
- public static final LocalOption[] NO_LOCAL_OPTIONS = new LocalOption[0];
- // valid for: annotate checkout commit diff export log rdiff remove rtag status tag update
- public static final LocalOption DO_NOT_RECURSE = new LocalOption("-l"); //$NON-NLS-1$
- // valid for: checkout export update
- public static final LocalOption PRUNE_EMPTY_DIRECTORIES = new LocalOption("-P"); //$NON-NLS-1$
- // valid for: checkout export update
- public static final LocalOption MESSAGE_OPTION = new LocalOption("-m"); //$NON-NLS-1$
-
- /*** Local options: keyword substitution mode ***/
- // valid for: add admin checkout export import update
- private static final Map ksubstOptionMap = new HashMap();
- public static final KSubstOption KSUBST_BINARY = new KSubstOption("-kb"); //$NON-NLS-1$
- public static final KSubstOption KSUBST_TEXT = new KSubstOption("-ko"); //$NON-NLS-1$
- public static final KSubstOption KSUBST_TEXT_EXPAND = new KSubstOption("-kkv"); //$NON-NLS-1$
- public static final KSubstOption KSUBST_TEXT_EXPAND_LOCKER = new KSubstOption("-kkvl"); //$NON-NLS-1$
- public static final KSubstOption KSUBST_TEXT_VALUES_ONLY = new KSubstOption("-kv"); //$NON-NLS-1$
- public static final KSubstOption KSUBST_TEXT_KEYWORDS_ONLY = new KSubstOption("-kk"); //$NON-NLS-1$
-
- /*** Default command output listener ***/
- protected static final ICommandOutputListener DEFAULT_OUTPUT_LISTENER =
- new ICommandOutputListener() {
- public IStatus messageLine(String line, ICVSFolder commandRoot, IProgressMonitor monitor) {
- return OK;
- }
- public IStatus errorLine(String line, ICVSFolder commandRoot, IProgressMonitor monitor) {
- return new CVSStatus(CVSStatus.ERROR, CVSStatus.ERROR_LINE, line);
- }
-
- };
-
- /**
- * Prevents client code from instantiating us.
- */
- protected Command() { }
-
- /**
- * Provides the default command output listener which is used to accumulate errors.
- *
- * Subclasses can override this method in order to properly interpret information
- * received from the server.
- */
- protected ICommandOutputListener getDefaultCommandOutputListener() {
- return DEFAULT_OUTPUT_LISTENER;
- }
-
- /**
- * Sends the command's arguments to the server.
- * [template method]
- * <p>
- * The default implementation sends all arguments. Subclasses may override
- * this method to provide alternate behaviour.
- * </p>
- *
- * @param session the CVS session
- * @param arguments the arguments that were supplied by the caller of execute()
- */
- protected void sendArguments(Session session, String[] arguments) throws CVSException {
- for (int i = 0; i < arguments.length; ++i) {
- session.sendArgument(arguments[i]);
- }
- }
-
- /**
- * Describes the local resource state to the server prior to command execution.
- * [template method]
- * <p>
- * Commands must override this method to inform the server about the state of
- * local resources using the Entries, Modified, Unchanged, and Questionable
- * requests as needed.
- * </p>
- *
- * @param session the CVS session
- * @param globalOptions the global options for the command
- * @param localOptions the local options for the command
- * @param resources the resource arguments for the command
- * @param monitor the progress monitor
- */
- protected abstract void sendLocalResourceState(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor)
- throws CVSException;
-
- /**
- * Cleans up after command execution.
- * [template method]
- * <p>
- * The default implementation is a no-op. Subclasses may override this
- * method to follow up command execution on the server with clean up
- * operations on local resources.
- * </p>
- *
- * @param session the CVS session
- * @param globalOptions the global options for the command
- * @param localOptions the local options for the command
- * @param resources the resource arguments for the command
- * @param monitor the progress monitor
- * @param serverError true iff the server returned the "ok" response
- */
- protected void commandFinished(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor,
- boolean serverError) throws CVSException {
- }
-
- /**
- * Sends the local working directory path prior to command execution.
- * [template method]
- * <p>
- * The default implementation sends the paths of local root directory
- * (assuming it exists). Subclasses may override this method to provide
- * alternate behaviour.
- * </p>
- *
- * @param session the CVS session
- */
- protected void sendLocalWorkingDirectory(Session session) throws CVSException {
- ICVSFolder localRoot = session.getLocalRoot();
- if (localRoot.isCVSFolder()) {
- session.sendLocalRootDirectory();
- } else {
- session.sendConstructedRootDirectory();
- }
- }
-
- /**
- * Computes an array of ICVSResources corresponding to command arguments.
- * [template method]
- * <p>
- * The default implementation assumes that all arguments supplied to the
- * command represent resources in the local root that are to be manipulated.
- * Subclasses must override this method if this assumption does not hold.
- * </p>
- * @param session the CVS session
- * @param localOptions the command local options
- * @param arguments the command arguments
- * @return the resource arguments for the command
- */
- protected ICVSResource[] computeWorkResources(Session session,
- LocalOption[] localOptions, String[] arguments) throws CVSException {
- ICVSFolder localRoot = session.getLocalRoot();
-
- if (arguments.length == 0) {
- // As a convenience, passing no arguments to the CVS command
- // implies the command will operate on the local root folder.
- return new ICVSResource[] { localRoot };
- } else {
- // Assume all arguments represent resources that are descendants
- // of the local root folder.
- ICVSResource[] resources = new ICVSResource[arguments.length];
- for (int i = 0; i < arguments.length; i++) {
- ICVSResource resource = localRoot.getChild(arguments[i]);
- // file does not exist, it could have been deleted. It doesn't matter
- // which type we return since only the name of the resource is used
- // and sent to the server.
- if(resource==null) {
- if(localRoot.getName().length()==0) {
- // XXX returning a folder because it is the safest choice when
- // localRoot is a handle to the IWorkspaceRoot!
- resource = localRoot.getFolder(arguments[i]);
- } else {
- resource = localRoot.getFile(arguments[i]);
- }
- }
- resources[i] = resource;
- }
- return resources;
- }
- }
-
- /**
- * Send an array of Resources.
- *
- * @see Command#sendFileStructure(ICVSResource,IProgressMonitor,boolean,boolean,boolean)
- */
- protected void sendFileStructure(Session session, ICVSResource[] resources,
- boolean emptyFolders, IProgressMonitor monitor) throws CVSException {
- checkResourcesManaged(resources);
-
- new FileStructureVisitor(session, emptyFolders, true, monitor).visit(session, resources);
- }
-
- /**
- * Checks that all work resources are managed.
- *
- * @param resources the resource arguments for the command
- * @throws CVSException if some resources are not managed
- */
- protected void checkResourcesManaged(ICVSResource[] resources) throws CVSException {
- for (int i = 0; i < resources.length; ++i) {
- ICVSFolder folder;
- if (resources[i].isFolder()) {
- folder = (ICVSFolder) resources[i];
- }
- else {
- folder = resources[i].getParent();
- }
- if (folder==null || (!folder.isCVSFolder() && folder.exists())) {
- throw new CVSException(Policy.bind("Command.argumentNotManaged", folder.getName()));//$NON-NLS-1$
- }
- }
- }
-
- /**
- * Executes a CVS command.
- * <p>
- * Dispatches the commands, retrieves the results, and determines whether or
- * not an error occurred. A listener may be supplied to capture message text
- * that would normally be written to the standard error and standard output
- * streams of a command line CVS client.
- * </p>
- * @param session the open CVS session
- * @param globalOptions the array of global options, or NO_GLOBAL_OPTIONS
- * @param localOptions the array of local options, or NO_LOCAL_OPTIONS
- * @param arguments the array of arguments (usually filenames relative to localRoot), or NO_ARGUMENTS
- * @param listener the command output listener, or null to discard all messages
- * @param monitor the progress monitor
- * @return a status code indicating success or failure of the operation
- * @throws CVSException if a fatal error occurs (e.g. connection timeout)
- */
- public final IStatus execute(final Session session, final GlobalOption[] globalOptions,
- final LocalOption[] localOptions, final String[] arguments, final ICommandOutputListener listener,
- IProgressMonitor pm) throws CVSException {
- final IStatus[] status = new IStatus[1];
- ICVSRunnable job = new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- // update the global and local options
- GlobalOption[] gOptions = filterGlobalOptions(session, globalOptions);
- LocalOption[] lOptions = filterLocalOptions(session, gOptions, localOptions);
-
- // print the invocation string to the console
- if (session.isOutputToConsole() || Policy.DEBUG_CVS_PROTOCOL) {
- String line = constructCommandInvocationString(gOptions, lOptions, arguments);
- if (session.isOutputToConsole()) {
- IConsoleListener consoleListener = CVSProviderPlugin.getPlugin().getConsoleListener();
- if (consoleListener != null) consoleListener.commandInvoked(line);
- }
- if (Policy.DEBUG_CVS_PROTOCOL) System.out.println("CMD> " + line); //$NON-NLS-1$
- }
-
- // run the command
- try {
- status[0] = doExecute(session, gOptions, lOptions, arguments, listener, monitor);
- notifyConsoleOnCompletion(session, status[0], null);
- } catch (CVSException e) {
- notifyConsoleOnCompletion(session, null, e);
- throw e;
- } catch (RuntimeException e) {
- notifyConsoleOnCompletion(session, null, e);
- throw e;
- }
- }
- };
- session.getLocalRoot().run(job, pm);
- return status[0];
- }
-
- private void notifyConsoleOnCompletion(Session session, IStatus status, Exception exception) {
- if (session.isOutputToConsole()) {
- IConsoleListener consoleListener = CVSProviderPlugin.getPlugin().getConsoleListener();
- if (consoleListener != null) consoleListener.commandCompleted(status, exception);
- }
- if (Policy.DEBUG_CVS_PROTOCOL) {
- if (status != null) System.out.println("RESULT> " + status.toString()); //$NON-NLS-1$
- else System.out.println("RESULT> " + exception.toString()); //$NON-NLS-1$
- }
- }
-
- protected IStatus doExecute(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, String[] arguments, ICommandOutputListener listener,
- IProgressMonitor monitor) throws CVSException {
- ICVSResource[] resources = null;
- /*** setup progress monitor ***/
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(Policy.bind("Command.server"), 100); //$NON-NLS-1$
- Policy.checkCanceled(monitor);
- try {
- /*** prepare for command ***/
- // clear stale command state from previous runs
- session.setNoLocalChanges(DO_NOT_CHANGE.isElementOf(globalOptions));
- session.setModTime(null);
-
- /*** initiate command ***/
- // send global options
- for (int i = 0; i < globalOptions.length; i++) {
- globalOptions[i].send(session);
- }
- Policy.checkCanceled(monitor);
- // send local options
- for (int i = 0; i < localOptions.length; i++) {
- localOptions[i].send(session);
- }
- Policy.checkCanceled(monitor);
- // compute the work resources
- resources = computeWorkResources(session, localOptions, arguments);
- Policy.checkCanceled(monitor);
- // send local working directory state contributes 25% of work
- sendLocalResourceState(session, globalOptions, localOptions,
- resources, Policy.subMonitorFor(monitor, 25));
- Policy.checkCanceled(monitor);
- // send arguments
- sendArguments(session, arguments);
- // send local working directory path
- sendLocalWorkingDirectory(session);
-
- // if no listener was provided, use the command's default in order to get error reporting
- if (listener == null) listener = getDefaultCommandOutputListener();
-
- /*** execute command and process responses ***/
- // Processing responses contributes 70% of work.
- IStatus status = executeRequest(session, listener, Policy.subMonitorFor(monitor, 70));
-
- // Finished adds last 5% of work.
- commandFinished(session, globalOptions, localOptions, resources, Policy.subMonitorFor(monitor, 5),
- status.getCode() != CVSStatus.SERVER_ERROR);
- return status;
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Constucts the CVS command invocation string corresponding to the arguments.
- *
- * @param globalOptions the global options
- * @param localOption the local options
- * @param arguments the arguments
- * @return the command invocation string
- */
- private String constructCommandInvocationString(GlobalOption[] globalOptions,
- LocalOption[] localOptions, String[] arguments) {
- StringBuffer commandLine = new StringBuffer("cvs"); //$NON-NLS-1$
- for (int i = 0; i < globalOptions.length; ++i) {
- String option = globalOptions[i].toString();
- if (option.length() == 0) continue;
- commandLine.append(' ');
- commandLine.append(option);
- }
- commandLine.append(' ');
- commandLine.append(getRequestId());
- for (int i = 0; i < localOptions.length; ++i) {
- String option = localOptions[i].toString();
- if (option.length() == 0) continue;
- commandLine.append(' ');
- commandLine.append(option);
- }
- for (int i = 0; i < arguments.length; ++i) {
- if (arguments[i].length() == 0) continue;
- commandLine.append(" \""); //$NON-NLS-1$
- commandLine.append(arguments[i]);
- commandLine.append('"'); //$NON-NLS-1$
- }
- return commandLine.toString();
- }
-
- /**
- * Superclass for all CVS command options
- */
- protected static abstract class Option {
- protected String option, argument;
- protected Option(String option, String argument) {
- this.option = option;
- this.argument = argument;
- }
- /**
- * Determines if this option is an element of an array of options
- * @param array the array of options
- * @return true iff the array contains this option
- */
- public boolean isElementOf(Option[] array) {
- return findOption(array, option) != null;
- }
- /**
- * Returns the option part of the option
- */
- String getOption() {
- return option;
- }
- /**
- * Compares two options for equality.
- * @param other the other option
- */
- public boolean equals(Object other) {
- if (this == other) return true;
- if (other instanceof Option) {
- Option otherOption = (Option) other;
- return option.equals(otherOption.option);
- }
- return false;
- }
- /**
- * Sends the option to a CVS server
- * @param session the CVS session
- */
- public abstract void send(Session session) throws CVSException;
- /*
- * To make debugging a tad easier.
- */
- public String toString() {
- if (argument != null && argument.length() != 0) {
- return option + " \"" + argument + '"'; //$NON-NLS-1$
- } else {
- return option;
- }
- }
- }
- /**
- * Option subtype for global options that are common to all commands.
- */
- public static class GlobalOption extends Option {
- protected GlobalOption(String option) {
- super(option, null);
- }
- public void send(Session session) throws CVSException {
- session.sendGlobalOption(option);
- }
- }
- /**
- * Option subtype for global quietness options.
- */
- public static final class QuietOption extends GlobalOption {
- private QuietOption(String option) {
- super(option);
- }
- public void send(Session session) throws CVSException {
- if (option.length() != 0) super.send(session);
- }
- }
- /**
- * Option subtype for local options that vary from command to command.
- */
- public static class LocalOption extends Option {
- protected LocalOption(String option) {
- super(option, null);
- }
- protected LocalOption(String option, String argument) {
- super(option, argument);
- }
- public void send(Session session) throws CVSException {
- session.sendArgument(option);
- if (argument != null) session.sendArgument(argument);
- }
- }
- /**
- * Options subtype for keyword substitution options.
- */
- public static class KSubstOption extends LocalOption {
- private boolean isUnknownMode;
- private KSubstOption(String option) {
- this(option, false);
- }
- private KSubstOption(String option, boolean isUnknownMode) {
- super(option);
- this.isUnknownMode = isUnknownMode;
- ksubstOptionMap.put(option, this);
- }
- /**
- * Gets the KSubstOption instance for the specified mode.
- *
- * @param mode the mode, e.g. -kb
- * @return an instance for that mode
- */
- public static KSubstOption fromMode(String mode) {
- if (mode.length() == 0) mode = "-kkv"; // use default //$NON-NLS-1$
- KSubstOption option = (KSubstOption) ksubstOptionMap.get(mode);
- if (option == null) option = new KSubstOption(mode, true);
- return option;
- }
- /**
- * Gets the KSubstOption instance for the specified file.
- *
- * @param file the file to get the option for
- * @return an instance for that mode
- */
- public static KSubstOption fromFile(IFile file) {
- if (CVSProvider.isText(file))
- return CVSProviderPlugin.getPlugin().getDefaultTextKSubstOption();
- return KSUBST_BINARY;
- }
- /**
- * Returns an array of all valid modes.
- */
- public static KSubstOption[] getAllKSubstOptions() {
- return (KSubstOption[]) ksubstOptionMap.values().toArray(new KSubstOption[ksubstOptionMap.size()]);
- }
- /**
- * Returns the entry line mode string for this instance.
- */
- public String toMode() {
- if (KSUBST_TEXT_EXPAND.equals(this)) return ""; //$NON-NLS-1$
- return getOption();
- }
- /**
- * Returns true if the substitution mode requires no data translation
- * during file transfer.
- */
- public boolean isBinary() {
- return KSUBST_BINARY.equals(this);
- }
- /**
- * Returns a short localized text string describing this mode.
- */
- public String getShortDisplayText() {
- if (isUnknownMode) return Policy.bind("KSubstOption.unknown.short", option); //$NON-NLS-1$
- return Policy.bind("KSubstOption." + option + ".short"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- /**
- * Returns a long localized text string describing this mode.
- */
- public String getLongDisplayText() {
- if (isUnknownMode) return Policy.bind("KSubstOption.unknown.long", option); //$NON-NLS-1$
- return Policy.bind("KSubstOption." + option + ".long"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Makes a -m log message option.
- * Valid for: add commit import
- */
- public static LocalOption makeArgumentOption(LocalOption option, String argument) {
- return new LocalOption(option.getOption(), argument); //$NON-NLS-1$
- }
-
- /**
- * Makes a -r or -D option for a tag.
- * Valid for: checkout export history rdiff update
- */
- public static LocalOption makeTagOption(CVSTag tag) {
- int type = tag.getType();
- switch (type) {
- case CVSTag.BRANCH:
- case CVSTag.VERSION:
- return new LocalOption("-r", tag.getName()); //$NON-NLS-1$
- case CVSTag.DATE:
- return new LocalOption("-D", tag.getName()); //$NON-NLS-1$
- default:
- // tag must not be HEAD
- throw new IllegalArgumentException(Policy.bind("Command.invalidTag")); //$NON-NLS-1$
- }
- }
-
- /**
- * Find a specific option in an array of options
- * @param array the array of options
- * @param option the option string to search for
- * @return the first element matching the option string, or null if none
- */
- public static Option findOption(Option[] array, String option) {
- for (int i = 0; i < array.length; ++i) {
- if (array[i].getOption().equals(option)) return array[i];
- }
- return null;
- }
-
- /**
- * Collect all arguments of a specific option from an array of options
- * @param array the array of options
- * @param option the option string to search for
- * @return an array of all arguments of belonging to matching options
- */
- protected static String[] collectOptionArguments(Option[] array, String option) {
- List /* of String */ list = new ArrayList();
- for (int i = 0; i < array.length; ++i) {
- if (array[i].getOption().equals(option)) {
- list.add(array[i].argument);
- }
- }
- return (String[]) list.toArray(new String[list.size()]);
- }
-
- /**
- * Allows commands to filter the set of global options to be sent.
- * Subclasses that override this method should call the superclass.
- *
- * @param session the session
- * @param globalOptions the global options, read-only
- * @return the filtered global options
- */
- protected GlobalOption[] filterGlobalOptions(Session session, GlobalOption[] globalOptions) {
- if (! DO_NOT_CHANGE.isElementOf(globalOptions)) {
- QuietOption quietOption = CVSProviderPlugin.getPlugin().getQuietness();
- if (quietOption != null) {
- GlobalOption[] oldOptions = globalOptions;
- globalOptions = new GlobalOption[oldOptions.length + 1];
- System.arraycopy(oldOptions, 0, globalOptions, 1, oldOptions.length);
- globalOptions[0] = quietOption;
- }
- }
- return globalOptions;
- }
-
- /**
- * Allows commands to filter the set of local options to be sent.
- * Subclasses that override this method should call the superclass.
- *
- * @param session the session
- * @param globalOptions the global options, read-only
- * @param localOptions the local options, read-only
- * @return the filtered local options
- */
- protected LocalOption[] filterLocalOptions(Session session, GlobalOption[] globalOptions, LocalOption[] localOptions) {
- return localOptions;
- }
-
- /**
- * Execute a CVS command inside an ICVSRunnable passed to Session.run()
- * <p>
- * Dispatches the commands, retrieves the results, and determines whether or
- * not an error occurred. A listener may be supplied to capture message text
- * that would normally be written to the standard error and standard output
- * streams of a command line CVS client.
- * </p>
- * @param globalOptions the array of global options, or NO_GLOBAL_OPTIONS
- * @param localOptions the array of local options, or NO_LOCAL_OPTIONS
- * @param arguments the array of arguments (usually filenames relative to localRoot), or NO_ARGUMENTS
- * @param listener the command output listener, or null to discard all messages
- * @param monitor the progress monitor
- * @return a status code indicating success or failure of the operation
- * @throws CVSException if a fatal error occurs (e.g. connection timeout)
- */
- public final IStatus execute(GlobalOption[] globalOptions, LocalOption[] localOptions, ICVSResource[] arguments,
- ICommandOutputListener listener, IProgressMonitor pm) throws CVSException {
-
- Session openSession = getOpenSession(arguments);
- if (openSession == null) {
- throw new CVSException(Policy.bind("Command.noOpenSession")); //$NON-NLS-1$
- } else {
- // Convert arguments
- List stringArguments = new ArrayList(arguments.length);
- for (int i = 0; i < arguments.length; i++) {
- stringArguments.add(arguments[i].getRelativePath(openSession.getLocalRoot()));
- }
- return execute(openSession, globalOptions, localOptions, (String[]) stringArguments.toArray(new String[stringArguments.size()]), listener, pm);
- }
- }
-
- protected Session getOpenSession(ICVSResource[] arguments) throws CVSException {
- // We assume that all the passed resources have the same root
- Session openSession;
- if (arguments == null || arguments.length == 0) {
- // If there are no arguments to the command, assume that the command is rooted at the workspace root
- openSession = Session.getOpenSession(CVSWorkspaceRoot.getCVSFolderFor(ResourcesPlugin.getWorkspace().getRoot()));
- } else {
- openSession = Session.getOpenSession(arguments[0]);
- }
- return openSession;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Commit.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Commit.java
deleted file mode 100644
index 55dcc405a..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Commit.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-
-public class Commit extends Command {
- /*** Local options: specific to commit ***/
- // Forces a file to be committed even if it has not been modified; implies -l.
- // NOTE: This option is not fully supported -- a file will not be sent
- // unless it is dirty. The primary use is to resend a file that may
- // or may not be changed (e.g. could depend on CR/LF translations, etc...)
- // and force the server to create a new revision and reply Checked-in.
- public static final LocalOption FORCE = new LocalOption("-f"); //$NON-NLS-1$
-
- protected Commit() { }
- protected String getRequestId() {
- return "ci"; //$NON-NLS-1$
- }
-
- /**
- * Send all files under the workingFolder as changed files to
- * the server.
- */
- protected void sendLocalResourceState(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor)
- throws CVSException {
-
- // Get the folders we want to work on
- checkResourcesManaged(resources);
-
- // Send all changed files to the server
- ModifiedFileSender visitor = new ModifiedFileSender(session, monitor);
- visitor.visit(session, resources);
-
- // Send the changed files as arguments (because this is what other cvs clients do)
- ICVSFile[] changedFiles = visitor.getSentFiles();
- for (int i = 0; i < changedFiles.length; i++) {
- session.sendArgument(changedFiles[i].getRelativePath(session.getLocalRoot()));
- }
- }
-
- /**
- * On successful finish, prune empty directories if the -P or -D option was specified.
- */
- protected void commandFinished(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor,
- boolean succeeded) throws CVSException {
- // If we didn't succeed, don't do any post processing
- if (! succeeded) return;
-
- // If pruning is enable, prune empty directories after a commit
- if (CVSProviderPlugin.getPlugin().getPruneEmptyDirectories()) { //$NON-NLS-1$
- new PruneFolderVisitor().visit(session, resources);
- }
- }
-
- /**
- * We do not want to send the arguments here, because we send
- * them in sendRequestsToServer (special handling).
- */
- protected void sendArguments(Session session, String[] arguments) throws CVSException {
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CopyHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CopyHandler.java
deleted file mode 100644
index 080213b0c..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CopyHandler.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.util.Assert;
-
-/**
- * Handles a "Copy-file" response from the CVS server.
- * <p>
- * Suppose as a result of performing a command the CVS server responds
- * as follows:<br>
- * <pre>
- * [...]
- * Copy-file myproject/ \n
- * /u/cvsroot/myproject/oldfile.txt \n
- * newfile.txt
- * [...]
- * </pre>
- * Then we copy (or optionally rename) the local file "oldfile.txt" in
- * folder "myproject" to "newfile.txt". This response is used to create
- * a backup copy of an existing file before merging in new changes.
- * </p>
- */
-class CopyHandler extends ResponseHandler {
- public String getResponseID() {
- return "Copy-file"; //$NON-NLS-1$
- }
-
- public void handle(Session session, String localDir,
- IProgressMonitor monitor) throws CVSException {
- // read additional data for the response
- String repositoryFile = session.readLine();
- String newFile = session.readLine();
- if (session.isNoLocalChanges() || ! session.isCreateBackups()) return;
-
- // Get the local file
- String fileName = repositoryFile.substring(repositoryFile.lastIndexOf("/") + 1); //$NON-NLS-1$
- ICVSFolder mParent = session.getLocalRoot().getFolder(localDir);
- ICVSFile mFile = mParent.getFile(fileName);
-
- Assert.isTrue(mParent.exists());
- Assert.isTrue(mFile.exists() && mFile.isManaged());
-
- // rename the file
- mFile.copyTo(newFile);
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Diff.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Diff.java
deleted file mode 100644
index 8e87905b1..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Diff.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener;
-import org.eclipse.team.internal.ccvs.core.connection.CVSServerException;
-
-/**
- * Runs the CVS diff command.
- */
-public class Diff extends Command {
- /*** Local options: specific to diff ***/
- public static final LocalOption UNIFIED_FORMAT = new LocalOption("-u"); //$NON-NLS-1$
- public static final LocalOption CONTEXT_FORMAT = new LocalOption("-c"); //$NON-NLS-1$
- public static final LocalOption INCLUDE_NEWFILES = new LocalOption("-N"); //$NON-NLS-1$
-
- protected Diff() { }
- protected String getRequestId() {
- return "diff"; //$NON-NLS-1$
- }
-
- /**
- * Overwritten to throw the CVSDiffException if the server returns an error, because it just does
- * so when there is a difference between the checked files.
- */
- protected IStatus doExecute(Session session, GlobalOption[] globalOptions, LocalOption[] localOptions,
- String[] arguments, ICommandOutputListener listener, IProgressMonitor monitor) throws CVSException {
- try {
- return super.doExecute(session, globalOptions, localOptions, arguments, listener, monitor);
- } catch (CVSServerException e) {
- if (e.containsErrors()) throw e;
- return e.getStatus();
- }
- }
-
- protected void sendLocalResourceState(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor)
- throws CVSException {
-
- checkResourcesManaged(resources);
- DiffStructureVisitor visitor = new DiffStructureVisitor(session, monitor);
- visitor.visit(session, resources);
- }
-
- protected String getServerErrorMessage() {
- return Policy.bind("Diff.serverError"); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/DiffStructureVisitor.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/DiffStructureVisitor.java
deleted file mode 100644
index 2a4447c47..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/DiffStructureVisitor.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseFile;
-import org.eclipse.team.internal.ccvs.core.syncinfo.MutableResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-/**
- * The diff command needs to send a file structure to the server that differs somewhat from the canonical
- * format sent by other commands. Instead of sending new files as questionables this class sends
- * new files as modified and fakes them being added. The contents are sent to the server and are
- * included in the returned diff report.
- */
-class DiffStructureVisitor extends FileStructureVisitor {
-
- public DiffStructureVisitor(Session session, IProgressMonitor monitor) {
- super(session, false, true, monitor);
- }
-
- /**
- * Send unmanaged files as modified with a default entry line.
- */
- protected void sendFile(ICVSFile mFile) throws CVSException {
- KSubstOption ksubst;
- ResourceSyncInfo info = mFile.getSyncInfo();
- boolean addedFile = (info==null);
-
- // Send the parent folder if it hasn't been sent already
- sendFolder(mFile.getParent());
-
- Policy.checkCanceled(monitor);
-
- if (addedFile) {
- if (mFile instanceof EclipseFile) {
- EclipseFile file = (EclipseFile)mFile;
- ksubst = KSubstOption.fromFile(file.getIFile());
- } else {
- ksubst = Command.KSUBST_BINARY;
- }
- MutableResourceSyncInfo newInfo = new MutableResourceSyncInfo(mFile.getName(), null);
- newInfo.setKeywordMode(ksubst);
- info = newInfo;
- } else {
- // existing file
- ksubst = info.getKeywordMode();
- }
- session.sendEntry(info.getServerEntryLine(null));
-
- if (!mFile.exists()) {
- return;
- }
-
- if (mFile.isModified() || addedFile) {
- session.sendModified(mFile, ksubst.isBinary(), monitor);
- } else {
- session.sendUnchanged(mFile);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ExpandModules.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ExpandModules.java
deleted file mode 100644
index 7dcb27033..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ExpandModules.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-
-public class ExpandModules extends Request {
- protected ExpandModules() { }
- protected String getRequestId() {
- return "expand-modules"; //$NON-NLS-1$
- }
-
- public IStatus execute(Session session, String[] modules, IProgressMonitor monitor) throws CVSException {
- // Reset the module expansions before the responses arrive
- session.resetModuleExpansion();
- for (int i = 0; i < modules.length; ++i) {
- session.sendArgument(modules[i]);
- }
- return executeRequest(session, Command.DEFAULT_OUTPUT_LISTENER, monitor);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/FileStructureVisitor.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/FileStructureVisitor.java
deleted file mode 100644
index 61b4d85f5..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/FileStructureVisitor.java
+++ /dev/null
@@ -1,110 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-
-/**
- * Visitor to send the local file structure to the CVS Server.
- *
- * Files are sent as Unchanged or Modified.
- * Folders are sent if they contain files unless sendEmptyFolders is true
- * in which case all folders are sent.
- *
- * @param sendEmptyFolders sends the folder-entrie even if there is no file
- to send in it
- */
-
-class FileStructureVisitor extends AbstractStructureVisitor {
-
- private final boolean sendEmptyFolders;
- private final Set sentFiles;
-
- /**
- * Constructor for the visitor
- *
- * @param modifiedOnly sends files that are modified only to the server
- * @param emptyFolders sends the folder-entrie even if there is no file to send in it
- */
- public FileStructureVisitor(Session session, boolean sendEmptyFolders, boolean sendModifiedContents, IProgressMonitor monitor) {
-
- super(session, true, sendModifiedContents, monitor);
- this.sendEmptyFolders = sendEmptyFolders;
- sentFiles = new HashSet();
- }
-
- /**
- * @see ICVSResourceVisitor#visitFile(IManagedFile)
- */
- public void visitFile(ICVSFile mFile) throws CVSException {
- sendFile(mFile);
- }
-
- /**
- * @see ICVSResourceVisitor#visitFolder(ICVSFolder)
- */
- public void visitFolder(ICVSFolder mFolder) throws CVSException {
-
- if (sendEmptyFolders) {
- // If we want to send empty folder, that just send it when
- // we come to it
- sendFolder(mFolder);
- }
-
- boolean exists = mFolder.exists();
- boolean isCVSFolder = mFolder.isCVSFolder();
-
- // We are only interested in folders that exist or are CVS folders
- // A folder could be a non-existant CVS folder if it is a holder for outgoing file deletions
- if ( ! exists && ! isCVSFolder) return;
-
- if (exists && isOrphanedSubtree(mFolder)) {
- return;
- }
-
- // Send files, then the questionable folders, then the managed folders
- ICVSResource[] files = mFolder.members(ICVSFolder.FILE_MEMBERS);
- for (int i = 0; i < files.length; i++) {
- files[i].accept(this);
- }
- ICVSResource[] folders = mFolder.members(ICVSFolder.FOLDER_MEMBERS | ICVSFolder.UNMANAGED_MEMBERS);
- for (int i = 0; i < folders.length; i++) {
- folders[i].accept(this);
- }
- folders = mFolder.members(ICVSFolder.FOLDER_MEMBERS | ICVSFolder.MANAGED_MEMBERS);
- for (int i = 0; i < folders.length; i++) {
- folders[i].accept(this);
- }
- }
-
- protected void sendFile(ICVSFile mFile) throws CVSException {
-
- // Send the parent folder if it hasn't been sent already
- sendFolder(mFile.getParent());
-
- // Send the file
- super.sendFile(mFile);
-
- // Record all managed files we sent
- if (mFile.isManaged()) {
- sentFiles.add(mFile);
- }
- }
-
- /**
- * Return all the files that have been send to the server
- */
- public ICVSFile[] getSentFiles() {
- return (ICVSFile[]) sentFiles.toArray(new ICVSFile[sentFiles.size()]);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Import.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Import.java
deleted file mode 100644
index 4a2d3e616..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Import.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResourceVisitor;
-import org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener;
-
-
-public class Import extends Command {
- /*** Local options: specific to import ***/
- public static LocalOption makeBinaryWrapperOption(String pattern) {
- return new LocalOption("-W", pattern + " -k 'b'"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- protected Import() { }
- protected String getRequestId() {
- return "import"; //$NON-NLS-1$
- }
-
- protected ICVSResource[] computeWorkResources(Session session, LocalOption[] localOptions,
- String[] arguments) throws CVSException {
- if (arguments.length < 3) throw new IllegalArgumentException();
- return new ICVSResource[0];
- }
-
- protected IStatus doExecute(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, String[] arguments, ICommandOutputListener listener,
- IProgressMonitor monitor) throws CVSException {
-
- // If the branch option is not provided, a default value of 1.1.1 is used.
- // This is done to maintain reference client compatibility
- if (findOption(localOptions, "-b") == null) { //$NON-NLS-1$
- LocalOption[] newLocalOptions = new LocalOption[localOptions.length + 1];
- newLocalOptions[0] = new LocalOption("-b", "1.1.1"); //$NON-NLS-1$ //$NON-NLS-2$
- System.arraycopy(localOptions, 0, newLocalOptions, 1, localOptions.length);
- localOptions = newLocalOptions;
- }
- return super.doExecute(session, globalOptions, localOptions, arguments, listener, monitor);
- }
-
- protected void sendLocalResourceState(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor)
- throws CVSException {
-
- ICVSResourceVisitor visitor = new ImportStructureVisitor(session,
- collectOptionArguments(localOptions, "-W"), monitor); //$NON-NLS-1$
- session.getLocalRoot().accept(visitor);
- }
-
- protected void sendLocalWorkingDirectory(Session session) throws CVSException {
- session.sendConstructedRootDirectory();
- }
-
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ImportStructureVisitor.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ImportStructureVisitor.java
deleted file mode 100644
index fd7d3ccd0..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ImportStructureVisitor.java
+++ /dev/null
@@ -1,133 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResourceVisitor;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.util.FileNameMatcher;
-
-/**
- * The ImportStructureVisitor sends the content of the folder it is
- * used on to the server. It constructs the locations of the resources
- * because the resources do not yet have a remote-location.<br>
- * It can also ignore certain files and decides wether to send
- * a file in binary or text mode due to a specification that is passed
- * as a "wrapper" argument.
- */
-class ImportStructureVisitor implements ICVSResourceVisitor {
-
- private static final String KEYWORD_OPTION = "-k"; //$NON-NLS-1$
- private static final String QUOTE = "'"; //$NON-NLS-1$
-
- protected Session session;
- private Set sentFolders;
- protected IProgressMonitor monitor;
- private String[] wrappers;
-
- private FileNameMatcher ignoreMatcher;
- private FileNameMatcher wrapMatcher;
-
- /**
- * Constructor for ImportStructureVisitor.
- * @param requestSender
- * @param mRoot
- * @param monitor
- */
- public ImportStructureVisitor(Session session,
- String[] wrappers, IProgressMonitor monitor) {
-
- this.session = session;
- this.monitor = Policy.infiniteSubMonitorFor(monitor, 512);
- this.wrappers = wrappers;
- wrapMatcher = initWrapMatcher(wrappers);
- }
-
-
- /**
- * Inits the wrapMatcher, that is responsible to find out
- * whether a file is to be send as a binary (on an import)
- * or not.
- *
- * Takes wrappers of this format:
- * *.class -k 'o'
- *
- * and inits the FileNameMatcher to give
- * -ko back if you call it with match("somename.class")
- *
- * ignores all wrappers, that do not contain -k
- */
- private FileNameMatcher initWrapMatcher(String[] wrappers) {
-
- FileNameMatcher wrapMatcher;
-
- if (wrappers == null) {
- return null;
- }
-
- wrapMatcher = new FileNameMatcher();
-
- for (int i = 0; i < wrappers.length; i++) {
-
- if (wrappers[i].indexOf(KEYWORD_OPTION) == -1) {
- continue;
- }
-
- StringTokenizer st = new StringTokenizer(wrappers[i]);
- String pattern = st.nextToken();
- String option = st.nextToken();
- // get rid of the quotes
- StringTokenizer quoteSt =
- new StringTokenizer(st.nextToken(),QUOTE);
- option += quoteSt.nextToken();
-
- wrapMatcher.register(pattern,option);
- }
-
- return wrapMatcher;
- }
-
- /**
- * @see ICVSResourceVisitor#visitFile(IManagedFile)
- */
- public void visitFile(ICVSFile mFile) throws CVSException {
- if (ignoreMatcher != null && ignoreMatcher.match(mFile.getName())) {
- return;
- }
-
- // XXX should we default to text or to binary?
- boolean binary = false;
- if (wrapMatcher != null) {
- String mode = wrapMatcher.getMatch(mFile.getName());
- if (mode != null) binary = KSubstOption.fromMode(mode).isBinary();
- }
- session.sendModified(mFile, binary, monitor);
- }
-
- /**
- * @see ICVSResourceVisitor#visitFolder(ICVSFolder)
- */
- public void visitFolder(ICVSFolder mFolder) throws CVSException {
-
- if (ignoreMatcher != null && ignoreMatcher.match(mFolder.getName())) {
- return;
- }
-
- String localPath = mFolder.getRelativePath(session.getLocalRoot());
- monitor.subTask(Policy.bind("AbstractStructureVisitor.sendingFolder", localPath)); //$NON-NLS-1$
-
- session.sendConstructedDirectory(localPath);
- mFolder.acceptChildren(this);
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Log.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Log.java
deleted file mode 100644
index e33f34218..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Log.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-
-public class Log extends AbstractMessageCommand {
- /*** Local options: specific to log ***/
-
- public static LocalOption makeRevisionOption(String revision) {
- return new LocalOption("-r" + revision, null); //$NON-NLS-1$
- }
-
- protected Log() { }
- protected String getRequestId() {
- return "log"; //$NON-NLS-1$
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/MTHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/MTHandler.java
deleted file mode 100644
index 104ef426a..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/MTHandler.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-
-public class MTHandler extends ResponseHandler {
-
- private String nextLine;
- private boolean isLineAvailable;
-
- /**
- * @see ResponseHandler#getResponseID()
- */
- public String getResponseID() {
- return "MT"; //$NON-NLS-1$
- }
-
- /**
- * @see ResponseHandler#handle(Session, String, IProgressMonitor)
- */
- public void handle(Session session, String argument, IProgressMonitor monitor)
- throws CVSException {
-
- // If there was a line available from before, clear it
- if (isLineAvailable()) {
- startNextLine();
- }
-
- if (argument.charAt(0) == '+') {
- // Reset any previously accumulated text
- startNextLine();
- } else if (argument.charAt(0) == '-') {
- // Mark the line as available in case there was no trailing newline
- if (nextLine != null) {
- isLineAvailable = true;
- }
- } else {
- // Extract the tag and text from the line
- String tag;
- String text;
- int spaceIndex = argument.indexOf(' ');
- if (spaceIndex == -1) {
- tag = argument;
- text = null;
- } else {
- tag = argument.substring(0, spaceIndex);
- text = argument.substring(spaceIndex + 1);
- }
-
- // Accumulate the line and indicate if its available for use
- if (tag.equals("newline")) { //$NON-NLS-1$
- isLineAvailable = true;
- } else if (text != null) {
- // Reset the previous line if required
- if (isLineAvailable()) {
- startNextLine();
- }
- // Accumulate the line
- if (nextLine == null) {
- nextLine = text;
- } else {
- // The text from the sevrver contains spaces when appropriate so just append
- nextLine = nextLine + text;
- }
- }
- }
- }
-
- /**
- * Check if there is a line available. If there is, it should be fetched with
- * getLine() immediatly before the next MT response is processed.
- */
- public boolean isLineAvailable() {
- return isLineAvailable;
- }
-
- /**
- * Get the available line. This purges the line from the handler
- */
- public String getLine() {
- return nextLine;
- }
-
- private void startNextLine() {
- isLineAvailable = false;
- nextLine = null;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModTimeHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModTimeHandler.java
deleted file mode 100644
index a4fda8c30..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModTimeHandler.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.text.ParseException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.util.CVSDateFormatter;
-
-/**
- * Handles a "Mod-time" response from the CVS server.
- * <p>
- * Suppose as a result of performing a command the CVS server responds
- * as follows:<br>
- * <pre>
- * [...]
- * Mod-time 18 Oct 2001 20:21:13 -0330\n
- * [...]
- * </pre>
- * Then we parse and remember the date for use in subsequent
- * file transfer responses such as Updated.
- * </p>
- */
-class ModTimeHandler extends ResponseHandler {
- public String getResponseID() {
- return "Mod-time"; //$NON-NLS-1$
- }
-
- public void handle(Session session, String timeStamp,
- IProgressMonitor monitor) throws CVSException {
- try {
- session.setModTime(CVSDateFormatter.serverStampToDate(timeStamp));
- } catch (ParseException e) {
- throw new CVSException(Policy.bind("ModTimeHandler.invalidFormat", timeStamp), e); //$NON-NLS-1$
- }
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModifiedFileSender.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModifiedFileSender.java
deleted file mode 100644
index f2054ae9d..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModifiedFileSender.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-
-/**
- * Visit the CVS file structure, only sending files if they are modified.
- */
-class ModifiedFileSender extends FileStructureVisitor {
-
- public ModifiedFileSender(Session session, IProgressMonitor monitor) {
- super(session, false, true, monitor);
- }
-
- /**
- * Override sendFile to only send modified files
- */
- protected void sendFile(ICVSFile mFile) throws CVSException {
-
- // Only send the file if its modified
- if (mFile.isModified()) {
- super.sendFile(mFile);
- }
- }
-
- protected String getSendFileTitleKey() {
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModuleExpansionHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModuleExpansionHandler.java
deleted file mode 100644
index 657377c44..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModuleExpansionHandler.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-
-public class ModuleExpansionHandler extends ResponseHandler {
-
- /*
- * @see ResponseHandler#getResponseID()
- */
- public String getResponseID() {
- return "Module-expansion";//$NON-NLS-1$
- }
-
- /*
- * @see ResponseHandler#handle(Session, String, IProgressMonitor)
- */
- public void handle(Session session, String expansion, IProgressMonitor monitor)
- throws CVSException {
-
- session.addModuleExpansion(expansion);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NewEntryHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NewEntryHandler.java
deleted file mode 100644
index c86c9a030..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NewEntryHandler.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-public class NewEntryHandler extends ResponseHandler {
-
- /*
- * @see ResponseHandler#getResponseID()
- */
- public String getResponseID() {
- return "New-entry"; //$NON-NLS-1$
- }
-
- /*
- * @see ResponseHandler#handle(Session, String, IProgressMonitor)
- */
- public void handle(Session session, String localDir, IProgressMonitor monitor)
- throws CVSException {
-
- // read additional data for the response
- String repositoryFile = session.readLine();
- String entryLine = session.readLine();
-
- // Clear the recorded mod-time
- session.setModTime(null);
-
- // Get the local file
- String fileName = repositoryFile.substring(repositoryFile.lastIndexOf("/") + 1); //$NON-NLS-1$
- ICVSFolder mParent = session.getLocalRoot().getFolder(localDir);
- ICVSFile mFile = mParent.getFile(fileName);
-
- ResourceSyncInfo fileInfo = mFile.getSyncInfo();
- ResourceSyncInfo newInfo = new ResourceSyncInfo(entryLine, fileInfo.getPermissions(), null);
- mFile.setSyncInfo(newInfo);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/PruneFolderVisitor.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/PruneFolderVisitor.java
deleted file mode 100644
index e2dc8a483..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/PruneFolderVisitor.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResourceVisitor;
-
-/**
- * Goes recursivly through the folders checks if they are empyty
- * and deletes them. Of course it is starting at the leaves of the
- * recusion (the folders that do not have subfolders).
- */
-class PruneFolderVisitor implements ICVSResourceVisitor {
-
- private Session session;
-
- private ICVSResource currentVisitRoot;
-
- public PruneFolderVisitor() {
- }
-
- /**
- * This method is used to visit a set of ICVSResources.
- */
- public void visit(Session s, ICVSResource[] resources) throws CVSException {
- session = s;
-
- // Visit the resources
- for (int i = 0; i < resources.length; i++) {
- currentVisitRoot = resources[i];
- resources[i].accept(this);
- }
- }
-
- /**
- * @see ICVSResourceVisitor#visitFile(IManagedFile)
- */
- public void visitFile(ICVSFile file) throws CVSException {
- pruneParentIfAppropriate(file);
- }
-
- /**
- * @see ICVSResourceVisitor#visitFolder(ICVSFolder)
- */
- public void visitFolder(ICVSFolder folder) throws CVSException {
- // First prune any empty children
- folder.acceptChildren(this);
- pruneFolderIfAppropriate(folder);
- }
-
- private void pruneFolderIfAppropriate(ICVSFolder folder) throws CVSException {
- if (folder.isManaged() &&
- ! folder.equals(session.getLocalRoot()) &&
- folder.members(ICVSFolder.ALL_MEMBERS).length == 0) {
- folder.delete();
- folder.unmanage(null);
- pruneParentIfAppropriate(folder);
- }
- }
-
- private void pruneParentIfAppropriate(ICVSResource resource) throws CVSException {
- // If we are visiting the current visit root, prune the parent if appropriate
- if (CVSProviderPlugin.getPlugin().getPruneEmptyDirectories() && resource.equals(currentVisitRoot)) {
- currentVisitRoot = resource.getParent();
- pruneFolderIfAppropriate((ICVSFolder)currentVisitRoot);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RTag.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RTag.java
deleted file mode 100644
index b76937dca..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RTag.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener;
-import org.eclipse.team.internal.ccvs.core.client.listeners.TagListener;
-
-public class RTag extends RemoteCommand {
- /*** Local options: specific to tag ***/
- public static final LocalOption CREATE_BRANCH = Tag.CREATE_BRANCH;
- public static final LocalOption CLEAR_FROM_REMOVED = new LocalOption("-a", null); //$NON-NLS-1$
- public static final LocalOption FORCE_REASSIGNMENT = new LocalOption("-F", null); //$NON-NLS-1$
-
- /*** Default command output listener ***/
- private static final ICommandOutputListener DEFAULT_OUTPUT_LISTENER = new TagListener();
-
- /**
- * Makes a -r or -D option for a tag.
- * Valid for: checkout export history rdiff update
- */
- public static LocalOption makeTagOption(CVSTag tag) {
- int type = tag.getType();
- switch (type) {
- case CVSTag.BRANCH:
- case CVSTag.VERSION:
- case CVSTag.HEAD:
- return new LocalOption("-r", tag.getName()); //$NON-NLS-1$
- case CVSTag.DATE:
- return new LocalOption("-D", tag.getName()); //$NON-NLS-1$
- default:
- // Unknow tag type!!!
- throw new IllegalArgumentException();
- }
- }
-
- protected String getRequestId() {
- return "rtag"; //$NON-NLS-1$
- }
-
- protected ICVSResource[] computeWorkResources(Session session, LocalOption[] localOptions,
- String[] arguments) throws CVSException {
- if (arguments.length < 2) throw new IllegalArgumentException();
- return super.computeWorkResources(session, localOptions, arguments);
- }
-
- public IStatus execute(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, CVSTag sourceTag, CVSTag tag, String[] arguments,
- IProgressMonitor monitor) throws CVSException {
-
- if(tag.getType() != CVSTag.VERSION && tag.getType() != CVSTag.BRANCH) {
- throw new CVSException(new CVSStatus(IStatus.ERROR, Policy.bind("Tag.notVersionOrBranchError"))); //$NON-NLS-1$
- }
-
- // Add the source tag to the local options
- List modifiedLocalOptions = new ArrayList(localOptions.length + 1);
- if (sourceTag==null) sourceTag = CVSTag.DEFAULT;
- modifiedLocalOptions.addAll(Arrays.asList(localOptions));
- modifiedLocalOptions.add(makeTagOption(sourceTag));
-
- // Add the CREATE_BRANCH option for a branch tag
- if (tag.getType() == tag.BRANCH) {
- if ( ! CREATE_BRANCH.isElementOf(localOptions)) {
- modifiedLocalOptions.add(CREATE_BRANCH);
- }
- }
-
- // Add the tag name to the start of the arguments
- String[] newArguments = new String[arguments.length + 1];
- newArguments[0] = tag.getName();
- System.arraycopy(arguments, 0, newArguments, 1, arguments.length);
-
- return execute(session, globalOptions,
- (LocalOption[]) modifiedLocalOptions.toArray(new LocalOption[modifiedLocalOptions.size()]),
- newArguments, null, monitor);
- }
-
- public IStatus execute(GlobalOption[] globalOptions, LocalOption[] localOptions,
- CVSTag sourceTag, CVSTag tag, ICVSRemoteResource[] arguments, IProgressMonitor monitor)
- throws CVSException {
-
- // Get the open session for the arguments
- Session session = getOpenSession((ICVSResource[])Arrays.asList(arguments).toArray(new ICVSResource[arguments.length]));
- if (session == null) {
- throw new CVSException(Policy.bind("Command.noOpenSession")); //$NON-NLS-1$
- }
-
- // Convert arguments to repository relative path
- List stringArguments = new ArrayList(arguments.length);
- for (int i = 0; i < arguments.length; i++) {
- stringArguments.add(arguments[i].getRepositoryRelativePath());
- }
-
- return execute(session, globalOptions, localOptions, sourceTag, tag, (String[]) stringArguments.toArray(new String[stringArguments.size()]), monitor);
- }
-
- protected ICommandOutputListener getDefaultCommandOutputListener() {
- return DEFAULT_OUTPUT_LISTENER;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemoteCommand.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemoteCommand.java
deleted file mode 100644
index 2460bcf4e..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemoteCommand.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-
-/**
- * This class acts as a super class for those CVS commands that do not send up the local file structure
- */
-public abstract class RemoteCommand extends Command {
-
- protected ICVSResource[] computeWorkResources(Session session, LocalOption[] localOptions,
- String[] arguments) throws CVSException {
- return new ICVSResource[0];
- }
-
- protected void sendLocalResourceState(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor)
- throws CVSException {
- // do nothing
- }
-
- protected void sendLocalWorkingDirectory(Session session) throws CVSException {
- // do nothing
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Remove.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Remove.java
deleted file mode 100644
index d34a1de62..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Remove.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-
-public class Remove extends Command {
- /*** Local options: specific to remove ***/
-
- protected Remove() { }
- protected String getRequestId() {
- return "remove"; //$NON-NLS-1$
- }
-
- protected void sendLocalResourceState(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor)
- throws CVSException {
-
- // Send all modified files to the server
- // XXX Does the command line client send all modified files?
- new ModifiedFileSender(session, monitor).visit(session, resources);
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemoveEntryHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemoveEntryHandler.java
deleted file mode 100644
index ca2124fca..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemoveEntryHandler.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.util.Assert;
-
-/**
- * Handles a "Remove-entry" response from the CVS server.
- * <p>
- * Suppose as a result of performing a command the CVS server responds
- * as follows:<br>
- * <pre>
- * [...]
- * Remove-entry ??? \n
- * [...]
- * </pre>
- * Then
- * </p>
- */
-
-/**
- * It removes the file from both the entries of the parent-folder.
- * This happen, when the folder has allready been removed locally
- * what happens on a checkin that includes a removed file.
- */
-class RemoveEntryHandler extends ResponseHandler {
- public String getResponseID() {
- return "Remove-entry"; //$NON-NLS-1$
- }
-
- public void handle(Session session, String localDir,
- IProgressMonitor monitor) throws CVSException {
- // read additional data for the response
- String repositoryFile = session.readLine();
-
- // Get the local file
- String fileName = repositoryFile.substring(repositoryFile.lastIndexOf("/") + 1); //$NON-NLS-1$
- ICVSFolder mParent = session.getLocalRoot().getFolder(localDir);
- ICVSFile mFile = mParent.getFile(fileName);
- mFile.unmanage(null);
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemovedHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemovedHandler.java
deleted file mode 100644
index 49ee8dbcc..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemovedHandler.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.Policy;
-
-/**
- * Handles a "Removed" response from the CVS server.
- * <p>
- * Suppose as a result of performing a command the CVS server responds
- * as follows:<br>
- * <pre>
- * [...]
- * Removed ??? \n
- * [...]
- * </pre>
- * Then
- * </p>
- */
-
-/**
- * It removes the file from both the entries of the parent-folder
- * and from the local filesystem.
- */
-class RemovedHandler extends ResponseHandler {
- public String getResponseID() {
- return "Removed"; //$NON-NLS-1$
- }
-
- public void handle(Session session, String localDir, IProgressMonitor monitor) throws CVSException {
-
- // read additional data for the response
- String repositoryFile = session.readLine();
-
- // Get the local file
- String fileName = repositoryFile.substring(repositoryFile.lastIndexOf("/") + 1); //$NON-NLS-1$
- ICVSFolder mParent = session.getLocalRoot().getFolder(localDir);
- ICVSFile mFile = mParent.getFile(fileName);
-
- if ( ! mFile.isManaged()) {
- throw new CVSException(Policy.bind("RemovedHandler.invalid", new Path(localDir).append(fileName).toString())); //$NON-NLS-1$
- }
-
- // delete then unmanage the file
- if (mFile.isReadOnly()) mFile.setReadOnly(false);
- mFile.delete();
- mFile.unmanage(null);
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Request.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Request.java
deleted file mode 100644
index 2cb284269..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Request.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener;
-import org.eclipse.team.internal.ccvs.core.client.listeners.IConsoleListener;
-
-/**
- * Abstract base class for requests that are to be sent to the server.
- */
-public abstract class Request {
- public static final ExpandModules EXPAND_MODULES = new ExpandModules();
- public static final ValidRequests VALID_REQUESTS = new ValidRequests();
-
- /*** Response handler map ***/
- private static final Map responseHandlers = new HashMap();
- static {
- registerResponseHandler(new CheckedInHandler());
- registerResponseHandler(new CopyHandler());
- registerResponseHandler(new ModTimeHandler());
- registerResponseHandler(new NewEntryHandler());
- registerResponseHandler(new RemovedHandler());
- registerResponseHandler(new RemoveEntryHandler());
- registerResponseHandler(new StaticHandler(true));
- registerResponseHandler(new StaticHandler(false));
- registerResponseHandler(new StickyHandler(true));
- registerResponseHandler(new StickyHandler(false));
- registerResponseHandler(new UpdatedHandler(UpdatedHandler.HANDLE_UPDATED));
- registerResponseHandler(new UpdatedHandler(UpdatedHandler.HANDLE_UPDATE_EXISTING));
- registerResponseHandler(new UpdatedHandler(UpdatedHandler.HANDLE_CREATED));
- registerResponseHandler(new UpdatedHandler(UpdatedHandler.HANDLE_MERGED));
- registerResponseHandler(new ValidRequestsHandler());
- registerResponseHandler(new ModuleExpansionHandler());
- registerResponseHandler(new MTHandler());
- }
- protected static void registerResponseHandler(ResponseHandler handler) {
- responseHandlers.put(handler.getResponseID(), handler);
- }
- protected static void removeResponseHandler(String responseID) {
- responseHandlers.remove(responseID);
- }
- protected static ResponseHandler getResponseHandler(String responseID) {
- return (ResponseHandler)responseHandlers.get(responseID);
- }
-
- /**
- * Prevents client code from instantiating us.
- */
- protected Request() { }
-
- /**
- * Returns the string used to invoke this request on the server.
- * [template method]
- *
- * @return the request identifier string
- */
- protected abstract String getRequestId();
-
- /**
- * Executes a request and processes the responses.
- *
- * @param session the open CVS session
- * @param listener the command output listener, or null to discard all messages
- * @param monitor the progress monitor
- * @return a status code indicating success or failure of the operation
- */
- protected IStatus executeRequest(Session session, ICommandOutputListener listener,
- IProgressMonitor monitor) throws CVSException {
- // send request
- session.sendRequest(getRequestId());
-
- // This number can be tweaked if the monitor is judged to move too
- // quickly or too slowly. After some experimentation this is a good
- // number for both large projects (it doesn't move so quickly as to
- // give a false sense of speed) and smaller projects (it actually does
- // move some rather than remaining still and then jumping to 100).
- final int TOTAL_WORK = 300;
- monitor.beginTask(Policy.bind("Command.receivingResponses"), TOTAL_WORK); //$NON-NLS-1$
- int halfWay = TOTAL_WORK / 2;
- int currentIncrement = 4;
- int nextProgress = currentIncrement;
- int worked = 0;
-
- // If the session is connected to a CVSNT server (1.11.1.1), we'll need to do some special handling for
- // some errors. Unfortunately, CVSNT 1.11.1.1 will drop the connection after so some functionality is
- // still effected
- boolean isCVSNT = session.isCVSNT();
-
- List accumulatedStatus = new ArrayList();
- for (;;) {
- // update monitor work amount
- if (--nextProgress <= 0) {
- monitor.worked(1);
- worked++;
- if (worked >= halfWay) {
- // we have passed the current halfway point, so double the
- // increment and reset the halfway point.
- currentIncrement *= 2;
- halfWay += (TOTAL_WORK - halfWay) / 2;
- }
- // reset the progress counter to another full increment
- nextProgress = currentIncrement;
- }
- Policy.checkCanceled(monitor);
-
- // retrieve a response line
- String response = session.readLine();
- int spacePos = response.indexOf(' ');
- String argument;
- if (spacePos != -1) {
- argument = response.substring(spacePos + 1);
- response = response.substring(0, spacePos);
- } else argument = ""; //$NON-NLS-1$
-
- // handle completion responses
- if (response.equals("ok")) { //$NON-NLS-1$
- break;
- } else if (response.equals("error") || (isCVSNT && response.equals(""))) { //$NON-NLS-1$ //$NON-NLS-2$
- if (argument.trim().length() == 0) {
- argument = getServerErrorMessage();
- }
- if (accumulatedStatus.isEmpty()) {
- accumulatedStatus.add(new CVSStatus(CVSStatus.ERROR, CVSStatus.SERVER_ERROR, Policy.bind("Command.noMoreInfoAvailable")));//$NON-NLS-1$
- }
- return new MultiStatus(CVSProviderPlugin.ID, CVSStatus.SERVER_ERROR,
- (IStatus[]) accumulatedStatus.toArray(new IStatus[accumulatedStatus.size()]),
- argument, null);
- // handle message responses
- } else if (response.equals("MT")) { //$NON-NLS-1$
- // Handle the MT response
- MTHandler handler = (MTHandler) responseHandlers.get(response);
- if (handler != null) {
- handler.handle(session, argument, monitor);
- } else {
- throw new CVSException(new org.eclipse.core.runtime.Status(IStatus.ERROR,
- CVSProviderPlugin.ID, CVSException.IO_FAILED,
- Policy.bind("Command.unsupportedResponse", response, argument), null)); //$NON-NLS-1$
- }
- // If a line is available, pass it on to the message listener
- // and console as if it were an M response
- if (handler.isLineAvailable()) {
- String line = handler.getLine();
- IStatus status = listener.messageLine(line, session.getLocalRoot(), monitor);
- if (status != ICommandOutputListener.OK) accumulatedStatus.add(status);
- if (session.isOutputToConsole()) {
- IConsoleListener consoleListener = CVSProviderPlugin.getPlugin().getConsoleListener();
- if (consoleListener != null) consoleListener.messageLineReceived(line);
- }
- }
- } else if (response.equals("M")) { //$NON-NLS-1$
- IStatus status = listener.messageLine(argument, session.getLocalRoot(), monitor);
- if (status != ICommandOutputListener.OK) accumulatedStatus.add(status);
- if (session.isOutputToConsole()) {
- IConsoleListener consoleListener = CVSProviderPlugin.getPlugin().getConsoleListener();
- if (consoleListener != null) consoleListener.messageLineReceived(argument);
- }
- } else if (response.equals("E")) { //$NON-NLS-1$
- IStatus status = listener.errorLine(argument, session.getLocalRoot(), monitor);
- if (status != ICommandOutputListener.OK) accumulatedStatus.add(status);
- if (session.isOutputToConsole()) {
- IConsoleListener consoleListener = CVSProviderPlugin.getPlugin().getConsoleListener();
- if (consoleListener != null) consoleListener.errorLineReceived(argument);
- }
- // handle other responses
- } else {
- ResponseHandler handler = (ResponseHandler) responseHandlers.get(response);
- if (handler != null) {
- handler.handle(session, argument, monitor);
- } else {
- throw new CVSException(new org.eclipse.core.runtime.Status(IStatus.ERROR,
- CVSProviderPlugin.ID, CVSException.IO_FAILED,
- Policy.bind("Command.unsupportedResponse", response, argument), null)); //$NON-NLS-1$
- }
- }
- }
- if (accumulatedStatus.isEmpty()) {
- return ICommandOutputListener.OK;
- } else {
- return new MultiStatus(CVSProviderPlugin.ID, CVSStatus.INFO,
- (IStatus[]) accumulatedStatus.toArray(new IStatus[accumulatedStatus.size()]),
- Policy.bind("Command.warnings", Policy.bind("Command." + getRequestId())), null); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /*
- * Provide the message that is used for the status that is generated when the server
- * reports as error.
- */
- protected String getServerErrorMessage() {
- return Policy.bind("Command.serverError", Policy.bind("Command." + getRequestId())); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Makes a list of all valid responses; for initializing a session.
- * @return a space-delimited list of all valid response strings
- */
- static String makeResponseList() {
- StringBuffer result = new StringBuffer("ok error M E"); //$NON-NLS-1$
- Iterator elements = responseHandlers.keySet().iterator();
- while (elements.hasNext()) {
- result.append(' ');
- result.append((String) elements.next());
- }
-
- return result.toString();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ResponseHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ResponseHandler.java
deleted file mode 100644
index aa52aae52..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ResponseHandler.java
+++ /dev/null
@@ -1,114 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-/**
- * Handles server responses that arise as a result of issuing a request
- * (usually a command) to a CVS server. The processing of each such
- * response is deferred to subclasses.
- */
-public abstract class ResponseHandler {
- /**
- * Returns the text string of the server response handled by this object.
- * @return the id
- */
- public abstract String getResponseID();
-
- /**
- * Handles a server response.
- * <p>
- * Suppose as a result of performing a command the CVS server responds
- * as follows:<br>
- * <pre>
- * [...]
- * Clear-sticky myDirectory \n
- * /u/cvsroot/myDirectory \n
- * [...]
- * </pre>
- * Then the <code>handle</code> method of the <code>ResponseHandler</code>
- * for <em>Clear-sticky</em> will be invoked with <code>argument</code>
- * set to <em>"myDirectory"</em>. It must then read the remaining
- * response data from the connection (<em>"/u/cvsroot/myDirectory"</em>
- * including the newline) and take any necessary action.
- * </p><p>
- * Note: The type and quantity of additional data that must be read
- * from the connection varies on a per-response basis.
- * </p>
- * @param session the Session used for CVS communication
- * @param argument the argument supplied with the response
- * @param monitor the progress monitor for the current CVS command
- */
- public abstract void handle(Session session, String argument,
- IProgressMonitor monitor) throws CVSException;
-
- /**
- * Creates a new CVS folder.
- * @param localDir the local path of the folder relative to root
- * @param repositoryDir the remote path of the folder relative to the repository
- * @return the new folder
- */
- protected static ICVSFolder createFolder(Session session,
- String localDir, String repositoryDir) throws CVSException {
- ICVSFolder folder = session.getLocalRoot().getFolder(localDir);
- if (! folder.exists()) {
- try {
- folder.mkdir();
- } catch (CVSException original) {
- boolean caseInvariant = false;
- if (original.getStatus().getCode() == IResourceStatus.CASE_VARIANT_EXISTS) {
- // We will try to create the mapped child below.
- caseInvariant = true;
- } else if (original.getStatus().getCode() == IResourceStatus.RESOURCE_NOT_FOUND) {
- // The parent of the folder doesn't exist. It could be due to case invariance.
- // Check if there is a case invariant mapping for the folder
- String actualLocalDir = session.getUniquePathForCaseSensitivePath(localDir, false);
- folder = session.getLocalRoot().getFolder(actualLocalDir);
- try {
- if (! folder.exists()) folder.mkdir();
- // We succeed in creating the child of a mapped parent
- // Since caseInvariant is false, we will fall through
- } catch (CVSException ex) {
- if (ex.getStatus().getCode() == IResourceStatus.CASE_VARIANT_EXISTS) {
- // We will try to create he mapped child below.
- caseInvariant = true;
- } else {
- // The atempt to get the mapped parent failed.
- // Throw the original exception
- throw original;
- }
- }
- } else {
- throw original;
- }
- if (caseInvariant) {
- // Change the name (last segment) of the localDir to a unique name for the case invariant one
- String newlocalDir = session.getUniquePathForCaseSensitivePath(localDir, true);
- folder = session.getLocalRoot().getFolder(newlocalDir);
- if (! folder.exists()) folder.mkdir();
- // Signal to the session that there is a renamed folder.
- session.addCaseCollision(localDir, newlocalDir);
- }
- }
- }
- if (! folder.isCVSFolder()) {
- folder.setFolderSyncInfo(new FolderSyncInfo(
- Util.getRelativePath(session.getRepositoryRoot(), repositoryDir),
- session.getCVSRepositoryLocation().getLocation(),
- null, false));
- }
- return folder;
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java
deleted file mode 100644
index 8a0166e80..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java
+++ /dev/null
@@ -1,1075 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.zip.GZIPInputStream;
-import java.util.zip.GZIPOutputStream;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResourceVisitor;
-import org.eclipse.team.internal.ccvs.core.ICVSRunnable;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.connection.Connection;
-import org.eclipse.team.internal.ccvs.core.util.Assert;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-import org.eclipse.team.internal.core.streams.CRLFtoLFInputStream;
-import org.eclipse.team.internal.core.streams.LFtoCRLFInputStream;
-import org.eclipse.team.internal.core.streams.ProgressMonitorInputStream;
-import org.eclipse.team.internal.core.streams.SizeConstrainedInputStream;
-
-/**
- * Maintains CVS communication state for the lifetime of a connection
- * to a remote repository. This class covers the initialization, use,
- * and eventual shutdown of a dialogue between a CVS client and a
- * remote server. This dialogue may be monitored through the use of
- * a console.
- *
- * Initially the Session is in a CLOSED state during which communication
- * with the server cannot take place. Once OPENED, any number of commands
- * may be issued serially to the server, one at a time. When finished, the
- * Session MUST be CLOSED once again to prevent eventual local and/or
- * remote resource exhaustion. The session can either be discarded, or
- * re-opened for use with the same server though no state is persisted from
- * previous connections except for console attributes.
- *
- * CVSExceptions are thrown only as a result of unrecoverable errors. Once
- * this happens, commands must no longer be issued to the server. If the
- * Session is in the OPEN state, it is still the responsibility of the
- * caller to CLOSE it before moving on.
- */
-public class Session {
- public static final String CURRENT_LOCAL_FOLDER = "."; //$NON-NLS-1$
- public static final String CURRENT_REMOTE_FOLDER = ""; //$NON-NLS-1$
- public static final String SERVER_SEPARATOR = "/"; //$NON-NLS-1$
-
- // default file transfer buffer size (in bytes)
- private static final int TRANSFER_BUFFER_SIZE = 8192;
- // update progress bar in increments of this size (in bytes)
- // no incremental progress shown for files smaller than this size
- private static final int TRANSFER_PROGRESS_INCREMENT = 32768;
-
- private static final boolean IS_CRLF_PLATFORM = Arrays.equals(
- System.getProperty("line.separator").getBytes(), new byte[] { '\r', '\n' }); //$NON-NLS-1$
-
- private static Map currentOpenSessions = null;
- private static final int MAX_SESSIONS_OPEN = 10;
-
- private CVSRepositoryLocation location;
- private ICVSFolder localRoot;
- private boolean outputToConsole;
- private Connection connection = null;
- private String validRequests = null;
- private Date modTime = null;
- private boolean noLocalChanges = false;
- private boolean createBackups = true;
- private int compressionLevel = 0;
- private List expansions;
- private Collection /* of ICVSFile */ textTransferOverrideSet = null;
- private boolean hasBeenConnected = false;
- private Map caseMappings;
-
- // The resource bundle key that provides the file sending message
- private String sendFileTitleKey;
-
- /**
- * Creates a new CVS session, initially in the CLOSED state.
- * By default, command output is directed to the console.
- *
- * @param location the CVS repository location used for this session
- * @param localRoot represents the current working directory of the client
- */
- public Session(ICVSRepositoryLocation location, ICVSFolder localRoot) {
- this(location, localRoot, true);
- }
-
- /**
- * Creates a new CVS session, initially in the CLOSED state.
- *
- * @param location the CVS repository location used for this session
- * @param localRoot represents the current working directory of the client
- * @param outputToConsole if true, command output is directed to the console
- */
- public Session(ICVSRepositoryLocation location, ICVSFolder localRoot, boolean outputToConsole) {
- this.location = (CVSRepositoryLocation) location;
- this.localRoot = localRoot;
- this.outputToConsole = outputToConsole;
- }
-
- /**
- * Execute the given runnable in a context that has access to an open session
- *
- * A session will be opened for the provided root. If the root is null, no session is opened.
- * However, sessions will be open for nested calls to run and these sessions will not be closed
- * until the outer most run finishes.
- */
- public static void run(ICVSRepositoryLocation location, ICVSFolder root, boolean outputToConsole,
- ICVSRunnable runnable, IProgressMonitor monitor) throws CVSException {
-
- // Determine if we are nested or not
- boolean isOuterRun = false;
- if (currentOpenSessions == null) {
- // Initialize the variable to be a map
- currentOpenSessions = new HashMap();
- isOuterRun = true;
- }
-
- try {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100);
- if (root == null) {
- // We don't have a root, so just run the runnable
- // (assuming that nested runs will create sessions)
- runnable.run(Policy.subMonitorFor(monitor, 90));
- } else {
- // Open a session on the root as far up the chain as possible
- ICVSFolder actualRoot = root;
- while (actualRoot.isManaged()) {
- actualRoot = actualRoot.getParent();
- }
- // Look for the root in the current open sessions
- Session session = (Session)currentOpenSessions.get(actualRoot);
- if (session == null) {
- // Make sure we don't exceed our maximum
- if (currentOpenSessions.size() == MAX_SESSIONS_OPEN) {
- // Pick one at random and close it
- Object key = currentOpenSessions.keySet().iterator().next();
- try {
- ((Session)currentOpenSessions.get(key)).close();
- } catch (CVSException e) {
- CVSProviderPlugin.log(e.getStatus());
- } finally {
- currentOpenSessions.remove(key);
- }
- }
- // If it's not there, open a session for the given root and remember it
- session = new Session(location, actualRoot, outputToConsole);
- session.open(Policy.subMonitorFor(monitor, 10));
- currentOpenSessions.put(actualRoot, session);
- }
-
- try {
- root.run(runnable, Policy.subMonitorFor(monitor, 100));
- } catch (CVSException e) {
- // The run didn't succeed so close the session and forget it ever existed
- try {
- // The session may have been close by a nested run
- if (currentOpenSessions.get(actualRoot) != null) session.close();
- } finally {
- currentOpenSessions.remove(actualRoot);
- throw e;
- }
- }
- }
- } finally {
- monitor.done();
- if (isOuterRun) {
- // Close all open sessions
- try {
- Iterator iter = currentOpenSessions.keySet().iterator();
- while (iter.hasNext()) {
- Session session = (Session)currentOpenSessions.get(iter.next());
- try {
- session.close();
- } catch (CVSException e) {
- CVSProviderPlugin.log(e.getStatus());
- }
- }
- } finally {
- currentOpenSessions = null;
- }
- }
- }
- }
-
- /**
- * Answer the currently open session
- */
- protected static Session getOpenSession(ICVSResource resource) throws CVSException {
- ICVSFolder root;
- if (resource.isFolder()) {
- root = (ICVSFolder)resource;
- } else {
- root = resource.getParent();
- }
- while (root.isManaged()) {
- root = root.getParent();
- }
- // Look for the root in the current open sessions
- return (Session)currentOpenSessions.get(root);
- }
-
- /**
- * Register a case collision with the session.
- *
- * For folders, the desired path is where the folder should be and the actual path
- * is where is was put temporarily. If one of the folders involved is pruned, the
- * other can be placed properly (see Session#handleCaseCollisions())
- *
- * For files, the desired path is where the file should be and the actual path is
- * the emtpy path indicating that the resource was not loaded.
- *
- * This makes sense because the files in a folder are always communicated before the folders
- * so a file can only collide with anothe file which can never be pruned so there's no
- * point in loading the file in a temporary place.
- */
- protected void addCaseCollision(String desiredLocalPath, String actualLocalPath) {
- if (caseMappings == null) caseMappings = new HashMap();
- IPath desiredPath = new Path(desiredLocalPath);
- IPath actualPath = new Path(actualLocalPath);
- Assert.isTrue(actualPath.equals(Path.EMPTY) || (desiredPath.segmentCount() == actualPath.segmentCount()));
- caseMappings.put(desiredPath, actualPath);
- }
- /*
- * Add a module expansion receivered from the server.
- * This is only used by the ModuleExpansionsHandler
- */
- protected void addModuleExpansion(String expansion) {
- expansions.add(expansion);
- }
-
- /*
- * Add a module expansion receivered from the server.
- * This is only used by the ExpandModules command
- */
- protected void resetModuleExpansion() {
- if (expansions == null)
- expansions = new ArrayList();
- else
- expansions.clear();
- }
-
- /**
- * Opens, authenticates and initializes a connection to the server specified
- * for the remote location.
- *
- * @param monitor the progress monitor
- * @throws IllegalStateException if the Session is not in the CLOSED state
- */
- public void open(IProgressMonitor monitor) throws CVSException {
- if (connection != null) throw new IllegalStateException();
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 100);
- try {
- connection = location.openConnection(Policy.subMonitorFor(monitor, 50));
- hasBeenConnected = true;
-
- ResponseHandler mtHandler = Request.getResponseHandler("MT"); //$NON-NLS-1$
- // accept MT messages for all non-standard server
- boolean useMT = ! (location.getServerPlatform() == location.CVS_SERVER);
- try {
- // If we're connected to a CVSNT server or we don't know the platform,
- // accept MT. Otherwise don't.
- // We only want to disable MT messages for this particular session
- // since there may be multiple sessions open.
- if ( ! useMT) {
- Request.removeResponseHandler("MT"); //$NON-NLS-1$
- }
-
- // tell the server the names of the responses we can handle
- connection.writeLine("Valid-responses " + Request.makeResponseList()); //$NON-NLS-1$
- } finally {
- // Re-register the MT handler since there may be more than one session open
- if ( ! useMT) {
- Request.registerResponseHandler(mtHandler);
- }
- }
-
- // ask for the set of valid requests
- Request.VALID_REQUESTS.execute(this, Policy.subMonitorFor(monitor, 40));
-
- // set the root directory on the server for this connection
- connection.writeLine("Root " + getRepositoryRoot()); //$NON-NLS-1$
-
- // enable compression
- compressionLevel = CVSProviderPlugin.getPlugin().getCompressionLevel();
- if (compressionLevel != 0 && isValidRequest("gzip-file-contents")) { //$NON-NLS-1$
- // Enable the use of CVS 1.8 per-file compression mechanism.
- // The newer Gzip-stream request seems to be problematic due to Java's
- // GZIPInputStream tendency to block on read() rather than to return a
- // partially filled buffer. The latter option would be better since it
- // can make more effective use of the code dictionary, if it can be made
- // to work...
- connection.writeLine("gzip-file-contents " + Integer.toString(compressionLevel)); //$NON-NLS-1$
- } else {
- compressionLevel = 0;
- }
-
- // get the server platform if it is unknown
- if (location.getServerPlatform() == location.UNDETERMINED_PLATFORM) {
- Command.VERSION.execute(this, location, Policy.subMonitorFor(monitor, 10));
- }
- } catch (CVSException e) {
- // If there is a failure opening, make sure we're closed
- if (connection != null) {
- hasBeenConnected = false;
- try {
- close();
- } catch (CVSException ex) {
- CVSProviderPlugin.log(ex);
- }
- }
- throw e;
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Closes a connection to the server.
- *
- * @throws IllegalStateException if the Session is not in the OPEN state
- */
- public void close() throws CVSException {
- if (connection == null) {
- if (hasBeenConnected) {
- throw new IllegalStateException();
- } else {
- return;
- }
- }
- connection.close();
- connection = null;
- validRequests = null;
- }
-
- /**
- * Determines if the server supports the specified request.
- *
- * @param request the request string to verify
- * @return true iff the request is supported
- */
- public boolean isValidRequest(String request) {
- return (validRequests == null) ||
- (validRequests.indexOf(" " + request + " ") != -1); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public boolean isCVSNT() {
- if (location.getServerPlatform() == location.UNDETERMINED_PLATFORM) {
- return location.getRootDirectory().indexOf(':') == 1;
- } else {
- return location.getServerPlatform() == location.CVSNT_SERVER;
- }
- }
-
- /**
- * Return a local path that can be used to uniquely identify a resource
- * if the platform does not support case variant names and there is a name collision
- */
- protected String getUniquePathForCaseSensitivePath(String localPath, boolean creatingFolder) {
- IPath path = new Path(localPath);
- IPath existingMapping = null;
- if (caseMappings != null) {
- // Look for an existing parent path that has already been mapped
- for (int i = 0; i < path.segmentCount(); i++) {
- IPath key = path.removeLastSegments(i);
- existingMapping = (IPath)caseMappings.get(key);
- if (existingMapping != null) break;
- }
- }
- if (existingMapping != null) {
- if (existingMapping.segmentCount() == path.segmentCount()) {
- return existingMapping.toString();
- }
- // Convert the path to the mapped path
- path = existingMapping.append(path.removeFirstSegments(existingMapping.segmentCount()));
- }
- if (creatingFolder) {
- // Change the name of the folder to a case insensitive one
- String folderName = path.lastSegment();
- // XXX We should ensure that each permutation of characters is unique
- folderName = getUniqueNameForCaseVariant(folderName);
- path = path.removeLastSegments(1).append(folderName);
- }
- return path.toString();
- }
-
- /*
- * Return a name that is unique for a give case variant.
- */
- private String getUniqueNameForCaseVariant(String name) {
- char[] buffer = new char[name.length() * 2];
- int position = 0;
- for (int i = 0; i < name.length(); i++) {
- char c = name.charAt(i);
- buffer[position++] = c;
- if (Character.isLetter(c)) {
- if (Character.isUpperCase(c)) {
- buffer[position++] = '-';
- } else {
- buffer[position++] = '_';
- }
- }
- }
- return new String(buffer, 0, position);
- }
-
- /**
- * Returns the local root folder for this session.
- * <p>
- * Generally speaking, specifies the "current working directory" at
- * the time of invocation of an equivalent CVS command-line client.
- * </p>
- *
- * @return the local root folder
- */
- public ICVSFolder getLocalRoot() {
- return localRoot;
- }
-
- /**
- * Return the list of module expansions communicated from the server.
- *
- * The modules expansions are typically a directory path of length 1
- * but can be of greater length on occasion.
- */
- public String[] getModuleExpansions() {
- if (expansions == null) return new String[0];
- return (String[]) expansions.toArray(new String[expansions.size()]);
- }
-
- /**
- * Returns the repository root folder for this session.
- * <p>
- * Specifies the unqualified path to the CVS repository root folder
- * on the server.
- * </p>
- *
- * @return the repository root folder
- */
- public String getRepositoryRoot() {
- return location.getRootDirectory();
- }
-
- /**
- * Returns an object representing the CVS repository location for this session.
- *
- * @return the CVS repository location
- */
- public ICVSRepositoryLocation getCVSRepositoryLocation() {
- return location;
- }
-
- private IContainer getIResourceFor(ICVSFolder cvsFolder) throws CoreException, CVSException {
- if (cvsFolder.isManaged()) {
- return getIResourceFor(cvsFolder.getParent()).getFolder(new Path(cvsFolder.getName()));
- } else {
- return ResourcesPlugin.getWorkspace().getRoot().getProject(cvsFolder.getName());
- }
- }
-
- protected void handleCaseCollisions() throws CVSException {
- // Handle any case variant mappings
- Map mappings = caseMappings;
- if (mappings == null || mappings.size() == 0) return;
- // We need to start at the longest paths and work to the shortest
- // in case there are nested case collisions
- List sortedCollisions = new ArrayList();
- sortedCollisions.addAll(mappings.keySet());
- Collections.sort(sortedCollisions, new Comparator() {
- public int compare(Object arg0, Object arg1) {
- int length0 = ((IPath)arg0).segmentCount();
- int length1 = ((IPath)arg1).segmentCount();
- if (length0 == length1) {
- return arg0.toString().compareTo(arg1.toString());
- }
- return length0 > length1 ? -1 : 1;
- }
- });
- // For each mapping, we need to see if one of the culprits was pruned
- List unhandledMappings = new ArrayList();
- Iterator iterator = sortedCollisions.iterator();
- while (iterator.hasNext()) {
- IPath desiredPath = (IPath)iterator.next();
- IPath actualPath = (IPath)mappings.get(desiredPath);
- // Check for the empty path (i.e. unloaded file)
- if (actualPath.equals(Path.EMPTY)) {
- unhandledMappings.add(desiredPath);
- continue;
- }
- // Check if the actualPath still exists (it may have been pruned)
- ICVSFolder actualFolder = getLocalRoot().getFolder(actualPath.toString());
- if ( ! actualFolder.exists()) continue;
- // Check if the desiredPath exists (we can only do this by trying to create it
- ICVSFolder desiredFolder = getLocalRoot().getFolder(desiredPath.toString());
- try {
- desiredFolder.mkdir();
- desiredFolder.delete();
- } catch (CVSException e) {
- // Must still exists. Delete the collision
- actualFolder.delete();
- actualFolder.unmanage(null);
- unhandledMappings.add(desiredPath);
- continue;
- }
- // The desired location is open (probably due to pruning)
- try {
- // We need to get the IResource for the actual and desired locations
- IResource actualResource = getIResourceFor(actualFolder);
- IResource desiredResource = actualResource.getParent().getFolder(new Path(desiredFolder.getName()));
- // Move the actual to the desired location
- actualResource.move(desiredResource.getFullPath(), false, null);
- // We need to also move the sync info. Since sync info is a session property
- // of the object, we can simpy reset the info for each moved resource
- desiredFolder.accept(new ICVSResourceVisitor() {
- public void visitFile(ICVSFile file) throws CVSException {
- file.setSyncInfo(file.getSyncInfo());
- }
- public void visitFolder(ICVSFolder folder) throws CVSException {
- folder.setFolderSyncInfo(folder.getFolderSyncInfo());
- folder.acceptChildren(this);
- }
- });
- // Unmanage the old location in order to remove the entry from the parent
- actualFolder.unmanage(null);
- } catch (CoreException e) {
- CVSProviderPlugin.log(e.getStatus());
- unhandledMappings.add(desiredPath);
- }
- }
-
- if (unhandledMappings.size() > 0) {
- MultiStatus status = new MultiStatus(CVSProviderPlugin.ID, CVSStatus.CASE_VARIANT_EXISTS, Policy.bind("PruneFolderVisitor.caseVariantsExist"), null);//$NON-NLS-1$
- Iterator iter = unhandledMappings.iterator();
- while (iter.hasNext()) {
- IPath desiredPath = (IPath) iter.next();
- IPath actualPath = (IPath)mappings.get(desiredPath);
- status.add(new CVSStatus(IStatus.ERROR, CVSStatus.CASE_VARIANT_EXISTS,
- Policy.bind("PruneFolderVisitor.caseVariantExists", desiredPath.toString())));//$NON-NLS-1$
- }
- if (status.getChildren().length == 1) {
- throw new CVSException(status.getChildren()[0]);
- } else {
- throw new CVSException(status);
- }
- }
- }
-
- /**
- * Receives a line of text minus the newline from the server.
- *
- * @return the line of text
- */
- public String readLine() throws CVSException {
- return connection.readLine();
- }
-
- /**
- * Sends a line of text followed by a newline to the server.
- *
- * @param line the line of text
- */
- public void writeLine(String line) throws CVSException {
- connection.writeLine(line);
- }
-
- /**
- * Sends an argument to the server.
- * <p>e.g. sendArgument("Hello\nWorld\n Hello World") sends:
- * <pre>
- * Argument Hello \n
- * Argumentx World \n
- * Argumentx Hello World \n
- * </pre></p>
- *
- * @param arg the argument to send
- */
- public void sendArgument(String arg) throws CVSException {
- connection.write("Argument "); //$NON-NLS-1$
- int oldPos = 0;
- for (;;) {
- int pos = arg.indexOf('\n', oldPos);
- if (pos == -1) break;
- connection.writeLine(arg.substring(oldPos, pos));
- connection.write("Argumentx "); //$NON-NLS-1$
- oldPos = pos + 1;
- }
- connection.writeLine(arg.substring(oldPos));
- }
-
- /**
- * Sends a request to the server and flushes any output buffers.
- *
- * @param requestId the string associated with the request to be executed
- */
- public void sendRequest(String requestId) throws CVSException {
- connection.writeLine(requestId);
- connection.flush();
- }
-
- /**
- * Sends an Is-modified request to the server without the file contents.
- * <p>e.g. if a file called "local_file" was modified, sends:
- * <pre>
- * Is-modified local_file \n
- * </pre></p><p>
- * This request is an optimized form of the Modified request and may not
- * be supported by all servers. Hence, if it is not supported, a Modified
- * request is sent instead along with the file's contents. According to
- * the CVS protocol specification, this request is only safe for use with
- * some forms of: admin, annotate, diff, editors, log, watch-add, watch-off,
- * watch-on, watch-remove, and watchers.<br>
- * It may be possible to use this for: add, export, remove and status.<br>
- * Do not use with co, ci, history, init, import, release, rdiff, rtag, or update.
- * </p><p>
- * Note: The most recent Directory request must have specified the file's
- * parent folder.
- * </p>
- *
- * @param file the file that was modified
- * @see #sendModified
- */
- public void sendIsModified(ICVSFile file, boolean isBinary, IProgressMonitor monitor)
- throws CVSException {
- if (isValidRequest("Is-modified")) { //$NON-NLS-1$
- connection.writeLine("Is-modified " + file.getName()); //$NON-NLS-1$
- } else {
- sendModified(file, isBinary, monitor);
- }
- }
-
- /**
- * Sends a Static-directory request to the server.
- * <p>
- * Indicates that the directory specified in the most recent Directory request
- * is static. No new files will be checked out into this directory unless
- * explicitly requested.
- * </p>
- */
- public void sendStaticDirectory() throws CVSException {
- connection.writeLine("Static-directory"); //$NON-NLS-1$
- }
-
- /**
- * Sends a Directory request to the server with a constructed path.
- * <p>
- * It may be necessary at times to guess the remote path of a directory since
- * it does not exist yet. In this case we construct a remote path based on the
- * local path by prepending the local path with the repository root. This may
- * not work in the presence of modules, so only use it for creating new projects.
- * </p><p>
- * Note: A CVS repository root can end with a trailing slash. The CVS server
- * expects that the repository root sent contain this extra slash. Including
- * the foward slash in addition to the absolute remote path makes for a string
- * containing two consecutive slashes (e.g. /home/cvs/repo//projecta/a.txt).
- * This is valid in the CVS protocol.
- * </p>
- */
- public void sendConstructedDirectory(String localDir) throws CVSException {
- sendDirectory(localDir, getRepositoryRoot() + "/" + localDir); //$NON-NLS-1$
- }
-
- /**
- * Sends a Directory request to the server.
- * <p>e.g. sendDirectory("local_dir", "remote_dir") sends:
- * <pre>
- * Directory local_dir
- * repository_root/remote_dir
- * </pre></p>
- *
- * @param localDir the path of the local directory relative to localRoot
- * @param remoteDir the path of the remote directory relative to repositoryRoot
- */
- public void sendDirectory(String localDir, String remoteDir) throws CVSException {
- if (localDir.length() == 0) localDir = "."; //$NON-NLS-1$
- connection.writeLine("Directory " + localDir); //$NON-NLS-1$
- connection.writeLine(remoteDir);
- }
-
- /**
- * Sends a Directory request for the localRoot.
- */
- public void sendLocalRootDirectory() throws CVSException {
- sendDirectory(".", localRoot.getRemoteLocation(localRoot)); //$NON-NLS-1$
- }
-
- /**
- * Sends a Directory request for the localRoot with a constructed path.
- * <p>
- * Use this when creating a new project that does not exist in the repository.
- * </p>
- * @see #sendConstructedDirectory
- */
- public void sendConstructedRootDirectory() throws CVSException {
- sendConstructedDirectory(""); //$NON-NLS-1$
- }
-
- /**
- * Sends an Entry request to the server.
- * <p>
- * Indicates that a file is managed (but it may not exist locally). Sends
- * the file's entry line to the server to indicate the version that was
- * previously checked out.
- * </p><p>
- * Note: The most recent Directory request must have specified the file's
- * parent folder.
- * </p>
- *
- * @param entryLine the formatted entry line of the managed file.
- */
- public void sendEntry(String entryLine) throws CVSException {
- connection.writeLine("Entry " + entryLine); //$NON-NLS-1$
- }
-
- /**
- * Sends a global options to the server.
- * <p>e.g. sendGlobalOption("-n") sends:
- * <pre>
- * Global_option -n \n
- * </pre></p>
- *
- * @param option the global option to send
- */
- public void sendGlobalOption(String option) throws CVSException {
- connection.writeLine("Global_option " + option); //$NON-NLS-1$
- }
-
- /**
- * Sends an Unchanged request to the server.
- * <p>e.g. if a file called "local_file" was not modified, sends:
- * <pre>
- * Unchanged local_file \n
- * </pre></p><p>
- * Note: The most recent Directory request must have specified the file's
- * parent folder.
- * </p>
- *
- * @param file the file that was not modified
- */
- public void sendUnchanged(ICVSFile file) throws CVSException {
- connection.writeLine("Unchanged " + file.getName()); //$NON-NLS-1$
- }
-
- /**
- * Sends a Questionable request to the server.
- * <p>
- * Indicates that a file exists locally but is unmanaged. Asks the server
- * whether or not the file should be ignored in subsequent CVS operations.
- * The reply to the request occurs in the form of special M-type message
- * responses prefixed with '?' when the next command is executed.
- * </p><p>
- * Note: The most recent Directory request must have specified the file's
- * parent folder.
- * </p>
- *
- * @param resource the local file or folder
- */
- public void sendQuestionable(ICVSResource resource) throws CVSException {
- connection.writeLine("Questionable " + resource.getName()); //$NON-NLS-1$
- }
-
- /**
- * Sends a Sticky tag request to the server.
- * <p>
- * Indicates that the directory specified in the most recent Directory request
- * has a sticky tag or date, and sends the tag's contents.
- * </p>
- *
- * @param tag the sticky tag associated with the directory
- */
- public void sendSticky(String tag) throws CVSException {
- connection.writeLine("Sticky " + tag); //$NON-NLS-1$
- }
-
- /**
- * Sends a Modified request to the server along with the file contents.
- * <p>e.g. if a file called "local_file" was modified, sends:
- * <pre>
- * Modified local_file \n
- * file_permissions \n
- * file_size \n
- * [... file_contents ...]
- * </pre></p><p>
- * Under some circumstances, Is-modified may be used in place of this request.<br>
- * Do not use with history, init, import, rdiff, release, rtag, or update.
- * </p><p>
- * Note: The most recent Directory request must have specified the file's
- * parent folder.
- * </p>
- *
- * @param file the file that was modified
- * @param isBinary if true the file is sent without translating line delimiters
- * @param monitor the progress monitor
- * @see #sendIsModified
- */
- public void sendModified(ICVSFile file, boolean isBinary, IProgressMonitor monitor)
- throws CVSException {
-
- String filename = file.getName();
- connection.writeLine("Modified " + filename); //$NON-NLS-1$
- ResourceSyncInfo info = file.getSyncInfo();
- if (info != null) {
- connection.writeLine(info.getPermissions());
- } else {
- // for new resources send the default permissions
- connection.writeLine(ResourceSyncInfo.getDefaultPermissions());
- }
- sendFile(file, isBinary, monitor);
- }
-
- /**
- * Sends a file to the remote CVS server, possibly translating line delimiters.
- * <p>
- * Line termination sequences are automatically converted to linefeeds only
- * (required by the CVS specification) when sending non-binary files. This
- * may alter the actual size and contents of the file that is sent.
- * </p><p>
- * Note: Non-binary files must be small enough to fit in available memory.
- * </p>
- * @param file the file to be sent
- * @param isBinary is true if the file should be sent without translation
- * @param monitor the progress monitor
- */
- public void sendFile(ICVSFile file, boolean isBinary, IProgressMonitor monitor) throws CVSException {
- // check overrides
- if (textTransferOverrideSet != null &&
- textTransferOverrideSet.contains(file)) isBinary = false;
-
- // update progress monitor
- final String title = Policy.bind(getSendFileTitleKey(), new Object[]{ Util.toTruncatedPath(file, localRoot, 3) }); //$NON-NLS-1$
- monitor.subTask(Policy.bind("Session.transferNoSize", title)); //$NON-NLS-1$
- // obtain an input stream for the file and its size
- long size = file.getSize();
- OutputStream out = connection.getOutputStream();
- try {
- InputStream in = file.getContents();
- try {
- boolean compressed = false;
- byte[] buffer = new byte[TRANSFER_BUFFER_SIZE];
- if (! isBinary && IS_CRLF_PLATFORM || compressionLevel != 0) {
- // this affects the file size, spool the converted copy to an in-memory buffer
- if (! isBinary && IS_CRLF_PLATFORM) in = new CRLFtoLFInputStream(in);
- ByteArrayOutputStream bout = new ByteArrayOutputStream();
- OutputStream zout;
- if (compressionLevel != 0) {
- try {
- zout = new GZIPOutputStream(bout); // apparently does not support specifying compression level
- compressed = true;
- } catch (IOException e) {
- throw CVSException.wrapException(e);
- }
- } else {
- zout = bout;
- }
- for (int count; (count = in.read(buffer)) != -1;) zout.write(buffer, 0, count);
- zout.close();
- in.close();
- byte[] contents = bout.toByteArray();
- in = new ByteArrayInputStream(contents);
- size = contents.length;
- }
- // setup progress monitoring
- in = new ProgressMonitorInputStream(in, size, TRANSFER_PROGRESS_INCREMENT, monitor) {
- protected void updateMonitor(long bytesRead, long bytesTotal, IProgressMonitor monitor) {
- if (bytesRead == 0) return;
- Assert.isTrue(bytesRead <= bytesTotal);
- monitor.subTask(Policy.bind("Session.transfer", //$NON-NLS-1$
- new Object[] { title, Long.toString(bytesRead >> 10), Long.toString(bytesTotal >> 10) }));
- }
- };
- // send the file
- String sizeLine = Long.toString(size);
- if (compressed) sizeLine = "z" + sizeLine; //$NON-NLS-1$
- writeLine(sizeLine);
- for (int count; (count = in.read(buffer)) != -1;) out.write(buffer, 0, count);
- } finally {
- in.close();
- }
- } catch (IOException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /**
- * Receives a file from the remote CVS server, possibly translating line delimiters.
- * <p>
- * Line termination sequences are automatically converted to platform format
- * only when receiving non-binary files. This may alter the actual size and
- * contents of the file that is received.
- * </p><p>
- * Translation is performed on-the-fly, so the file need not fit in available memory.
- * </p>
- * @param file the file to be received
- * @param isBinary is true if the file should be received without translation
- * @param responseType one of the ICVSFile updated types (UPDATED, CREATED, MERGED, UPDATE_EXISTING)
- * indicating what repsonse type provided the file contents
- * @param monitor the progress monitor
- */
- public void receiveFile(ICVSFile file, boolean isBinary, int responseType, IProgressMonitor monitor)
- throws CVSException {
- // check overrides
- if (textTransferOverrideSet != null &&
- textTransferOverrideSet.contains(file)) isBinary = false;
-
- // update progress monitor
- final String title = Policy.bind("Session.receiving", new Object[]{ Util.toTruncatedPath(file, localRoot, 3) }); //$NON-NLS-1$
- monitor.subTask(Policy.bind("Session.transferNoSize", title)); //$NON-NLS-1$
- // get the file size from the server
- long size;
- boolean compressed = false;
- try {
- String sizeLine = readLine();
- if (sizeLine.charAt(0) == 'z') {
- compressed = true;
- sizeLine = sizeLine.substring(1);
- }
- size = Long.parseLong(sizeLine, 10);
- } catch (NumberFormatException e) {
- throw new CVSException(Policy.bind("Session.badInt"), e); //$NON-NLS-1$
- }
- // create an input stream that spans the next 'size' bytes from the connection
- InputStream in = new SizeConstrainedInputStream(connection.getInputStream(), size, true /*discardOnClose*/);
- // setup progress monitoring
- in = new ProgressMonitorInputStream(in, size, TRANSFER_PROGRESS_INCREMENT, monitor) {
- protected void updateMonitor(long bytesRead, long bytesTotal, IProgressMonitor monitor) {
- if (bytesRead == 0) return;
- monitor.subTask(Policy.bind("Session.transfer", //$NON-NLS-1$
- new Object[] { title, Long.toString(bytesRead >> 10), Long.toString(bytesTotal >> 10) }));
- }
- };
- // if compression enabled, decompress on the fly
- if (compressed) {
- try {
- in = new GZIPInputStream(in);
- } catch (IOException e) {
- throw CVSException.wrapException(e);
- }
- }
- // if not binary, translate line delimiters on the fly
- if (! isBinary) {
- // always auto-correct for CRLF line-ends that come from the server
- in = new CRLFtoLFInputStream(in);
- // switch from LF to CRLF if appropriate
- if (IS_CRLF_PLATFORM) in = new LFtoCRLFInputStream(in);
- }
- // write the file locally
- file.setContents(in, responseType, true, new NullProgressMonitor());
- }
-
- /**
- * Stores the value of the last Mod-time response encountered.
- * Valid only for the duration of a single CVS command.
- */
- void setModTime(Date modTime) {
- this.modTime = modTime;
- }
-
- /**
- * Returns the stored value of the last Mod-time response,
- * or null if there was none while processing the current command.
- */
- Date getModTime() {
- return modTime;
- }
-
- /**
- * Stores true if the -n global option was specified for the current command.
- * Valid only for the duration of a single CVS command.
- */
- void setNoLocalChanges(boolean noLocalChanges) {
- this.noLocalChanges = noLocalChanges;
- }
-
- /**
- * Returns true if the -n global option was specified for the current command,
- * false otherwise.
- */
- boolean isNoLocalChanges() {
- return noLocalChanges;
- }
-
- /**
- * Callback hook for the ValidRequestsHandler to specify the set of valid
- * requests for this session.
- */
- void setValidRequests(String validRequests) {
- this.validRequests = " " + validRequests + " "; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- boolean isOutputToConsole() {
- return outputToConsole;
- }
-
- /**
- * Stores a flag as to whether .# files will be created. (Default is true)
- * @param createBackups if true, creates .# files at the server's request
- */
- void setCreateBackups(boolean createBackups) {
- this.createBackups = createBackups;
- }
-
- /**
- * Returns a flag as to whether .# files will be created.
- */
- boolean isCreateBackups() {
- return createBackups;
- }
-
- /**
- * Gets the sendFileTitleKey.
- * @return Returns a String
- */
- String getSendFileTitleKey() {
- if (sendFileTitleKey == null)
- return "Session.sending"; //$NON-NLS-1$
- return sendFileTitleKey;
- }
-
- /**
- * Sets the sendFileTitleKey.
- * @param sendFileTitleKey The sendFileTitleKey to set
- */
- public void setSendFileTitleKey(String sendFileTitleKey) {
- this.sendFileTitleKey = sendFileTitleKey;
- }
-
- /**
- * Remembers a set of files that must be transferred as 'text'
- * regardless of what the isBinary parameter to sendFile() is.
- *
- * @param textTransferOverrideSet the set of ICVSFiles to override, or null if none
- */
- public void setTextTransferOverride(Collection textTransferOverrideSet) {
- this.textTransferOverrideSet = textTransferOverrideSet;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/StaticHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/StaticHandler.java
deleted file mode 100644
index a4c4cb9d5..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/StaticHandler.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Assert;
-
-/**
- * Handles any "Set-static-directory" and "Clear-static-directory" responses
- * from the CVS server.
- * <p>
- * Suppose as a result of performing a command the CVS server responds
- * as follows:<br>
- * <pre>
- * [...]
- * Set-static-directory myproject/ \n
- * /u/cvsroot/myproject/ \n
- * [...]
- * </pre>
- * Then we set or clear the static flag of the folder "myproject",
- * automatically creating it if it does not exist locally,
- * </p>
- */
-class StaticHandler extends ResponseHandler {
- private final boolean setStaticDirectory;
-
- public StaticHandler(boolean setStaticDirectory) {
- this.setStaticDirectory = setStaticDirectory;
- }
-
- public String getResponseID() {
- if (setStaticDirectory) {
- return "Set-static-directory"; //$NON-NLS-1$
- } else {
- return "Clear-static-directory"; //$NON-NLS-1$
- }
- }
-
- public void handle(Session session, String localDir,
- IProgressMonitor monitor) throws CVSException {
- // read additional data for the response
- String repositoryDir = session.readLine();
-
- // create the directory then set or clear the static flag
- Assert.isTrue(repositoryDir.endsWith("/")); //$NON-NLS-1$
- repositoryDir = repositoryDir.substring(0, repositoryDir.length() - 1);
- ICVSFolder folder = createFolder(session, localDir, repositoryDir);
- FolderSyncInfo syncInfo = folder.getFolderSyncInfo();
- folder.setFolderSyncInfo(new FolderSyncInfo(syncInfo.getRepository(),
- syncInfo.getRoot(), syncInfo.getTag(), setStaticDirectory));
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Status.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Status.java
deleted file mode 100644
index ba1f0f05d..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Status.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-public class Status extends AbstractMessageCommand {
- /*** Local options: specific to status ***/
-
- protected Status() { }
- protected String getRequestId() {
- return "status"; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/StickyHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/StickyHandler.java
deleted file mode 100644
index 5765a0729..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/StickyHandler.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.resources.CVSEntryLineTag;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Assert;
-
-/**
- * Handles any "Set-sticky" and "Clear-stick" responses from the CVS server.
- * <p>
- * Suppose as a result of performing a command the CVS server responds
- * as follows:<br>
- * <pre>
- * [...]
- * Set-sticky myproject/ \n
- * /u/cvsroot/myproject/ \n
- * Tsometag \n
- * [...]
- * </pre>
- * Then we set or clear the sticky tag property of the folder "myproject",
- * automatically creating it if it does not exist locally,
- * </p>
- */
-class StickyHandler extends ResponseHandler {
- private final boolean setSticky;
-
- public StickyHandler(boolean setSticky) {
- this.setSticky = setSticky;
- }
-
- public String getResponseID() {
- if (setSticky) {
- return "Set-sticky"; //$NON-NLS-1$
- } else {
- return "Clear-sticky"; //$NON-NLS-1$
- }
- }
-
- public void handle(Session session, String localDir,
- IProgressMonitor monitor) throws CVSException {
- // read additional data for the response
- String repositoryDir = session.readLine();
- String tag = null;
- if (setSticky) {
- tag = session.readLine();
- if (tag.length() == 0) tag = null; // FIXME: is this correct
- }
-
- // create the directory then set or clear the sticky tag
- Assert.isTrue(repositoryDir.endsWith("/")); //$NON-NLS-1$
- repositoryDir = repositoryDir.substring(0, repositoryDir.length() - 1);
- ICVSFolder folder = createFolder(session, localDir, repositoryDir);
- FolderSyncInfo syncInfo = folder.getFolderSyncInfo();
- folder.setFolderSyncInfo(new FolderSyncInfo(syncInfo.getRepository(),
- syncInfo.getRoot(), tag != null ? new CVSEntryLineTag(tag) : null,
- syncInfo.getIsStatic()));
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Tag.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Tag.java
deleted file mode 100644
index af39226c7..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Tag.java
+++ /dev/null
@@ -1,92 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener;
-import org.eclipse.team.internal.ccvs.core.client.listeners.TagListener;
-
-public class Tag extends Command {
- /*** Local options: specific to tag ***/
- public static final LocalOption CREATE_BRANCH = new LocalOption("-b", null); //$NON-NLS-1$
-
- /*** Default command output listener ***/
- private static final ICommandOutputListener DEFAULT_OUTPUT_LISTENER = new TagListener();
-
- // handle added and removed resources in a special way
- private boolean customBehaviorEnabled;
-
- protected Tag(boolean customBehaviorEnabled) {
- this.customBehaviorEnabled = customBehaviorEnabled;
- }
-
- protected Tag() {
- this(false);
- }
-
- protected String getRequestId() {
- return "tag"; //$NON-NLS-1$
- }
-
- protected ICVSResource[] computeWorkResources(Session session, LocalOption[] localOptions,
- String[] arguments) throws CVSException {
-
- if (arguments.length < 1) throw new IllegalArgumentException();
- String[] allButFirst = new String[arguments.length - 1];
- System.arraycopy(arguments, 1, allButFirst, 0, arguments.length - 1);
- return super.computeWorkResources(session, localOptions, allButFirst);
- }
-
- public IStatus execute(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, CVSTag tag, String[] arguments, ICommandOutputListener listener,
- IProgressMonitor monitor) throws CVSException {
-
- if(tag.getType() != CVSTag.VERSION && tag.getType() != CVSTag.BRANCH) {
- throw new CVSException(new CVSStatus(IStatus.ERROR, Policy.bind("Tag.notVersionOrBranchError"))); //$NON-NLS-1$
- }
-
- // Add the CREATE_BRANCH option for a branch tag
- if (tag.getType() == tag.BRANCH) {
- if ( ! CREATE_BRANCH.isElementOf(localOptions)) {
- LocalOption[] newLocalOptions = new LocalOption[localOptions.length + 1];
- System.arraycopy(localOptions, 0, newLocalOptions, 0, localOptions.length);
- newLocalOptions[newLocalOptions.length - 1] = CREATE_BRANCH;
- localOptions = newLocalOptions;
- }
- }
-
- // Add the tag name to the start of the arguments
- String[] newArguments = new String[arguments.length + 1];
- newArguments[0] = tag.getName();
- System.arraycopy(arguments, 0, newArguments, 1, arguments.length);
-
- return execute(session, globalOptions, localOptions, newArguments, listener, monitor);
- }
-
- protected ICommandOutputListener getDefaultCommandOutputListener() {
- return DEFAULT_OUTPUT_LISTENER;
- }
-
- protected void sendLocalResourceState(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor)
- throws CVSException {
-
- // Send all folders that are already managed to the server
- if (customBehaviorEnabled) {
- new TagFileSender(session, monitor).visit(session, resources);
- } else {
- new FileStructureVisitor(session, false, false, monitor).visit(session, resources);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TagFileSender.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TagFileSender.java
deleted file mode 100644
index de1861827..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TagFileSender.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.syncinfo.MutableResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-/**
- * Special visitor which handles added and removed files in a special way.
- * Added resources are skipped. Deleted resources are sent as if they were not deleted.
- */
-class TagFileSender extends FileStructureVisitor {
-
- public TagFileSender(Session session, IProgressMonitor monitor) {
- super(session, false, false, monitor);
- }
-
- /**
- * Override sendFile to provide custom handling of added and deleted resources.
- * Added resources are skipped. Deleted resources are sent as if they were not deleted.
- */
- protected void sendFile(ICVSFile mFile) throws CVSException {
- Policy.checkCanceled(monitor);
- if (mFile.isManaged()) {
- // Send the parent folder if it hasn't been sent already
- sendFolder(mFile.getParent());
- // Send the file if appropriate
- ResourceSyncInfo info = mFile.getSyncInfo();
- if (info.isDeleted()) {
- // makes this resource sync undeleted
- MutableResourceSyncInfo undeletedInfo = info.cloneMutable();
- undeletedInfo.setDeleted(false);
- info = undeletedInfo;
- }
- if (!info.isAdded()) {
- session.sendEntry(info.getServerEntryLine(mFile.getTimeStamp()));
- boolean binary = info != null && info.getKeywordMode().isBinary();
- session.sendIsModified(mFile, binary, monitor);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Update.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Update.java
deleted file mode 100644
index 665e4eaef..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Update.java
+++ /dev/null
@@ -1,154 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener;
-import org.eclipse.team.internal.ccvs.core.client.listeners.UpdateListener;
-
-public class Update extends Command {
- /*** Local options: specific to update ***/
- public static final LocalOption CLEAR_STICKY = new LocalOption("-A"); //$NON-NLS-1$
- public static final LocalOption IGNORE_LOCAL_CHANGES = new LocalOption("-C"); //$NON-NLS-1$
- public static final LocalOption RETRIEVE_ABSENT_DIRECTORIES = new LocalOption("-d"); //$NON-NLS-1$
- public static final LocalOption JOIN = new LocalOption("-j"); //$NON-NLS-1$
-
- /*** Default command output listener ***/
- private static final ICommandOutputListener DEFAULT_OUTPUT_LISTENER = new UpdateListener(null);
-
- /*** File information status returned from update ***/
- public static final int STATE_NONE = 0; // no state information available
- public static final int STATE_ADDED_LOCAL = 1; // new file locally that was added but not comitted to server yet
- public static final int STATE_UNKOWN = 2; // new file locally but not added to server
- public static final int STATE_REMOTE_CHANGES = 3; // remote changes to an unmodified local file
- public static final int STATE_DELETED = 4; // removed locally but still exists on the server
- public static final int STATE_MODIFIED = 5; // modified locally
- public static final int STATE_CONFLICT = 6; // modified locally and on the server but cannot be auto-merged
- public static final int STATE_MERGEABLE_CONFLICT = 7; // modified locally and on the server but can be auto-merged
-
- /**
- * Makes a -r or -D or -A option for a tag.
- * Valid for: checkout export history rdiff update
- */
- public static LocalOption makeTagOption(CVSTag tag) {
- int type = tag.getType();
- switch (type) {
- case CVSTag.HEAD:
- return CLEAR_STICKY;
- default:
- return Command.makeTagOption(tag);
- }
- }
-
- protected Update() { }
- protected String getRequestId() {
- return "update"; //$NON-NLS-1$
- }
-
- protected ICommandOutputListener getDefaultCommandOutputListener() {
- return DEFAULT_OUTPUT_LISTENER;
- }
-
- protected void sendLocalResourceState(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor)
- throws CVSException {
-
- // Send all folders that are already managed to the server
- // even folders that are empty
- sendFileStructure(session, resources, true, monitor);
- }
-
- /**
- * Convenience method that allows the creation of .# files to be disabled.
- * @param createBackups if true, creates .# files
- * @see Command.execute
- */
- public final IStatus execute(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, String[] arguments, ICommandOutputListener listener,
- IProgressMonitor pm, boolean createBackups) throws CVSException {
- session.setCreateBackups(createBackups);
- try {
- return super.execute(session, globalOptions, localOptions, arguments, listener, pm);
- } finally {
- session.setCreateBackups(true);
- }
- }
-
- /**
- * On successful finish, prune empty directories if the -P or -D option was specified.
- */
- protected void commandFinished(Session session, GlobalOption[] globalOptions,
- LocalOption[] localOptions, ICVSResource[] resources, IProgressMonitor monitor,
- boolean succeeded) throws CVSException {
- // If we didn't succeed, don't do any post processing
- if (! succeeded) return;
-
- // If we are pruning (-P) or getting a sticky copy using -D, then prune empty directories
- if (PRUNE_EMPTY_DIRECTORIES.isElementOf(localOptions) ||
- findOption(localOptions, "-D") != null) { //$NON-NLS-1$
- // Delete empty directories
- new PruneFolderVisitor().visit(session, resources);
-
- }
- session.handleCaseCollisions();
- }
-
- protected LocalOption[] filterLocalOptions(Session session, GlobalOption[] globalOptions, LocalOption[] localOptions) {
- List newOptions = new ArrayList(Arrays.asList(localOptions));
-
- // Look for absent directories if enabled and the option is not already included
- if (CVSProviderPlugin.getPlugin().getFetchAbsentDirectories() && ! RETRIEVE_ABSENT_DIRECTORIES.isElementOf(localOptions)) {
- newOptions.add(Update.RETRIEVE_ABSENT_DIRECTORIES);
- }
-
- // Prune empty directories if pruning is enabled and the command in not being run in non-update mode
- if (CVSProviderPlugin.getPlugin().getPruneEmptyDirectories() && ! PRUNE_EMPTY_DIRECTORIES.isElementOf(localOptions)) {
- if (! DO_NOT_CHANGE.isElementOf(globalOptions)) {
- newOptions.add(Update.PRUNE_EMPTY_DIRECTORIES);
- }
- }
- localOptions = (LocalOption[]) newOptions.toArray(new LocalOption[newOptions.size()]);
- return super.filterLocalOptions(session, globalOptions, localOptions);
- }
-
- /**
- * We allow unmanaged resources as long as there parents are managed.
- *
- * @see Command#checkResourcesManaged(ICVSResource[])
- */
- protected void checkResourcesManaged(ICVSResource[] resources) throws CVSException {
- for (int i = 0; i < resources.length; ++i) {
- ICVSFolder folder;
- if (resources[i].isFolder()) {
- if (((ICVSFolder)resources[i]).isCVSFolder()) {
- folder = (ICVSFolder)resources[i];
- } else {
- folder = resources[i].getParent();
- }
- }
- else {
- folder = resources[i].getParent();
- }
- if (folder==null || (!folder.isCVSFolder() && folder.exists())) {
- throw new CVSException(Policy.bind("Command.argumentNotManaged", folder.getName()));//$NON-NLS-1$
- }
- }
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/UpdatedHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/UpdatedHandler.java
deleted file mode 100644
index a5c2a8695..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/UpdatedHandler.java
+++ /dev/null
@@ -1,122 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.Date;
-
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.syncinfo.MutableResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Assert;
-
-/**
- * Handles any "Updated" and "Merged" responses
- * from the CVS server.
- * <p>
- * Suppose as a result of performing a command the CVS server responds
- * as follows:<br>
- * <pre>
- * [...]
- * Updated ???\n
- * [...]
- * </pre>
- * Then
- * </p>
- */
-
-/**
- * Does get information about the file that is updated
- * and the file-content itself and puts it on the fileSystem.
- *
- * The difference beetween the "Updated" and the "Merged" is, that
- * an "Merged" file is not going to be up-to-date after the operation.
- *
- * Requiers a exisiting parent-folder.
- */
-class UpdatedHandler extends ResponseHandler {
-
- private int handlerType;
-
- protected static final int HANDLE_UPDATED = ICVSFile.UPDATED;
- protected static final int HANDLE_MERGED = ICVSFile.MERGED;
- protected static final int HANDLE_UPDATE_EXISTING = ICVSFile.UPDATE_EXISTING;
- protected static final int HANDLE_CREATED = ICVSFile.CREATED;
-
- private static final String READ_ONLY_FLAG = "u=rw"; //$NON-NLS-1$
-
- public UpdatedHandler(int handlerType) {
- this.handlerType = handlerType;
- }
-
- public String getResponseID() {
- switch (handlerType) {
- case HANDLE_UPDATED: return "Updated"; //$NON-NLS-1$
- case HANDLE_MERGED: return "Merged"; //$NON-NLS-1$
- case HANDLE_UPDATE_EXISTING: return "Update-existing"; //$NON-NLS-1$
- case HANDLE_CREATED: return "Created"; //$NON-NLS-1$
- }
- return null;
- }
-
- public void handle(Session session, String localDir,
- IProgressMonitor monitor) throws CVSException {
- // read additional data for the response
- String repositoryFile = session.readLine();
- String entryLine = session.readLine();
- String permissionsLine = session.readLine();
- // temporary sync info for parsing the line received from the server
- ResourceSyncInfo info = new ResourceSyncInfo(entryLine, permissionsLine, null);
-
- // clear file update modifiers
- Date modTime = session.getModTime();
- session.setModTime(null);
-
- // Get the local file
- String fileName = repositoryFile.substring(repositoryFile.lastIndexOf("/") + 1); //$NON-NLS-1$
- ICVSFolder mParent = session.getLocalRoot().getFolder(localDir);
- if (! mParent.exists()) {
- // It is possible that we have a case invarient problem.
- localDir = session.getUniquePathForCaseSensitivePath(localDir, false);
- mParent = session.getLocalRoot().getFolder(localDir);
- Assert.isTrue(mParent.exists());
- }
- ICVSFile mFile = mParent.getFile(fileName);
-
- boolean binary = info.getKeywordMode().isBinary();
- boolean readOnly = info.getPermissions().indexOf(READ_ONLY_FLAG) == -1;
-
- // The file may have been set as read-only by a previous checkout/update
- if (mFile.isReadOnly()) mFile.setReadOnly(false);
- try {
- session.receiveFile(mFile, binary, handlerType, monitor);
- } catch (CVSException e) {
- if (e.getStatus().getCode() == IResourceStatus.CASE_VARIANT_EXISTS) {
- // Record that we have a case collision and continue;
- session.addCaseCollision(new Path(localDir).append(fileName).toString(), Path.EMPTY.toString());
- return;
- } else {
- throw e;
- }
- }
- if (readOnly) mFile.setReadOnly(true);
-
- // Set the timestamp in the file and get it again so that we use the *real* timestamp
- // in the sync info. The os may not actually set the time we provided :)
- mFile.setTimeStamp(modTime);
- modTime = mFile.getTimeStamp();
- MutableResourceSyncInfo newInfoWithTimestamp = info.cloneMutable();
- newInfoWithTimestamp.setTimeStamp(modTime);
- if(handlerType==HANDLE_MERGED) {
- newInfoWithTimestamp.setMerged();
- }
- mFile.setSyncInfo(newInfoWithTimestamp);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ValidRequests.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ValidRequests.java
deleted file mode 100644
index e90c9b9fe..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ValidRequests.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-
-class ValidRequests extends Request {
- protected ValidRequests() { }
- protected String getRequestId() {
- return "valid-requests"; //$NON-NLS-1$
- }
-
- public IStatus execute(Session session, IProgressMonitor monitor) throws CVSException {
- return executeRequest(session, null, monitor);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ValidRequestsHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ValidRequestsHandler.java
deleted file mode 100644
index 071dd2877..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ValidRequestsHandler.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-
-/**
- * Handles a "Valid-requests" response from the CVS server.
- * <p>
- * Suppose as a result of performing a command the CVS server responds
- * as follows:<br>
- * <pre>
- * [...]
- * Valid-requests ci co update Root Directory Valid-responses Argument ...\n
- * [...]
- * </pre>
- * Then we remember the set of valid requests for this session in
- * preparation for isValidRequests queries.
- * </p>
- */
-class ValidRequestsHandler extends ResponseHandler {
- public String getResponseID() {
- return "Valid-requests"; //$NON-NLS-1$
- }
-
- public void handle(Session session, String validRequests,
- IProgressMonitor monitor) throws CVSException {
- // remember the set of valid requests for this session
- session.setValidRequests(validRequests);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Version.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Version.java
deleted file mode 100644
index d16596c8c..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Version.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.client.listeners.ICommandOutputListener;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-
-/**
- * Here are some of the output formats we know about:
- *
- * Concurrent Versions System (CVS) 1.11.1p1 (client/server)
- * Concurrent Versions System (CVS) NT 1.11.1.1 (Build 27)
- * Concurrent Versions System (CVSNT) 1.11.1.3 (Build 57a) (client/server)
- */
-public class Version extends RemoteCommand {
-
- private static final String CVS_NT_PREFIX_1 = "Concurrent Versions System (CVS) NT "; //$NON-NLS-1$
- private static final String CVS_NT_PREFIX_2 = "Concurrent Versions System (CVSNT) "; //$NON-NLS-1$
- private static final String CVS_PREFIX = "Concurrent Versions System (CVS) "; //$NON-NLS-1$
- /**
- * @see Request#getRequestId()
- */
- protected String getRequestId() {
- return "version"; //$NON-NLS-1$
- }
-
- public IStatus execute(Session session, final ICVSRepositoryLocation location, IProgressMonitor monitor) throws CVSException {
-
- // The server may not support the version request
- if (session == null) {
- session = getOpenSession(null);
- }
- if ( ! session.isValidRequest(getRequestId())) {
- IStatus status = new CVSStatus(IStatus.WARNING, CVSStatus.SERVER_IS_UNKNOWN, Policy.bind("Version.versionNotValidRequest", location.getHost()));//$NON-NLS-1$
- ((CVSRepositoryLocation)location).setServerPlaform(status);
- CVSProviderPlugin.log(status);
- return status;
- }
-
- ICommandOutputListener listener = new ICommandOutputListener() {
- public IStatus messageLine(String line, ICVSFolder commandRoot, IProgressMonitor monitor) {
- String knownPrefix = null;
- boolean isCVSNT = false;
- if (line.startsWith(CVS_NT_PREFIX_1)) {
- isCVSNT = true;
- knownPrefix = CVS_NT_PREFIX_1;
- } else if (line.startsWith(CVS_NT_PREFIX_2)) {
- isCVSNT = true;
- knownPrefix = CVS_NT_PREFIX_2;
- } else if (line.startsWith(CVS_PREFIX)) {
- knownPrefix = CVS_PREFIX;
- }
- IStatus status = OK;
- if (knownPrefix != null) {
- String versionNumber = line.substring(knownPrefix.length(), line.indexOf(' ', knownPrefix.length() + 1));
- if (versionNumber.startsWith("1.10") || versionNumber.equals("1.11") || versionNumber.equals("1.11.1")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- status = new CVSStatus(IStatus.ERROR, CVSStatus.UNSUPPORTED_SERVER_VERSION, Policy.bind("Version.unsupportedVersion", location.getHost(), versionNumber));//$NON-NLS-1$
- } else if (isCVSNT) {
- status = new CVSStatus(IStatus.WARNING, CVSStatus.SERVER_IS_CVSNT, Policy.bind("Version.unsupportedCVSNT", location.getHost(), versionNumber));//$NON-NLS-1$
- }
- } else {
- status = new CVSStatus(IStatus.INFO, CVSStatus.SERVER_IS_UNKNOWN, Policy.bind("Version.unknownVersionFormat", location.getHost(), line));//$NON-NLS-1$
- }
- ((CVSRepositoryLocation)location).setServerPlaform(status);
- return status;
- }
- public IStatus errorLine(String line, ICVSFolder commandRoot, IProgressMonitor monitor) {
- return new CVSStatus(IStatus.ERROR, CVSStatus.ERROR_LINE, line);
- }
- };
-
- return execute(session, NO_GLOBAL_OPTIONS, NO_LOCAL_OPTIONS, new String[] {}, listener, monitor);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/AdminKSubstListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/AdminKSubstListener.java
deleted file mode 100644
index a8d24b0fa..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/AdminKSubstListener.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client.listeners;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.MutableResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-/**
- * Used with 'admin -ksubst' to capture lines of text that are issued
- * as confirmation that the remote keyword substitution mode has been
- * changed. When encountered, updates the local ResourceSyncInfo for
- * the file in question to reflect
- *
- * e.g.
- * RCS file: path/filename,v
- * done
- */
-public class AdminKSubstListener implements ICommandOutputListener {
- private KSubstOption ksubstMode;
-
- public AdminKSubstListener(KSubstOption ksubstMode) {
- this.ksubstMode = ksubstMode;
- }
-
- public IStatus messageLine(String line, ICVSFolder commandRoot,
- IProgressMonitor monitor) {
- if (line.startsWith("RCS file:")) { //$NON-NLS-1$
- String rcsFile = line.substring(10).trim();
- if (! rcsFile.endsWith(",v")) { //$NON-NLS-1$
- return new CVSStatus(CVSStatus.ERROR,
- Policy.bind("AdminKSubstListener.expectedRCSFile", rcsFile)); //$NON-NLS-1$
- }
- String remoteRootLocation = null;
- try {
- FolderSyncInfo info = commandRoot.getFolderSyncInfo();
- remoteRootLocation = info.getRemoteLocation();
- } catch (CVSException e) {
- // XXX bad eating of exception
- }
- if (remoteRootLocation == null) {
- return new CVSStatus(CVSStatus.ERROR,
- Policy.bind("AdminKSubstListener.commandRootNotManaged")); //$NON-NLS-1$
- }
- IPath rcsFilePath = new Path(rcsFile.substring(0, rcsFile.length() - 2));
- IPath remoteRootPath = new Path(remoteRootLocation);
- if (! remoteRootPath.isPrefixOf(rcsFilePath)) {
- return new CVSStatus(CVSStatus.ERROR,
- Policy.bind("AdminKSubstListener.expectedChildOfCommandRoot", //$NON-NLS-1$
- rcsFilePath.toString(), remoteRootPath.toString()));
- }
- rcsFilePath = rcsFilePath.removeFirstSegments(remoteRootPath.segmentCount());
- try {
- ICVSFile file = commandRoot.getFile(rcsFilePath.toString());
- ResourceSyncInfo info = file.getSyncInfo();
- if (info != null) {
- // only update sync info if we have it locally
- MutableResourceSyncInfo newInfo = info.cloneMutable();
- newInfo.setKeywordMode(ksubstMode);
- file.setSyncInfo(newInfo);
- }
- } catch (CVSException e) {
- return new CVSStatus(CVSStatus.ERROR,
- Policy.bind("AdminKSubstListener.couldNotSetResourceSyncInfo", //$NON-NLS-1$
- rcsFilePath.toString(), e.toString()));
- }
- }
- return OK;
- }
-
- public IStatus errorLine(String line, ICVSFolder commandRoot,
- IProgressMonitor monitor) {
- // we don't expect to see anything on stderr if the command succeeds
- // possible errors include:
- // cvs server: cannot open /repo/a.txt,v: Permission denied
- // cvs server: failed to create lock directory for `/repo/folder' (/repo/folder/#cvs.lock): Permission denied
- // cvs server: failed to remove lock /repo/folder/#cvs.wfl.fiji.4442: Permission denied
- // cvs server: lock failed - giving up
- // cvs [server aborted]: lock failed - giving up
- return new CVSStatus(CVSStatus.ERROR, CVSStatus.ERROR_LINE, line);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/DiffListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/DiffListener.java
deleted file mode 100644
index a15c44935..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/DiffListener.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client.listeners;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.io.PrintStream;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-
-public class DiffListener implements ICommandOutputListener {
- PrintStream patchStream;
-
- public DiffListener(PrintStream patchStream) {
- this.patchStream = patchStream;
- }
-
- public IStatus messageLine(String line, ICVSFolder commandRoot,
- IProgressMonitor monitor) {
- if (! line.startsWith("cvs server:")) { //$NON-NLS-1$
- // Ensure that the line doesn't end with a CR.
- // This can happen if the remote file has CR/LF in it.
- if (line.length() > 0 && line.charAt(line.length() - 1) == '\r') {
- line = line.substring(0, line.length() - 1);
- }
- patchStream.println(line);
- }
- return OK;
- }
-
- public IStatus errorLine(String line, ICVSFolder commandRoot,
- IProgressMonitor monitor) {
- // ignore these errors for now - this is used only with the diff
- // request and the errors can be safely ignored.
- if(! line.startsWith("cvs server:")) {//$NON-NLS-1$
- return new CVSStatus(CVSStatus.ERROR, CVSStatus.ERROR_LINE, commandRoot, line);
- }
- return OK;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ICommandOutputListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ICommandOutputListener.java
deleted file mode 100644
index 78dc32c0d..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ICommandOutputListener.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client.listeners;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.Policy;
-
-public interface ICommandOutputListener {
-
- /*** Status to be returned when no error or warning occured ***/
- public static final IStatus OK = new CVSStatus(CVSStatus.OK,Policy.bind("ok")); //$NON-NLS-1$
-
- /**
- * Invoked when a message line is received from the server.
- * <p>
- * Any status other than ICommandOutputListener.OK will be accumulated
- * by the command and returned. The severity of the status matches those of
- * IStatus and must indicate whether this is a warning, error, or informational
- * text.while the code should be one of the codes provided by CVSStatus.
- * The status code must not be CVSStatus.SERVER_ERROR.
- * </p>
- *
- * @param line the line of message text sent by the server
- * @param commandRoot the root directory of the command
- * @param monitor the progress monitor
- * @return a status indicating success or failure based on the text
- */
- public IStatus messageLine(String line, ICVSFolder commandRoot,
- IProgressMonitor monitor);
-
- /**
- * Invoked when an error line is received from the server.
- * <p>
- * Any status other than ICommandOutputListener.OK will be accumulated
- * by the command and returned. The severity of the status matches those of
- * IStatus and must indicate whether this is a warning, error, or informational
- * text.while the code should be one of the codes provided by CVSStatus.
- * The status code must not be CVSStatus.SERVER_ERROR.
- * </p>
- *
- * @param line the line of error text sent by the server
- * @param commandRoot the root directory of the command
- * @param monitor the progress monitor
- * @return a status indicating success or failure based on the text
- */
- public IStatus errorLine(String line, ICVSFolder commandRoot,
- IProgressMonitor monitor);
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IConsoleListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IConsoleListener.java
deleted file mode 100644
index a2ff86e1d..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IConsoleListener.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client.listeners;
-
-import org.eclipse.core.runtime.IStatus;
-
-public interface IConsoleListener {
- /**
- * Called when a command is invoked.
- * @param line the command invocation string
- */
- public void commandInvoked(String line);
-
- /**
- * Called when a line of message text has been received.
- * @param line the line of text
- */
- public void messageLineReceived(String line);
-
- /**
- * Called when a line of error text has been received.
- * @param line the line of text
- */
- public void errorLineReceived(String line);
-
- /**
- * Called when a command has been completed.
- * @param status the status code, or null if not applicable
- * @param exception an exception, or null if not applicable
- */
- public void commandCompleted(IStatus status, Exception exception);
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IStatusListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IStatusListener.java
deleted file mode 100644
index f36162143..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IStatusListener.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client.listeners;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-
-public interface IStatusListener {
-
- public static final String FOLDER_REVISION = ""; //$NON-NLS-1$
-
- /**
- * Provides access to the revision of a file through the use of the Status command.
- *
- * @param commandRoot the root directory of the command
- * @param path the absolute remote path of the resource including the repository root directory
- * @param remoteRevision the remote revision of the file
- */
- public void fileStatus(ICVSFolder commandRoot, IPath path, String remoteRevision);
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IUpdateMessageListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IUpdateMessageListener.java
deleted file mode 100644
index c3583baa0..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IUpdateMessageListener.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client.listeners;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-
-/**
- * This listener is used by RemoteFolder to listener for E and M messages
- * from the CVS server in order to determine the files and folders contained in a parent folder.
- */
-public interface IUpdateMessageListener {
- /**
- * Notification that a directory (which may or may not have been reported by
- * directoryInformation()) does not exist.
- *
- * @param commandRoot the root directory of the command
- * @param path the path of the directory relative to the commandRoot
- */
- public void directoryDoesNotExist(ICVSFolder commandRoot, IPath path);
- /**
- * Notification of information about a directory.
- *
- * @param commandRoot the root directory of the command
- * @param path the path of the directory relative to the commandRoot
- * @param newDirectory true if the directory does not exist locally (i.e. in the commandRoot hierarchy)
- */
- public void directoryInformation(ICVSFolder commandRoot, IPath path, boolean newDirectory);
- /**
- * Notification of information about a file
- *
- * @param type the type of update for the file (see Update for type constants)
- * @param commandRoot the root directory of the command
- * @param filename the path of the file relative to the commandRoot
- */
- public void fileInformation(int type, ICVSFolder parent, String filename);
- /**
- * Notification that a file does not exists remotely
- *
- * @param commandRoot the root directory of the command
- * @param filename the path of the file relative to the commandRoot
- */
- public void fileDoesNotExist(ICVSFolder parent, String filename);
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogEntry.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogEntry.java
deleted file mode 100644
index 3cce54017..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogEntry.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client.listeners;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.Date;
-
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ILogEntry;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFile;
-
-public class LogEntry extends PlatformObject implements ILogEntry {
-
- private RemoteFile file;
- private String author;
- private Date date;
- private String comment;
- private String state;
- private CVSTag[] tags;
-
- public LogEntry(RemoteFile file, String revision, String author, Date date, String comment, String state, CVSTag[] tags) {
- this.file = file.toRevision(revision);
- this.author = author;
- this.date = date;
- this.comment = comment;
- this.state = state;
- this.tags = tags;
- }
-
- /**
- * @see ILogEntry#getRevision()
- */
- public String getRevision() {
- return file.getRevision();
- }
-
- /**
- * @see ILogEntry#getAuthor()
- */
- public String getAuthor() {
- return author;
- }
-
- /**
- * @see ILogEntry#getDate()
- */
- public Date getDate() {
- return date;
- }
-
- /**
- * @see ILogEntry#getComment()
- */
- public String getComment() {
- return comment;
- }
-
- /**
- * @see ILogEntry#getState()
- */
- public String getState() {
- return state;
- }
-
- /**
- * @see ILogEntry#getTags()
- */
- public CVSTag[] getTags() {
- CVSTag[] result = new CVSTag[tags.length];
- System.arraycopy(tags, 0, result, 0, tags.length);
- return result;
- }
-
- /**
- * @see ILogEntry#getRemoteFile()
- */
- public ICVSRemoteFile getRemoteFile() {
- return file;
- }
-
- /**
- * @see ILogEntry#isDeletion()
- */
- public boolean isDeletion() {
- return getState().equals("dead"); //$NON-NLS-1$
- }
-
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogListener.java
deleted file mode 100644
index fae081ca6..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogListener.java
+++ /dev/null
@@ -1,154 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client.listeners;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.DateUtil;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFile;
-
-public class LogListener implements ICommandOutputListener {
- private List entries;
- private RemoteFile file;
-
- // state
- private final int BEGIN = 0, SYMBOLIC_NAMES = 1, REVISION = 2, COMMENT = 3, DONE = 4;
- private List tagNames = new ArrayList(5);
- private List tagRevisions = new ArrayList(5);
- private int state = BEGIN; // current state
- private String creationDate;
- private String author;
- private String revision; // revision number
- private String fileState; //
- private StringBuffer comment; // comment
-
- public LogListener(RemoteFile file, List entries) {
- this.file = file;
- this.entries = entries;
- }
-
- public IStatus messageLine(String line, ICVSFolder commandRoot,
- IProgressMonitor monitor) {
- // Fields we will find in the log for a file
- // keys = String (tag name), values = String (tag revision number) */
- switch (state) {
- case BEGIN:
- if (line.startsWith("symbolic names:")) { //$NON-NLS-1$
- state = SYMBOLIC_NAMES;
- } else if (line.startsWith("revision ")) { //$NON-NLS-1$
- revision = line.substring(9);
- state = REVISION;
- }
- break;
- case SYMBOLIC_NAMES:
- if (line.startsWith("keyword substitution:")) { //$NON-NLS-1$
- state = BEGIN;
- } else {
- int firstColon = line.indexOf(':');
- String tagName = line.substring(1, firstColon);
- String tagRevision = line.substring(firstColon + 2);
- tagNames.add(tagName);
- tagRevisions.add(tagRevision);
- }
- break;
- case REVISION:
- // date: 2000/06/19 04:56:21; author: somebody; state: Exp; lines: +114 -45
- // get the creation date
- int endOfDateIndex = line.indexOf(';', 6);
- creationDate = line.substring(6, endOfDateIndex) + " GMT"; //$NON-NLS-1$
-
- // get the author name
- int endOfAuthorIndex = line.indexOf(';', endOfDateIndex + 1);
- author = line.substring(endOfDateIndex + 11, endOfAuthorIndex);
-
- // get the file state (because this revision might be "dead")
- fileState = line.substring(endOfAuthorIndex + 10, line.indexOf(';', endOfAuthorIndex + 1));
- comment = new StringBuffer();
- state = COMMENT;
- break;
- case COMMENT:
- // skip next line (info about branches) if it exists, if not then it is a comment line.
- if (line.startsWith("branches:")) break; //$NON-NLS-1$
- if (line.equals("=============================================================================") //$NON-NLS-1$
- || line.equals("----------------------------")) { //$NON-NLS-1$
- state = DONE;
- break;
- }
- if (comment.length() != 0) comment.append('\n');
- comment.append(line);
- break;
- }
- if (state == DONE) {
- // we are only interested in tag names for this revision, remove all others.
- List thisRevisionTags = new ArrayList(3);
- for (int i = 0; i < tagNames.size(); i++) {
- String tagName = (String) tagNames.get(i);
- String tagRevision = (String) tagRevisions.get(i);
- // If this is a branch tag then only include this tag with the revision
- // that is the root of this branch (e.g. 1.1 is root of branch 1.1.2).
- boolean isBranch = isBranchTag(tagRevision);
- if (isBranch) {
- int lastDot = tagRevision.lastIndexOf('.');
- if (lastDot == -1) {
- CVSProviderPlugin.log(new CVSStatus(IStatus.ERROR,
- Policy.bind("LogListener.invalidRevisionFormat", tagName, tagRevision))); //$NON-NLS-1$
- } else {
- if (tagRevision.charAt(lastDot - 1) == '0' && tagRevision.charAt(lastDot - 2) == '.') {
- lastDot = lastDot - 2;
- }
- tagRevision = tagRevision.substring(0, lastDot);
- }
- }
- if (tagRevision.equals(revision)) {
- int type = isBranch ? CVSTag.BRANCH : CVSTag.VERSION;
- thisRevisionTags.add(new CVSTag(tagName, type));
- }
- }
- Date date = DateUtil.convertFromLogTime(creationDate);
- LogEntry entry = new LogEntry(file, revision, author, date,
- comment.toString(), fileState, (CVSTag[]) thisRevisionTags.toArray(new CVSTag[0]));
- entries.add(entry);
- state = BEGIN;
- // XXX should we reset the tagNames and tagRevisions stuff?
- }
- return OK;
- }
-
- public IStatus errorLine(String line, ICVSFolder commandRoot,
- IProgressMonitor monitor) {
- return OK;
- }
-
- /** branch tags have odd number of segments or have
- * an even number with a zero as the second last segment
- * e.g: 1.1.1, 1.26.0.2 are branch revision numbers */
- protected boolean isBranchTag(String tagName) {
- // First check if we have an odd number of segments (i.e. even number of dots)
- int numberOfDots = 0;
- int lastDot = 0;
- for (int i = 0; i < tagName.length(); i++) {
- if (tagName.charAt(i) == '.') {
- numberOfDots++;
- lastDot = i;
- }
- }
- if ((numberOfDots % 2) == 0) return true;
- if (numberOfDots == 1) return false;
-
- // If not, check if the second lat segment is a zero
- if (tagName.charAt(lastDot - 1) == '0' && tagName.charAt(lastDot - 2) == '.') return true;
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ModuleDefinitionsListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ModuleDefinitionsListener.java
deleted file mode 100644
index 7bd7fa3a0..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ModuleDefinitionsListener.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client.listeners;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-
-/*
- * This class pares the output of the "cvs checkout -c" command which returns the list of modules
- * defined in the CVSROOT/modules file.
- */
-public class ModuleDefinitionsListener implements ICommandOutputListener {
-
- // the last line read from the context (used to accumulate multi-line definitions)
- private String lastLine = ""; //$NON-NLS-1$
-
- private Map moduleMap;
-
- public ModuleDefinitionsListener() {
- reset();
- }
-
- /*
- * @see ICommandOutputListener#messageLine(String, ICVSFolder, IProgressMonitor)
- */
- public IStatus messageLine(
- String line,
- ICVSFolder commandRoot,
- IProgressMonitor monitor) {
-
- // Lines that start with a space indicate a multi line entry
- if( line.charAt(0) == ' ' ) {
- lastLine += line;
- line = lastLine;
- }
- else
- lastLine = line;
-
- // Use the module name as the key so that multi-line modules will be recorded properly
- int firstSpace = line.indexOf(" "); //$NON-NLS-1$
- if (firstSpace > -1) {
- String module = line.substring(0, firstSpace);
- moduleMap.put(module, line);
- }
- return OK;
- }
-
- /*
- * @see ICommandOutputListener#errorLine(String, ICVSFolder, IProgressMonitor)
- */
- public IStatus errorLine(String line, ICVSFolder commandRoot, IProgressMonitor monitor) {
- return new CVSStatus(CVSStatus.ERROR, CVSStatus.ERROR_LINE, commandRoot, line);
- }
-
- public String[] getModuleExpansions() {
- return (String[])moduleMap.values().toArray(new String[moduleMap.size()]);
- }
-
- public void reset() {
- this.moduleMap = new HashMap();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ModuleExpansion.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ModuleExpansion.java
deleted file mode 100644
index ac88c6972..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ModuleExpansion.java
+++ /dev/null
@@ -1,120 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client.listeners;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-
-/**
- *
- */
-public class ModuleExpansion {
-
- /** Name of the CVS module as found in the CVSROOT/modules file */
- private String moduleName;
-
- /** Expansion of the module name returned by the CVS server */
- private String[] expansions;
-
- private LocalOption[] options;
-
- ModuleExpansion(String moduleName, String[] expansions, LocalOption[] options) {
- this.moduleName = moduleName;
- this.expansions = expansions;
- this.options = options;
- }
-
- /**
- * @see IModuleExpansion#getModuleName()
- */
- public String getModuleName() {
- return moduleName;
- }
-
- /**
- * @see IModuleExpansion#getModuleExpansionString()
- */
- public String getModuleExpansionString() {
- String result = expansions[0];
- for (int i=1;i<expansions.length; i++)
- result = result + ", " + expansions[i]; //$NON-NLS-1$
- return result;
- }
-
- /**
- * @see IModuleExpansion#getExpansions()
- */
- public String[] getExpansions() {
- return expansions;
- }
-
- public LocalOption[] getOptions() {
- return options;
- }
-
- /**
- * Translate an array of module names to their expansions.
- * The resulting List of Strings may be bigger than the original
- */
- private List getExpansionsFor(String[] possibleModules, Map moduleMappings, int depth) throws CVSException {
- List result = new ArrayList();
- for (int i=0;i<possibleModules.length;i++) {
- // Is it a module?
- if (possibleModules[i].charAt(0) == '&')
- result.addAll(getExpansionsFor(possibleModules[i].substring(1), moduleMappings, depth));
- else
- result.add(possibleModules[i]);
- }
- return result;
- }
-
- /**
- * Translate a module name to its expansion.
- * The resulting List may contain one or more Strings
- */
- private List getExpansionsFor(String module, Map moduleMappings, int depth) throws CVSException {
- if (depth > moduleMappings.size()) {
- // Indicate that a circular reference exists
- throw new CVSException(Policy.bind("ModuleExpansion.circular", module));//$NON-NLS-1$
- }
- Object mappings = moduleMappings.get(module);
- if (mappings == null) {
- // If there's no mapping assume it is a project name
- List result = new ArrayList();
- result.add(module);
- return result;
- } else {
- // Follow any expansion chains
- return getExpansionsFor(((ModuleExpansion)mappings).expansions, moduleMappings, depth + 1);
- }
- }
-
- /**
- * Resolve the module mappings using moduleMappings which maps
- * module names to their ModuleExpansion
- */
- public void resolveModuleReferencesUsing(Map moduleMappings) {
- try {
- List result = getExpansionsFor(expansions, moduleMappings, 0);
- expansions = (String[])result.toArray(new String[result.size()]);
- } catch (CVSException e) {
- // Is this the best way to show the circular reference problem?
- // Or should we just leave the expansions untouched?
- List result = new ArrayList();
- result.add(e.getStatus().getMessage());
- result.addAll(Arrays.asList(expansions));
- expansions = (String[])result.toArray(new String[result.size()]);
- }
- }
-}
-
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/StatusListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/StatusListener.java
deleted file mode 100644
index 6fdb2c7e0..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/StatusListener.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client.listeners;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-
-public class StatusListener implements ICommandOutputListener {
- private static boolean isFolder = false;
- private IStatusListener statusListener;
-
- public StatusListener(IStatusListener statusListener) {
- this.statusListener = statusListener;
- }
-
- public IStatus messageLine(String line, ICVSFolder commandRoot,
- IProgressMonitor monitor) {
-
- // We're only concerned about file revisions.
- if (line.startsWith(" Repository revision:")) { //$NON-NLS-1$
- if (!line.startsWith(" Repository revision: No revision control file")) { //$NON-NLS-1$
- int separatingTabIndex = line.indexOf('\t', 24);
- String remoteRevision = line.substring(24, separatingTabIndex);
-
- // This is the full location on the server (e.g. /home/cvs/repo/project/file.txt)
- String fileLocation = line.substring(separatingTabIndex + 1, line.length() - 2);
-
- // This is the absolute remote pathincluding the repository root directory
- IPath fullPath = new Path(fileLocation);
-
- // If the status returns that the file is in the Attic, then remove the
- // Attic segment. This is because files added to a branch that are not in
- // the main trunk (HEAD) are added to the Attic but cvs does magic on update
- // to put them in the correct location.
- // (e.g. /project/Attic/file.txt -> /project/file.txt)
- if ((fullPath.segmentCount() >= 2) && (fullPath.segment(fullPath.segmentCount() - 2).equals("Attic"))) { //$NON-NLS-1$
- String filename = fullPath.lastSegment();
- fullPath = fullPath.removeLastSegments(2);
- fullPath = fullPath.append(filename);
- }
-
- // Inform the listener about the file revision
- statusListener.fileStatus(commandRoot, fullPath, remoteRevision);
- }
- }
- return OK;
- }
-
- public IStatus errorLine(String line, ICVSFolder commandRoot, IProgressMonitor monitor) {
- if (line.startsWith("cvs server: conflict:")) {//$NON-NLS-1$
- // We get this because we made up an entry line to send to the server
- // Therefore, we make this a warning!!!
- return new CVSStatus(CVSStatus.WARNING, CVSStatus.CONFLICT, commandRoot, line);
- }
- if (line.startsWith("cvs server: Examining")) {//$NON-NLS-1$
- isFolder = true;
- return OK;
- }
- if (isFolder && line.startsWith("cvs [server aborted]: could not chdir to")) {//$NON-NLS-1$
- String folderPath = line.substring(41, line.indexOf(':', 42));
- // Pass null to listener indicating that the resource exists but does not have a revision number
- // (i.e. the resource is a folder)
- if (statusListener != null)
- // XXX We should be using that path relative to the root of the command (mRoot)!!!
- statusListener.fileStatus(commandRoot, new Path(folderPath).removeFirstSegments(1), IStatusListener.FOLDER_REVISION);
- isFolder = false;
- return OK;
- }
- return new CVSStatus(CVSStatus.ERROR, CVSStatus.ERROR_LINE, commandRoot, line);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/TagListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/TagListener.java
deleted file mode 100644
index aaf374162..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/TagListener.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.client.listeners;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-
-public class TagListener implements ICommandOutputListener {
-
- /*
- * @see ICommandOutputListener#messageLine(String, ICVSFolder, IProgressMonitor)
- */
- public IStatus messageLine(
- String line,
- ICVSFolder commandRoot,
- IProgressMonitor monitor) {
-
- // Received a warning in the form:
- // W folder/file : v1 already exists on version 1.2 : NOT MOVING tag to version 1.3
- if( line.charAt(0) == 'W' ) {
- return new CVSStatus(CVSStatus.WARNING, CVSStatus.TAG_ALREADY_EXISTS, commandRoot, line.substring(2));
- }
-
- return OK;
- }
-
- /*
- * @see ICommandOutputListener#errorLine(String, ICVSFolder, IProgressMonitor)
- */
- public IStatus errorLine(
- String line,
- ICVSFolder commandRoot,
- IProgressMonitor monitor) {
-
- // Ignore the lines: Tagging folder1/folder2
- if( line.startsWith("cvs server: Tagging") ) { //$NON-NLS-1$
- return OK;
- } else if( line.startsWith("cvs rtag: Tagging") ) { //$NON-NLS-1$
- return OK;
- }
-
- return new CVSStatus(CVSStatus.ERROR, CVSStatus.ERROR_LINE, commandRoot, line);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/UpdateListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/UpdateListener.java
deleted file mode 100644
index bf7b43f2e..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/UpdateListener.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.client.listeners;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.client.Update;
-
-public class UpdateListener implements ICommandOutputListener {
- static final String SERVER_PREFIX = "cvs server: "; //$NON-NLS-1$
- static final String SERVER_ABORTED_PREFIX = "cvs [server aborted]: "; //$NON-NLS-1$
-
- IUpdateMessageListener updateMessageListener;
- boolean merging = false;
-
- public UpdateListener(IUpdateMessageListener updateMessageListener) {
- this.updateMessageListener = updateMessageListener;
- }
-
- public IStatus messageLine(String line, ICVSFolder commandRoot,
- IProgressMonitor monitor) {
- if (updateMessageListener == null) return OK;
- if(line.startsWith("Merging differences")) { //$NON-NLS-1$
- merging = true;
- } else if(line.indexOf(' ')==1) {
- // We have a message that indicates the type of update. The possible messages are
- // defined by the prefix constants MLP_*.
- String path = line.substring(2);
- char changeType = line.charAt(0);
-
- // calculate change type
- int type = 0;
- switch(changeType) {
- case 'A': type = Update.STATE_ADDED_LOCAL; break; // new file locally that was added but not comitted to server yet
- case '?': type = Update.STATE_UNKOWN; break; // new file locally but not added to server
- case 'U': type = Update.STATE_REMOTE_CHANGES; break; // remote changes to an unmodified local file
- case 'R': type = Update.STATE_DELETED; break; // removed locally but still exists on the server
- case 'M': type = Update.STATE_MODIFIED; break; // modified locally
- case 'C': type = Update.STATE_CONFLICT; break; // modified locally and on the server but cannot be auto-merged
- case 'D': type = Update.STATE_DELETED; break; // deleted locally but still exists on server
- default: type = Update.STATE_NONE;
- }
-
- if (merging) {
- // If we are merging the modified prefix is used both to show merges and
- // local changes. We have to detect this case and use a more specific change
- // type.
- if (type == Update.STATE_MODIFIED)
- type = Update.STATE_MERGEABLE_CONFLICT;
- merging = false;
- }
- updateMessageListener.fileInformation(type, commandRoot, path);
- }
- return OK;
- }
-
- /**
- * This handler is used by the RemoteResource hierarchy to retrieve E messages
- * from the CVS server in order to determine the folders contained in a parent folder.
- *
- * WARNING: This class parses the message output to determine the state of files in the
- * repository. Unfortunately, these messages seem to be customizable on a server by server basis.
- *
- * Here's a list of responses we expect in various situations:
- *
- * Directory exists remotely:
- * cvs server: Updating folder1/folder2
- * Directory doesn't exist remotely:
- * cvs server: skipping directory folder1/folder2
- * New (or unknown) remote directory
- * cvs server: New Directory folder1/folder2
- * File removed remotely
- * cvs server: folder1/file.ext is no longer in the repository
- * cvs server: warning: folder1/file.ext is not (any longer) pertinent
- * Locally added file was added remotely as well
- * cvs server: conflict: folder/file.ext created independently by second party
- * File removed locally and modified remotely
- * cvs server: conflict: removed file.txt was modified by second party
- * File modified locally but removed remotely
- * cvs server: conflict: file.txt is modified but no longer in the repository
- * Ignored Messages
- * cvs server: cannot open directory ...
- * cvs server: nothing known about ...
- * Tag error that really means there are no files in a directory
- * cvs [server aborted]: no such tag
- */
- public IStatus errorLine(String line, ICVSFolder commandRoot,
- IProgressMonitor monitor) {
-
- if (line.startsWith(SERVER_PREFIX)) {
- // Strip the prefix from the line
- String message = line.substring(SERVER_PREFIX.length());
- if (message.startsWith("Updating")) { //$NON-NLS-1$
- if (updateMessageListener != null) {
- IPath path = new Path(message.substring(9));
- updateMessageListener.directoryInformation(commandRoot, path, false);
- }
- return OK;
- } else if (message.startsWith("skipping directory")) { //$NON-NLS-1$
- if (updateMessageListener != null) {
- IPath path = new Path(message.substring(18).trim());
- updateMessageListener.directoryDoesNotExist(commandRoot, path);
- }
- return OK;
- } else if (message.startsWith("New directory")) { //$NON-NLS-1$
- if (updateMessageListener != null) {
- IPath path = new Path(message.substring(15, message.indexOf('\'', 15)));
- updateMessageListener.directoryInformation(commandRoot, path, true);
- }
- return OK;
- } else if (message.endsWith("is no longer in the repository")) { //$NON-NLS-1$
- if (updateMessageListener != null) {
- String filename = message.substring(0, message.length() - 31);
- updateMessageListener.fileDoesNotExist(commandRoot, filename);
- }
- return OK;
- } else if (message.startsWith("conflict:")) { //$NON-NLS-1$
- /*
- * We can get the following conflict warnings
- * cvs server: conflict: folder/file.ext created independently by second party
- * cvs server: conflict: removed file.txt was modified by second party
- * cvs server: conflict: file.txt is modified but no longer in the repository
- * If we get the above line, we have conflicting additions or deletions and we can expect a server error.
- * We still get "C foler/file.ext" so we don't need to do anything else (except in the remotely deleted case)
- */
- if (updateMessageListener != null) {
- if (message.endsWith("is modified but no longer in the repository")) { //$NON-NLS-1$
- // The "C foler/file.ext" will come after this so if whould be ignored!
- String filename = message.substring(10, message.length() - 44);
- updateMessageListener.fileDoesNotExist(commandRoot, filename);
- }
- }
- return new CVSStatus(CVSStatus.WARNING, CVSStatus.CONFLICT, commandRoot, line);
- } else if (message.startsWith("warning:")) { //$NON-NLS-1$
- /*
- * We can get the following conflict warnings
- * cvs server: warning: folder1/file.ext is not (any longer) pertinent
- * If we get the above line, we have local changes to a remotely deleted file.
- */
- if (updateMessageListener != null) {
- if (message.endsWith("is not (any longer) pertinent")) { //$NON-NLS-1$
- String filename = message.substring(9, message.length() - 30);
- updateMessageListener.fileDoesNotExist(commandRoot, filename);
- }
- }
- return new CVSStatus(CVSStatus.WARNING, CVSStatus.CONFLICT, commandRoot, line);
- } else if (message.startsWith("conflicts")) { //$NON-NLS-1$
- // This line is info only. The server doesn't report an error.
- return new CVSStatus(IStatus.INFO, CVSStatus.CONFLICT, commandRoot, line);
- } else if (!message.startsWith("cannot open directory") //$NON-NLS-1$
- && !message.startsWith("nothing known about")) { //$NON-NLS-1$
- return new CVSStatus(CVSStatus.ERROR, CVSStatus.ERROR_LINE, commandRoot, line);
- }
- } else if (line.startsWith(SERVER_ABORTED_PREFIX)) {
- // Strip the prefix from the line
- String message = line.substring(SERVER_ABORTED_PREFIX.length());
- if (message.startsWith("no such tag")) { //$NON-NLS-1$
- // This is reported from CVS when a tag is used on the update there are no files in the directory
- // To get the folders, the update request should be re-issued for HEAD
- return new CVSStatus(CVSStatus.WARNING, CVSStatus.NO_SUCH_TAG, commandRoot, line);
- } else {
- return new CVSStatus(CVSStatus.ERROR, CVSStatus.ERROR_LINE, commandRoot, line);
- }
- }
- return new CVSStatus(CVSStatus.ERROR, CVSStatus.ERROR_LINE, commandRoot, line);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSAuthenticationException.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSAuthenticationException.java
deleted file mode 100644
index 412c3d21a..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSAuthenticationException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.connection;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.Policy;
-
-public class CVSAuthenticationException extends CVSException {
-
- /**
- * Creates a new <code>CVSAuthenticationException</code>
- *
- * @param detail a message that describes the exception in detail.
- */
- public CVSAuthenticationException(String detail) {
- super(Policy.bind("CVSAuthenticationException.detail", new Object[] { detail })); //$NON-NLS-1$
- }
-
- /**
- * Creates a new <code>CVSAuthenticationException</code>
- *
- * @param cvsroot the cvs server.
- * @param detail a message that describes the exception in detail.
- */
- public CVSAuthenticationException(String cvsroot, String detail) {
- this(detail);
- }
- /**
- * Creates a new <code>CVSAuthenticationException</code>
- *
- * @param status the status result describing this exception.
- */
- public CVSAuthenticationException(IStatus status) {
- super(status);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSCommunicationException.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSCommunicationException.java
deleted file mode 100644
index b17dc14d5..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSCommunicationException.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.connection;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.Policy;
-
-public class CVSCommunicationException extends CVSException {
-
- /**
- * Create a new <code>CVSCommunicationException with the
- * given message.
- */
- public CVSCommunicationException(String message) {
- super(message);
- }
- /**
- * Create a new <code>CVSCommunicationException.
- *
- * @param message a message describing the exception in detail.
- * @param the caught exception that has caused the communication
- * exception.
- */
- public CVSCommunicationException(String message, Exception e) {
- super(message, e);
- }
- /**
- * Create a new <code>CVSCommunicationException.
- *
- * @param the caught exception that has caused the communication
- * exception.
- */
- public CVSCommunicationException(Exception e) {
- this(getMessageFor(e), e);
- }
-
- public static String getMessageFor(Throwable throwable) {
- String message = Policy.bind(throwable.getClass().getName(), new Object[] {throwable.getMessage()});
- if (message.equals(throwable.getClass().getName()))
- message = Policy.bind("CVSCommunicationException.io", new Object[] {throwable.toString()}); //$NON-NLS-1$
- return message;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java
deleted file mode 100644
index bc8fe53d1..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java
+++ /dev/null
@@ -1,819 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.connection;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProvider;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.ICVSRunnable;
-import org.eclipse.team.internal.ccvs.core.IConnectionMethod;
-import org.eclipse.team.internal.ccvs.core.IUserAuthenticator;
-import org.eclipse.team.internal.ccvs.core.IUserInfo;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolder;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteModule;
-
-/**
- * This class manages a CVS repository location.
- *
- * It provides the mapping between connection method name and the
- * plugged in ICunnectionMethod.
- *
- * It parses location strings into instances.
- *
- * It provides a method to open a connection to the server along
- * with a method to validate that connections can be made.
- *
- * It manages its user info using the plugged in IUserAuthenticator
- * (unless a username and password are provided as part of the creation
- * string, in which case, no authenticator is used).
- *
- * Instances must be disposed of when no longer needed in order to
- * notify the authenticator so cached properties can be cleared
- *
- */
-public class CVSRepositoryLocation extends PlatformObject implements ICVSRepositoryLocation, IUserInfo {
-
- // server platform constants
- public static final int UNDETERMINED_PLATFORM = 0;
- public static final int CVS_SERVER = 1;
- public static final int CVSNT_SERVER = 2;
- public static final int UNSUPPORTED_SERVER = 3;
- public static final int UNKNOWN_SERVER = 4;
-
- // static variables for extension points
- private static IUserAuthenticator authenticator;
- private static IConnectionMethod[] pluggedInConnectionMethods = null;
-
- private IConnectionMethod method;
- private String user;
- private String password;
- private String host;
- private int port;
- private String root;
- private boolean userFixed;
- private boolean passwordFixed;
- private int serverPlatform = UNDETERMINED_PLATFORM;
-
- public static final char COLON = ':';
- public static final char HOST_SEPARATOR = '@';
- public static final char PORT_SEPARATOR = '#';
- public static final boolean STANDALONE_MODE = (System.getProperty("eclipse.cvs.standalone")==null) ? //$NON-NLS-1$
- false :(new Boolean(System.getProperty("eclipse.cvs.standalone")).booleanValue()); //$NON-NLS-1$
-
- // fields needed for caching the password
- public static final String INFO_PASSWORD = "org.eclipse.team.cvs.core.password";//$NON-NLS-1$
- public static final String INFO_USERNAME = "org.eclipse.team.cvs.core.username";//$NON-NLS-1$
- public static final String AUTH_SCHEME = "";//$NON-NLS-1$
- public static final URL FAKE_URL;
-
- static {
- URL temp = null;
- try {
- temp = new URL("http://org.eclipse.team.cvs.core");//$NON-NLS-1$
- } catch (MalformedURLException e) {
- }
- FAKE_URL = temp;
- }
-
- /*
- * Create a CVSRepositoryLocation from its composite parts.
- */
- private CVSRepositoryLocation(IConnectionMethod method, String user, String password, String host, int port, String root, boolean userFixed, boolean passwordFixed) {
- this.method = method;
- this.user = user;
- this.password = password;
- this.host = host;
- this.port = port;
- this.root = root;
- // The username can be fixed only if one is provided
- if (userFixed && (user != null))
- this.userFixed = true;
- // The password can only be fixed if the username is and a password is provided
- if (userFixed && passwordFixed && (password != null))
- this.passwordFixed = true;
- }
-
- /*
- * Create the connection to the remote server.
- * If anything fails, an exception will be thrown and must
- * be handled by the caller.
- */
- private Connection createConnection(String password, IProgressMonitor monitor) throws CVSException {
- // FIXME Should the open() of Connection be done in the constructor?
- // The only reason it should is if connections can be reused (they aren't reused now).
- // FIXME! monitor is unused
- Connection connection = new Connection(this, method.createConnection(this, password));
- connection.open(monitor);
- return connection;
- }
-
- /*
- * Dispose of the receiver by clearing any cached authorization information.
- * This method shold only be invoked when the corresponding adapter is shut
- * down or a connection is being validated.
- */
- public void dispose() throws CVSException {
- flushCache();
- }
-
- /*
- * Flush the keyring entry associated with the receiver
- */
- private void flushCache() throws CVSException {
- try {
- Platform.flushAuthorizationInfo(FAKE_URL, getLocation(), AUTH_SCHEME);
- } catch (CoreException e) {
- // We should probably wrap the CoreException here!
- CVSProviderPlugin.log(e.getStatus());
- throw new CVSException(IStatus.ERROR, IStatus.ERROR, Policy.bind("CVSRepositoryLocation.errorFlushing", getLocation()), e);//$NON-NLS-1$
- }
- }
-
- /*
- * @see ICVSRepositoryLocation#getHost()
- */
- public String getHost() {
- return host;
- }
-
- /*
- * @see IRepositoryLocation#getLocation()
- *
- * The username is included if it is fixed.
- * The password is never included even if it is fixed.
- * The port is included if it is not the default port.
- */
- public String getLocation() {
- return COLON + method.getName() + COLON +
- (userFixed?(user +
- (passwordFixed?(COLON + password):"")//$NON-NLS-1$
- + HOST_SEPARATOR):"") +//$NON-NLS-1$
- host +
- ((port == USE_DEFAULT_PORT)?"":(PORT_SEPARATOR + new Integer(port).toString())) +//$NON-NLS-1$
- COLON + root;
- }
-
- /*
- * @see ICVSRepositoryLocation#getMethod()
- */
- public IConnectionMethod getMethod() {
- return method;
- }
-
- public boolean setMethod(String methodName) {
- IConnectionMethod newMethod = getPluggedInConnectionMethod(methodName);
- if (newMethod == null)
- return false;
- method = newMethod;
- return true;
- }
-
- /*
- * @see ICVSRepositoryLocation#getPort()
- */
- public int getPort() {
- return port;
- }
-
- /*
- * @see ICVSRepositoryLocation#members(CVSTag, boolean, IProgressMonitor)
- */
- public ICVSRemoteResource[] members(CVSTag tag, boolean modules, IProgressMonitor progress) throws CVSException {
- try {
- if (modules) {
- return RemoteModule.getRemoteModules(this, tag, progress);
- } else {
- RemoteFolder root = new RemoteFolder(null, this, Path.EMPTY, tag);
- ICVSRemoteResource[] resources = (ICVSRemoteResource[])root.members(progress);
- // There is the off chance that there is a file in the root of the repository.
- // This is not supported by cvs so we need to make sure there are no files
- List folders = new ArrayList(resources.length);
- for (int i = 0; i < resources.length; i++) {
- ICVSRemoteResource remoteResource = resources[i];
- if (remoteResource.isContainer()) {
- folders.add(remoteResource);
- }
- }
- return (ICVSRemoteResource[]) folders.toArray(new ICVSRemoteResource[folders.size()]);
- }
- } catch(TeamException e) {
- throw new CVSException(e.getStatus());
- }
- }
-
- /*
- * @see ICVSRepositoryLocation#getRemoteFolder(String, CVSTag)
- */
- public ICVSRemoteFolder getRemoteFolder(String remotePath, CVSTag tag) {
- return new RemoteFolder(null, this, new Path(remotePath), tag);
- }
-
- /*
- * @see ICVSRepositoryLocation#getRootDirectory()
- */
- public String getRootDirectory() {
- return root;
- }
-
- /*
- * @see ICVSRepositoryLocation#getTimeout()
- *
- * For the time being, the timeout value is a system wide value
- * associated with the CVSPlugin singleton.
- */
- public int getTimeout() {
- return CVSProviderPlugin.getPlugin().getTimeout();
- }
-
- /*
- * @see ICVSRepositoryLocation#getUserInfo()
- */
- public IUserInfo getUserInfo(boolean makeUsernameMutable) {
- return new UserInfo(getUsername(), password, makeUsernameMutable ? true : isUsernameMutable());
- }
-
- /*
- * @see ICVSRepositoryLocation#getUsername()
- * @see IUserInfo#getUsername()
- */
- public String getUsername() {
- // If the username is mutable, get it from the cache if it's there
- if (user == null && isUsernameMutable()) {
- try {
- retrievePassword();
- } catch (CVSException e) {
- }
- }
- return user == null ? "" : user; //$NON-NLS-1$
- }
-
- /*
- * @see IUserInfo#isUsernameMutable()
- */
- public boolean isUsernameMutable() {
- return !userFixed;
- }
-
- /*
- * Open a connection to the repository represented by the receiver.
- * If the username or password are not fixed, openConnection will
- * use the plugged-in authenticator to prompt for the username and/or
- * password if one has not previously been provided or if the previously
- * supplied username and password are invalid.
- */
- public Connection openConnection(IProgressMonitor monitor) throws CVSException {
-
- try {
- // Allow two ticks in case of a retry
- monitor.beginTask(Policy.bind("CVSRepositoryLocation.openingConnection", getLocation()), 2);//$NON-NLS-1$
-
- // If we have a username and password, use them to attempt a connection
- if ((user != null) && (password != null)) {
- return createConnection(password, monitor);
- }
-
- // Get the repository in order to ensure that the location is known by CVS.
- // (The get will record the location if it's not already recorded.
- CVSProvider.getInstance().getRepository(getLocation());
-
- while (true) {
- try {
- // The following will throw an exception if authentication fails
- String password = retrievePassword();
- if (user == null) {
- // This is possible if the cache was cleared somehow for a location with a mutable username
- throw new CVSAuthenticationException(new CVSStatus(CVSStatus.ERROR, Policy.bind("CVSRepositoryLocation.usernameRequired"))); //$NON-NLS-1$
- }
- if (password == null)
- password = "";//$NON-NLS-1$
- return createConnection(password, monitor);
- } catch (CVSAuthenticationException ex) {
- String message = ex.getMessage();
- try {
- IUserAuthenticator authenticator = getAuthenticator();
- if (authenticator == null) {
- throw new CVSAuthenticationException(getLocation(), Policy.bind("Client.noAuthenticator"));//$NON-NLS-1$
- }
- authenticator.promptForUserInfo(this, this, message);
- updateCache();
- } catch (OperationCanceledException e) {
- throw new CVSAuthenticationException(new CVSStatus(CVSStatus.ERROR, message));
- }
- }
- }
- } finally {
- monitor.done();
- }
- }
-
- /*
- * Implementation of inherited toString()
- */
- public String toString() {
- return getLocation();
- }
-
- public boolean equals(Object o) {
- if (!(o instanceof CVSRepositoryLocation)) return false;
- return getLocation().equals(((CVSRepositoryLocation)o).getLocation());
- }
- public int hashCode() {
- return getLocation().hashCode();
- }
-
- /*
- * Return the cached password from the keyring.
- * Also, set the username of the receiver if the username is mutable
- */
- private String retrievePassword() throws CVSException {
- Map map = Platform.getAuthorizationInfo(FAKE_URL, getLocation(), AUTH_SCHEME);
- if (map != null) {
- String username = (String) map.get(INFO_USERNAME);
- if (username != null && isUsernameMutable())
- setUsername(username);
- String password = (String) map.get(INFO_PASSWORD);
- if (password != null) {
- return password;
- }
- }
- return null;
- }
- /*
- * @see IUserInfo#setPassword(String)
- */
- public void setPassword(String password) {
- if (passwordFixed)
- throw new UnsupportedOperationException();
- this.password = password;
- // XXX The cache needs to get the new password somehow but not before we are validated!
- }
-
- public void setUserInfo(IUserInfo userinfo) {
- user = userinfo.getUsername();
- password = ((UserInfo)userinfo).getPassword();
- }
- /*
- * @see IUserInfo#setUsername(String)
- */
- public void setUsername(String user) {
- if (userFixed)
- throw new UnsupportedOperationException();
- this.user = user;
- // XXX The cache needs to get the new username somehow but not before we are validated!
- }
-
- public void setUserMuteable(boolean muteable) {
- userFixed = !muteable;
- }
-
- public void updateCache() throws CVSException {
- if (passwordFixed)
- return;
- updateCache(user, password, true);
- password = null;
- // Ensure that the receiver is known by the CVS provider
- CVSProvider.getInstance().getRepository(getLocation());
- }
-
- /*
- * Cache the user info in the keyring
- */
- private void updateCache(String username, String password, boolean createIfAbsent) throws CVSException {
- // put the password into the Platform map
- Map map = Platform.getAuthorizationInfo(FAKE_URL, getLocation(), AUTH_SCHEME);
- if (map == null) {
- if ( ! createIfAbsent) return;
- map = new java.util.HashMap(10);
- }
- if (username != null)
- map.put(INFO_USERNAME, username);
- if (password != null)
- map.put(INFO_PASSWORD, password);
- try {
- Platform.addAuthorizationInfo(FAKE_URL, getLocation(), AUTH_SCHEME, map);
- } catch (CoreException e) {
- // We should probably wrap the CoreException here!
- CVSProviderPlugin.log(e.getStatus());
- throw new CVSException(IStatus.ERROR, IStatus.ERROR, Policy.bind("CVSRepositoryLocation.errorCaching", getLocation()), e);//$NON-NLS-1$
- }
- }
-
- /*
- * Validate that the receiver contains valid information for
- * making a connection. If the receiver contains valid
- * information, the method returns. Otherwise, an exception
- * indicating the problem is throw.
- */
- public void validateConnection(IProgressMonitor monitor) throws CVSException {
- try {
- ICVSFolder root = CVSWorkspaceRoot.getCVSFolderFor(ResourcesPlugin.getWorkspace().getRoot());
- Session.run(this, root, false, new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- IStatus status = Command.VERSION.execute(null, CVSRepositoryLocation.this, monitor);
- // Log any non-ok status
- if (! status.isOK()) {
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++) {
- CVSProviderPlugin.log(children[i]);
- }
- } else {
- CVSProviderPlugin.log(status);
- }
- }
- }
- }, monitor);
- } catch (CVSException e) {
- // If the validation failed, dispose of any cached info
- dispose();
- throw e;
- }
- }
-
- /**
- * Return the server platform type. It will be one of the following:
- * UNDETERMINED_PLATFORM: The platform has not been determined
- * CVS_SERVER: The platform is regular CVS server
- * CVSNT_SERVER: The platform in CVSNT
- * If UNDETERMINED_PLATFORM is returned, the platform can be determined
- * using the Command.VERSION command.
- */
- public int getServerPlatform() {
- return serverPlatform;
- }
-
- /**
- * This method is called from Command.VERSION to set the platform type.
- */
- public void setServerPlaform(IStatus status) {
- // OK means that its a regular cvs server
- if (status.isOK()) {
- serverPlatform = CVS_SERVER;
- return;
- }
- // Find the status that reports the CVS platform
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++) {
- IStatus iStatus = children[i];
- if (iStatus.getCode() == CVSStatus.SERVER_IS_CVSNT
- || iStatus.getCode() == CVSStatus.UNSUPPORTED_SERVER_VERSION
- || iStatus.getCode() == CVSStatus.SERVER_IS_UNKNOWN) {
- status = iStatus;
- break;
- }
- }
- }
- // Second, check the code of the status itself to see if it is NT
- switch (status.getCode()) {
- case CVSStatus.SERVER_IS_CVSNT:
- serverPlatform = CVSNT_SERVER;
- break;
- case CVSStatus.UNSUPPORTED_SERVER_VERSION:
- serverPlatform = UNSUPPORTED_SERVER;
- break;
- case CVSStatus.SERVER_IS_UNKNOWN:
- serverPlatform = UNKNOWN_SERVER;
- break;
- default:
- // We had an error status with no info about the server.
- // Mark it as undetermined.
- serverPlatform = UNDETERMINED_PLATFORM;
- }
- }
-
- public static boolean validateConnectionMethod(String methodName) {
- String[] methods = CVSProviderPlugin.getProvider().getSupportedConnectionMethods();
- for (int i=0;i<methods.length;i++) {
- if (methodName.equals(methods[i]))
- return true;
- }
- return false;
- }
-
- /*
- * Create a repository location instance from the given properties.
- * The supported properties are:
- *
- * connection The connection method to be used
- * user The username for the connection (optional)
- * password The password used for the connection (optional)
- * host The host where the repository resides
- * port The port to connect to (optional)
- * root The server directory where the repository is located
- */
- public static CVSRepositoryLocation fromProperties(Properties configuration) throws CVSException {
- // We build a string to allow validation of the components that are provided to us
- String connection = configuration.getProperty("connection");//$NON-NLS-1$
- if (connection == null)
- connection = "pserver";//$NON-NLS-1$
- IConnectionMethod method = getPluggedInConnectionMethod(connection);
- if (method == null)
- throw new CVSException(new Status(IStatus.ERROR, CVSProviderPlugin.ID, TeamException.UNABLE, Policy.bind("CVSRepositoryLocation.methods", new Object[] {getPluggedInConnectionMethodNames()}), null));//$NON-NLS-1$
- String user = configuration.getProperty("user");//$NON-NLS-1$
- if (user.length() == 0)
- user = null;
- String password = configuration.getProperty("password");//$NON-NLS-1$
- if (user == null)
- password = null;
- String host = configuration.getProperty("host");//$NON-NLS-1$
- if (host == null)
- throw new CVSException(new Status(IStatus.ERROR, CVSProviderPlugin.ID, TeamException.UNABLE, Policy.bind("CVSRepositoryLocation.hostRequired"), null));//$NON-NLS-1$
- String portString = configuration.getProperty("port");//$NON-NLS-1$
- int port;
- if (portString == null)
- port = ICVSRepositoryLocation.USE_DEFAULT_PORT;
- else
- port = Integer.parseInt(portString);
- String root = configuration.getProperty("root");//$NON-NLS-1$
- if (root == null)
- throw new CVSException(new Status(IStatus.ERROR, CVSProviderPlugin.ID, TeamException.UNABLE, Policy.bind("CVSRepositoryLocation.rootRequired"), null));//$NON-NLS-1$
- root = root.replace('\\', '/');
-
- return new CVSRepositoryLocation(method, user, password, host, port, root, user != null, false);
- }
-
- /*
- * Parse a location string and return a CVSRepositoryLocation.
- *
- * On failure, the status of the exception will be a MultiStatus
- * that includes the original parsing error and a general status
- * displaying the passed location and proper form. This form is
- * better for logging, etc.
- */
- public static CVSRepositoryLocation fromString(String location) throws CVSException {
- try {
- return fromString(location, false);
- } catch (CVSException e) {
- // Parsing failed. Include a status that
- // shows the passed location and the proper form
- MultiStatus error = new MultiStatus(CVSProviderPlugin.ID, CVSStatus.ERROR, Policy.bind("CVSRepositoryLocation.invalidFormat", new Object[] {location}), null);//$NON-NLS-1$
- error.merge(new CVSStatus(CVSStatus.ERROR, Policy.bind("CVSRepositoryLocation.locationForm")));//$NON-NLS-1$
- error.merge(e.getStatus());
- throw new CVSException(error);
- }
- }
-
- /*
- * Parse a location string and return a CVSRepositoryLocation.
- *
- * The valid format (from the cederqvist) is:
- *
- * :method:[[user][:password]@]hostname[:[port]]/path/to/repository
- *
- * However, this does not work with CVS on NT so we use the format
- *
- * :method:[user[:password]@]hostname[#port]:/path/to/repository
- *
- * Some differences to note:
- * The : after the host/port is not optional because of NT naming including device
- * e.g. :pserver:username:password@hostname#port:D:\cvsroot
- *
- * If validateOnly is true, this method will always throw an exception.
- * The status of the exception indicates success or failure. The status
- * of the exception contains a specific message suitable for displaying
- * to a user who has knowledge of the provided location string.
- * @see CVSRepositoryLocation.fromString(String)
- */
- public static CVSRepositoryLocation fromString(String location, boolean validateOnly) throws CVSException {
- String partId = null;
- try {
- // Get the connection method
- partId = "CVSRepositoryLocation.parsingMethod";//$NON-NLS-1$
- int start = location.indexOf(COLON);
- if (start != 0)
- throw new CVSException(Policy.bind("CVSRepositoryLocation.startOfLocation"));//$NON-NLS-1$
- int end = location.indexOf(COLON, start + 1);
- String methodName = location.substring(start + 1, end);
- IConnectionMethod method = getPluggedInConnectionMethod(methodName);
- if (method == null)
- throw new CVSException(new CVSStatus(CVSStatus.ERROR, Policy.bind("CVSRepositoryLocation.methods", new Object[] {getPluggedInConnectionMethodNames()})));//$NON-NLS-1$
-
- // Get the user name and password (if provided)
- partId = "CVSRepositoryLocation.parsingUser";//$NON-NLS-1$
- start = end + 1;
- end = location.indexOf(HOST_SEPARATOR, start);
- String user = null;;
- String password = null;
- // if end is -1 then there is no host separator meaning that the username is not present
- if (end != -1) {
- // Get the optional user and password
- user = location.substring(start, end);
- // Separate the user and password (if there is a password)
- start = user.indexOf(COLON);
- if (start != -1) {
- partId = "CVSRepositoryLocation.parsingPassword";//$NON-NLS-1$
- password = user.substring(start+1);
- user = user.substring(0, start);
- }
- // Set start to point after the host separator
- start = end + 1;
- }
-
- // Get the host (and port)
- partId = "CVSRepositoryLocation.parsingHost";//$NON-NLS-1$
- end= location.indexOf(COLON, start);
- String host = location.substring(start, end);
- int port = USE_DEFAULT_PORT;
- // Separate the port and host if there is a port
- start = host.indexOf(PORT_SEPARATOR);
- if (start != -1) {
- partId = "CVSRepositoryLocation.parsingPort";//$NON-NLS-1$
- port = Integer.parseInt(host.substring(start+1));
- host = host.substring(0, start);
- }
-
- // Get the repository path (translating backslashes to slashes)
- partId = "CVSRepositoryLocation.parsingRoot";//$NON-NLS-1$
- start = end + 1;
- String root = location.substring(start).replace('\\', '/');
-
- if (validateOnly)
- throw new CVSException(new CVSStatus(CVSStatus.OK, Policy.bind("ok")));//$NON-NLS-1$
-
- return new CVSRepositoryLocation(method, user, password, host, port, root, (user != null), (password != null));
- }
- catch (IndexOutOfBoundsException e) {
- // We'll get here if anything funny happened while extracting substrings
- throw new CVSException(Policy.bind(partId));
- }
- catch (NumberFormatException e) {
- // We'll get here if we couldn't parse a number
- throw new CVSException(Policy.bind(partId));
- }
- }
-
- public static IUserAuthenticator getAuthenticator() {
- if (authenticator == null) {
- authenticator = getPluggedInAuthenticator();
- }
- return authenticator;
- }
-
- /*
- * Return the connection method registered for the given name or null if none
- * are registered
- */
- private static IConnectionMethod getPluggedInConnectionMethod(String methodName) {
- IConnectionMethod[] methods = getPluggedInConnectionMethods();
- for(int i=0; i<methods.length; i++) {
- if(methodName.equals(methods[i].getName()))
- return methods[i];
- }
- return null;
- }
-
- /*
- * Return a string containing a list of all connection methods
- */
- private static String getPluggedInConnectionMethodNames() {
- IConnectionMethod[] methods = getPluggedInConnectionMethods();
- StringBuffer methodNames = new StringBuffer();
- for(int i=0; i<methods.length; i++) {
- String name = methods[i].getName();
- if (i>0)
- methodNames.append(", ");//$NON-NLS-1$
- methodNames.append(name);
- }
- return methodNames.toString();
- }
-
- public static IConnectionMethod[] getPluggedInConnectionMethods() {
- if(pluggedInConnectionMethods==null) {
- List connectionMethods = new ArrayList();
-
- if (STANDALONE_MODE) {
- connectionMethods.add(new PServerConnectionMethod());
- } else {
- IExtension[] extensions = Platform.getPluginRegistry().getExtensionPoint(CVSProviderPlugin.ID, CVSProviderPlugin.PT_CONNECTIONMETHODS).getExtensions();
- for(int i=0; i<extensions.length; i++) {
- IExtension extension = extensions[i];
- IConfigurationElement[] configs = extension.getConfigurationElements();
- if (configs.length == 0) {
- CVSProviderPlugin.log(new Status(IStatus.ERROR, CVSProviderPlugin.ID, 0, Policy.bind("CVSProviderPlugin.execProblem"), null));//$NON-NLS-1$
- continue;
- }
- try {
- IConfigurationElement config = configs[0];
- connectionMethods.add(config.createExecutableExtension("run"));//$NON-NLS-1$
- } catch (CoreException ex) {
- CVSProviderPlugin.log(new Status(IStatus.ERROR, CVSProviderPlugin.ID, 0, Policy.bind("CVSProviderPlugin.execProblem"), ex));//$NON-NLS-1$
- }
- }
- }
- pluggedInConnectionMethods = (IConnectionMethod[])connectionMethods.toArray(new IConnectionMethod[0]);
- }
- return pluggedInConnectionMethods;
- }
-
- private static IUserAuthenticator getPluggedInAuthenticator() {
- IExtension[] extensions = Platform.getPluginRegistry().getExtensionPoint(CVSProviderPlugin.ID, CVSProviderPlugin.PT_AUTHENTICATOR).getExtensions();
- if (extensions.length == 0)
- return null;
- IExtension extension = extensions[0];
- IConfigurationElement[] configs = extension.getConfigurationElements();
- if (configs.length == 0) {
- CVSProviderPlugin.log(new Status(IStatus.ERROR, CVSProviderPlugin.ID, 0, Policy.bind("CVSAdapter.noConfigurationElement", new Object[] {extension.getUniqueIdentifier()}), null));//$NON-NLS-1$
- return null;
- }
- try {
- IConfigurationElement config = configs[0];
- return (IUserAuthenticator) config.createExecutableExtension("run");//$NON-NLS-1$
- } catch (CoreException ex) {
- CVSProviderPlugin.log(new Status(IStatus.ERROR, CVSProviderPlugin.ID, 0, Policy.bind("CVSAdapter.unableToInstantiate", new Object[] {extension.getUniqueIdentifier()}), ex));//$NON-NLS-1$
- return null;
- }
- }
-
- /*
- * Validate that the given string could ne used to succesfully create
- * an instance of the receiver.
- *
- * This method performs some initial checks to provide displayable
- * feedback and also tries a more in-depth parse using fromString(String, boolean).
- */
- public static IStatus validate(String location) {
-
- // Check some simple things that are not checked in creation
- if (location == null)
- return new CVSStatus(CVSStatus.ERROR, Policy.bind("CVSRepositoryLocation.nullLocation"));//$NON-NLS-1$
- if (location.equals(""))//$NON-NLS-1$
- return new CVSStatus(CVSStatus.ERROR, Policy.bind("CVSRepositoryLocation.emptyLocation"));//$NON-NLS-1$
- if (location.endsWith(" ") || location.endsWith("\t"))//$NON-NLS-1$ //$NON-NLS-2$
- return new CVSStatus(CVSStatus.ERROR, Policy.bind("CVSRepositoryLocation.endWhitespace"));//$NON-NLS-1$
- if (!location.startsWith(":") || location.indexOf(COLON, 1) == -1)//$NON-NLS-1$
- return new CVSStatus(CVSStatus.ERROR, Policy.bind("CVSRepositoryLocation.startOfLocation"));//$NON-NLS-1$
-
- // Do some quick checks to provide geberal feedback
- String formatError = Policy.bind("CVSRepositoryLocation.locationForm");//$NON-NLS-1$
- int secondColon = location.indexOf(COLON, 1);
- int at = location.indexOf(HOST_SEPARATOR);
- if (at != -1) {
- String user = location.substring(secondColon + 1, at);
- if (user.equals(""))//$NON-NLS-1$
- return new CVSStatus(CVSStatus.ERROR, formatError);
- } else
- at = secondColon;
- int colon = location.indexOf(COLON, at + 1);
- if (colon == -1)
- return new CVSStatus(CVSStatus.ERROR, formatError);
- String host = location.substring(at + 1, colon);
- if (host.equals(""))//$NON-NLS-1$
- return new CVSStatus(CVSStatus.ERROR, formatError);
- String path = location.substring(colon + 1, location.length());
- if (path.equals(""))//$NON-NLS-1$
- return new CVSStatus(CVSStatus.ERROR, formatError);
-
- // Do a full parse and see if it passes
- try {
- fromString(location, true);
- } catch (CVSException e) {
- // An exception is always throw. Return the status
- return e.getStatus();
- }
-
- // Looks ok (we'll actually never get here because above
- // fromString(String, boolean) will always throw an exception).
- return new CVSStatus(IStatus.OK, Policy.bind("ok"));//$NON-NLS-1$
- }
- /**
- * @see ICVSRepositoryLocation#flushUserInfo()
- */
- public void flushUserInfo() throws CVSException {
- flushCache();
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSServerException.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSServerException.java
deleted file mode 100644
index bf2c6e474..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSServerException.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.connection;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-
-/**
- * Client has received an error response from the server.
- */
-public class CVSServerException extends CVSException {
-
- /**
- * Return true if the exception from the cvs server is the no tag error, and false
- * otherwise.
- */
- public boolean isNoTagException() {
- IStatus status = getStatus();
- if ( ! status.isMultiStatus())
- return false;
- IStatus[] children = ((MultiStatus)status).getChildren();
- for (int i = 0; i < children.length; i++) {
- if (children[i].getCode() == CVSStatus.NO_SUCH_TAG) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Return true if the exceptions status contains any error status messages
- */
- public boolean containsErrors() {
- IStatus status = getStatus();
- if ( ! status.isMultiStatus())
- return status.getSeverity() == IStatus.ERROR;
- IStatus[] children = ((MultiStatus)status).getChildren();
- for (int i=0;i<children.length;i++) {
- if (children[i].getSeverity() == IStatus.ERROR)
- return true;
- }
- return false;
- }
-
- /**
- * Return the CVSServerException for the given error message and error list
- *
- * This is public due to packaging and should not be used by clients.
- */
- public static CVSServerException forError(String message, IStatus[] children) {
- if (children.length > 0) {
- return new CVSServerException(message, children);
- } else {
- return new CVSServerException(new CVSStatus(IStatus.ERROR, CVSStatus.SERVER_ERROR, message, null));
- }
- }
-
- public CVSServerException(IStatus status) {
- super(status);
- }
-
- private CVSServerException(String message, IStatus[] children) {
- super(new MultiStatus(CVSProviderPlugin.ID, CVSStatus.SERVER_ERROR, children, message, null));
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/Connection.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/Connection.java
deleted file mode 100644
index 3e68d7ce0..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/Connection.java
+++ /dev/null
@@ -1,202 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.connection;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.IServerConnection;
-import org.eclipse.team.internal.ccvs.core.Policy;
-
-/**
- * A connection to talk to a cvs server. The life cycle of a connection is
- * as follows:
- * <ul>
- * <li> constructor: creates a new connection object that wraps the given
- * repository location and connection method.
- * <li> open: opens a connection.
- * <li> send a request: use write* method or use the request stream directly.
- * <code>GetRequestStream</code> returns an output stream to directly
- * talk to the server.
- * <li> read responses: use read* methods or use the response stream directly.
- * <code>GetResponseStream</code> returns an input stream to directly
- * read output from the server.
- * <li> close: closes the connection. A closed connection can be reopened by
- * calling open again.
- * </ul>
- */
-public class Connection {
- private static final byte NEWLINE= 0xA;
-
- private IServerConnection serverConnection;
- private ICVSRepositoryLocation fCVSRoot;
- private String fCVSRootDirectory;
- private boolean fIsEstablished;
- private InputStream fResponseStream;
- private byte[] readLineBuffer = new byte[256];
-
- public Connection(ICVSRepositoryLocation cvsroot, IServerConnection serverConnection) {
- fCVSRoot = cvsroot;
- this.serverConnection = serverConnection;
- }
-
- private static byte[] append(byte[] buffer, int index, byte b) {
- if (index >= buffer.length) {
- byte[] newBuffer= new byte[index * 2];
- System.arraycopy(buffer, 0, newBuffer, 0, buffer.length);
- buffer= newBuffer;
- }
- buffer[index]= b;
- return buffer;
- }
- /**
- * Closes the connection.
- */
- public void close() throws CVSException {
- if (!isEstablished())
- return;
- try {
- serverConnection.close();
- } catch (IOException ex) {
- throw new CVSCommunicationException(Policy.bind("Connection.cannotClose"), ex);//$NON-NLS-1$
- } finally {
- fResponseStream = null;
- fIsEstablished = false;
- }
- }
- /**
- * Flushes the request stream.
- */
- public void flush() throws CVSException {
- if (!isEstablished())
- return;
- try {
- getOutputStream().flush();
- } catch(IOException e) {
- throw new CVSCommunicationException(e);
- }
- }
-
- /**
- * Returns the <code>OutputStream</code> used to send requests
- * to the server.
- */
- public OutputStream getOutputStream() throws CVSException {
- if (!isEstablished())
- return null;
- return serverConnection.getOutputStream();
- }
- /**
- * Returns the <code>InputStream</code> used to read responses from
- * the server.
- */
- public InputStream getInputStream() throws CVSException {
- if (!isEstablished())
- return null;
- if (fResponseStream == null)
- fResponseStream = serverConnection.getInputStream();
- return fResponseStream;
- }
-
- /**
- * Returns <code>true</code> if the connection is established;
- * otherwise <code>false</code>.
- */
- public boolean isEstablished() {
- return fIsEstablished;
- }
-
- /**
- * Opens the connection.
- */
- public void open(IProgressMonitor monitor) throws CVSException {
- if (isEstablished())
- return;
- try {
- serverConnection.open(monitor);
- } catch (IOException e) {
- throw new CVSCommunicationException(e);
- }
- fIsEstablished= true;
- }
- /**
- * Reads a line from the response stream.
- */
- public String readLine() throws CVSException {
- if (!isEstablished())
- throw new CVSCommunicationException(Policy.bind("Connection.readUnestablishedConnection"));//$NON-NLS-1$
- try {
- InputStream in = getInputStream();
- int index = 0;
- int r;
- while ((r = in.read()) != -1) {
- if (r == NEWLINE) break;
- readLineBuffer = append(readLineBuffer, index++, (byte) r);
- }
- String result = new String(readLineBuffer, 0, index);
- if (Policy.DEBUG_CVS_PROTOCOL) System.out.println(result);
- return result;
- } catch (IOException e) {
- throw new CVSCommunicationException(e);
- }
- }
-
- static String readLine(InputStream in) throws IOException {
- byte[] buffer = new byte[256];
- int index = 0;
- int r;
- while ((r = in.read()) != -1) {
- if (r == NEWLINE)
- break;
- buffer = append(buffer, index++, (byte) r);
- }
- String result = new String(buffer, 0, index);
- if (Policy.DEBUG_CVS_PROTOCOL)
- System.out.println(result);
- return result;
- }
-
- //---- Helper to send strings to the server ----------------------------
-
- /**
- * Sends the given string to the server.
- */
- public void write(String s) throws CVSException {
- write(s, false);
- }
- /**
- * Sends the given string and a newline to the server.
- */
- public void writeLine(String s) throws CVSException {
- write(s, true);
- }
- /**
- * Low level method to write a string to the server. All write* methods are
- * funneled through this method.
- */
- void write(String s, boolean newline) throws CVSException {
- if (!isEstablished())
- throw new CVSCommunicationException(Policy.bind("Connection.writeUnestablishedConnection"));//$NON-NLS-1$
-
- if (Policy.DEBUG_CVS_PROTOCOL)
- System.out.print(s + (newline ? "\n" : ""));//$NON-NLS-1$ //$NON-NLS-2$
-
- try {
- OutputStream out= getOutputStream();
- out.write(s.getBytes());
- if (newline)
- out.write(NEWLINE);
- out.flush();
-
- } catch (IOException e) {
- throw new CVSCommunicationException(e);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnection.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnection.java
deleted file mode 100644
index f3401abdc..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnection.java
+++ /dev/null
@@ -1,151 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.connection;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.IServerConnection;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.core.streams.PollingInputStream;
-import org.eclipse.team.internal.core.streams.PollingOutputStream;
-import org.eclipse.team.internal.core.streams.TimeoutInputStream;
-import org.eclipse.team.internal.core.streams.TimeoutOutputStream;
-
-/**
- * Implements a connection method which invokes an external tool to
- * establish the connection to the cvs server. Authentication and starting
- * of the cvs server are the responsibility of the external connection
- * tool.
- */
-public class ExtConnection implements IServerConnection {
-
- // command to start remote cvs in server mode
- private static final String INVOKE_SVR_CMD = "server"; //$NON-NLS-1$
-
- // The default port for rsh
- private static final int DEFAULT_PORT = 9999;
-
- // cvs format for the repository (e.g. :extssh:user@host:/home/cvs/repo)
- private ICVSRepositoryLocation location;
-
- // incoming from remote host
- InputStream inputStream;
-
- // outgoing to remote host
- OutputStream outputStream;
-
- // Process spawn to run the command
- Process process;
-
- protected ExtConnection(ICVSRepositoryLocation location, String password) {
- this.location = location;
- // passwork not needed, authentication performed by external tool
- }
-
- /**
- * Closes the connection.
- */
- public void close() throws IOException {
- try {
- if (inputStream != null) inputStream.close();
- } finally {
- inputStream = null;
- try {
- if (outputStream != null) outputStream.close();
- } finally {
- outputStream = null;
- process.destroy();
- }
- }
- }
-
- /**
- * Returns the <code>InputStream</code> used to read data from the
- * server.
- */
- public InputStream getInputStream() {
- return inputStream;
- }
-
- /**
- * Returns the <code>OutputStream</code> used to send data to the
- * server.
- */
- public OutputStream getOutputStream() {
- return outputStream;
- }
-
- /**
- * Opens the connection and invokes cvs in server mode.
- *
- * @see Connection.open()
- */
- public void open(IProgressMonitor monitor) throws IOException {
- String hostname = location.getHost();
- String username = location.getUsername();
-
- String CVS_RSH = CVSProviderPlugin.getPlugin().getCvsRshCommand();
- String CVS_SERVER = CVSProviderPlugin.getPlugin().getCvsServer();
- String[] command = new String[] {CVS_RSH, hostname, "-l", username, CVS_SERVER, INVOKE_SVR_CMD}; //$NON-NLS-1$
-
- int port = location.getPort();
- if (port == location.USE_DEFAULT_PORT)
- port = DEFAULT_PORT;
-
- // The command line doesn't support the use of a port
- if (port != DEFAULT_PORT)
- throw new IOException(Policy.bind("EXTServerConnection.invalidPort")); //$NON-NLS-1$
-
- if(CVS_RSH == null || CVS_SERVER == null) {
- throw new IOException(Policy.bind("EXTServerConnection.varsNotSet")); //$NON-NLS-1$
- }
-
- boolean connected = false;
- try {
- process = Runtime.getRuntime().exec(command);
-
- inputStream = new PollingInputStream(new TimeoutInputStream(process.getInputStream(),
- 8192 /*bufferSize*/, 1000 /*readTimeout*/, -1 /*closeTimeout*/), location.getTimeout(), monitor);
- outputStream = new PollingOutputStream(new TimeoutOutputStream(process.getOutputStream(),
- 8192 /*buffersize*/, 1000 /*writeTimeout*/, 1000 /*closeTimeout*/), location.getTimeout(), monitor);
-
- // XXX need to do something more useful with stderr
- // discard the input to prevent the process from hanging due to a full pipe
- Thread thread = new DiscardInputThread(process.getErrorStream());
- connected = true;
- } finally {
- if (! connected) {
- try {
- close();
- } finally {
- throw new IOException(Policy.bind("EXTServerConnection.ioError", CVS_RSH)); //$NON-NLS-1$
- }
- }
- }
- }
-
- private static class DiscardInputThread extends Thread {
- private InputStream in;
- public DiscardInputThread(InputStream in) {
- this.in = in;
- }
- public void run() {
- try {
- try {
- while (in.read() != -1);
- } finally {
- in.close();
- }
- } catch (IOException e) {
- }
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnectionMethod.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnectionMethod.java
deleted file mode 100644
index 1b97fc84b..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnectionMethod.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.connection;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.IConnectionMethod;
-import org.eclipse.team.internal.ccvs.core.IServerConnection;
-
-public class ExtConnectionMethod implements IConnectionMethod {
- /**
- * @see IConnectionMethod#getName
- */
- public String getName() {
- return "ext"; //$NON-NLS-1$
- }
-
- /**
- * @see IConnectionMethod#createConnection
- */
- public IServerConnection createConnection(ICVSRepositoryLocation repositoryRoot, String password) {
- return new ExtConnection(repositoryRoot, password);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnection.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnection.java
deleted file mode 100644
index 37df44650..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnection.java
+++ /dev/null
@@ -1,273 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.connection;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.io.BufferedInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InterruptedIOException;
-import java.io.OutputStream;
-import java.net.Socket;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.IServerConnection;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.core.streams.PollingInputStream;
-import org.eclipse.team.internal.core.streams.PollingOutputStream;
-import org.eclipse.team.internal.core.streams.TimeoutOutputStream;
-
-/**
- * A connection used to talk to an cvs pserver.
- */
-public class PServerConnection implements IServerConnection {
-
- protected static final String SLEEP_PROPERTY = "cvs.pserver.wait";//$NON-NLS-1$
- protected static final String milliseconds = System.getProperty(SLEEP_PROPERTY);
-
- public static final char NEWLINE= 0xA;
-
- /** default CVS pserver port */
- private static final int DEFAULT_PORT= 2401;
-
- /** error line indicators */
- private static final char ERROR_CHAR = 'E';
- private static final String ERROR_MESSAGE = "error 0";//$NON-NLS-1$
- private static final String NO_SUCH_USER = "no such user";//$NON-NLS-1$
-
- private static final char[] SCRAMBLING_TABLE=new char[] {
- 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
- 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,
- 114,120,53,79,96,109,72,108,70,64,76,67,116,74,68,87,
- 111,52,75,119,49,34,82,81,95,65,112,86,118,110,122,105,
- 41,57,83,43,46,102,40,89,38,103,45,50,42,123,91,35,
- 125,55,54,66,124,126,59,47,92,71,115,78,88,107,106,56,
- 36,121,117,104,101,100,69,73,99,63,94,93,39,37,61,48,
- 58,113,32,90,44,98,60,51,33,97,62,77,84,80,85,223,
- 225,216,187,166,229,189,222,188,141,249,148,200,184,136,248,190,
- 199,170,181,204,138,232,218,183,255,234,220,247,213,203,226,193,
- 174,172,228,252,217,201,131,230,197,211,145,238,161,179,160,212,
- 207,221,254,173,202,146,224,151,140,196,205,130,135,133,143,246,
- 192,159,244,239,185,168,215,144,139,165,180,157,147,186,214,176,
- 227,231,219,169,175,156,206,198,129,164,150,210,154,177,134,127,
- 182,128,158,208,162,132,167,209,149,241,153,251,237,236,171,195,
- 243,233,253,240,194,250,191,155,142,137,245,235,163,242,178,152
- };
-
- /** Communication strings */
- private static final String BEGIN= "BEGIN AUTH REQUEST";//$NON-NLS-1$
- private static final String END= "END AUTH REQUEST";//$NON-NLS-1$
- private static final String LOGIN_OK= "I LOVE YOU";//$NON-NLS-1$
- private static final String LOGIN_FAILED= "I HATE YOU";//$NON-NLS-1$
-
- private String password;
- private ICVSRepositoryLocation cvsroot;
-
- private Socket fSocket;
-
- private InputStream inputStream;
- private OutputStream outputStream;
-
- /**
- * @see Connection#doClose()
- */
- public void close() throws IOException {
- try {
- if (inputStream != null) inputStream.close();
- } finally {
- inputStream = null;
- try {
- if (outputStream != null) outputStream.close();
- } finally {
- outputStream = null;
- try {
- if (fSocket != null) fSocket.close();
- } finally {
- fSocket = null;
- }
- }
- }
- }
-
- /**
- * @see Connection#doOpen()
- */
- public void open(IProgressMonitor monitor) throws IOException, CVSAuthenticationException {
-
- // XXX see sleepIfPropertyIsSet() for comments.
- // This should be removed once we have corrected the
- // CVS plugin's bad behavior with connections.
- sleepIfPropertyIsSet();
-
- monitor.subTask(Policy.bind("PServerConnection.authenticating"));//$NON-NLS-1$
- monitor.worked(1);
-
- fSocket = createSocket();
- boolean connected = false;
- try {
- this.inputStream = new BufferedInputStream(new PollingInputStream(fSocket.getInputStream(),
- cvsroot.getTimeout(), monitor));
- this.outputStream = new PollingOutputStream(new TimeoutOutputStream(
- fSocket.getOutputStream(), 8192 /*bufferSize*/, 1000 /*writeTimeout*/, 1000 /*closeTimeout*/),
- cvsroot.getTimeout(), monitor);
- authenticate();
- connected = true;
- } finally {
- if (! connected) cleanUpAfterFailedConnection();
- }
- }
-
- /**
- * @see Connection#getInputStream()
- */
- public InputStream getInputStream() {
- return inputStream;
- }
- /**
- * @see Connection#getOutputStream()
- */
- public OutputStream getOutputStream() {
- return outputStream;
- }
-
- /**
- * Creates a new <code>PServerConnection</code> for the given
- * cvs root.
- */
- PServerConnection(ICVSRepositoryLocation cvsroot, String password) {
- this.cvsroot = cvsroot;
- this.password = password;
- }
- /**
- * Does the actual authentification.
- */
- private void authenticate() throws IOException, CVSAuthenticationException {
- String scrambledPassword = scramblePassword(password);
-
- String user = cvsroot.getUsername();
- OutputStream out = getOutputStream();
-
- StringBuffer request = new StringBuffer();
- request.append(BEGIN);
- request.append(NEWLINE);
- request.append(cvsroot.getRootDirectory());
- request.append(NEWLINE);
- request.append(user);
- request.append(NEWLINE);
- request.append(scrambledPassword);
- request.append(NEWLINE);
- request.append(END);
- request.append(NEWLINE);
- out.write(request.toString().getBytes());
- out.flush();
- String line = Connection.readLine(getInputStream());
-
- // Return if we succeeded
- if (LOGIN_OK.equals(line))
- return;
-
- // Otherwise, determine the type of error
- if (line.length() == 0)
- throw new IOException(Policy.bind("PServerConnection.noResponse"));//$NON-NLS-1$
- if (LOGIN_FAILED.equals(line))
- throw new CVSAuthenticationException(cvsroot.getLocation(), Policy.bind("PServerConnection.loginRefused"));//$NON-NLS-1$
- String message = "";//$NON-NLS-1$
- // Skip any E messages for now
- while (line.charAt(0) == ERROR_CHAR) {
- // message += line.substring(1) + " ";
- line = Connection.readLine(getInputStream());
- }
- // Remove leading "error 0"
- if (line.startsWith(ERROR_MESSAGE))
- message += line.substring(ERROR_MESSAGE.length() + 1);
- else
- message += line;
- if (message.indexOf(NO_SUCH_USER) != -1)
- throw new CVSAuthenticationException(cvsroot.getLocation(), Policy.bind("PServerConnection.invalidUser", new Object[] {message}));//$NON-NLS-1$
- throw new IOException(Policy.bind("PServerConnection.connectionRefused", new Object[] { message }));//$NON-NLS-1$
- }
- /*
- * Called if there are exceptions when connecting.
- * This method makes sure that all connections are closed.
- */
- private void cleanUpAfterFailedConnection() throws IOException {
- try {
- if (inputStream != null)
- inputStream.close();
- } finally {
- try {
- if (outputStream != null)
- outputStream.close();
- } finally {
- try {
- if (fSocket != null)
- fSocket.close();
- } finally {
- fSocket = null;
- }
- }
- }
-
- }
- /**
- * Creates the actual socket
- */
- protected Socket createSocket() throws IOException {
- // Determine what port to use
- int port = cvsroot.getPort();
- if (port == cvsroot.USE_DEFAULT_PORT)
- port = DEFAULT_PORT;
- // Make the connection
- Socket result;
- try {
- result= new Socket(cvsroot.getHost(), port);
- } catch (InterruptedIOException e) {
- // If we get this exception, chances are the host is not responding
- throw new InterruptedIOException(Policy.bind("PServerConnection.socket", new Object[] {cvsroot.getHost()}));//$NON-NLS-1$
- }
- result.setSoTimeout(1000); // 1 second between timeouts
- return result;
- }
-
- private String scramblePassword(String password) throws CVSAuthenticationException {
- int length = password.length();
- char[] out= new char[length];
- for (int i= 0; i < length; i++) {
- char value = password.charAt(i);
- if( value < 0 || value > 255 )
- throwInValidCharacter();
- out[i]= SCRAMBLING_TABLE[value];
- }
- return "A" + new String(out);//$NON-NLS-1$
- }
-
- private void throwInValidCharacter() throws CVSAuthenticationException {
- throw new CVSAuthenticationException(cvsroot.getLocation(),
- Policy.bind("PServerConnection.invalidChars"));//$NON-NLS-1$
- }
-
- /**
- * XXX This is provided to allow slowing down of pserver connections in cases
- * where the inetd connections per second setting is not set high enough. The
- * CVS plugin has a known problem of creating too many unnecessary connections.
- */
- private void sleepIfPropertyIsSet()
- {
- try {
- if( milliseconds == null )
- return;
-
- long sleepMilli = new Long(milliseconds).longValue();
-
- if( sleepMilli > 0 )
- Thread.currentThread().sleep(sleepMilli);
- } catch( InterruptedException e ) {
- // keep going
- } catch( NumberFormatException e ) {
- // don't sleep if number format is wrong
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnectionMethod.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnectionMethod.java
deleted file mode 100644
index 264ba8091..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnectionMethod.java
+++ /dev/null
@@ -1 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.connection; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation; import org.eclipse.team.internal.ccvs.core.IConnectionMethod; import org.eclipse.team.internal.ccvs.core.IServerConnection; public class PServerConnectionMethod implements IConnectionMethod { /** * @see IConnectionMethod#createConnection(ICVSRepositoryLocation, String) */ public IServerConnection createConnection(ICVSRepositoryLocation location, String password) { return new PServerConnection(location, password); } /** * @see IConnectionMethod#getName() */ public String getName() { return "pserver";//$NON-NLS-1$ } } \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/UserInfo.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/UserInfo.java
deleted file mode 100644
index 7b5ace98c..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/UserInfo.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.connection;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.team.internal.ccvs.core.IUserInfo;
-
-/**
- * @version 1.0
- * @author
- */
-public class UserInfo implements IUserInfo {
-
- private String username;
- private String password;
- private boolean isUsernameMutable;
-
- protected UserInfo(String username, String password, boolean isUsernameMutable) {
- this.username = username;
- this.password = password;
- this.isUsernameMutable = isUsernameMutable;
- }
-
- /*
- * @see IUserInfo#getUsername()
- */
- public String getUsername() {
- return username;
- }
-
- protected String getPassword() {
- return password;
- }
-
- /*
- * @see IUserInfo#isUsernameMutable()
- */
- public boolean isUsernameMutable() {
- return false;
- }
-
- /*
- * @see IUserInfo#setPassword(String)
- */
- public void setPassword(String password) {
- this.password = password;
- }
-
- /*
- * @see IUserInfo#setUsername(String)
- */
- public void setUsername(String username) {
- this.username = username;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/messages.properties b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/messages.properties
deleted file mode 100644
index 8a44d4684..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/messages.properties
+++ /dev/null
@@ -1,264 +0,0 @@
-org.eclipse.team.internal.provider.cvs.CVSException=CVS Error: {0}
-
-ok=ok
-
-AbstractStructureVisitor.sendingFolder=Processing {0}
-AbstractStructureVisitor.sendingFile=Processing {0}
-AbstractStructureVisitor.noRemote=Unable to determine remote location for resource
-
-AddDeleteMoveListener.deletedResource={0} has been deleted locally
-AddDeleteMoveListener.Error_creating_deletion_marker_1=Error creating deletion marker
-AddDeleteMoveListener.Local_addition_not_under_CVS_control_2=Local addition not under CVS control
-AddDeleteMoveListener.Error_creating_addition_marker_3=Error creating addition marker
-AddDeleteMoveListener.Error_updating_marker_state_4=Error updating marker state
-
-CVSAuthenticationException.detail=Authentication error: {0}
-CVSCommunicationException.io=CVS communication error: {0}
-CVSFileException.io=Error accessing CVS file
-CVSDiffException.message=The compared files are different
-CVSStatus.messageWithRoot={0}: {1}
-
-CVSTag.nullName=Name must not be null
-CVSTag.emptyName=Name must not be empty
-CVSTag.beginName=Name must start with a letter
-CVSTag.badCharName=Name must not contain spaces or the characters `$,.:;@|'
-
-CVSWorkspaceRoot.notCVSFolder=The CVS synchronization information for {0} has become corrupt or does not exist
-
-java.io.IOException={0}
-java.io.EOFException=End of file encountered: {0}
-java.io.FileNotFoundException=File not found: {0}
-java.io.InterruptedIOException=Interrupted IO: {0}
-java.net.UnknownHostException=Cannot locate host: {0}
-java.net.ConnectException=Cannot connect to host: {0}
-java.net.SocketException=Socket Exception: {0}
-
-Connection.cannotClose=Cannot close connection
-Connection.readUnestablishedConnection=Failure due to attempt to read from an unestablished connection
-Connection.writeUnestablishedConnection=Failure due to attempt to write to an unestablished connection
-
-PServerConnection.invalidChars=Invalid characters in password
-PServerConnection.hostInvalid=Invalid host
-PServerConnection.loginRefused=Incorrect user name or password
-PServerConnection.invalidUser={0}
-PServerConnection.socket=Cannot connect to host: {0}
-PServerConnection.connectionRefused=Connection refused: {0}
-PServerConnection.stream=Error opening socket connection
-PServerConnection.noResponse=No response from server
-PServerConnection.authenticating=Authenticating using pserver
-
-CVSProviderPlugin.cannotUpdateDescription=Error updating project description
-CVSProviderPlugin.errorDeletingCache=Error occured deleting cache: {0}
-CVSProviderPlugin.errorCreatingCache=Error occured creating cache: {0}
-
-CVSProvider.exception=Internal error occured.
-CVSProvider.invalidResource=Resource {0} is not a CVS resource
-CVSProvider.initialImport=Initial import
-CVSProvider.alreadyExists=The specified repository location already exists.
-CVSProvider.rename=An IO Exception occurred while renaming the state file {0}
-CVSProvider.save=An IO Exception occurred while saving the state file {0}
-CVSProvider.ioException=IO Exception occured on the state file
-CVSProvider.errorSaving=Error saving state
-CVSProvider.errorLoading=Error loading state
-CVSProvider.infoMismatch=Provided CVS information does not match that on disk for project {0}
-
-CVSTeamProvider.noFolderInfo=Project {0} does not contain CVS folder meta-information
-CVSTeamProvider.deconfigureProblem=Error while deconfiguring CVS project {0}
-CVSTeamProvider.initializationFailed=Initialization of CVS for project {0} failed
-CVSTeamProvider.visitError=An error occurred while visiting resource {0}
-CVSTeamProvider.invalidResource=Resource {0} is not a child of project {1}
-CVSTeamProvider.checkinProblems=Problems occured committing resources to server
-CVSTeamProvider.invalidProjectState=CVS sharing information is missing from project {0}
-CVSTeamProvider.unmanagedParent=Error retrieving remote resource tree for {0}. Parent is not managed by CVS.
-CVSTeamProvider.typesDiffer=Error retrieving remote resource tree. Local and remote resource types differ for {0}
-CVSTeamProvider.connectionInfo=Updating connection information for project {0}
-CVSTeamProvider.folderInfo=Updating folder synchronization information for project {0}
-CVSTeamProvider.updatingFolder=Updating {0}
-CVSTeamProvider.scrubbingResource=Scrubbing {0}
-CVSTeamProvider.updatingFile=Updating {0}
-CVSTeamProvider.makeBranch=Creating branch
-CVSTeamProvider.preparingToSetKSubst=Preparing to set keyword substitution mode
-CVSTeamProvider.settingKSubst=Setting keyword substitution mode
-CVSTeamProvider.cleanLineDelimitersException=Exception occurred while cleaning line delimiters
-CVSTeamProvider.changingKeywordComment=*** keyword substitution change ***
-
-ProjectDescriptionManager.unableToSetDescription=An error occured setting the project description
-ProjectDescriptionManager.unableToReadDescription=An error occured reading the project description
-ProjectDescriptionManager.ioDescription=An IO error occured while writing the project description
-ProjectDescriptionManager.coreDescription=A Core error occured while writing the project description
-ProjectDescriptionManager.vcmmetaIgnored=.vcm_meta file ignored for project {0}
-ProjectDescriptionManager.cannotUpdateDesc=Cannot update project description
-ProjectDescriptionManager.markerError=Error creating marker for .vcm_meta file.
-ProjectDescriptionManager.vcmmetaMarker=The file {0} exists in {1} but is no longer being read; its usage has been replaced with .project.
-
-ResourceDeltaVisitor.visitError=Error while processing resource deltas
-
-ResponseDispatcher.serverError=The CVS server responded with an error (see the CVS console)
-ResponseDispatcher.problemsReported= Errors occured during the CVS operation
-ResponseDispatcher.receiving=Receiving reponse
-
-FileProperties.invalidEntryLine=Invalid entry line: {0}
-
-EclipseResource.invalidResourceClass=Two different implementations of ICVSResource used
-
-RemoteResource.invalidResourceClass=Two different implementations of ICVSResource used
-RemoteResource.invalidOperation=Invalid operation performed on remote resource
-RemoteFolder.errorFetchingRevisions=Error fetching file revision numbers
-RemoteFolder.invalidChild=Resource {0} is not a child of folder {1}
-RemoteFolder.errorFetchingRevisions=Error fetching file revisions
-RemoteFolder.errorFetchingMembers=One or more error occured fetching the members of a remote folder
-RemoteFolder.doesNotExist=Folder {0} does not exist remotely
-
-RemoteFile.noContentsReceived=No contents received from server for {0}
-RemoteFile.errorRetrievingFromCache=Error occured retrieving cached contents: {0}
-
-RemoteFolderTreeBuilder.buildingBase=Collecting local synchronization information
-RemoteFolderTreeBuilder.receivingDelta=Receiving delta for {0}
-RemoteFolderTreeBuilder.receivingRevision=Receiving revision for {0}
-RemoteFolderTreeBuilder.missingParent=An error has occurred processing file ''{0} {1}''
-RemoteFolderTreeBuild.folderDeletedFromServer=Folder ''{0}'' has been deleted from the server.
-
-ReplaceWithBaseVisitor.replacing=Replacing ''{0}''
-
-Session.badInt="Malformed file transmission received"
-Session.receiving=Receiving file: {0}
-Session.sending=Sending file: {0}
-Session.transfer={0} ({1}K of {2}K bytes)
-Session.transferNoSize={0}
-
-Command.receivingResponses=Receiving server response
-Command.warnings=The server reported warnings while performing the "cvs {0}" command.
-Command.serverError=The server reported an error while performing the "cvs {0}" command.
-Command.noMoreInfoAvailable=The server did not provide any additional information.
-Command.add=add
-Command.admin=admin
-Command.co=checkout
-Command.ci=commit
-Command.diff=diff
-Command.import=import
-Command.log=log
-Command.remove=remove
-Command.status=status
-Command.tag=tag
-Command.update=update
-Command.version=version
-Command.valid-requests=valid-requests
-Command.unsupportedResponse=Unknown response received from cvs server: {0} {1}
-Command.argumentNotManaged=Argument {0} is not managed
-Command.invalidTag=HEAD is not a valid tag
-Command.noOpenSession=The CVS command cannot be issued because there is no connection available
-
-Diff.serverError=The server reported an error while performing the "cvs diff" command which may only indicate that a difference exists.
-
-Tag.notVersionOrBranchError=Error applying tag: the tag provided is not a version or branch tag.
-
-DefaultHandler.connectionClosed=The connection to the server has been closed
-ModTimeHandler.invalidFormat=The server modification time {0} is in an unknown format
-Updated.numberFormat=Server did not send length of the file
-UnsupportedHandler.message=Unsupported response received from server
-RemovedHandler.invalid=Invalid removed response received from CVS server for {0}
-
-KSubstOption.-kb.short=Binary
-KSubstOption.-kb.long=Binary (-kb)
-KSubstOption.-ko.short=Text -ko
-KSubstOption.-ko.long=Text without keyword substitution (-ko)
-KSubstOption.-kkv.short=Text -kkv
-KSubstOption.-kkv.long=Text with keyword expansion (-kkv)
-KSubstOption.-kkvl.short=Text -kkvl
-KSubstOption.-kkvl.long=Text with keyword expansion and locker (-kkvl)
-KSubstOption.-kv.short=Text -kv
-KSubstOption.-kv.long=Text with keyword replacement (-kv)
-KSubstOption.-kk.short=Text -kk
-KSubstOption.-kk.long=Text with keyword compression (-kk)
-KSubstOption.unknown.short=Unknown {0}
-KSubstOption.unknown.long=Unknown ({0})
-
-AdminKSubstListener.expectedRCSFile=Expected RCS file {0} to end in ',v'
-AdminKSubstListener.commandRootNotManaged=Local root for this command is not managed
-AdminKSubstListener.expectedChildOfCommandRoot=Expected RCS file {0} to be a child of remote root for this command {1}
-AdminKSubstListener.couldNotSetResourceSyncInfo=Could not set resource sync info for {0}: {1}
-
-CVSRepositoryLocation.nullLocation=Location must not be null
-CVSRepositoryLocation.emptyLocation=Location must not be empty
-CVSRepositoryLocation.endWhitespace=Location must not end with whitespace
-CVSRepositoryLocation.locationForm=Location must have form ':methodname:[user[:password]@]host[#port]:/path/to/cvsroot'
-CVSRepositoryLocation.startOfLocation=Location must start with a connection method name enclosed in colons
-CVSRepositoryLocation.methods=Only the following methods are supported: {0}
-CVSRepositoryLocation.parsingMethod=Error in connection method specification
-CVSRepositoryLocation.parsingUser=Error in user name specification
-CVSRepositoryLocation.parsingPassword=Error in password specification
-CVSRepositoryLocation.parsingHost=Error in host specification
-CVSRepositoryLocation.parsingPort=Error in port specification
-CVSRepositoryLocation.parsingRoot=Error in repository root directory specification
-CVSRepositoryLocation.invalidFormat=Invalid CVS repository location format: {0}
-CVSRepositoryLocation.authenticationCanceled=Authentication canceled by user
-CVSRepositoryLocation.errorCaching=Error occurred while saving password for {0}
-CVSRepositoryLocation.errorFlushing=Error occurred while flushing password for {0}
-CVSRepositoryLocation.openingConnection=Opening connection to {0}
-CVSRepositoryLocation.usernameRequired=A username is required to make a connection
-
-ProjectDescriptionContentHandler.xml=Error parsing project description file
-
-Util.invalidResource=Resource {1} is not relative to root {0}
-
-Synchronizer.reload=Examining {0}
-Checking_out_from_CVS..._5=Checking out from CVS...
-FileSystemSynchronizer_Error_loading_from_CVS/Entries_file_1=Error loading from CVS/Entries file
-FileSystemSynchronizer_Error_loading_from_.cvsignore_file_2=Error loading from .cvsignore file
-FileSystemSynchronizer_Error_loading_from_CVS/Root,Repository_files_3=Error loading from CVS/Root,Repository files
-FileSystemSynchronizer_Error_reloading_sync_information_5=Error reloading sync information
-Malformed_entry_line___11=Malformed entry line:
-Malformed_entry_line,_missing_name___12=Malformed entry line, missing name:
-Malformed_entry_line,_missing_revision___13=Malformed entry line, missing revision:
-FolderSyncInfo_Maleformed_root_4=Maleformed root
-SyncFileUtil_Error_writing_to_Entries.log_48=Error writing to Entries.log
-SyncFileUtil_Cannot_close_Entries.log_49=Cannot close Entries.log
-SyncFileUtil_Error_reloading_sync_information_58=Error reloading sync information
-SyncFileUtil_Error_writing_to_.cvsignore_61=Error writing to .cvsignore
-SyncFileUtil_Cannot_close_.cvsignore_62=Cannot close .cvsignore
-
-FileModificationValidator.isReadOnly=File is Read Only.
-
-EXTServerConnection.invalidPort=A port cannot be specified for the ext connection method.
-EXTServerConnection.varsNotSet=Cannot run external ext program because CVS_RSH and CVS_SERVER variables are not initialized.
-EXTServerConnection.ioError=Error starting external connection program: {0}. Ensure that the path is correct and that you can connect manually using this program.
-
-CVSRemoteSyncElement.rootDiffers=Error mapping local folder {0} to repository {1}. It is already managed by repository {2}.
-CVSRemoteSyncElement.repositoryDiffers=Error mapping local folder {0} to remote folder {1}. It is already mapped to {2}.
-Util.Internal_error,_resource_does_not_start_with_root_3=Internal error, resource does not start with root
-
-CVSProvider.Scrubbing_local_project_1=Scrubbing local project
-CVSProvider.Scrubbing_projects_1=Scrubbing projects
-CVSProvider.Creating_projects_2=Creating projects
-
-EclipseFile_Problem_deleting_resource=Problem deleting resource: {1}
-EclipseFile_Problem_accessing_resource=Problem accessing resource: {1} Perform a Refresh.
-EclipseFile_Problem_creating_resource=Problem creating resource: {1}
-EclipseFile_Problem_writing_resource=Problem writing resource: {1}
-EclipseFolder_problem_creating=Problem creating folder: {1}
-
-EclipseSynchronizer.UpdatingSyncEndOperation=Saving CVS synchronization information...
-EclipseSynchronizer.UpdatingSyncEndOperationCancelled=Operation cancelled: saving CVS synchronization information...
-EclipseSynchronizer.ErrorSettingFolderSync=Cannot set folder sync info on {0}
-EclipseSynchronizer.ErrorSettingResourceSync=Cannot set resource sync info on {0}
-EclipseSynchronizer.ErrorSettingIgnorePattern=Cannot set ignored pattern on {0}
-EclipseSynchronizer.ErrorCommitting=Errors saving CVS synchronization information to disk. Please fix the problems listed below and then update the affected resources from the CVS repository.
-EclipseSynchronizer.folderSyncInfoMissing=CVS synchronization information could not be found for folder ''{0}''
-
-SyncFileChangeListener.errorSettingTeamPrivateFlag=Error setting team-private flag on resource
-
-RemoteFile.getContents=Retrieving remote file contents
-RemoteFile.getLogEntries=Retrieving log entries
-RemoteFolder.exists=Checking if resource exists remotely
-RemoteFolder.getMembers=Retrieving children of remote folder
-RemoteModule.getRemoteModules=Retrieving remote modules
-
-PruneFolderVisitor.caseVariantsExist=The following resources could not be created.
-PruneFolderVisitor.caseVariantExists=Resource ''{0}'' could not be created because a case variant exists.
-
-Version.unsupportedVersion=Host ''{0}'' is running unsupported CVS version {1}. Although most functionality works, use version 1.11.1p1 or later for full support.
-Version.unsupportedCVSNT=Host ''{0}'' is running CVS NT (version {1}) which is not fully supported. However, most functionality is available.
-Version.unknownVersionFormat=Host ''{0}'' is running ''{1}'' which is an unknown version to the workbench. Although most functionality may work, use version 1.11.1p1 or later for full support.
-Version.versionNotValidRequest=Unable to determine server version. Host ''{0}'' does not support the ''cvs version'' command. Although most functionality works, use version 1.11.1p1 or later for full support.
-
-LogListener.invalidRevisionFormat=Invalid revision format ''{1}'' for tag ''{0}''. \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSEntryLineTag.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSEntryLineTag.java
deleted file mode 100644
index ac60cf365..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSEntryLineTag.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.resources;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-
-public class CVSEntryLineTag extends CVSTag {
-
- /*
- * The parameter tag must not be null.
- */
- public CVSEntryLineTag(CVSTag tag) {
- super(tag.getName(), tag.getType());
- }
-
- public CVSEntryLineTag(String entryLineTag) {
- switch (entryLineTag.charAt(0)) {
- case 'T' : type = BRANCH; break;
- case 'N' : type = VERSION; break;
- case 'D' : type = DATE; break;
- default: type = HEAD;
- }
- name = entryLineTag.substring(1);
- }
- /*
- * Returns the tag name
- */
- public String getName() {
- return name;
- }
- /*
- * Returns the tag type
- */
- public int getType() {
- return type;
- }
-
- public String toEntryLineFormat(boolean useSamePrefixForBranchAndTag) {
- if (type == BRANCH || (type == VERSION && useSamePrefixForBranchAndTag))
- return "T" + name;//$NON-NLS-1$
- else if (type == VERSION)
- return "N" + name;//$NON-NLS-1$
- else if (type == DATE)
- return "D" + name;//$NON-NLS-1$
- return "";//$NON-NLS-1$
- }
-
- /*
- * For debugging purposes.
- */
- public String toString() {
- return toEntryLineFormat(false);
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSLocalSyncElement.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSLocalSyncElement.java
deleted file mode 100644
index 416b19a9f..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSLocalSyncElement.java
+++ /dev/null
@@ -1,103 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.resources;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.core.sync.ILocalSyncElement;
-import org.eclipse.team.core.sync.IRemoteResource;
-import org.eclipse.team.core.sync.LocalSyncElement;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-public class CVSLocalSyncElement extends LocalSyncElement {
-
- protected IRemoteResource base;
- protected IResource local;
-
- public CVSLocalSyncElement(IResource local, IRemoteResource base) {
- this.local = local;
- this.base = base;
- }
-
- /*
- * @see RemoteSyncElement#create(IResource, IRemoteResource, IRemoteResource)
- */
- public ILocalSyncElement create(IResource local, IRemoteResource base, Object data) {
- return new CVSLocalSyncElement(local, base);
- }
-
- /*
- * @see ILocalSyncElement#getLocal()
- */
- public IResource getLocal() {
- return local;
- }
-
- /*
- * @see ILocalSyncElement#getBase()
- */
- public IRemoteResource getBase() {
- return base;
- }
-
- /*
- * @see ILocalSyncElement#isCheckedOut()
- */
- public boolean isCheckedOut() {
- return getLocal() != null;
- }
-
- /*
- * @see ILocalSyncElement#hasRemote()
- */
- public boolean hasRemote() {
- return getLocal() != null;
- }
-
- /*
- * @see RemoteSyncElement#getData()
- */
- protected Object getData() {
- return null;
- }
-
- /*
- * Answers the CVS resource for this sync element
- */
- public ICVSResource getCVSResource() {
- return getCVSResourceFor(getLocal());
- }
-
- /*
- * @see LocalSyncElement#isIgnored(IResource)
- */
- protected boolean isIgnored(IResource child) {
- ICVSResource cvsResource = getCVSResourceFor(getLocal());
- if(cvsResource==null || !cvsResource.isFolder() ) {
- return false;
- } else {
- try {
- ICVSResource managedChild = ((ICVSFolder)cvsResource).getChild(child.getName());
- return managedChild.isIgnored();
- } catch(CVSException e) {
- return false;
- }
- }
- }
-
- private ICVSResource getCVSResourceFor(IResource resource) {
- if(resource.getType() != IResource.FILE) {
- return new EclipseFolder((IContainer)resource);
- } else {
- return new EclipseFile((IFile)resource);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSRemoteSyncElement.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSRemoteSyncElement.java
deleted file mode 100644
index 85914c55d..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSRemoteSyncElement.java
+++ /dev/null
@@ -1,413 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.resources;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.ILocalSyncElement;
-import org.eclipse.team.core.sync.IRemoteResource;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.core.sync.RemoteSyncElement;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.client.Update;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.MutableResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Assert;
-
-public class CVSRemoteSyncElement extends RemoteSyncElement {
-
- CVSLocalSyncElement localSync;
- IRemoteResource remote;
- boolean isThreeWay = true;
-
- public CVSRemoteSyncElement(boolean isThreeWay, IResource local, IRemoteResource base, IRemoteResource remote) {
- localSync = new CVSLocalSyncElement(local, base);
- this.remote = remote;
- this.isThreeWay = isThreeWay;
- }
-
- /*
- * @see RemoteSyncElement#create(IResource, IRemoteResource, IRemoteResource)
- */
- public IRemoteSyncElement create(boolean isThreeWay, IResource local, IRemoteResource base, IRemoteResource remote, Object data) {
- return new CVSRemoteSyncElement(isThreeWay, local, base, remote);
- }
-
- /*
- * @see IRemoteSyncElement#getRemote()
- */
- public IRemoteResource getRemote() {
- return remote;
- }
-
- /*
- * @see LocalSyncElement#getData()
- */
- protected Object getData() {
- return localSync.getData();
- }
-
- /*
- * @see ILocalSyncElement#getLocal()
- */
- public IResource getLocal() {
- return localSync.getLocal();
- }
-
- /*
- * @see ILocalSyncElement#getBase()
- */
- public IRemoteResource getBase() {
- return localSync.getBase();
- }
-
- /*
- * @see ILocalSyncElement#isCheckedOut()
- */
- public boolean isCheckedOut() {
- return localSync.isCheckedOut();
- }
-
- /*
- * Local helper to indicate if the corresponding local resource has a base
- *
- * XXX Should this be part of the interface?
- */
- public boolean hasBase() {
- return getBase() != null;
- }
-
- /*
- * @see ILocalSyncElement#hasRemote()
- */
- public boolean hasRemote() {
- return remote != null;
- }
-
- /*
- * @see LocalSyncElement#create(IResource, IRemoteResource, Object)
- */
- public ILocalSyncElement create(IResource local, IRemoteResource base, Object data) {
- return localSync.create(local, base, data);
- }
- /*
- * @see LocalSyncElement#isIgnored(IResource)
- */
- protected boolean isIgnored(IResource resource) {
- return localSync.isIgnored(resource);
- }
- /*
- * @see IRemoteSyncElement#ignoreBaseTree()
- */
- public boolean isThreeWay() {
- return isThreeWay;
- }
-
- /*
- * Update the sync info of the local resource in such a way that the local changes can be committed.
- */
- public void makeOutgoing(IProgressMonitor monitor) throws TeamException {
-
- int syncKind = getSyncKind(GRANULARITY_TIMESTAMP, monitor);
- boolean incoming = (syncKind & DIRECTION_MASK) == INCOMING;
- boolean outgoing = (syncKind & DIRECTION_MASK) == OUTGOING;
-
- ICVSResource local = localSync.getCVSResource();
- RemoteResource remote = (RemoteResource)getRemote();
- ResourceSyncInfo origInfo = local.getSyncInfo();
- MutableResourceSyncInfo info = null;
- if(origInfo!=null) {
- info = origInfo.cloneMutable();
- }
-
- if (outgoing) {
- // The sync info is alright, it's already outgoing!
- return;
- } else if (incoming) {
- // We have an incoming change, addition, or deletion that we want to ignore
- if (local.exists()) {
- // We could have an incoming change or deletion
- if (remote == null) {
- info.setAdded();
- } else {
- // Otherwise change the revision to the remote revision and dirty the file
- info.setRevision(remote.getSyncInfo().getRevision());
- info.setTimeStamp(null);
- }
- } else {
- // We have an incoming add, turn it around as an outgoing delete
- info = remote.getSyncInfo().cloneMutable();
- info.setDeleted(true);
- }
- } else if (local.exists()) {
- // We have a conflict and a local resource!
- if (hasRemote()) {
- if (hasBase()) {
- // We have a conflicting change, Update the local revision
- info.setRevision(remote.getSyncInfo().getRevision());
- } else {
- // We have conflictin additions.
- // We need to fetch the contents of the remote to get all the relevant information (timestamp, permissions)
- remote.getContents(Policy.monitorFor(monitor));
- info = remote.getSyncInfo().cloneMutable();
- }
- } else if (hasBase()) {
- // We have a remote deletion. Make the local an addition
- info.setAdded();
- } else {
- // There's a local, no base and no remote. We can't possible have a conflict!
- Assert.isTrue(false);
- }
- } else {
- // We have a conflict and there is no local!
- if (hasRemote()) {
- // We have a local deletion that conflicts with remote changes.
- info.setRevision(remote.getSyncInfo().getRevision());
- info.setDeleted(true);
- } else {
- // We have conflicting deletions. Clear the sync info
- info = null;
- return;
- }
- }
- if(info!=null) {
- info.setTag(local.getParent().getFolderSyncInfo().getTag());
- }
- local.setSyncInfo(info);
- }
-
- /*
- * Update the sync info of the local resource in such a way that the remote resource can be loaded
- * ignore any local changes.
- */
- public void makeIncoming(IProgressMonitor monitor) throws TeamException {
- // To make outgoing deletions incoming, the local will not exist but
- // it is still important to unmanage (e.g. delete all meta info) for the
- // deletion.
- CVSWorkspaceRoot.getCVSResourceFor(getLocal()).unmanage(null);
- }
-
- /*
- * Load the resource and folder sync info into the local from the remote
- *
- * This method can be used on incoming folder additions to set the folder sync info properly
- * without hitting the server again. It also applies to conflicts that involves unmanaged
- * local resources.
- *
- * If the local folder is already managed and is a cvs folder, this operation
- * will throw an exception if the mapping does not match that of the remote.
- */
- public void makeInSync(IProgressMonitor monitor) throws TeamException {
-
- // Only work on folders
- if (! isContainer()) return;
-
- int syncKind = getSyncKind(GRANULARITY_TIMESTAMP, monitor);
- boolean outgoing = (syncKind & DIRECTION_MASK) == OUTGOING;
- if (outgoing) return;
-
- ICVSFolder local = (ICVSFolder)localSync.getCVSResource();
- RemoteFolder remote = (RemoteFolder)getRemote();
-
- // The parent must be managed
- if (! local.getParent().isCVSFolder())
- return;
-
- // If the folder already has CVS info, check that the remote and local match
- if(local.isManaged() && local.isCVSFolder()) {
- // Verify that the root and repository are the same
- FolderSyncInfo remoteInfo = remote.getFolderSyncInfo();
- FolderSyncInfo localInfo = local.getFolderSyncInfo();
- if ( ! localInfo.getRoot().equals(remoteInfo.getRoot())) {
- throw new CVSException(Policy.bind("CVSRemoteSyncElement.rootDiffers", new Object[] {local.getName(), remoteInfo.getRoot(), localInfo.getRoot()}));//$NON-NLS-1$
- } else if ( ! localInfo.getRepository().equals(remoteInfo.getRepository())) {
- throw new CVSException(Policy.bind("CVSRemoteSyncElement.repositoryDiffers", new Object[] {local.getName(), remoteInfo.getRepository(), localInfo.getRepository()}));//$NON-NLS-1$
- }
- // The folders are in sync so just return
- return;
- }
-
- // Ensure that the folder exists locally
- if (! local.exists()) {
- local.mkdir();
- }
-
- // Since the parent is managed, this will also set the resource sync info. It is
- // impossible for an incoming folder addition to map to another location in the
- // repo, so we assume that using the parent's folder sync as a basis is safe.
- // It is also impossible for an incomming folder to be static.
- FolderSyncInfo remoteInfo = remote.getFolderSyncInfo();
- FolderSyncInfo localInfo = local.getParent().getFolderSyncInfo();
- local.setFolderSyncInfo(new FolderSyncInfo(remoteInfo.getRepository(), remoteInfo.getRoot(), localInfo.getTag(), false));
- }
- /*
- * Make all the folders that have both a remote and local in sync by copying
- * the sync information from the remote to the local
- */
- protected void makeFoldersInSync(IProgressMonitor progress) throws TeamException {
- FolderSyncInfo remoteInfo = ((RemoteFolder)getRemote()).getFolderSyncInfo();
- ((ICVSFolder)localSync.getCVSResource()).setFolderSyncInfo(remoteInfo);
- ILocalSyncElement[] children = members(progress);
- for (int i = 0; i < children.length; i++) {
- CVSRemoteSyncElement child = (CVSRemoteSyncElement)children[i];
- if (child.isContainer() && child.getLocal().exists() && child.getRemote() != null) {
- child.makeFoldersInSync(progress);
- }
- }
- }
- /*
- * @see ILocalSyncElement#getSyncKind(int, IProgressMonitor)
- */
- public int getSyncKind(int granularity, IProgressMonitor progress) {
-
- // special handling for folders, the generic sync algorithm doesn't work well
- // with CVS because folders are not in namespaces (e.g. they exist in all versions
- // and branches).
- if(isContainer() && isThreeWay()) {
- int folderKind = IRemoteSyncElement.IN_SYNC;
- IResource local = getLocal();
- ICVSRemoteFolder remote = (ICVSRemoteFolder)getRemote();
- ICVSFolder cvsFolder = (ICVSFolder)localSync.getCVSResource();
- boolean isCVSFolder = false;
- try {
- isCVSFolder = cvsFolder.isCVSFolder();
- } catch (CVSException e) {
- // Assume the folder is not a CVS folder
- }
- if(!local.exists()) {
- if (isCVSFolder) {
- // We have local information for the folder but it doesn't exist
- if (remote == null) {
- // Conflicting deletion. Purge local information
- try {
- cvsFolder.unmanage(null);
- } catch (CVSException e) {
- CVSProviderPlugin.log(e.getStatus());
- }
- } else {
- // The folder exists remotely and has been deleted locally
- folderKind = IRemoteSyncElement.OUTGOING | IRemoteSyncElement.DELETION;
- }
- } else if(remote != null) {
- folderKind = IRemoteSyncElement.INCOMING | IRemoteSyncElement.ADDITION;
- } else {
- // conflicting deletion ignore
- }
- } else {
- if(remote == null) {
- if(isCVSFolder) {
- folderKind = IRemoteSyncElement.INCOMING | IRemoteSyncElement.DELETION;
- } else {
- folderKind = IRemoteSyncElement.OUTGOING | IRemoteSyncElement.ADDITION;
- }
- } else if(!isCVSFolder) {
- folderKind = IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.ADDITION;
- } else {
- // folder exists both locally and remotely and are considered in sync, however
- // we aren't checking the folder mappings to ensure that they are the same.
- }
- }
- return folderKind;
- }
-
- // 1. Run the generic sync calculation algorithm, then handle CVS specific
- // sync cases.
- int kind = super.getSyncKind(granularity, progress);
-
- // 2. Set the CVS specific sync type based on the workspace sync state provided
- // by the CVS server.
- if(remote!=null && (kind & IRemoteSyncElement.PSEUDO_CONFLICT) == 0) {
- int type = ((RemoteResource)remote).getWorkspaceSyncState();
- switch(type) {
- // the server compared both text files and decided that it cannot merge
- // them without line conflicts.
- case Update.STATE_CONFLICT:
- return kind | ILocalSyncElement.MANUAL_CONFLICT;
-
- // the server compared both text files and decided that it can safely merge
- // them without line conflicts.
- case Update.STATE_MERGEABLE_CONFLICT:
- return kind | ILocalSyncElement.AUTOMERGE_CONFLICT;
- }
- }
-
- // 3. unmanage delete/delete conflicts and return that they are in sync
- kind = handleDeletionConflicts(kind);
-
- return kind;
- }
-
- /*
- * If the resource has a delete/delete conflict then ensure that the local is unmanaged so that the
- * sync info can be properly flushed.
- */
- private int handleDeletionConflicts(int kind) {
- if(kind == (IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.DELETION | IRemoteSyncElement.PSEUDO_CONFLICT)) {
- try {
- ICVSResource cvsResource = localSync.getCVSResource();
- if(!isContainer() && cvsResource.isManaged()) {
- cvsResource.unmanage(null);
- }
- return IRemoteSyncElement.IN_SYNC;
- } catch(CVSException e) {
- CVSProviderPlugin.log(e.getStatus());
- return IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.DELETION;
- }
- }
- return kind;
- }
-
- /**
- * @see RemoteSyncElement#timestampEquals(IRemoteResource, IRemoteResource)
- */
- protected boolean timestampEquals(IRemoteResource e1, IRemoteResource e2) {
- if(e1.isContainer()) {
- if(e2.isContainer()) {
- return true;
- }
- return false;
- }
- return e1.equals(e2);
- }
-
- /**
- * @see RemoteSyncElement#timestampEquals(IResource, IRemoteResource)
- */
- protected boolean timestampEquals(IResource e1, IRemoteResource e2) {
- if(e1.getType() != IResource.FILE) {
- if(e2.isContainer()) {
- return true;
- }
- return false;
- }
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor((IFile)e1);
- try {
- ResourceSyncInfo info1 = cvsFile.getSyncInfo();
- ResourceSyncInfo info2 = ((ICVSRemoteResource)e2).getSyncInfo();
-
- if(info1 != null) {
- if(info1.isDeleted() || info1.isMerged() || cvsFile.isModified()) {
- return false;
- }
- return info1.getRevision().equals(info2.getRevision());
- }
- return false;
- } catch(CVSException e) {
- CVSProviderPlugin.log(e.getStatus());
- return false;
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSWorkspaceRoot.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSWorkspaceRoot.java
deleted file mode 100644
index 5425b54fe..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSWorkspaceRoot.java
+++ /dev/null
@@ -1,202 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.resources;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProvider;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-
-public class CVSWorkspaceRoot {
-
- private ICVSFolder localRoot;
-
- public CVSWorkspaceRoot(IContainer resource){
- this.localRoot = getCVSFolderFor(resource);
- }
-
- public static ICVSFolder getCVSFolderFor(IContainer resource) {
- return new EclipseFolder(resource);
- }
-
-
- public static ICVSFile getCVSFileFor(IFile resource) {
- return new EclipseFile(resource);
- }
-
-
- public static ICVSResource getCVSResourceFor(IResource resource) {
- if (resource.getType() == IResource.FILE)
- return getCVSFileFor((IFile) resource);
- else
- return getCVSFolderFor((IContainer) resource);
- }
-
- public static ICVSRemoteResource getRemoteResourceFor(IResource resource) throws CVSException {
- ICVSResource managed = getCVSResourceFor(resource);
- return getRemoteResourceFor(managed);
- }
-
- public static ICVSRemoteResource getRemoteResourceFor(ICVSResource resource) throws CVSException {
- if (resource.isFolder()) {
- ICVSFolder folder = (ICVSFolder)resource;
- FolderSyncInfo syncInfo = folder.getFolderSyncInfo();
- if (syncInfo != null) {
- return new RemoteFolder(null, CVSProvider.getInstance().getRepository(syncInfo.getRoot()), new Path(syncInfo.getRepository()), syncInfo.getTag());
- }
- } else {
- if (resource.isManaged())
- return RemoteFile.getBase((RemoteFolder)getRemoteResourceFor(resource.getParent()), (ICVSFile)resource);
- }
- return null;
- }
-
- /*
- * Helper method that uses the parent of a local resource that has no base to ensure that the resource
- * wasn't added remotely by a third party
- */
- private static ICVSRemoteResource getRemoteTreeFromParent(IResource resource, ICVSResource managed, CVSTag tag, IProgressMonitor progress) throws TeamException {
- // If the parent isn't mapped to CVS, there's nothing we can do
- ICVSFolder parent = managed.getParent();
- FolderSyncInfo syncInfo = parent.getFolderSyncInfo();
- if (syncInfo == null) {
- throw new CVSException(new CVSStatus(CVSStatus.ERROR, Policy.bind("CVSTeamProvider.unmanagedParent", resource.getFullPath().toString()), null)); //$NON-NLS-1$
- }
- ICVSRepositoryLocation location = CVSProvider.getInstance().getRepository(parent.getFolderSyncInfo().getRoot());
- // XXX We build and fetch the whole tree from the parent. We could restrict the search to just the desired child
- RemoteFolder remoteParent = RemoteFolderTreeBuilder.buildRemoteTree((CVSRepositoryLocation)location, parent, tag, progress);
- ICVSRemoteResource remote = null;
- if (remoteParent != null) {
- try {
- remote = (ICVSRemoteResource)remoteParent.getChild(resource.getName());
- } catch (CVSException e) {
- remote = null;
- }
- // The types need to match or we're in trouble
- if (remote != null && !(remote.isContainer() == managed.isFolder()))
- throw new CVSException(new CVSStatus(CVSStatus.ERROR, Policy.bind("CVSTeamProvider.typesDiffer", resource.getFullPath().toString()), null)); //$NON-NLS-1$
- }
- return remote;
- }
-
- public static IRemoteSyncElement getRemoteSyncTree(IResource resource, CVSTag tag, IProgressMonitor progress) throws TeamException {
- ICVSResource managed = CVSWorkspaceRoot.getCVSResourceFor(resource);
- ICVSRemoteResource remote = CVSWorkspaceRoot.getRemoteResourceFor(resource);
- ICVSRemoteResource baseTree = null;
-
- // The resource doesn't have a remote base.
- // However, we still need to check to see if its been created remotely by a third party.
- if(resource.getType() == IResource.FILE) {
- baseTree = remote;
- ICVSRepositoryLocation location;
- if (remote == null) {
- // If there's no base for the file, get the repository location from the parent
- ICVSRemoteResource parent = CVSWorkspaceRoot.getRemoteResourceFor(resource.getParent());
- if (parent == null) {
- throw new CVSException(new CVSStatus(CVSStatus.ERROR, Policy.bind("CVSTeamProvider.unmanagedParent", resource.getFullPath().toString()), null)); //$NON-NLS-1$
- }
- location = parent.getRepository();
- } else {
- location = remote.getRepository();
- }
- remote = RemoteFolderTreeBuilder.buildRemoteTree((CVSRepositoryLocation)location, (ICVSFile)managed, tag, progress);
- } else {
- if (remote == null) {
- remote = getRemoteTreeFromParent(resource, managed, tag, progress);
- } else {
- ICVSRepositoryLocation location = remote.getRepository();
- baseTree = RemoteFolderTreeBuilder.buildBaseTree((CVSRepositoryLocation)location, (ICVSFolder)managed, tag, progress);
- remote = RemoteFolderTreeBuilder.buildRemoteTree((CVSRepositoryLocation)location, (ICVSFolder)managed, tag, progress);
- }
- }
- return new CVSRemoteSyncElement(true /*three way*/, resource, baseTree, remote);
- }
-
- /**
- * Sync the given unshared project with the given repository and module.
- */
- public static IRemoteSyncElement getRemoteSyncTree(IProject project, ICVSRepositoryLocation location, String moduleName, CVSTag tag, IProgressMonitor progress) throws TeamException {
- if (CVSWorkspaceRoot.getCVSFolderFor(project).isCVSFolder()) {
- return getRemoteSyncTree(project, tag, progress);
- } else {
- progress.beginTask(null, 100);
- RemoteFolder folder = new RemoteFolder(null, location, new Path(moduleName), tag);
- RemoteFolderTree remote = RemoteFolderTreeBuilder.buildRemoteTree((CVSRepositoryLocation)folder.getRepository(), folder, folder.getTag(), Policy.subMonitorFor(progress, 80));
- CVSRemoteSyncElement tree = new CVSRemoteSyncElement(true /*three way*/, project, null, remote);
- tree.makeFoldersInSync(Policy.subMonitorFor(progress, 10));
-
- RepositoryProvider.map(project, CVSProviderPlugin.getTypeId());
-
- progress.done();
- return tree;
- }
- }
-
- public static IRemoteSyncElement getRemoteSyncTree(IProject project, IResource[] resources, CVSTag tag, IProgressMonitor progress) throws TeamException {
- ICVSResource managed = CVSWorkspaceRoot.getCVSResourceFor(project);
- ICVSRemoteResource remote = CVSWorkspaceRoot.getRemoteResourceFor(project);
- if (remote == null) {
- return new CVSRemoteSyncElement(true /*three way*/, project, null, null);
- }
- ArrayList cvsResources = new ArrayList();
- for (int i = 0; i < resources.length; i++) {
- cvsResources.add(CVSWorkspaceRoot.getCVSResourceFor(resources[i]));
- }
- CVSRepositoryLocation location = (CVSRepositoryLocation)remote.getRepository();
- ICVSRemoteResource base = RemoteFolderTreeBuilder.buildBaseTree(location, (ICVSFolder)managed, tag, progress);
- remote = RemoteFolderTreeBuilder.buildRemoteTree(location, (ICVSFolder)managed, (ICVSResource[]) cvsResources.toArray(new ICVSResource[cvsResources.size()]), tag, progress);
- return new CVSRemoteSyncElement(true /*three way*/, project, base, remote);
- }
-
- public static ICVSRemoteResource getRemoteTree(IResource resource, CVSTag tag, IProgressMonitor progress) throws TeamException {
- ICVSResource managed = CVSWorkspaceRoot.getCVSResourceFor(resource);
- ICVSRemoteResource remote = CVSWorkspaceRoot.getRemoteResourceFor(resource);
- if (remote == null) {
- remote = getRemoteTreeFromParent(resource, managed, tag, progress);
- } else if(resource.getType() == IResource.FILE) {
- ICVSRepositoryLocation location = remote.getRepository();
- remote = RemoteFolderTreeBuilder.buildRemoteTree((CVSRepositoryLocation)location, (ICVSFile)managed, tag, progress);
- } else {
- ICVSRepositoryLocation location = remote.getRepository();
- remote = RemoteFolderTreeBuilder.buildRemoteTree((CVSRepositoryLocation)location, (ICVSFolder)managed, tag, progress);
- }
- return remote;
- }
-
- public ICVSRepositoryLocation getRemoteLocation() throws CVSException {
- FolderSyncInfo info = localRoot.getFolderSyncInfo();
- if (info == null) {
- throw new CVSException(Policy.bind("CVSWorkspaceRoot.notCVSFolder", localRoot.getName())); //$NON-NLS-1$
- }
- return CVSProvider.getInstance().getRepository(info.getRoot());
- }
-
- public ICVSFolder getLocalRoot() {
- return localRoot;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java
deleted file mode 100644
index 3eb694058..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.resources;
-
-import java.io.File;
-import java.io.InputStream;
-import java.util.Date;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResourceVisitor;
-import org.eclipse.team.internal.ccvs.core.ILogEntry;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-/**
- * Represents handles to CVS resource on the local file system. Synchronization
- * information is taken from the CVS subdirectories.
- */
-public class EclipseFile extends EclipseResource implements ICVSFile {
-
- private static final String TEMP_FILE_EXTENSION = ".tmp";//$NON-NLS-1$
- private static final IPath PROJECT_META_DATA_PATH = new Path(".project");//$NON-NLS-1$
-
- /**
- * Create a handle based on the given local resource.
- */
- protected EclipseFile(IFile file) {
- super(file);
- }
-
- /*
- * @see ICVSResource#delete()
- */
- public void delete() throws CVSException {
- try {
- ((IFile)resource).delete(false /*force*/, true /*keepHistory*/, null);
- } catch(CoreException e) {
- throw CVSException.wrapException(resource, Policy.bind("EclipseFile_Problem_deleting_resource", resource.getFullPath().toString(), e.getStatus().getMessage()), e); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- public long getSize() {
- return getIOFile().length();
- }
-
- public InputStream getContents() throws CVSException {
- try {
- return getIFile().getContents();
- } catch (CoreException e) {
- throw CVSException.wrapException(resource, Policy.bind("EclipseFile_Problem_accessing_resource", resource.getFullPath().toString(), e.getStatus().getMessage()), e); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /*
- * @see ICVSFile#getTimeStamp()
- */
- public Date getTimeStamp() {
- return new Date((getIOFile().lastModified()/1000)*1000);
- }
-
- /*
- * @see ICVSFile#setTimeStamp(String)
- */
- public void setTimeStamp(Date date) throws CVSException {
- long time;
- if (date == null) {
- time = System.currentTimeMillis();
- } else {
- time = date.getTime();
- }
- getIOFile().setLastModified(time);
- try {
- // Needed for workaround to Platform Core Bug #
- resource.refreshLocal(IResource.DEPTH_ZERO, null);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /*
- * @see ICVSResource#isFolder()
- */
- public boolean isFolder() {
- return false;
- }
-
- /*
- * @see ICVSFile#isModified()
- */
- public boolean isModified() throws CVSException {
- ResourceSyncInfo info = getSyncInfo();
- if (!exists() || !isManaged(info)) {
- return true;
- } else {
- // consider a merged file as always modified.
- if(info.isMerged()) return true;
- return !getTimeStamp().equals(info.getTimeStamp());
- }
- }
-
- /*
- * @see ICVSResource#accept(ICVSResourceVisitor)
- */
- public void accept(ICVSResourceVisitor visitor) throws CVSException {
- visitor.visitFile(this);
- }
-
- /*
- * This is to be used by the Copy handler. The filename of the form .#filename
- */
- public void copyTo(String filename) throws CVSException {
- try {
- getIFile().copy(new Path(filename), true /*force*/, null);
- } catch(CoreException e) {
- throw new CVSException(e.getStatus());
- }
- }
-
- /*
- * @see ICVSResource#getRemoteLocation()
- */
- public String getRemoteLocation(ICVSFolder stopSearching) throws CVSException {
- return getParent().getRemoteLocation(stopSearching) + SEPARATOR + getName();
- }
-
- /*
- * @see ICVSFile#setReadOnly()
- */
- public void setContents(InputStream stream, int responseType, boolean keepLocalHistory, IProgressMonitor monitor) throws CVSException {
- try {
- IFile file = getIFile();
- if (PROJECT_META_DATA_PATH.equals(file.getFullPath().removeFirstSegments(1))) {
- responseType = UPDATED;
- }
- switch (responseType) {
- case UPDATED:
- if (resource.exists()) {
- file.setContents(stream, true /*force*/, true /*keep history*/, monitor);
- break;
- }
- case CREATED: // creating a new file so it should not exist locally
- file.create(stream, false /*force*/, monitor);
- break;
- case MERGED: // merging contents into a file that exists locally
- // Ensure we don't leave the file in a partially written state
- IFile tempFile = file.getParent().getFile(new Path(file.getName() + TEMP_FILE_EXTENSION));
- tempFile.create(stream, true /*force*/, monitor);
- file.delete(false, true, monitor);
- tempFile.move(new Path(file.getName()), true /*force*/, false /*history*/, monitor);
- break;
- case UPDATE_EXISTING: // creating a new file so it should exist locally
- file.setContents(stream, true /*force*/, true /*keep history*/, monitor);
- break;
- }
- } catch(CoreException e) {
- throw CVSException.wrapException(resource, Policy.bind("EclipseFile_Problem_writing_resource", e.getMessage(), e.getStatus().getMessage()), e); //$NON-NLS-1$
- }
- }
-
- /*
- * @see ICVSFile#setReadOnly()
- */
- public void setReadOnly(boolean readOnly) throws CVSException {
- getIFile().setReadOnly(readOnly);
- }
-
- /*
- * @see ICVSFile#isReadOnly()
- */
- public boolean isReadOnly() throws CVSException {
- return getIFile().isReadOnly();
- }
-
- /*
- * Typecasting helper
- */
- public IFile getIFile() {
- return (IFile)resource;
- }
-
- /*
- * To allow accessing size and timestamp for the underlying java.io.File
- */
- private File getIOFile() {
- IPath location = resource.getLocation();
- if(location!=null) {
- return location.toFile();
- }
- return null;
- }
- /**
- * @see ICVSFile#getLogEntries(IProgressMonitor)
- */
- public ILogEntry[] getLogEntries(IProgressMonitor monitor) throws TeamException {
- ResourceSyncInfo info = getSyncInfo();
- if(isManaged(info) && !info.isAdded()) {
- ICVSRemoteResource remoteFile = CVSWorkspaceRoot.getRemoteResourceFor(resource);
- return ((ICVSRemoteFile)remoteFile).getLogEntries(monitor);
- }
- return new ILogEntry[0];
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFolder.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFolder.java
deleted file mode 100644
index 822fd203c..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFolder.java
+++ /dev/null
@@ -1,303 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.resources;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.team.IMoveDeleteHook;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResourceVisitor;
-import org.eclipse.team.internal.ccvs.core.ICVSRunnable;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-/**
- * Implements the ICVSFolder interface on top of an
- * instance of the ICVSFolder interface
- *
- * @see ICVSFolder
- */
-class EclipseFolder extends EclipseResource implements ICVSFolder {
-
- protected EclipseFolder(IContainer container) {
- super(container);
- }
-
- /**
- * @see ICVSFolder#members(int)
- */
- public ICVSResource[] members(int flags) throws CVSException {
- final List result = new ArrayList();
- IResource[] resources = EclipseSynchronizer.getInstance().members((IContainer)resource);
- boolean includeFiles = (((flags & FILE_MEMBERS) != 0) || ((flags & (FILE_MEMBERS | FOLDER_MEMBERS)) == 0));
- boolean includeFolders = (((flags & FOLDER_MEMBERS) != 0) || ((flags & (FILE_MEMBERS | FOLDER_MEMBERS)) == 0));
- boolean includeManaged = (((flags & MANAGED_MEMBERS) != 0) || ((flags & (MANAGED_MEMBERS | UNMANAGED_MEMBERS | IGNORED_MEMBERS)) == 0));
- boolean includeUnmanaged = (((flags & UNMANAGED_MEMBERS) != 0) || ((flags & (MANAGED_MEMBERS | UNMANAGED_MEMBERS | IGNORED_MEMBERS)) == 0));
- boolean includeIgnored = ((flags & IGNORED_MEMBERS) != 0);
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- if ((includeFiles && (resource.getType()==IResource.FILE))
- || (includeFolders && (resource.getType()==IResource.FOLDER))) {
- boolean isManaged = cvsResource.isManaged();
- boolean isIgnored = cvsResource.isIgnored();
- if ((isManaged && includeManaged)|| (isIgnored && includeIgnored)
- || ( ! isManaged && ! isIgnored && includeUnmanaged)) {
- result.add(cvsResource);
- }
-
- }
- }
- return (ICVSResource[]) result.toArray(new ICVSResource[result.size()]);
- }
-
- /**
- * @see ICVSFolder#createFolder(String)
- */
- public ICVSFolder getFolder(String name) throws CVSException {
- if ((CURRENT_LOCAL_FOLDER.equals(name)) || ((CURRENT_LOCAL_FOLDER + SEPARATOR).equals(name)))
- return this;
- IPath path = new Path(name);
- if(resource.getType()==IResource.ROOT && path.segmentCount()==1) {
- return new EclipseFolder(((IWorkspaceRoot)resource).getProject(name));
- } else {
- return new EclipseFolder(((IContainer)resource).getFolder(new Path(name)));
- }
- }
-
- /**
- * @see ICVSFolder#createFile(String)
- */
- public ICVSFile getFile(String name) throws CVSException {
- return new EclipseFile(((IContainer)resource).getFile(new Path(name)));
- }
-
- /**
- * @see ICVSFolder#mkdir()
- */
- public void mkdir() throws CVSException {
- try {
- if(resource.getType()==IResource.PROJECT) {
- IProject project = (IProject)resource;
- project.create(null);
- project.open(null);
- } else {
- ((IFolder)resource).create(false /*don't force*/, true /*make local*/, null);
- EclipseSynchronizer.getInstance().folderCreated((IFolder)resource);
- }
- } catch (CoreException e) {
- throw CVSException.wrapException(resource, Policy.bind("EclipseFolder_problem_creating", resource.getFullPath().toString(), e.getStatus().getMessage()), e); //$NON-NLS-1$
- }
- }
-
- /**
- * @see ICVSResource#isFolder()
- */
- public boolean isFolder() {
- return true;
- }
-
- /**
- * @see ICVSFolder#acceptChildren(ICVSResourceVisitor)
- */
- public void acceptChildren(ICVSResourceVisitor visitor) throws CVSException {
-
- // Visit files and then folders
- ICVSResource[] subFiles = members(FILE_MEMBERS);
- for (int i=0; i<subFiles.length; i++) {
- subFiles[i].accept(visitor);
- }
- ICVSResource[] subFolders = members(FOLDER_MEMBERS);
- for (int i=0; i<subFolders.length; i++) {
- subFolders[i].accept(visitor);
- }
- }
-
- /**
- * @see ICVSResource#accept(ICVSResourceVisitor)
- */
- public void accept(ICVSResourceVisitor visitor) throws CVSException {
- visitor.visitFolder(this);
- }
-
- /**
- * @see ICVSResource#getRemoteLocation(ICVSFolder)
- */
- public String getRemoteLocation(ICVSFolder stopSearching) throws CVSException {
-
- if (getFolderSyncInfo() != null) {
- return getFolderSyncInfo().getRemoteLocation();
- }
-
- ICVSFolder parent = getParent();
- if(parent!=null && !equals(stopSearching)) {
- String parentLocation;
- parentLocation = parent.getRemoteLocation(stopSearching);
- if (parentLocation!=null) {
- return parentLocation + SEPARATOR + getName();
- }
- }
- return null;
- }
-
- /*
- * @see ICVSFolder#getFolderInfo()
- */
- public FolderSyncInfo getFolderSyncInfo() throws CVSException {
- return EclipseSynchronizer.getInstance().getFolderSync((IContainer)resource);
- }
-
- /*
- * @see ICVSFolder#setFolderInfo(FolderSyncInfo)
- */
- public void setFolderSyncInfo(FolderSyncInfo folderInfo) throws CVSException {
- EclipseSynchronizer.getInstance().setFolderSync((IContainer)resource, folderInfo);
- // the server won't add directories as sync info, therefore it must be done when
- // a directory is shared with the repository.
- setSyncInfo(new ResourceSyncInfo(getName()));
- }
-
- /*
- * @see ICVSFolder#isCVSFolder()
- */
- public boolean isCVSFolder() throws CVSException {
- return EclipseSynchronizer.getInstance().getFolderSync((IContainer)resource) != null;
- }
-
- /*
- * @see ICVSResource#unmanage()
- */
- public void unmanage(IProgressMonitor monitor) throws CVSException {
- monitor = Policy.monitorFor(monitor);
- try {
- monitor.beginTask("", 100); //$NON-NLS-1$
- run(new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- recursiveUnmanage((IContainer) resource, monitor);
- }
- }, Policy.subMonitorFor(monitor, 99));
- // unmanaged from parent
- super.unmanage(Policy.subMonitorFor(monitor, 1));
- } finally {
- monitor.done();
- }
- }
-
- private static void recursiveUnmanage(IContainer container, IProgressMonitor monitor) throws CVSException {
- try {
- monitor.beginTask("", 10); //$NON-NLS-1$
- monitor.subTask(container.getFullPath().toOSString());
- EclipseSynchronizer.getInstance().deleteFolderSync(container);
- IResource[] members = container.members();
- for (int i = 0; i < members.length; i++) {
- monitor.worked(1);
- IResource resource = members[i];
- if (members[i].getType() != IResource.FILE) {
- recursiveUnmanage((IContainer) resource, monitor);
- }
- }
- } catch (CoreException e) {
- } finally {
- monitor.done();
- }
- }
-
- /*
- * @see ICVSResource#isIgnored()
- */
- public boolean isIgnored() throws CVSException {
- if(isCVSFolder()) {
- return false;
- }
- return super.isIgnored();
- }
-
- /*
- * @see ICVSFolder#getChild(String)
- */
- public ICVSResource getChild(String namedPath) throws CVSException {
- IPath path = new Path(namedPath);
- if(path.segmentCount()==0) {
- return this;
- }
- IResource child = ((IContainer)resource).findMember(path, true /* include phantoms */);
- if(child!=null) {
- if(child.getType()==IResource.FILE) {
- return new EclipseFile((IFile)child);
- } else {
- return new EclipseFolder((IContainer)child);
- }
- }
- return null;
- }
-
- /*
- * @see ICVSFolder#run(ICVSRunnable, IProgressMonitor)
- */
- public void run(final ICVSRunnable job, IProgressMonitor monitor) throws CVSException {
- final CVSException[] error = new CVSException[1];
- // Remove the registered Move/Delete hook, assuming that the cvs runnable will keep sync info up-to-date
- final IMoveDeleteHook oldHook = CVSTeamProvider.getRegisteredMoveDeleteHook();
- CVSTeamProvider.setMoveDeleteHook(null);
- try {
- ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- monitor = Policy.monitorFor(monitor);
- try {
- monitor.beginTask(null, 100);
- try {
- EclipseSynchronizer.getInstance().beginOperation(Policy.subMonitorFor(monitor, 5));
- job.run(Policy.subMonitorFor(monitor, 60));
- } finally {
- EclipseSynchronizer.getInstance().endOperation(Policy.subMonitorFor(monitor, 35));
- }
- } catch(CVSException e) {
- error[0] = e;
- } finally {
- monitor.done();
- }
- }
- }, monitor);
- } catch(CoreException e) {
- throw CVSException.wrapException(e);
- } finally {
- CVSTeamProvider.setMoveDeleteHook(oldHook);
- }
- if(error[0]!=null) {
- throw error[0];
- }
- }
- /**
- * @see ICVSFolder#fetchChildren(IProgressMonitor)
- */
- public ICVSResource[] fetchChildren(IProgressMonitor monitor) throws CVSException {
- return members(FILE_MEMBERS | FOLDER_MEMBERS);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipsePhantomSynchronizer.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipsePhantomSynchronizer.java
deleted file mode 100644
index 40b0e1ff5..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipsePhantomSynchronizer.java
+++ /dev/null
@@ -1,450 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.resources;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ISynchronizer;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.SyncFileWriter;
-
-/**
- * Wraps the CVS EclipseSynchronizer with phantoms for folder deletions.
- */
-public class EclipsePhantomSynchronizer extends EclipseSynchronizer {
-
- private static final QualifiedName FOLDER_SYNC_KEY = new QualifiedName(CVSProviderPlugin.ID, "folder-sync"); //$NON-NLS-1$
- private static final QualifiedName RESOURCE_SYNC_KEY = new QualifiedName(CVSProviderPlugin.ID, "resource-sync"); //$NON-NLS-1$
-
- private Set changedResources = new HashSet();
-
- EclipsePhantomSynchronizer() {
- // Add the sync keys to the workspace synchronizer which is used to handle folder deletions
- getWorkspaceSynchronizer().add(FOLDER_SYNC_KEY);
- getWorkspaceSynchronizer().add(RESOURCE_SYNC_KEY);
- }
-
- /**
- * Gets the folder sync info for the specified folder.
- *
- * @param folder the folder
- * @return the folder sync info associated with the folder, or null if none.
- * @see #setFolderSync, #deleteFolderSync
- */
- public FolderSyncInfo getFolderSync(IContainer container) throws CVSException{
- if (container.isPhantom()) {
- return getPhantomFolderSyncInfo(container);
- }
- return super.getFolderSync(container);
- }
-
- /**
- * @see EclipseSynchronizer#setFolderSync(IContainer, FolderSyncInfo)
- */
- public void setFolderSync(IContainer container, FolderSyncInfo info) throws CVSException {
- if (container.isPhantom()) {
- try {
- beginOperation(null);
- changedResources.add(container);
- try {
- getWorkspaceSynchronizer().setSyncInfo(FOLDER_SYNC_KEY, container, getBytes(info));
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- } finally {
- endOperation(null);
- }
- } else {
- super.setFolderSync(container, info);
- }
- }
-
- /**
- * Deletes the folder sync for the specified folder and the resource sync
- * for all of its children. Does not recurse.
- *
- * @param folder the folder
- * @see #getFolderSync, #setFolderSync
- */
- public void deleteFolderSync(IContainer container) throws CVSException {
- if (container.isPhantom()) {
- try {
- beginOperation(null);
- changedResources.add(container);
- flushPhantomInfo(container);
- } finally {
- endOperation(null);
- }
- } else {
- super.deleteFolderSync(container);
- }
- }
-
- /**
- * Gets the resource sync info for the specified folder.
- *
- * @param resource the resource
- * @return the resource sync info associated with the resource, or null if none.
- * @see #setResourceSync, #deleteResourceSync
- */
- public ResourceSyncInfo getResourceSync(IResource resource) throws CVSException {
- IContainer parent = resource.getParent();
- if (parent != null && parent.isPhantom()) {
- Map map = getPhantomResourceSyncInfoMap(parent);
- return (ResourceSyncInfo)map.get(resource.getName());
- }
- return super.getResourceSync(resource);
- }
-
- /**
- * @see EclipseSynchronizer#setResourceSync(IResource, ResourceSyncInfo)
- */
- public void setResourceSync(IResource resource, ResourceSyncInfo info) throws CVSException {
- IContainer parent = resource.getParent();
- if (parent != null && parent.isPhantom()) {
- // Look for the sync info in the workspace synchronizer
- try {
- beginOperation(null);
- Map map = getPhantomResourceSyncInfoMap(parent);
- map.put(resource.getName(), info);
- getWorkspaceSynchronizer().setSyncInfo(RESOURCE_SYNC_KEY, parent, getBytes(map));
- changedResources.add(resource);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- } finally {
- endOperation(null);
- }
- } else {
- super.setResourceSync(resource, info);
- }
- }
-
- /**
- * Deletes the resource sync info for the specified resource, if it exists.
- *
- * @param resource the resource
- * @see #getResourceSync, #setResourceSync
- */
- public void deleteResourceSync(IResource resource) throws CVSException {
- IContainer parent = resource.getParent();
- if (parent != null && parent.isPhantom()) {
- // Look for the sync info in the workspace synchronizer
- try {
- beginOperation(null);
- Map map = getPhantomResourceSyncInfoMap(parent);
- map.remove(resource.getName());
- if (map.isEmpty()) {
- flushEmptyFolder(parent);
- } else {
- getWorkspaceSynchronizer().setSyncInfo(RESOURCE_SYNC_KEY, parent, getBytes(map));
- }
- changedResources.add(resource);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- } finally {
- endOperation(null);
- }
- } else {
- super.deleteResourceSync(resource);
- }
- }
-
- /**
- * Flush the folder sync and resource sync for a phantom folder that has no childen
- * @param folder an empty phantom folder
- */
- private void flushEmptyFolder(IContainer folder) throws CVSException {
- deleteFolderSync(folder);
- deleteResourceSync(folder);
- }
-
- /**
- * Returns the members of this folder which are either phantom folder
- * or file deletions
- *
- * @param folder the container to list
- * @return the array of members
- */
- public IResource[] members(IContainer container) throws CVSException {
- if (container.isPhantom()) {
- Map map = getPhantomResourceSyncInfoMap(container);
- Set childResources = new HashSet();
- for (Iterator it = map.values().iterator(); it.hasNext();) {
- ResourceSyncInfo info = (ResourceSyncInfo) it.next();
- IPath path = new Path(info.getName());
- if(info.isDirectory()) {
- childResources.add(container.getFolder(path));
- } else {
- childResources.add(container.getFile(path));
- }
- }
- return (IResource[])childResources.toArray(new IResource[childResources.size()]);
- } else {
- return super.members(container);
- }
- }
-
- /**
- * Notify the receiver that a folder has been created.
- * Any existing phantom sync info will be moved
- *
- * @param folder the folder that has been created
- */
- public void folderCreated(IFolder folder) throws CVSException {
- FolderSyncInfo folderInfo = getPhantomFolderSyncInfo(folder);
- if (folderInfo != null) {
- if (folder.getFolder(SyncFileWriter.CVS_DIRNAME).exists()) {
- // There is already a CVS subdirectory which indicates that the folder
- // was recreated by an external tool.
- // Therefore, just forget what we had and use the info from disk.
- flushPhantomInfo(folder);
- return;
- }
- try {
- beginOperation(null);
- setFolderSync(folder, folderInfo);
- Map map = getPhantomResourceSyncInfoMap(folder);
- for (Iterator it = map.values().iterator(); it.hasNext();) {
- ResourceSyncInfo info = (ResourceSyncInfo) it.next();
- IPath path = new Path(info.getName());
- IResource childResource;
- if(info.isDirectory()) {
- childResource = folder.getFolder(path);
- } else {
- childResource = folder.getFile(path);
- }
- setResourceSync(childResource, info);
- }
- } finally {
- endOperation(null);
- flushPhantomInfo(folder);
- }
- }
- }
-
- /**
- * Return the cached folder sync info for the given container or null
- * if there is none.
- */
- private FolderSyncInfo getPhantomFolderSyncInfo(IContainer container) throws CVSException {
- try {
- byte[] bytes = getWorkspaceSynchronizer().getSyncInfo(FOLDER_SYNC_KEY, container);
- if (bytes == null) return null;
- return getFolderSyncInfo(bytes);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- private Map getPhantomResourceSyncInfoMap(IContainer container) throws CVSException {
- try {
- byte[] bytes = getWorkspaceSynchronizer().getSyncInfo(RESOURCE_SYNC_KEY, container);
- if (bytes == null) return new HashMap();
- return getResourceSyncInfoMap(bytes);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /**
- * Flush any info cahced for the folder
- */
- private void flushPhantomInfo(IContainer container) throws CVSException {
- try {
- if (container.isPhantom()) {
- getWorkspaceSynchronizer().flushSyncInfo(FOLDER_SYNC_KEY, container, IResource.DEPTH_ZERO);
- }
- if (container.isPhantom()) {
- getWorkspaceSynchronizer().flushSyncInfo(RESOURCE_SYNC_KEY, container, IResource.DEPTH_ZERO);
- }
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /**
- * Return the Eclipse Workspace Synchronizer (from org.eclipse.core.resources)
- */
- private ISynchronizer getWorkspaceSynchronizer() {
- return ResourcesPlugin.getWorkspace().getSynchronizer();
- }
-
- /**
- * The folder is about to be deleted so move the folder's CVS information
- * to the workspace synchronizer so it will survive the deletion
- */
- public void prepareForDeletion(IContainer container) throws CVSException {
- try {
- beginOperation(null);
- if (container.getType() == IResource.PROJECT) {
- getWorkspaceSynchronizer().flushSyncInfo(FOLDER_SYNC_KEY, container, IResource.DEPTH_INFINITE);
- getWorkspaceSynchronizer().flushSyncInfo(RESOURCE_SYNC_KEY, container, IResource.DEPTH_INFINITE);
- } else {
- FolderSyncInfo info = getFolderSync(container);
- if (info == null) return;
- getWorkspaceSynchronizer().setSyncInfo(FOLDER_SYNC_KEY, container, getBytes(info));
- getWorkspaceSynchronizer().setSyncInfo(RESOURCE_SYNC_KEY, container, getBytes(getResourceSyncInfosForChildren(container)));
- changedResources.add(container);
- }
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- } finally {
- endOperation(null);
- }
- }
-
- /**
- * Return a map of resource name to ResourceSyncInfo
- *
- * This should only be used on folders that exist in the workspace
- */
- private Map getResourceSyncInfosForChildren(IContainer parent) throws CVSException {
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor(parent);
- ICVSResource[] files = folder.members(ICVSFolder.FILE_MEMBERS | ICVSFolder.FOLDER_MEMBERS | ICVSFolder.MANAGED_MEMBERS);
- Map result = new HashMap();
- for (int i = 0; i < files.length; i++) {
- ICVSResource resource = files[i];
- result.put(resource.getName(), resource.getSyncInfo());
- }
- return result;
- }
-
- /**
- * Convert a byte array that was created using getBytes(FolderSyncInfo)
- * into a FolderSyncInfo
- */
- private static FolderSyncInfo getFolderSyncInfo(byte[] bytes) throws CVSException {
- ByteArrayInputStream in = new ByteArrayInputStream(bytes);
- DataInputStream dis = new DataInputStream(in);
- String root;
- String repository;
- CVSEntryLineTag tag;
- boolean isStatic;
- try {
- root = dis.readUTF();
- repository = dis.readUTF();
- String tagName = dis.readUTF();
- if (tagName.length() == 0) {
- tag = null;
- } else {
- tag = new CVSEntryLineTag(tagName);
- }
- isStatic = dis.readBoolean();
- } catch (IOException e) {
- throw CVSException.wrapException(e);
- }
- return new FolderSyncInfo(repository, root, tag, isStatic);
- }
-
- /**
- * Convert a FolderSyncInfo into a byte array that can be stored
- * in the workspace synchronizer
- */
- private static byte[] getBytes(FolderSyncInfo info) throws CVSException {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- DataOutputStream dos = new DataOutputStream(out);
- try {
- dos.writeUTF(info.getRoot());
- dos.writeUTF(info.getRepository());
- CVSEntryLineTag tag = info.getTag();
- if (tag == null) {
- dos.writeUTF(""); //$NON-NLS-1$
- } else {
- dos.writeUTF(tag.toString());
- }
- dos.writeBoolean(info.getIsStatic());
- dos.close();
- } catch (IOException e) {
- throw CVSException.wrapException(e);
- }
- return out.toByteArray();
- }
-
- /**
- * Convert a Map of ResourceSyncInfo into a byte array that can be stored
- * in the workspace synchronizer
- */
- private static byte[] getBytes(Map infos) throws CVSException {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- DataOutputStream dos = new DataOutputStream(out);
- try {
- dos.writeInt(infos.size());
- Iterator iter = infos.values().iterator();
- while (iter.hasNext()) {
- ResourceSyncInfo info = (ResourceSyncInfo)iter.next();
- dos.writeUTF(info.getEntryLine());
- }
- } catch (IOException e) {
- throw CVSException.wrapException(e);
- }
- return out.toByteArray();
- }
-
- /**
- * Convert a byte array that was created using getBytes(Map)
- * into a Map of ResourceSyncInfo
- */
- private static Map getResourceSyncInfoMap(byte[] bytes) throws CVSException {
- ByteArrayInputStream in = new ByteArrayInputStream(bytes);
- DataInputStream dis = new DataInputStream(in);
- Map result = new HashMap();
- try {
- int size = dis.readInt();
- for (int i = 0; i < size; i++) {
- ResourceSyncInfo info = new ResourceSyncInfo(dis.readUTF(), null, null);
- result.put(info.getName(), info);
- }
- } catch (IOException e) {
- throw CVSException.wrapException(e);
- }
- return result;
- }
-
- /**
- * @see EclipseSynchronizer#broadcastResourceStateChanges(IResource[])
- */
- void broadcastResourceStateChanges(IResource[] resources) {
- // Add the changedResources to the list of broadcasted resources
- if (changedResources.size() > 0) {
- ArrayList allResources = new ArrayList();
- allResources.addAll(Arrays.asList(resources));
- allResources.addAll(changedResources);
- resources = (IResource[]) allResources.toArray(new IResource[allResources.size()]);
- changedResources.clear();
- }
- super.broadcastResourceStateChanges(resources);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseResource.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseResource.java
deleted file mode 100644
index 0ee11f494..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseResource.java
+++ /dev/null
@@ -1,260 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.resources;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.IIgnoreInfo;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Assert;
-import org.eclipse.team.internal.ccvs.core.util.FileNameMatcher;
-import org.eclipse.team.internal.ccvs.core.util.SyncFileWriter;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-import org.eclipse.team.internal.core.TeamPlugin;
-
-/**
- * Represents handles to CVS resource on the local file system. Synchronization
- * information is taken from the CVS subdirectories.
- *
- * @see LocalFolder
- * @see LocalFile
- */
-abstract class EclipseResource implements ICVSResource, Comparable {
-
- // The seperator that must be used when creating CVS resource paths. Never use
- // the platform default seperator since it is not compatible with CVS resources.
- protected static final String SEPARATOR = Session.SERVER_SEPARATOR;
- protected static final String CURRENT_LOCAL_FOLDER = Session.CURRENT_LOCAL_FOLDER;
-
- /*
- * The local resource represented by this handle
- */
- IResource resource;
-
- /*
- * Creates a CVS handle to the provided resource
- */
- protected EclipseResource(IResource resource) {
- Assert.isNotNull(resource);
- this.resource = resource;
- }
-
- /*
- * Get the extention of the path of resource relative to the path of root
- *
- * @throws CVSException if root is not a root-folder of resource
- */
- public String getRelativePath(ICVSFolder root) throws CVSException {
- try {
- EclipseResource rootFolder;
- String result;
- rootFolder = (EclipseResource)root;
- result = Util.getRelativePath(rootFolder.getPath(), getPath());
- if (result.length() == 0) return CURRENT_LOCAL_FOLDER;
- return result;
- } catch (ClassCastException e) {
- throw new CVSException(Policy.bind("EclipseResource.invalidResourceClass"), e); //$NON-NLS-1$
- }
- }
-
- /*
- * @see ICVSResource#delete()
- */
- public void delete() throws CVSException {
- try {
- resource.delete(false /*force*/, null);
- } catch(CoreException e) {
- throw new CVSException(e.getStatus());
- }
- }
-
- /*
- * @see ICVSResource#exists()
- */
- public boolean exists() {
- return resource.exists();
- }
-
- /*
- * Returns the parent folder of this resource of <code>null</code> if resource
- * the resource.
- *
- * @see ICVSResource#getParent()
- */
- public ICVSFolder getParent() {
- IContainer parent = resource.getParent();
- if (parent==null) {
- return null;
- }
- return new EclipseFolder(parent);
- }
-
- /*
- * @see ICVSResource#getName()
- */
- public String getName() {
- return resource.getName();
- }
-
- /*
- * @see ICVSResource#isIgnored()
- */
- public boolean isIgnored() throws CVSException {
- // a managed resource is never ignored
- if(isManaged() || resource.getType()==IResource.ROOT || resource.getType()==IResource.PROJECT) {
- return false;
- }
-
- // If the resource is a derived resource, it is ignored
- if (resource.isDerived()) {
- return true;
- }
-
- // initialize matcher with global ignores, basic CVS ignore patterns, and ignore patterns
- // from the .cvsignore file.
- FileNameMatcher matcher = new FileNameMatcher(SyncFileWriter.BASIC_IGNORE_PATTERNS);
- String[] cvsIgnorePatterns;;
- try {
- cvsIgnorePatterns = EclipseSynchronizer.getInstance().getIgnored(resource.getParent());
- } catch(CVSException e) {
- cvsIgnorePatterns = null;
- }
- IIgnoreInfo[] ignorePatterns = Team.getAllIgnores();
- for (int i = 0; i < ignorePatterns.length; i++) {
- IIgnoreInfo info = ignorePatterns[i];
- if(info.getEnabled()) {
- matcher.register(info.getPattern(), "true"); //$NON-NLS-1$
- }
- }
- if(cvsIgnorePatterns!=null) {
- for (int i = 0; i < cvsIgnorePatterns.length; i++) {
- matcher.register(cvsIgnorePatterns[i], "true"); //$NON-NLS-1$
- }
- }
-
- // check with all the registered patterns
- boolean ignored = matcher.match(getName());
-
- // check the parent, if the parent is ignored then this resource
- // is ignored also
- if(!ignored) {
- ICVSFolder parent = getParent();
- if(parent==null) return false;
- return parent.isIgnored();
- } else {
- return ignored;
- }
- }
-
- /*
- * @see ICVSResource#setIgnored()
- */
- public void setIgnored() throws CVSException {
- EclipseSynchronizer.getInstance().addIgnored(resource.getParent(), resource.getName());
- }
-
- /*
- * @see ICVSResource#setIgnoredAs(String)
- */
- public void setIgnoredAs(String pattern) throws CVSException {
- EclipseSynchronizer.getInstance().addIgnored(resource.getParent(), pattern);
- }
-
- /*
- * @see ICVSResource#isManaged()
- */
- public boolean isManaged() throws CVSException {
- return isManaged(getSyncInfo());
- }
-
- /*
- * Helper method that captures the sematics of isManaged given a ResourceSyncInfo
- */
- public boolean isManaged(ResourceSyncInfo info) {
- return info != null;
- }
-
- /**
- * Two ManagedResources are equal, if there cvsResources are
- * equal (and that is, if the point to the same file)
- */
- public boolean equals(Object obj) {
-
- if (!(obj instanceof EclipseResource)) {
- return false;
- } else {
- return getPath().equals(((EclipseResource) obj).getPath());
- }
- }
-
- /*
- * @see ICVSResource#getPath()
- */
- public String getPath() {
- return resource.getFullPath().toString();
- }
-
- /*
- * @see ICVSResource#isFolder()
- */
- public boolean isFolder() {
- return false;
- }
-
- /*
- * @see ICVSResource#getSyncInfo()
- */
- public ResourceSyncInfo getSyncInfo() throws CVSException {
- return EclipseSynchronizer.getInstance().getResourceSync(resource);
- }
-
- /*
- * @see ICVSResource#setSyncInfo(ResourceSyncInfo)
- */
- public void setSyncInfo(ResourceSyncInfo info) throws CVSException {
- if (getParent().isCVSFolder()) {
- EclipseSynchronizer.getInstance().setResourceSync(resource, info);
- }
- }
-
- /*
- * Implement the hashcode on the underlying strings, like it is done in the equals.
- */
- public int hashCode() {
- return getPath().hashCode();
- }
-
- /*
- * Give the pathname back
- */
- public String toString() {
- return getPath();
- }
-
- /*
- * @see ICVSResource#unmanage()
- */
- public void unmanage(IProgressMonitor monitor) throws CVSException {
- EclipseSynchronizer.getInstance().deleteResourceSync(resource);
- }
-
- /*
- * @see Comparable#compareTo(Object)
- */
- public int compareTo(Object arg0) {
- EclipseResource other = (EclipseResource)arg0;
- return resource.getFullPath().toString().compareTo(other.resource.getFullPath().toString());
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java
deleted file mode 100644
index 666159d64..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java
+++ /dev/null
@@ -1,834 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.resources;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ReentrantLock;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Assert;
-import org.eclipse.team.internal.ccvs.core.util.SyncFileWriter;
-
-/**
- * A synchronizer is responsible for managing synchronization information for local
- * CVS resources.
- *
- * @see ResourceSyncInfo
- * @see FolderSyncInfo
- */
-public class EclipseSynchronizer {
- // the resources plugin synchronizer is used to cache and possibly persist. These
- // are keys for storing the sync info.
- private static final QualifiedName FOLDER_SYNC_KEY = new QualifiedName(CVSProviderPlugin.ID, "folder-sync"); //$NON-NLS-1$
- private static final QualifiedName RESOURCE_SYNC_KEY = new QualifiedName(CVSProviderPlugin.ID, "resource-sync"); //$NON-NLS-1$
- private static final QualifiedName IGNORE_SYNC_KEY = new QualifiedName(CVSProviderPlugin.ID, "folder-ignore"); //$NON-NLS-1$
-
- private static final String[] NULL_IGNORES = new String[0];
- private static final FolderSyncInfo NULL_FOLDER_SYNC_INFO = new FolderSyncInfo("", "", null, false); //$NON-NLS-1$ //$NON-NLS-2$
-
- private static final IStatus STATUS_OK = new Status(IStatus.OK, CVSProviderPlugin.ID, 0, Policy.bind("ok"), null); //$NON-NLS-1$
-
- // the cvs eclipse synchronizer is a singleton
- private static EclipseSynchronizer instance;
-
- // track resources that have changed in a given operation
- private ReentrantLock lock = new ReentrantLock();
-
- private Set changedResources = new HashSet();
- private Set changedFolders = new HashSet();
-
- /*
- * Package private contructor to allow specialized subclass for handling folder deletions
- */
- EclipseSynchronizer() {
- }
-
- /**
- * Returns the singleton instance of the synchronizer.
- */
- public static EclipseSynchronizer getInstance() {
- if(instance==null) {
- instance = new EclipsePhantomSynchronizer();
- }
- return instance;
- }
-
- /**
- * Sets the folder sync info for the specified folder.
- * The folder must exist and must not be the workspace root.
- *
- * @param folder the folder
- * @param info the folder sync info, must not be null
- * @see #getFolderSync, #deleteFolderSync
- */
- public void setFolderSync(IContainer folder, FolderSyncInfo info) throws CVSException {
- Assert.isNotNull(info); // enforce the use of deleteFolderSync
- if (folder.getType() == IResource.ROOT || ! folder.exists()) {
- throw new CVSException(IStatus.ERROR, CVSException.UNABLE,
- Policy.bind("EclipseSynchronizer.ErrorSettingFolderSync", folder.getFullPath().toString())); //$NON-NLS-1$
- }
- try {
- beginOperation(null);
- // set folder sync and notify
- setCachedFolderSync(folder, info);
- changedFolders.add(folder);
- } finally {
- endOperation(null);
- }
- }
-
- /**
- * Gets the folder sync info for the specified folder.
- *
- * @param folder the folder
- * @return the folder sync info associated with the folder, or null if none.
- * @see #setFolderSync, #deleteFolderSync
- */
- public FolderSyncInfo getFolderSync(IContainer folder) throws CVSException {
- if (folder.getType() == IResource.ROOT || ! folder.exists()) return null;
- try {
- beginOperation(null);
- // cache folder sync and return it
- return cacheFolderSync(folder);
- } finally {
- endOperation(null);
- }
- }
-
- /**
- * Deletes the folder sync for the specified folder and the resource sync
- * for all of its children. Does not recurse.
- *
- * @param folder the folder
- * @see #getFolderSync, #setFolderSync
- */
- public void deleteFolderSync(IContainer folder) throws CVSException {
- if (folder.getType() == IResource.ROOT || ! folder.exists()) return;
- try {
- beginOperation(null);
- // delete folder sync
- setCachedFolderSync(folder, null);
- changedFolders.add(folder);
- // iterate over all children with sync info and prepare notifications
- cacheResourceSyncForChildren(folder);
- Collection infos = getCachedResourceSyncForChildren(folder);
- for (Iterator it = infos.iterator(); it.hasNext();) {
- ResourceSyncInfo info = (ResourceSyncInfo) it.next();
- IPath path = new Path(info.getName());
- if(info.isDirectory()) {
- changedResources.add(folder.getFolder(path));
- } else {
- changedResources.add(folder.getFile(path));
- }
- }
- // delete resource sync for all children
- deleteCachedResourceSyncForChildren(folder);
- } finally {
- endOperation(null);
- }
- }
-
- /**
- * Sets the resource sync info for the specified resource.
- * The parent folder must exist and must not be the workspace root.
- *
- * @param resource the resource
- * @param info the resource sync info, must not be null
- * @see #getResourceSync, #deleteResourceSync
- */
- public void setResourceSync(IResource resource, ResourceSyncInfo info) throws CVSException {
- Assert.isNotNull(info); // enforce the use of deleteResourceSync
- IContainer parent = resource.getParent();
- if (parent == null || ! parent.exists() || parent.getType() == IResource.ROOT) {
- throw new CVSException(IStatus.ERROR, CVSException.UNABLE,
- Policy.bind("EclipseSynchronizer.ErrorSettingResourceSync", resource.getFullPath().toString())); //$NON-NLS-1$
- }
- try {
- beginOperation(null);
- // cache resource sync for siblings, set for self, then notify
- cacheResourceSyncForChildren(parent);
- setCachedResourceSync(resource, info);
- changedResources.add(resource);
- } finally {
- endOperation(null);
- }
- }
-
- /**
- * Gets the resource sync info for the specified folder.
- *
- * @param resource the resource
- * @return the resource sync info associated with the resource, or null if none.
- * @see #setResourceSync, #deleteResourceSync
- */
- public ResourceSyncInfo getResourceSync(IResource resource) throws CVSException {
- IContainer parent = resource.getParent();
- if (parent == null || ! parent.exists() || parent.getType() == IResource.ROOT) return null;
- try {
- beginOperation(null);
- // cache resource sync for siblings, then return for self
- cacheResourceSyncForChildren(parent);
- return getCachedResourceSync(resource);
- } finally {
- endOperation(null);
- }
- }
-
- /**
- * Deletes the resource sync info for the specified resource, if it exists.
- *
- * @param resource the resource
- * @see #getResourceSync, #setResourceSync
- */
- public void deleteResourceSync(IResource resource) throws CVSException {
- IContainer parent = resource.getParent();
- if (parent == null || ! parent.exists() || parent.getType() == IResource.ROOT) return;
- try {
- beginOperation(null);
- // cache resource sync for siblings, delete for self, then notify
- cacheResourceSyncForChildren(resource.getParent());
- if (getCachedResourceSync(resource) != null) { // avoid redundant notifications
- setCachedResourceSync(resource, null);
- changedResources.add(resource);
- }
- } finally {
- endOperation(null);
- }
- }
-
- /**
- * Gets the array of ignore patterns for the specified folder.
- *
- * @param folder the folder
- * @return the patterns, or an empty array if none
- * @see #addIgnored
- */
- public String[] getIgnored(IContainer folder) throws CVSException {
- if (folder.getType() == IResource.ROOT || ! folder.exists()) return NULL_IGNORES;
- try {
- beginOperation(null);
- return cacheFolderIgnores(folder);
- } finally {
- endOperation(null);
- }
- }
-
- /**
- * Adds a pattern to the set of ignores for the specified folder.
- *
- * @param folder the folder
- * @param pattern the pattern
- */
- public void addIgnored(IContainer folder, String pattern) throws CVSException {
- if (folder.getType() == IResource.ROOT || ! folder.exists()) {
- throw new CVSException(IStatus.ERROR, CVSException.UNABLE,
- Policy.bind("EclipseSynchronizer.ErrorSettingIgnorePattern", folder.getFullPath().toString())); //$NON-NLS-1$
- }
- try {
- beginOperation(null);
- String[] ignores = cacheFolderIgnores(folder);
- if (ignores != null) {
- // verify that the pattern has not already been added
- for (int i = 0; i < ignores.length; i++) {
- if (ignores[i].equals(pattern)) return;
- }
- // add the pattern
- String[] oldIgnores = ignores;
- ignores = new String[oldIgnores.length + 1];
- System.arraycopy(oldIgnores, 0, ignores, 0, oldIgnores.length);
- ignores[oldIgnores.length] = pattern;
- } else {
- ignores = new String[] { pattern };
- }
- setCachedFolderIgnores(folder, ignores);
- SyncFileWriter.writeCVSIgnoreEntries(folder, ignores);
- // broadcast changes to unmanaged children - they are the only candidates for being ignored
- List possibleIgnores = new ArrayList();
- accumulateNonManagedChildren(folder, possibleIgnores);
- CVSProviderPlugin.broadcastResourceStateChanges((IResource[])possibleIgnores.toArray(new IResource[possibleIgnores.size()]));
- } finally {
- endOperation(null);
- }
- }
-
- /**
- * Returns the members of this folder including deleted resources with sync info,
- * but excluding special resources such as CVS subdirectories.
- *
- * @param folder the container to list
- * @return the array of members
- */
- public IResource[] members(IContainer folder) throws CVSException {
- if (! folder.exists()) return new IResource[0];
- try {
- beginOperation(null);
- if (folder.getType() == IResource.ROOT) return folder.members();
- cacheResourceSyncForChildren(folder);
- Collection infos = getCachedResourceSyncForChildren(folder);
- // add all children with or without sync info
- Set childResources = new HashSet();
- for (Iterator it = infos.iterator(); it.hasNext();) {
- ResourceSyncInfo info = (ResourceSyncInfo) it.next();
- IPath path = new Path(info.getName());
- if(info.isDirectory()) {
- childResources.add(folder.getFolder(path));
- } else {
- childResources.add(folder.getFile(path));
- }
- }
- childResources.addAll(Arrays.asList(folder.members()));
- return (IResource[])childResources.toArray(new IResource[childResources.size()]);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- } finally {
- endOperation(null);
- }
- }
-
- /**
- * Begins a batch of operations.
- *
- * @param monitor the progress monitor, may be null
- */
- public void beginOperation(IProgressMonitor monitor) throws CVSException {
- lock.acquire();
-
- if (lock.getNestingCount() == 1) {
- prepareCache(monitor);
- }
- }
-
- /**
- * Ends a batch of operations. Pending changes are committed only when
- * the number of calls to endOperation() balances those to beginOperation().
- * <p>
- * Progress cancellation is ignored while writting the cache to disk. This
- * is to ensure cache to disk consistency.
- * </p>
- *
- * @param monitor the progress monitor, may be null
- * @exception CVSException with a status with code <code>COMMITTING_SYNC_INFO_FAILED</code>
- * if all the CVS sync information could not be written to disk.
- */
- public void endOperation(IProgressMonitor monitor) throws CVSException {
- try {
- IStatus status = STATUS_OK;
- if (lock.getNestingCount() == 1) {
- status = commitCache(monitor);
- }
- if (status != STATUS_OK) {
- throw new CVSException(status);
- }
- } finally {
- lock.release();
- }
- }
-
- /**
- * Flushes unwritten sync information to disk.
- * <p>
- * Recursively commits unwritten sync information for all resources
- * below the root, and optionally purges the cached data from memory
- * so that the next time it is accessed it will be retrieved from disk.
- * May flush more sync information than strictly needed, but never less.
- * </p>
- * <p>
- * Will throw a CVS Exception with a status with code = CVSStatus.DELETION_FAILED
- * if the flush could not perform CVS folder deletions. In this case, all other
- * aspects of the operation succeeded.
- * </p>
- *
- * @param root the root of the subtree to flush
- * @param purgeCache if true, purges the cache from memory as well
- * @param deep purge sync from child folders
- * @param monitor the progress monitor, may be null
- */
- public void flush(IContainer root, boolean purgeCache, boolean deep, IProgressMonitor monitor) throws CVSException {
- // flush unwritten sync info to disk
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 10);
- try {
- beginOperation(Policy.subMonitorFor(monitor, 1));
-
- IStatus status = commitCache(Policy.subMonitorFor(monitor, 7));
-
- // purge from memory too if we were asked to
- if (purgeCache) purgeCache(root, deep);
-
- // prepare for the operation again if we cut the last one short
- prepareCache(Policy.subMonitorFor(monitor, 1));
-
- if (status != STATUS_OK) {
- throw new CVSException(status);
- }
- } finally {
- endOperation(Policy.subMonitorFor(monitor, 1));
- monitor.done();
- }
- }
-
- /**
- * Called to notify the synchronizer that meta files have changed on disk, outside
- * of the workbench. The cache will be flushed for this folder and it's immediate
- * children and appropriate state change events are broadcasts to state change
- * listeners.
- */
- public void syncFilesChanged(IContainer[] roots) throws CVSException {
- try {
- for (int i = 0; i < roots.length; i++) {
- IContainer root = roots[i];
- flush(root, true, false /*don't flush children*/, null);
- List changedPeers = new ArrayList();
- changedPeers.add(root);
- changedPeers.addAll(Arrays.asList(root.members()));
- CVSProviderPlugin.broadcastResourceStateChanges((IResource[]) changedPeers.toArray(new IResource[changedPeers.size()]));
- }
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /**
- * The folder is about to be deleted (including its CVS subfolder).
- * Take any appropriate action to remember the CVS information.
- */
- public void prepareForDeletion(IContainer container) throws CVSException {
- }
-
- /**
- * Signal to the synchronizer that a folder has been created
- *
- * @param folder the folder to be created
- */
- public void folderCreated(IFolder folder) throws CVSException {
- }
-
- /**
- * Prepares the cache for a series of operations.
- *
- * @param monitor the progress monitor, may be null
- */
- private void prepareCache(IProgressMonitor monitor) throws CVSException {
- }
-
- /**
- * Commits the cache after a series of operations.
- *
- * Will return STATUS_OK unless there were problems writting sync
- * information to disk. If an error occurs a multistatus is returned
- * with the list of reasons for the failures. Failures are recovered,
- * and all changed resources are given a chance to be written to disk.
- *
- * @param monitor the progress monitor, may be null
- */
- private IStatus commitCache(IProgressMonitor monitor) {
- if (changedFolders.isEmpty() && changedResources.isEmpty()) {
- broadcastResourceStateChanges(new IResource[0]);
- return STATUS_OK;
- }
- List errors = new ArrayList();
- try {
- /*** prepare operation ***/
- // find parents of changed resources
- Set dirtyParents = new HashSet();
- for(Iterator it = changedResources.iterator(); it.hasNext();) {
- IResource resource = (IResource) it.next();
- IContainer folder = resource.getParent();
- dirtyParents.add(folder);
- }
-
- monitor = Policy.monitorFor(monitor);
- int numDirty = dirtyParents.size();
- int numResources = changedFolders.size() + numDirty;
- monitor.beginTask(null, numResources);
- if(monitor.isCanceled()) {
- monitor.subTask(Policy.bind("EclipseSynchronizer.UpdatingSyncEndOperationCancelled")); //$NON-NLS-1$
- } else {
- monitor.subTask(Policy.bind("EclipseSynchronizer.UpdatingSyncEndOperation")); //$NON-NLS-1$
- }
-
- /*** write sync info to disk ***/
- // folder sync info changes
- for(Iterator it = changedFolders.iterator(); it.hasNext();) {
- IContainer folder = (IContainer) it.next();
- if (folder.exists() && folder.getType() != IResource.ROOT) {
- try {
- FolderSyncInfo info = getCachedFolderSync(folder);
- if (info == null) {
- // deleted folder sync info since we loaded it
- SyncFileWriter.deleteFolderSync(folder);
- dirtyParents.remove(folder);
- } else {
- // modified or created new folder sync info since we loaded it
- SyncFileWriter.writeFolderSync(folder, info);
- }
- } catch(CVSException e) {
- try {
- purgeCache(folder, true /* deep */);
- } catch(CVSException pe) {
- errors.add(pe.getStatus());
- }
- errors.add(e.getStatus());
- }
- }
- monitor.worked(1);
- }
-
- // update progress for parents we will skip because they were deleted
- monitor.worked(numDirty - dirtyParents.size());
-
- // resource sync info changes
- for (Iterator it = dirtyParents.iterator(); it.hasNext();) {
- IContainer folder = (IContainer) it.next();
- if (folder.exists() && folder.getType() != IResource.ROOT) {
- // write sync info for all children in one go
- try {
- Collection infos = getCachedResourceSyncForChildren(folder);
- SyncFileWriter.writeAllResourceSync(folder,
- (ResourceSyncInfo[]) infos.toArray(new ResourceSyncInfo[infos.size()]));
- } catch(CVSException e) {
- try {
- purgeCache(folder, false /* depth 1 */);
- } catch(CVSException pe) {
- errors.add(pe.getStatus());
- }
- errors.add(e.getStatus());
- }
- }
- monitor.worked(1);
- }
-
- /*** broadcast events ***/
- changedResources.addAll(changedFolders);
- IResource[] resources = (IResource[]) changedResources.toArray(
- new IResource[changedResources.size()]);
- broadcastResourceStateChanges(resources);
- changedResources.clear();
- changedFolders.clear();
- if ( ! errors.isEmpty()) {
- MultiStatus status = new MultiStatus(CVSProviderPlugin.ID,
- CVSStatus.COMMITTING_SYNC_INFO_FAILED,
- Policy.bind("EclipseSynchronizer.ErrorCommitting"), //$NON-NLS-1$
- null);
- for (int i = 0; i < errors.size(); i++) {
- status.merge((IStatus)errors.get(i));
- }
- return status;
- }
- return STATUS_OK;
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Broadcasts the resource state changes for the given resources to CVS Provider Plugin
- */
- void broadcastResourceStateChanges(IResource[] resources) {
- if (resources.length > 0) {
- CVSProviderPlugin.broadcastResourceStateChanges(resources);
- }
- }
-
- /**
- * Purges the cache recursively for all resources beneath the container.
- * There must not be any pending uncommitted changes.
- */
- private static void purgeCache(IContainer container, boolean deep) throws CVSException {
- if (! container.exists()) return;
- try {
- if (container.getType() != IResource.ROOT) {
- container.setSessionProperty(RESOURCE_SYNC_KEY, null);
- container.setSessionProperty(IGNORE_SYNC_KEY, null);
- container.setSessionProperty(FOLDER_SYNC_KEY, null);
- }
- if(deep) {
- IResource[] members = container.members();
- for (int i = 0; i < members.length; i++) {
- IResource resource = members[i];
- if (resource.getType() != IResource.FILE) {
- purgeCache((IContainer) resource, deep);
- }
- }
- }
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /**
- * If not already cached, loads and caches the resource sync for the children of the container.
- * Folder must exist and must not be the workspace root.
- *
- * @param container the container
- */
- private static void cacheResourceSyncForChildren(IContainer container) throws CVSException {
- try {
- // don't try to load if the information is already cached
- HashMap children = (HashMap)container.getSessionProperty(RESOURCE_SYNC_KEY);
- if (children == null) {
- // load the sync info from disk
- ResourceSyncInfo[] infos = SyncFileWriter.readAllResourceSync(container);
- if (infos != null) {
- children = new HashMap(infos.length);
- for (int i = 0; i < infos.length; i++) {
- ResourceSyncInfo syncInfo = infos[i];
- children.put(syncInfo.getName(), syncInfo);
- }
- } else {
- children = new HashMap(0);
- }
- container.setSessionProperty(RESOURCE_SYNC_KEY, children);
- }
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /**
- * Returns the resource sync info for the resource; null if none.
- * Parent must exist and must not be the workspace root.
- * The resource sync info for the children of the parent container MUST ALREADY BE CACHED.
- *
- * @param resource the resource
- * @return the resource sync info for the resource, or null
- * @see #cacheResourceSyncForChildren
- */
- private static ResourceSyncInfo getCachedResourceSync(IResource resource) throws CVSException {
- try {
- IContainer parent = resource.getParent();
- HashMap children = (HashMap)resource.getParent().getSessionProperty(RESOURCE_SYNC_KEY);
- if (children == null) {
- // There should be sync info but it was missing. Report the error
- throw new CVSException(Policy.bind("EclipseSynchronizer.folderSyncInfoMissing", parent.getFullPath().toString())); //$NON-NLS-1$
- }
- return (ResourceSyncInfo) children.get(resource.getName());
- } catch(CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /**
- * Sets the resource sync info for the resource; if null, deletes it.
- * Parent must exist and must not be the workspace root.
- * The resource sync info for the children of the parent container MUST ALREADY BE CACHED.
- *
- * @param resource the resource
- * @param info the new resource sync info
- * @see #cacheResourceSyncForChildren
- */
- private static void setCachedResourceSync(IResource resource, ResourceSyncInfo info) throws CVSException {
- try {
- IContainer parent = resource.getParent();
- HashMap children = (HashMap)parent.getSessionProperty(RESOURCE_SYNC_KEY);
- Assert.isNotNull(children);
- if (info == null) {
- children.remove(resource.getName());
- } else {
- children.put(resource.getName(), info);
- }
- } catch(CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /**
- * Returns the resource sync info for all children of the container.
- * Container must exist and must not be the workspace root.
- * The resource sync info for the children of the container MUST ALREADY BE CACHED.
- *
- * @param container the container
- * @return a collection of the resource sync info's for all children
- * @see #cacheResourceSyncForChildren
- */
- private static Collection /* of ResourceSyncInfo */ getCachedResourceSyncForChildren(IContainer container) throws CVSException {
- try {
- HashMap children = (HashMap)container.getSessionProperty(RESOURCE_SYNC_KEY);
- if (children == null) {
- // There should be sync info but it was missing. Report the error
- throw new CVSException(Policy.bind("EclipseSynchronizer.folderSyncInfoMissing", container.getFullPath().toString())); //$NON-NLS-1$
- }
- return children.values();
- } catch(CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /**
- * Deletes the resource sync info for all children of the container.
- * Container must exist and must not be the workspace root.
- * The resource sync info for the children of the container need not have previously been cached.
- *
- * @param container the container
- */
- private static void deleteCachedResourceSyncForChildren(IContainer container) throws CVSException {
- try {
- HashMap children = (HashMap)container.getSessionProperty(RESOURCE_SYNC_KEY);
- if (children != null) {
- children.clear();
- } else {
- children = new HashMap(0);
- container.setSessionProperty(RESOURCE_SYNC_KEY, children);
- }
- } catch(CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /**
- * If not already cached, loads and caches the folder sync for the container.
- * Folder must exist and must not be the workspace root.
- *
- * @param container the container
- * @return the folder sync info for the folder, or null if none.
- */
- private static FolderSyncInfo cacheFolderSync(IContainer container) throws CVSException {
- try {
- // don't try to load if the information is already cached
- FolderSyncInfo info = (FolderSyncInfo)container.getSessionProperty(FOLDER_SYNC_KEY);
- if (info == null) {
- // read folder sync info and remember it
- info = SyncFileWriter.readFolderSync(container);
- if (info == null) {
- container.setSessionProperty(FOLDER_SYNC_KEY, NULL_FOLDER_SYNC_INFO);
- } else {
- container.setSessionProperty(FOLDER_SYNC_KEY, info);
- }
- } else if (info == NULL_FOLDER_SYNC_INFO) {
- info = null;
- }
- return info;
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /**
- * Returns the folder sync info for the container; null if none.
- * Folder must exist and must not be the workspace root.
- * The folder sync info for the container MUST ALREADY BE CACHED.
- *
- * @param container the container
- * @return the folder sync info for the folder, or null if none.
- * @see #cacheFolderSync
- */
- private static FolderSyncInfo getCachedFolderSync(IContainer container) throws CVSException {
- try {
- FolderSyncInfo info = (FolderSyncInfo)container.getSessionProperty(FOLDER_SYNC_KEY);
- if (info == null) {
- // There should be sync info but it was missing. Report the error
- throw new CVSException(Policy.bind("EclipseSynchronizer.folderSyncInfoMissing", container.getFullPath().toString())); //$NON-NLS-1$
- }
- if (info == NULL_FOLDER_SYNC_INFO) return null;
- return info;
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /**
- * Sets the folder sync info for the container; if null, deletes it.
- * Folder must exist and must not be the workspace root.
- * The folder sync info for the container need not have previously been cached.
- *
- * @param container the container
- * @param info the new folder sync info
- */
- private static void setCachedFolderSync(IContainer container, FolderSyncInfo info) throws CVSException {
- try {
- if (info == null) info = NULL_FOLDER_SYNC_INFO;
- container.setSessionProperty(FOLDER_SYNC_KEY, info);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /**
- * If not already cached, loads and caches the folder ignores sync for the container.
- * Folder must exist and must not be the workspace root.
- *
- * @param container the container
- * @return the folder ignore patterns, or an empty array if none
- */
- private static String[] cacheFolderIgnores(IContainer container) throws CVSException {
- try {
- // don't try to load if the information is already cached
- String[] ignores = (String[])container.getSessionProperty(IGNORE_SYNC_KEY);
- if (ignores == null) {
- // read folder ignores and remember it
- ignores = SyncFileWriter.readCVSIgnoreEntries(container);
- if (ignores == null) ignores = NULL_IGNORES;
- container.setSessionProperty(IGNORE_SYNC_KEY, ignores);
- }
- return ignores;
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /**
- * Sets the array of folder ignore patterns for the container, must not be null.
- * Folder must exist and must not be the workspace root.
- *
- * @param container the container
- * @param ignores the array of ignore patterns
- */
- private static void setCachedFolderIgnores(IContainer container, String[] ignores) throws CVSException {
- try {
- container.setSessionProperty(IGNORE_SYNC_KEY, ignores);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /**
- * Recursively adds to the possibleIgnores list all children of the given
- * folder that can be ignored.
- *
- * @param folder the folder to be searched
- * @param possibleIgnores the list of IResources that can be ignored
- */
- private void accumulateNonManagedChildren(IContainer folder, List possibleIgnores) throws CVSException {
- try {
- cacheResourceSyncForChildren(folder);
- IResource[] children = folder.members();
- for (int i = 0; i < children.length; i++) {
- IResource child = children[i];
- if(getCachedResourceSync(child)==null) {
- possibleIgnores.add(child);
- }
- if(child.getType()!=IResource.FILE) {
- accumulateNonManagedChildren((IContainer)child, possibleIgnores);
- }
- }
- } catch(CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java
deleted file mode 100644
index cb4586f79..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java
+++ /dev/null
@@ -1,530 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.resources;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteResource;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResourceVisitor;
-import org.eclipse.team.internal.ccvs.core.ICVSRunnable;
-import org.eclipse.team.internal.ccvs.core.ILogEntry;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.client.Update;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.QuietOption;
-import org.eclipse.team.internal.ccvs.core.client.listeners.LogListener;
-import org.eclipse.team.internal.ccvs.core.connection.CVSServerException;
-import org.eclipse.team.internal.ccvs.core.syncinfo.MutableResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-/**
- * This class provides the implementation of ICVSRemoteFile and IManagedFile for
- * use by the repository and sync view.
- */
-public class RemoteFile extends RemoteResource implements ICVSRemoteFile {
-
- // Contents will be cached to disk when this thrshold is exceeded
- private static final int CACHING_THRESHOLD = 32768;
-
- // buffer for file contents received from the server
- private byte[] contents;
- // cach the log entry for the remote file
- private ILogEntry entry;
-
- /**
- * Static method which creates a file as a single child of its parent.
- * This should only be used when one is only interested in the file alone.
- *
- * The returned RemoteFile represents the base of the local resource.
- * If the local resource does not have a base, then null is returned
- * even if the resource does exists remotely (e.g. created by another party).
- */
- public static RemoteFile getBase(RemoteFolder parent, ICVSFile managed) throws CVSException {
- ResourceSyncInfo info = managed.getSyncInfo();
- if ((info == null) || info.isAdded()) {
- // Either the file is unmanaged or has just been added (i.e. doesn't necessarily have a remote)
- return null;
- }
- RemoteFile file = new RemoteFile(parent, managed.getSyncInfo());
- parent.setChildren(new ICVSRemoteResource[] {file});
- return file;
- }
-
- /**
- * Constructor for RemoteFile that should be used when nothing is know about the
- * file ahead of time.
- */
- // XXX do we need the first two constructors?
- public RemoteFile(RemoteFolder parent, int workspaceSyncState, String name, CVSTag tag) {
- this(parent, workspaceSyncState, name, "", tag); //$NON-NLS-1$
- MutableResourceSyncInfo newInfo = info.cloneMutable();
- newInfo.setAdded();
- }
-
- public RemoteFile(RemoteFolder parent, int workspaceSyncState, String name, String revision, CVSTag tag) {
- this(parent, workspaceSyncState, null);
- MutableResourceSyncInfo newInfo = new MutableResourceSyncInfo(name, revision);
- newInfo.setKeywordMode(Command.KSUBST_TEXT_EXPAND);
- newInfo.setTag(tag);
- info = newInfo;
- }
-
- public RemoteFile(RemoteFolder parent, ResourceSyncInfo info) {
- this(parent, Update.STATE_NONE, info);
- }
-
- public RemoteFile(RemoteFolder parent, int workspaceSyncState, ResourceSyncInfo newInfo) {
- this.parent = parent;
- info = newInfo;
- setWorkspaceSyncState(workspaceSyncState);
- }
-
- /**
- * @see ICVSResource#accept(IManagedVisitor)
- */
- public void accept(ICVSResourceVisitor visitor) throws CVSException {
- visitor.visitFile(this);
- }
-
- /**
- * @see ICVSRemoteFile#getContents()
- */
- public InputStream getContents(IProgressMonitor monitor) throws CVSException {
- if (contents == null) {
- // First, check to see if there's a cached contents for the file
- InputStream cached = getCachedContents();
- if (cached != null) {
- return cached;
- }
-
- // We need to fetch the contents from the server
- monitor.beginTask(Policy.bind("RemoteFile.getContents"), 100);//$NON-NLS-1$
- Session.run(getRepository(), parent, false, new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- IStatus status = Command.UPDATE.execute(
- Command.NO_GLOBAL_OPTIONS,
- new LocalOption[] {
- Update.makeTagOption(new CVSTag(info.getRevision(), CVSTag.VERSION)),
- Update.IGNORE_LOCAL_CHANGES },
- new ICVSResource[] { RemoteFile.this },
- null,
- monitor);
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSServerException(status);
- }
- }
- }, Policy.subMonitorFor(monitor, 100));
-
- // If the update succeeded but no contents were retreived from the server
- // than we can assume that the remote file has no contents.
- if (contents == null) {
- // The above is true unless there is a cache file
- cached = getCachedContents();
- if (cached != null) {
- return cached;
- } else {
- contents = new byte[0];
- }
- }
- }
- return new ByteArrayInputStream(contents);
- }
-
- /*
- * @see ICVSRemoteFile#getLogEntry(IProgressMonitor)
- */
- public ILogEntry getLogEntry(IProgressMonitor monitor) throws CVSException {
- if (entry == null) {
- Session.run(getRepository(), parent, false, new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(Policy.bind("RemoteFile.getLogEntries"), 100); //$NON-NLS-1$
- try {
- final List entries = new ArrayList();
- IStatus status = Command.LOG.execute(
- Command.NO_GLOBAL_OPTIONS,
- new LocalOption[] {
- Command.LOG.makeRevisionOption(info.getRevision())},
- new ICVSResource[] { RemoteFile.this },
- new LogListener(RemoteFile.this, entries),
- Policy.subMonitorFor(monitor, 100));
- if (entries.size() == 1) {
- entry = (ILogEntry)entries.get(0);
- }
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSServerException(status);
- }
- } finally {
- monitor.done();
- }
- }
- }, monitor);
- }
- return entry;
- }
-
- /**
- * @see ICVSRemoteFile#getLogEntries()
- */
- public ILogEntry[] getLogEntries(IProgressMonitor monitor) throws CVSException {
- final List entries = new ArrayList();
- Session.run(getRepository(), parent, false, new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(Policy.bind("RemoteFile.getLogEntries"), 100); //$NON-NLS-1$
- QuietOption quietness = CVSProviderPlugin.getPlugin().getQuietness();
- try {
- CVSProviderPlugin.getPlugin().setQuietness(Command.VERBOSE);
- IStatus status = Command.LOG.execute(Command.NO_GLOBAL_OPTIONS, Command.NO_LOCAL_OPTIONS,
- new ICVSResource[] { RemoteFile.this }, new LogListener(RemoteFile.this, entries),
- Policy.subMonitorFor(monitor, 100));
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSServerException(status);
- }
- } finally {
- CVSProviderPlugin.getPlugin().setQuietness(quietness);
- monitor.done();
- }
- }
- }, monitor);
- return (ILogEntry[])entries.toArray(new ILogEntry[entries.size()]);
- }
-
- /**
- * @see ICVSRemoteFile#getRevision()
- */
- public String getRevision() {
- return info.getRevision();
- }
-
- /*
- * Get a different revision of the remote file.
- *
- * We must also create a new parent since the child is accessed through the parent from within CVS commands.
- * Therefore, we need a new parent so that we can fecth the contents of the remote file revision
- */
- public RemoteFile toRevision(String revision) {
- RemoteFolder newParent = new RemoteFolder(null, parent.getRepository(), new Path(parent.getRepositoryRelativePath()), parent.getTag());
- RemoteFile file = new RemoteFile(newParent, getWorkspaceSyncState(), getName(), revision, CVSTag.DEFAULT);
- newParent.setChildren(new ICVSRemoteResource[] {file});
- return file;
- }
-
- /**
- * @see ICVSFile#getSize()
- */
- public long getSize() {
- if (contents == null) {
- try {
- File ioFile = getCacheFile();
- if (ioFile.exists()) {
- return ioFile.length();
- }
- } catch (IOException e) {
- // Try to purge the cache and continue
- try {
- clearCachedContents();
- } catch (IOException e2) {
- }
- CVSProviderPlugin.log(CVSException.wrapException(e).getStatus());
- }
- }
- return contents == null ? 0 : contents.length;
- }
-
- /**
- * @see ICVSFile#getSyncInfo()
- */
- public ResourceSyncInfo getSyncInfo() {
- return info;
- }
-
- /**
- * @see ICVSResource#getRemoteLocation(ICVSFolder)
- */
- public String getRemoteLocation(ICVSFolder stopSearching) throws CVSException {
- return parent.getRemoteLocation(stopSearching) + Session.SERVER_SEPARATOR + getName();
- }
-
- /**
- * Get the remote path for the receiver relative to the repository location path
- */
- public String getRepositoryRelativePath() {
- String parentPath = parent.getRepositoryRelativePath();
- return parentPath + Session.SERVER_SEPARATOR + getName();
- }
-
- /**
- * Return the server root directory for the repository
- */
- public ICVSRepositoryLocation getRepository() {
- return parent.getRepository();
- }
-
- /**
- * @see IManagedFile#setFileInfo(FileProperties)
- */
- public void setSyncInfo(ResourceSyncInfo fileInfo) {
- info = fileInfo;
- }
-
- /**
- * Set the revision for this remote file.
- *
- * @param revision to associated with this remote file
- */
- public void setRevision(String revision) {
- MutableResourceSyncInfo newInfo = getSyncInfo().cloneMutable();
- newInfo.setRevision(revision);
- info = newInfo;
- }
-
- public InputStream getContents() throws CVSException {
- if (contents == null) {
- // Check for cached contents for the file
- InputStream cached = getCachedContents();
- if (cached != null) {
- return cached;
- }
- }
- return new ByteArrayInputStream(contents == null ? new byte[0] : contents);
- }
-
- public void setContents(InputStream stream, int responseType, boolean keepLocalHistory, IProgressMonitor monitor) throws CVSException {
- try {
- try {
- byte[] buffer = new byte[1024];
- ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
- OutputStream out = byteStream;
- int read;
- try {
- try {
- while ((read = stream.read(buffer)) >= 0) {
- Policy.checkCanceled(monitor);
- out.write(buffer, 0, read);
- // Detect when the file is getting too big to keep in memory
- // and switch to a caching strategy for the contents of the file
- if (out == byteStream && byteStream.size() > CACHING_THRESHOLD) {
- // Switch streams
- byteStream.close();
- out = switchToCacheOutputStream(byteStream);
- // Continue looping until the whole file is read
- }
- }
- } finally {
- out.close();
- }
- } catch (IOException e) {
- // Make sure we don't leave the cache file around as it may not have the right contents
- if (byteStream != out) {
- clearCachedContents();
- }
- throw e;
- }
-
- // Set the contents if we didn't cache them to disk
- if (out == byteStream) {
- contents = byteStream.toByteArray();
- } else {
- contents = null;
- }
- } finally {
- stream.close();
- }
- } catch(IOException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /*
- * @see ICVSFile#setReadOnly(boolean)
- */
- public void setReadOnly(boolean readOnly) throws CVSException {
- }
-
- /*
- * @see ICVSFile#isReadOnly()
- */
- public boolean isReadOnly() throws CVSException {
- return true;
- }
-
- /*
- * @see ICVSFile#getTimeStamp()
- */
- public Date getTimeStamp() {
- return info.getTimeStamp();
- }
-
- /*
- * @see ICVSFile#setTimeStamp(Date)
- */
- public void setTimeStamp(Date date) throws CVSException {
- }
-
- public boolean isModified() throws CVSException {
- // it is safe to always consider a remote file handle as modified. This will cause any
- // CVS command to fetch new contents from the server.
- return true;
- }
-
- /**
- * @see IManagedFile#moveTo(IManagedFile)
- */
- public void copyTo(String mFile) throws CVSException, ClassCastException {
- // Do nothing
- }
-
- /*
- * @see IRemoteResource#members(IProgressMonitor)
- */
- public IRemoteResource[] members(IProgressMonitor progress) throws TeamException {
- return new IRemoteResource[0];
- }
-
- /*
- * @see IRemoteResource#isContainer()
- */
- public boolean isContainer() {
- return false;
- }
-
- /*
- * @see ICVSResource#isFolder()
- */
- public boolean isFolder() {
- return false;
- }
-
- /*
- * @see ICVSResource#tag(CVSTag, LocalOption[], IProgressMonitor)
- *
- * The revision of the remote file is used as the base for the tagging operation
- */
- public IStatus tag(final CVSTag tag, final LocalOption[] localOptions, IProgressMonitor monitor) throws CVSException {
- final IStatus[] result = new IStatus[] { null };
- Session.run(getRepository(), this.getParent(), true, new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- result[0] = Command.RTAG.execute(
- Command.NO_GLOBAL_OPTIONS,
- localOptions,
- new CVSTag(getRevision(), CVSTag.VERSION),
- tag,
- new ICVSRemoteResource[] { RemoteFile.this },
- monitor);
- }
- }, monitor);
- return result[0];
- }
-
- public boolean updateRevision(CVSTag tag, IProgressMonitor monitor) throws CVSException {
- return parent.updateRevision(this, tag, monitor);
- }
-
- public boolean equals(Object target) {
- if (this == target)
- return true;
- if (!(target instanceof RemoteFile))
- return false;
- RemoteFile remote = (RemoteFile) target;
- return super.equals(target) && remote.getRevision().equals(getRevision());
- }
-
- /*
- * Return the cache relative path for the receiver as
- * host/cvs/root/module/path/.#filename revision
- */
- private String getCacheRelativePath() {
- ICVSRepositoryLocation location = getRepository();
- IPath path = new Path(location.getHost());
- path = path.append(location.getRootDirectory());
- path = path.append(parent.getRepositoryRelativePath());
- path = path.append(getName() + ' ' + getRevision());
- return path.toString();
- }
-
- private File getCacheFile() throws IOException {
- return CVSProviderPlugin.getPlugin().getCacheFileFor(getCacheRelativePath());
- }
-
- private void clearCachedContents() throws IOException {
- try {
- File ioFile = getCacheFile();
- if (ioFile.exists()) {
- ioFile.delete();
- }
- } catch (IOException e) {
- CVSProviderPlugin.log(CVSException.wrapException(e).getStatus());
- }
- }
-
- private InputStream getCachedContents() throws CVSException {
- try {
- try {
- File ioFile = getCacheFile();
- if (ioFile.exists()) {
- return new BufferedInputStream(new FileInputStream(ioFile));
- }
- } catch (IOException e) {
- // Try to purge the cache and continue
- clearCachedContents();
- throw e;
- }
- } catch (IOException e) {
- // We will end up here if we couldn't read or delete the cache file
- throw new CVSException(new CVSStatus(IStatus.ERROR, 0, Policy.bind("RemoteFile.errorRetrievingFromCache", e.getMessage()), e));//$NON-NLS-1$
- }
- return null;
- }
-
- private OutputStream switchToCacheOutputStream(ByteArrayOutputStream byteStream) throws IOException {
- // Get the cache file and make sure it's parent exists
- File ioFile = getCacheFile();
- if ( ! ioFile.getParentFile().exists()) {
- ioFile.getParentFile().mkdirs();
- }
- // Switch streams
- OutputStream out = new BufferedOutputStream(new FileOutputStream(ioFile));
- // Write what we've read so far
- out.write(byteStream.toByteArray());
- return out;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java
deleted file mode 100644
index bdc6756d2..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java
+++ /dev/null
@@ -1,747 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.resources;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteResource;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResourceVisitor;
-import org.eclipse.team.internal.ccvs.core.ICVSRunnable;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.client.Update;
-import org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.QuietOption;
-import org.eclipse.team.internal.ccvs.core.client.listeners.IStatusListener;
-import org.eclipse.team.internal.ccvs.core.client.listeners.IUpdateMessageListener;
-import org.eclipse.team.internal.ccvs.core.client.listeners.StatusListener;
-import org.eclipse.team.internal.ccvs.core.client.listeners.UpdateListener;
-import org.eclipse.team.internal.ccvs.core.connection.CVSServerException;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Assert;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-/**
- * This class provides the implementation of ICVSRemoteFolder
- *
- * The parent of the RemoteFolder represents the folders parent in a local configuration.
- * For instance, the parent may correspond to the remote parent or may be a folder in the
- * same repository that has no physical relationship to the RemoteFolder (resulting from the use
- * of a module definition, for instance). A RemoteFolder may not have a parent, indicating that it is
- * the root of the local configuration it represents.
- *
- * A RemoteFolder has the following:
- * A name in the folder's local configuration
- *
- */
-public class RemoteFolder extends RemoteResource implements ICVSRemoteFolder, ICVSFolder {
-
- protected FolderSyncInfo folderInfo;
- private ICVSRemoteResource[] children;
- private ICVSRepositoryLocation repository;
-
- /**
- * Constructor for RemoteFolder.
- */
- public RemoteFolder(RemoteFolder parent, ICVSRepositoryLocation repository, IPath repositoryRelativePath, CVSTag tag) {
- this(parent,
- repositoryRelativePath.lastSegment() == null ? "" : repositoryRelativePath.lastSegment(), //$NON-NLS-1$
- repository,
- repositoryRelativePath,
- tag,
- false);
- }
-
- public RemoteFolder(RemoteFolder parent, String name, ICVSRepositoryLocation repository, IPath repositoryRelativePath, CVSTag tag, boolean isStatic) {
- this.info = new ResourceSyncInfo(name);
- this.parent = parent;
- this.folderInfo = new FolderSyncInfo(repositoryRelativePath.toString(), repository.getLocation(), tag, isStatic);
- this.repository = repository;
- }
-
- // Get the file revisions for the given filenames
- protected void updateFileRevisions(final ICVSFile[] files, IProgressMonitor monitor) throws CVSException {
-
- final int[] count = new int[] {0};
-
- // Create a listener for receiving the revision info
- final IStatusListener listener = new IStatusListener() {
- public void fileStatus(ICVSFolder parent, IPath path, String remoteRevision) {
- if (remoteRevision == IStatusListener.FOLDER_REVISION)
- // Ignore any folders
- return;
- try {
- ((RemoteFile)getChild(path.lastSegment())).setRevision(remoteRevision);
- count[0]++;
- } catch (CVSException e) {
- // The count will be off to indicate an error
- }
- }
- };
-
- // Perform a "cvs status..." with a listener
- QuietOption quietness = CVSProviderPlugin.getPlugin().getQuietness();
- try {
- CVSProviderPlugin.getPlugin().setQuietness(Command.VERBOSE);
- Session.run(getRepository(), this, false, new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- IStatus status = Command.STATUS.execute(
- Command.NO_GLOBAL_OPTIONS,
- Command.NO_LOCAL_OPTIONS,
- files,
- new StatusListener(listener),
- monitor);
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSServerException(status);
- }
- }
- }, monitor);
- } finally {
- CVSProviderPlugin.getPlugin().setQuietness(quietness);
- }
-
- if (count[0] != files.length)
- throw new CVSException(Policy.bind("RemoteFolder.errorFetchingRevisions")); //$NON-NLS-1$
- }
-
- /**
- * @see IManagedResource#accept(IManagedVisitor)
- */
- public void accept(ICVSResourceVisitor visitor) throws CVSException {
- visitor.visitFolder(this);
- }
-
- /*
- * @see ICVSRemoteResource#exists(IProgressMonitor)
- */
- public boolean exists(IProgressMonitor monitor) throws TeamException {
- try {
- members(monitor);
- return true;
- } catch (CVSException e) {
- if (e.getStatus().getCode() == CVSStatus.DOES_NOT_EXIST) {
- return false;
- } else {
- throw e;
- }
- }
- }
-
- /*
- * Check whether the given resource is a child of the receiver remotely
- */
- protected boolean exists(ICVSRemoteResource child, IProgressMonitor monitor) throws CVSException {
- return exists(child, getTag(), monitor);
- }
-
- /*
- * Check whether the child exists for the given tag. This additional method is required because
- * CVS will signal an error if a folder only contains subfolders when a tag is used. If we get this
- * error and we're looking for a folder, we need to reissue the command without a tag.
- */
- protected boolean exists(final ICVSRemoteResource child, CVSTag tag, IProgressMonitor monitor) throws CVSException {
- final IProgressMonitor progress = Policy.monitorFor(monitor);
- progress.beginTask(Policy.bind("RemoteFolder.exists"), 100); //$NON-NLS-1$
- try {
- // Create the listener for remote files and folders
- final boolean[] exists = new boolean[] {true};
- final IUpdateMessageListener listener = new IUpdateMessageListener() {
- public void directoryInformation(ICVSFolder parent, IPath path, boolean newDirectory) {
- exists[0] = true;
- }
- public void directoryDoesNotExist(ICVSFolder parent, IPath path) {
- exists[0] = false;
- }
- public void fileInformation(int type, ICVSFolder parent, String filename) {
- // We can't set exists true here as we may get a conflict on a deleted file.
- // i.e. remote files are always communicated to the server as modified.
- }
- public void fileDoesNotExist(ICVSFolder parent, String filename) {
- exists[0] = false;
- }
- };
-
- // Build the local options
- final List localOptions = new ArrayList();
- localOptions.add(Update.RETRIEVE_ABSENT_DIRECTORIES);
- if (tag != null && tag.getType() != CVSTag.HEAD)
- localOptions.add(Update.makeTagOption(tag));
-
- // Retrieve the children and any file revision numbers in a single connection
- // Perform a "cvs -n update -d -r tagName folderName" with custom message and error handlers
- final boolean[] retry = new boolean[] {false};
- Session.run(getRepository(), this, false, new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- IStatus status = Command.UPDATE.execute(
- new GlobalOption[] { Command.DO_NOT_CHANGE },
- (LocalOption[]) localOptions.toArray(new LocalOption[localOptions.size()]),
- new ICVSResource[] { child }, new UpdateListener(listener),
- monitor);
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- CVSServerException e = new CVSServerException(status);
- if (e.isNoTagException() && child.isContainer()) {
- retry[0] = true;
- } else {
- if (e.containsErrors()) {
- throw e;
- }
- }
- }
- }
- }, Policy.subMonitorFor(progress, 80));
-
- // We now know that this is an exception caused by a cvs bug.
- // If the folder has no files in it (just subfolders) CVS does not respond with the subfolders...
- // Workaround: Retry the request with no tag to get the directory names (if any)
- if (retry[0]) {
- Policy.checkCanceled(progress);
- return exists(child, null, Policy.subMonitorFor(progress, 20));
- }
- return exists[0];
- } finally {
- progress.done();
- }
- }
-
- /**
- * @see ICVSRemoteFolder#getMembers()
- */
- public ICVSRemoteResource[] getMembers(IProgressMonitor monitor) throws TeamException {
- return getMembers(getTag(), monitor);
- }
-
- /**
- * This method gets the members for a given tag and returns them.
- * During the execution of this method, the instance variable children
- * will be used to contain the children. However, the variable is reset
- * and the result returned. Thus, instances of RemoteFolder do not
- * persist the children. Subclasses (namely RemoteFolderTree) may
- * persist the children.
- */
- protected ICVSRemoteResource[] getMembers(final CVSTag tag, IProgressMonitor monitor) throws CVSException {
- final IProgressMonitor progress = Policy.monitorFor(monitor);
- progress.beginTask(Policy.bind("RemoteFolder.getMembers"), 100); //$NON-NLS-1$
- try {
- // Forget about any children we used to know about children
- children = null;
-
- // Create the listener for remote files and folders
- final List newRemoteDirectories = new ArrayList();
- final List newRemoteFiles = new ArrayList();
- final boolean[] exists = new boolean[] {true};
- final List exceptions = new ArrayList();
- final IUpdateMessageListener listener = new IUpdateMessageListener() {
- public void directoryInformation(ICVSFolder commandRoot, IPath path, boolean newDirectory) {
- try {
- path = getRelativePathFromRootRelativePath(commandRoot, path);
- if (newDirectory && path.segmentCount() == 1) {
- newRemoteDirectories.add(path.lastSegment());
- progress.subTask(path.lastSegment().toString());
- progress.worked(1);
- }
- } catch (CVSException e) {
- exceptions.add(e);
- }
- }
- public void directoryDoesNotExist(ICVSFolder parent, IPath path) {
- try {
- path = getRelativePathFromRootRelativePath(parent, path);
- if (path.isEmpty()) {
- // the remote folder doesn't exist
- exists[0] = false;
- }
- } catch (CVSException e) {
- exceptions.add(e);
- }
- }
- public void fileInformation(int type, ICVSFolder parent, String filename) {
- try {
- IPath filePath = new Path(filename);
- filePath = getRelativePathFromRootRelativePath(parent, filePath);
- if( filePath.segmentCount() == 1 ) {
- String properFilename = filePath.lastSegment();
- newRemoteFiles.add(properFilename);
- progress.subTask(properFilename);
- progress.worked(1);
- }
- } catch (CVSException e) {
- exceptions.add(e);
- }
- }
- public void fileDoesNotExist(ICVSFolder parent, String filename) {
- }
- };
-
- // Build the local options
- final List localOptions = new ArrayList();
- localOptions.add(Update.RETRIEVE_ABSENT_DIRECTORIES);
- if (tag != null) localOptions.add(Update.makeTagOption(tag));
-
- // Retrieve the children and any file revision numbers in a single connection
- try {
- Session.run(getRepository(), this, false, new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- // Perform a "cvs -n update -d -r tagName folderName"
- monitor.beginTask(null, 100); //$NON-NLS-1$
- IStatus status = Command.UPDATE.execute(
- new GlobalOption[] { Command.DO_NOT_CHANGE },
- (LocalOption[])localOptions.toArray(new LocalOption[localOptions.size()]),
- new ICVSResource[] { RemoteFolder.this },
- new UpdateListener(listener),
- Policy.subMonitorFor(monitor, 60));
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- // Only throw the exception if no files or folders were found
- if (newRemoteDirectories.size() + newRemoteFiles.size() == 0) {
- throw new CVSServerException(status);
- } else {
- CVSProviderPlugin.log(status);
- }
-
- }
- if (! exists[0]) {
- throw new CVSException(new CVSStatus(CVSStatus.ERROR, CVSStatus.DOES_NOT_EXIST, Policy.bind("RemoteFolder.doesNotExist", getRepositoryRelativePath()))); //$NON-NLS-1$
- }
- // Report any internal exceptions that occured fetching the members
- if ( ! exceptions.isEmpty()) {
- if (exceptions.size() == 1) {
- throw (CVSException)exceptions.get(0);
- } else {
- MultiStatus multi = new MultiStatus(CVSProviderPlugin.ID, 0, Policy.bind("RemoteFolder.errorFetchingMembers"), null); //$NON-NLS-1$
- for (int i = 0; i < exceptions.size(); i++) {
- multi.merge(((CVSException)exceptions.get(i)).getStatus());
- }
- throw new CVSException(multi);
- }
- }
- // Convert the file names to remote resources
- Policy.checkCanceled(monitor);
- List result = new ArrayList();
- List remoteFiles = new ArrayList();
- for (int i=0;i<newRemoteFiles.size();i++) {
- RemoteFile newFile = new RemoteFile(RemoteFolder.this, Update.STATE_NONE, (String)newRemoteFiles.get(i), tag);
- result.add(newFile);
- remoteFiles.add(newFile);
- }
- // Convert the folder names to remote resources
- for (int i=0;i<newRemoteDirectories.size();i++)
- result.add(new RemoteFolder(RemoteFolder.this, getRepository(), new Path(getRepositoryRelativePath()).append((String)newRemoteDirectories.get(i)), tag));
- children = (ICVSRemoteResource[])result.toArray(new ICVSRemoteResource[0]);
- // Get the revision numbers for the files
- if (remoteFiles.size() > 0) {
- updateFileRevisions((ICVSFile[])remoteFiles.toArray(new ICVSFile[remoteFiles.size()]),
- Policy.subMonitorFor(monitor, 40));
- } else {
- monitor.worked(40);
- }
- }
- }, Policy.subMonitorFor(progress, 80));
- } catch (CVSServerException e) {
- if ( ! e.isNoTagException() && e.containsErrors())
- throw e;
- if (tag == null)
- throw e;
- // we now know that this is an exception caused by a cvs bug.
- // if the folder has no files in it (just subfolders) cvs does not respond with the subfolders...
- // workaround: retry the request with no tag to get the directory names (if any)
- Policy.checkCanceled(progress);
- children = getMembers(null, Policy.subMonitorFor(progress, 20));
- // the returned children must be given the original tag
- for (int i = 0; i < children.length; i++) {
- ICVSRemoteResource remoteResource = children[i];
- if(remoteResource.isContainer()) {
- ((RemoteFolder)remoteResource).setTag(tag);
- }
- }
- }
-
- // We need to remember the children that were fetched in order to support file
- // operations that depend on the parent knowing about the child (i.e. RemoteFile#getContents)
- return children;
- } finally {
- progress.done();
- }
- }
-
- /**
- * @see ICVSFolder#members(int)
- */
- public ICVSResource[] members(int flags) throws CVSException {
- final List result = new ArrayList();
- ICVSRemoteResource[] resources = getChildren();
- if (children == null) {
- return new ICVSResource[0];
- }
- boolean includeFiles = (((flags & FILE_MEMBERS) != 0) || ((flags & (FILE_MEMBERS | FOLDER_MEMBERS)) == 0));
- boolean includeFolders = (((flags & FOLDER_MEMBERS) != 0) || ((flags & (FILE_MEMBERS | FOLDER_MEMBERS)) == 0));
- boolean includeManaged = (((flags & MANAGED_MEMBERS) != 0) || ((flags & (MANAGED_MEMBERS | UNMANAGED_MEMBERS | IGNORED_MEMBERS)) == 0));
- boolean includeUnmanaged = (((flags & UNMANAGED_MEMBERS) != 0) || ((flags & (MANAGED_MEMBERS | UNMANAGED_MEMBERS | IGNORED_MEMBERS)) == 0));
- boolean includeIgnored = ((flags & IGNORED_MEMBERS) != 0);
- for (int i = 0; i < resources.length; i++) {
- ICVSResource cvsResource = resources[i];
- if ((includeFiles && ( ! cvsResource.isFolder()))
- || (includeFolders && (cvsResource.isFolder()))) {
- boolean isManaged = cvsResource.isManaged();
- boolean isIgnored = cvsResource.isIgnored();
- if ((isManaged && includeManaged)|| (isIgnored && includeIgnored)
- || ( ! isManaged && ! isIgnored && includeUnmanaged)) {
- result.add(cvsResource);
- }
-
- }
- }
- return (ICVSResource[]) result.toArray(new ICVSResource[result.size()]);
- }
-
- /**
- * @see ICVSFolder#getFolder(String)
- */
- public ICVSFolder getFolder(String name) throws CVSException {
- if (name.equals(Session.CURRENT_LOCAL_FOLDER) || name.equals(Session.CURRENT_LOCAL_FOLDER + Session.SERVER_SEPARATOR))
- return this;
- ICVSResource child = getChild(name);
- if (child.isFolder())
- return (ICVSFolder)child;
- throw new CVSException(Policy.bind("RemoteFolder.invalidChild", name, getName())); //$NON-NLS-1$
- }
-
- /**
- * @see ICVSFolder#getFile(String)
- */
- public ICVSFile getFile(String name) throws CVSException {
- ICVSResource child = getChild(name);
- if (!child.isFolder())
- return (ICVSFile)child;
- throw new CVSException(Policy.bind("RemoteFolder.invalidChild", name, getName())); //$NON-NLS-1$
-
- }
-
- public LocalOption[] getLocalOptions() {
- return Command.NO_LOCAL_OPTIONS;
- }
-
- public String getRepositoryRelativePath() {
- // The REPOSITORY property of the folder info is the repository relative path
- return getFolderSyncInfo().getRepository();
- }
-
- /**
- * @see ICVSResource#getRelativePath(ICVSFolder)
- */
- public String getRelativePath(ICVSFolder ancestor) throws CVSException {
- // Check to see if the receiver is the ancestor
- if (ancestor == this) return Session.CURRENT_LOCAL_FOLDER;
- // Otherwise, we need a parent to continue
- if (parent == null) {
- throw new CVSException(Policy.bind("RemoteFolder.invalidChild", getName(), ancestor.getName())); //$NON-NLS-1$
- }
- return super.getRelativePath(ancestor);
- }
-
- public ICVSRepositoryLocation getRepository() {
- return repository;
- }
-
- /**
- * @see ICVSRemoteFolder#isExpandable()
- */
- public boolean isExpandable() {
- return true;
- }
-
- /**
- * @see ICVSResource#isFolder()
- */
- public boolean isFolder() {
- return true;
- }
-
- /**
- * @see ICVSFolder#childExists(String)
- */
- public boolean childExists(String path) {
- try {
- return getChild(path) != null;
- } catch (CVSException e) {
- return false;
- }
- }
-
- /**
- * @see ICVSFolder#getChild(String)
- *
- * XXX: shouldn't this consider the case where children is null. Maybe
- * by running the update + status with only one member?
- *
- * XXX: The only problem with the above is that this is not supposed to be a long
- * running method. Also, path could be a file or folder and can be more than one level.
- *
- * This getChild is geared to work with the Command hierarchy. Therefore it only returns
- * children that were previously fetched by a call to getMembers(). If the request child
- * does not exist, an exception is thrown.
- */
- public ICVSResource getChild(String path) throws CVSException {
- if (path.equals(Session.CURRENT_LOCAL_FOLDER) || path.length() == 0)
- return this;
- ICVSRemoteResource[] children = getChildren();
- if (children == null)
- throw new CVSException(Policy.bind("RemoteFolder.invalidChild", path, getName()));//$NON-NLS-1$
- if (path.indexOf(Session.SERVER_SEPARATOR) == -1) {
- for (int i=0;i<children.length;i++) {
- if (children[i].getName().equals(path))
- return (ICVSResource)children[i];
- }
- } else {
- IPath p = new Path(path);
- try {
- return ((RemoteFolder)getChild(p.segment(0))).getChild(p.removeFirstSegments(1).toString());
- } catch (CVSException e) {
- // regenerate the exception to give as much info as possible
- throw new CVSException(Policy.bind("RemoteFolder.invalidChild", path, getName()));//$NON-NLS-1$
- }
- }
- throw new CVSException(Policy.bind("RemoteFolder.invalidChild", path, getName()));//$NON-NLS-1$
- }
-
- /**
- * @see ICVSFolder#mkdir()
- */
- public void mkdir() throws CVSException {
- throw new CVSException(Policy.bind("RemoteResource.invalidOperation"));//$NON-NLS-1$
- }
-
- /**
- * @see ICVSFolder#flush(boolean)
- */
- public void flush(boolean deep) {
- }
-
- /**
- * @see ICVSFolder#getFolderInfo()
- */
- public FolderSyncInfo getFolderSyncInfo() {
- return folderInfo;
- }
-
- /**
- * @see ICVSResource#getRemoteLocation(ICVSFolder)
- */
- public String getRemoteLocation(ICVSFolder stopSearching) throws CVSException {
- return folderInfo.getRemoteLocation();
- }
-
- /**
- * @see ICVSFolder#isCVSFolder()
- */
- public boolean isCVSFolder() {
- return true;
- }
-
- /**
- * @see ICVSFolder#acceptChildren(ICVSResourceVisitor)
- */
- public void acceptChildren(ICVSResourceVisitor visitor) throws CVSException {
- throw new CVSException(Policy.bind("RemoteResource.invalidOperation"));//$NON-NLS-1$
- }
-
- /*
- * @see IRemoteResource#isContainer()
- */
- public boolean isContainer() {
- return true;
- }
-
- /*
- * @see IRemoteResource#members(IProgressMonitor)
- */
- public IRemoteResource[] members(IProgressMonitor progress) throws TeamException {
- return getMembers(progress);
- }
-
- /*
- * @see IRemoteResource#getContents(IProgressMonitor)
- */
- public InputStream getContents(IProgressMonitor progress) throws TeamException {
- return null;
- }
-
- /*
- * Answers the immediate cached children of this remote folder or null if the remote folder
- * handle has not yet queried the server for the its children.
- */
- public ICVSRemoteResource[] getChildren() {
- return children;
- }
- /*
- * This allows subclass to set the children
- */
- protected void setChildren(ICVSRemoteResource[] children) {
- this.children = children;
- }
- /*
- * @see ICVSRemoteFolder#setTag(String)
- */
- public void setTag(CVSTag tag) {
- this.folderInfo = new FolderSyncInfo(folderInfo.getRepository(), folderInfo.getRoot(), tag, folderInfo.getIsStatic());
- }
-
- /*
- * @see ICVSRemoteFolder#getTag()
- */
- public CVSTag getTag() {
- return folderInfo.getTag();
- }
- /*
- * @see ICVSFolder#setFolderInfo(FolderSyncInfo)
- */
- public void setFolderSyncInfo(FolderSyncInfo folderInfo) throws CVSException {
- this.folderInfo = folderInfo;
- // XXX temporary to see if this ever occurs
- throw new CVSException(Policy.bind("RemoteResource.invalidOperation"));//$NON-NLS-1$
- }
-
- /**
- * Update the file revision for the given child such that the revision is the one in the given branch.
- * Return true if the file exists and false otherwise
- */
- protected boolean updateRevision(final ICVSRemoteFile child, CVSTag tag, IProgressMonitor monitor) throws CVSException {
- final IProgressMonitor progress = Policy.monitorFor(monitor);
- progress.beginTask(null, 100); //$NON-NLS-1$
- ICVSRemoteResource[] oldChildren = children;
- try {
- children = new ICVSRemoteResource[] {child};
-
- // Create the listener for remote files and folders
- final boolean[] exists = new boolean[] {true};
- final IUpdateMessageListener listener = new IUpdateMessageListener() {
- public void directoryInformation(ICVSFolder parent, IPath path, boolean newDirectory) {
- }
- public void directoryDoesNotExist(ICVSFolder parent, IPath path) {
- // If we get this, we can assume that the parent directory no longer exists
- exists[0] = false;
- }
- public void fileInformation(int type, ICVSFolder parent, String filename) {
- // The file was found and has a different revision
- try {
- ((RemoteFile)parent.getChild(filename)).setWorkspaceSyncState(type);
- } catch(CVSException e) {
- exists[0] = false;
- }
- exists[0] = true;
- }
- public void fileDoesNotExist(ICVSFolder parent, String filename) {
- exists[0] = false;
- }
- };
-
- // Build the local options
- final List localOptions = new ArrayList();
- if (tag != null && tag.getType() != CVSTag.HEAD)
- localOptions.add(Update.makeTagOption(tag));
-
- // Retrieve the children and any file revision numbers in a single connection
- Session.run(getRepository(), this, false, new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- // Perform a "cvs -n update -d -r tagName fileName" with custom message and error handlers
- Command.UPDATE.execute(
- new GlobalOption[] { Command.DO_NOT_CHANGE },
- (LocalOption[]) localOptions.toArray(new LocalOption[localOptions.size()]),
- new ICVSResource[] { child },
- new UpdateListener(listener),
- monitor);
- }
- }, Policy.subMonitorFor(progress, 70));
-
- if (!exists[0]) return false;
- updateFileRevisions(new ICVSFile[] {child}, Policy.subMonitorFor(progress, 30));
- return true;
- } finally {
- children = oldChildren;
- }
- }
-
- /*
- * @see ICVSFolder#run(ICVSRunnable, IProgressMonitor)
- */
- public void run(ICVSRunnable job, IProgressMonitor monitor) throws CVSException {
- job.run(monitor);
- }
-
- /*
- * @see ICVSFolder#tag(CVSTag, LocalOption[], IProgressMonitor)
- */
- public IStatus tag(final CVSTag tag, final LocalOption[] localOptions, IProgressMonitor monitor) throws CVSException {
- final IStatus[] result = new IStatus[] { null };
- Session.run(getRepository(), this, true, new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- result[0] = Command.RTAG.execute(
- Command.NO_GLOBAL_OPTIONS,
- localOptions,
- folderInfo.getTag(),
- tag,
- new ICVSRemoteResource[] { RemoteFolder.this },
- monitor);
- }
- }, monitor);
- return result[0];
- }
-
- /**
- * @see ICVSFolder#fetchChildren(IProgressMonitor)
- */
- public ICVSResource[] fetchChildren(IProgressMonitor monitor) throws CVSException {
- try {
- return getMembers(monitor);
- } catch(TeamException e) {
- throw new CVSException(e.getStatus());
- }
- }
-
- public boolean equals(Object target) {
- if ( ! super.equals(target)) return false;
- RemoteFolder folder = (RemoteFolder)target;
- CVSTag tag1 = getTag();
- CVSTag tag2 = folder.getTag();
- if (tag1 == null) tag1 = CVSTag.DEFAULT;
- if (tag2 == null) tag2 = CVSTag.DEFAULT;
- return tag1.equals(tag2);
- }
-
- /*
- * The given root must be an ancestor of the receiver (or the receiver)
- * and the path of the receiver must be a prefix of the provided path.
- */
- protected IPath getRelativePathFromRootRelativePath(ICVSFolder root, IPath path) throws CVSException {
- // If the root is the receiver, then the path is already relative to the receiver
- if (root == this) {
- return path;
- }
- Assert.isTrue( ! path.isEmpty());
- return getRelativePathFromRootRelativePath((ICVSFolder)root.getChild(path.segment(0)), path.removeFirstSegments(1));
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTree.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTree.java
deleted file mode 100644
index e784c3e3e..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTree.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.resources;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResourceVisitor;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-/**
- * Whereas the RemoteFolder class provides access to a remote hierarchy using
- * lazy retrieval via <code>getMembers()</code>, the RemoteFolderTree will force
- * a recursive retrieval of the remote hierarchy in one round trip.
- */
-public class RemoteFolderTree extends RemoteFolder {
-
- public RemoteFolderTree(RemoteFolder parent, ICVSRepositoryLocation repository, IPath repositoryRelativePath, CVSTag tag) {
- super(parent, repository, repositoryRelativePath, tag);
- }
-
- public RemoteFolderTree(RemoteFolder parent, String name, ICVSRepositoryLocation repository, IPath repositoryRelativePath, CVSTag tag) {
- super(parent, name, repository, repositoryRelativePath, tag, false);
- }
-
- /*
- * Override of inherited method which persists the children
- */
- public ICVSRemoteResource[] getMembers(CVSTag tagName, IProgressMonitor monitor) throws CVSException {
- if (getChildren() == null)
- setChildren(super.getMembers(tagName, monitor));
- return getChildren();
- }
-
- /*
- * This method is public to allow access by the RemoteFolderTreeBuilder utility class.
- * No other external classes should use this method.
- */
- public void setChildren(ICVSRemoteResource[] children) {
- super.setChildren(children);
- }
-
- /*
- * @see ICVSFolder#acceptChildren(ICVSResourceVisitor)
- */
- public void acceptChildren(ICVSResourceVisitor visitor) throws CVSException {
- ICVSRemoteResource[] children = getChildren();
- if (children == null) return;
- for (int i=0; i<children.length; i++) {
- ((ICVSResource)children[i]).accept(visitor);
- }
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTreeBuilder.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTreeBuilder.java
deleted file mode 100644
index 89e8d193f..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTreeBuilder.java
+++ /dev/null
@@ -1,734 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.resources;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.client.Update;
-import org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.QuietOption;
-import org.eclipse.team.internal.ccvs.core.client.listeners.IStatusListener;
-import org.eclipse.team.internal.ccvs.core.client.listeners.IUpdateMessageListener;
-import org.eclipse.team.internal.ccvs.core.client.listeners.StatusListener;
-import org.eclipse.team.internal.ccvs.core.client.listeners.UpdateListener;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.connection.CVSServerException;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.MutableResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-/*
- * This class is responsible for building a remote tree that shows the repository
- * state of a locally loaded folder tree.
- *
- * It is used as follows
- *
- * RemoteFolderTreeBuilder.buildRemoteTree(CVSRepositoryLocation, IManagedFolder, String, IProgressMonitor);
- *
- * The provider IManagedFolder can be a local resource or a RemoteFolderTree that
- * that was previously built.
- */
-public class RemoteFolderTreeBuilder {
-
- private static final int MAX_REVISION_FETCHES_PER_CONNECTION = 1024;
-
- private Map fileDeltas;
- private List changedFiles;
- private Map remoteFolderTable;
-
- private ICVSFolder root;
- private RemoteFolderTree remoteRoot;
- private CVSRepositoryLocation repository;
-
- private CVSTag tag;
-
- private LocalOption[] updateLocalOptions;
-
- private boolean projectDoesNotExist = false;
-
- private static String UNKNOWN = ""; //$NON-NLS-1$
- private static String DELETED = "DELETED"; //$NON-NLS-1$
- private static String ADDED = "ADDED"; //$NON-NLS-1$
- private static String FOLDER = "FOLDER"; //$NON-NLS-1$
-
- private static Map EMPTY_MAP = new HashMap();
-
- static class DeltaNode {
- int syncState = Update.STATE_NONE;
- String name;
- String revision;
-
- DeltaNode(String name, String revision, int syncState) {
- this.name = name;
- this.revision = revision;
- this.syncState = syncState;
- }
-
- String getName() {
- return name;
- }
-
- String getRevision() {
- return revision;
- }
-
- int getSyncState() {
- return syncState;
- }
- }
-
-
- private RemoteFolderTreeBuilder(CVSRepositoryLocation repository, ICVSFolder root, CVSTag tag) {
- this.repository = repository;
- this.root = root;
- this.tag = tag;
- this.fileDeltas = new HashMap();
- this.changedFiles = new ArrayList();
- this.remoteFolderTable = new HashMap();
-
- // Build the local options
- List localOptions = new ArrayList();
- localOptions.add(Update.RETRIEVE_ABSENT_DIRECTORIES);
- if (tag != null) {
- if (tag.getType() == CVSTag.HEAD) {
- localOptions.add(Update.CLEAR_STICKY);
- } else {
- localOptions.add(Update.makeTagOption(tag));
- }
- }
- updateLocalOptions = (LocalOption[])localOptions.toArray(new LocalOption[localOptions.size()]);
- }
-
- private LocalOption[] getOptionsWithoutTag() {
- // Build the local options
- List localOptions = new ArrayList();
- localOptions.add(Update.RETRIEVE_ABSENT_DIRECTORIES);
- return (LocalOption[])localOptions.toArray(new LocalOption[localOptions.size()]);
- }
-
- public static RemoteFolderTree buildBaseTree(CVSRepositoryLocation repository, ICVSFolder root, CVSTag tag, IProgressMonitor progress) throws CVSException {
- try {
- RemoteFolderTreeBuilder builder = new RemoteFolderTreeBuilder(repository, root, tag);
- progress.beginTask(null, 100);
- IProgressMonitor subProgress = Policy.infiniteSubMonitorFor(progress, 100);
- subProgress.beginTask(null, 512); //$NON-NLS-1$
- subProgress.subTask(Policy.bind("RemoteFolderTreeBuilder.buildingBase", root.getName())); //$NON-NLS-1$
- return builder.buildBaseTree(null, root, subProgress);
- } finally {
- progress.done();
- }
- }
-
- public static RemoteFolderTree buildRemoteTree(CVSRepositoryLocation repository, IContainer root, CVSTag tag, IProgressMonitor monitor) throws CVSException {
- return buildRemoteTree(repository, CVSWorkspaceRoot.getCVSFolderFor(root), tag, monitor);
- }
-
- public static RemoteFolderTree buildRemoteTree(CVSRepositoryLocation repository, ICVSFolder root, CVSTag tag, IProgressMonitor monitor) throws CVSException {
- RemoteFolderTreeBuilder builder = new RemoteFolderTreeBuilder(repository, root, tag);
- return builder.buildTree(new ICVSResource[] { root }, monitor);
- }
- public static RemoteFile buildRemoteTree(CVSRepositoryLocation repository, ICVSFile file, CVSTag tag, IProgressMonitor monitor) throws CVSException {
- RemoteFolderTreeBuilder builder = new RemoteFolderTreeBuilder(repository, file.getParent(), tag);
- return builder.buildTree(file, monitor);
- }
-
- /*
- * The provided resources must all be children of the same project
- */
- public static RemoteFolderTree buildRemoteTree(CVSRepositoryLocation repository, ICVSFolder root, ICVSResource[] resources, CVSTag tag, IProgressMonitor monitor) throws CVSException {
- if (resources.length == 0) {
- resources = new ICVSResource[] { root };
- }
- RemoteFolderTreeBuilder builder = new RemoteFolderTreeBuilder(repository, root, tag);
- return builder.buildTree(resources, monitor);
- }
-
- private RemoteFolderTree buildTree(ICVSResource[] resources, IProgressMonitor monitor) throws CVSException {
-
- // Make sure that the cvs commands are not quiet during this operations
- QuietOption quietness = CVSProviderPlugin.getPlugin().getQuietness();
- try {
- CVSProviderPlugin.getPlugin().setQuietness(Command.VERBOSE);
-
- monitor.beginTask(null, 100);
-
- // Get the arguments from the files
- ArrayList arguments = new ArrayList();
- for (int i = 0; i < resources.length; i++) {
- ICVSResource resource = resources[i];
- arguments.add(resource.getRelativePath(root));
- }
-
- Policy.checkCanceled(monitor);
- Session session = new Session(repository, root, false);
- session.open(Policy.subMonitorFor(monitor, 10));
- try {
- Policy.checkCanceled(monitor);
- fetchDelta(session, (String[]) arguments.toArray(new String[arguments.size()]), Policy.subMonitorFor(monitor, 50));
- if (projectDoesNotExist) {
- // We cannot handle the case where a project (i.e. the top-most CVS folder)
- // has been deleted directly on the sever (i.e. deleted using rm -rf)
- if (root.isCVSFolder() && ! root.isManaged()) {
- throw new CVSException(Policy.bind("RemoteFolderTreeBuild.folderDeletedFromServer", root.getFolderSyncInfo().getRepository())); //$NON-NLS-1$
- } else {
- return null;
- }
- }
- } finally {
- session.close();
- }
- // We need a second session because of the use of a different handle on the same remote resource
- // Perhaps we could support the changing of a sessions root as long as
- // the folder sync info is the same
- remoteRoot =
- new RemoteFolderTree(null, root.getName(), repository,
- new Path(root.getFolderSyncInfo().getRepository()),
- tagForRemoteFolder(root, tag));
- session = new Session(repository, remoteRoot, false);
- session.open(Policy.subMonitorFor(monitor, 10));
- try {
- // Set up an infinite progress monitor for the recursive build
- IProgressMonitor subProgress = Policy.infiniteSubMonitorFor(monitor, 30);
- subProgress.beginTask(null, 512);
- // Build the remote tree
- buildRemoteTree(session, root, remoteRoot, Path.EMPTY, subProgress);
- // we can only fecth the status for up to 1024 files in a single connection due to
- // the server which has a limit on the number of "open" files.
- if (!changedFiles.isEmpty() && changedFiles.size() <= MAX_REVISION_FETCHES_PER_CONNECTION) {
- fetchFileRevisions(session, (String[])changedFiles.toArray(new String[changedFiles.size()]), Policy.subMonitorFor(monitor, 20));
- }
- } finally {
- session.close();
- }
-
- // If there were more than 1024 changed files, we need a connection per each 1024
- if (!changedFiles.isEmpty() && changedFiles.size() > MAX_REVISION_FETCHES_PER_CONNECTION) {
- String[] allChangedFiles = (String[])changedFiles.toArray(new String[changedFiles.size()]);
- int iterations = (allChangedFiles.length / MAX_REVISION_FETCHES_PER_CONNECTION)
- + (allChangedFiles.length % MAX_REVISION_FETCHES_PER_CONNECTION == 0 ? 0 : 1);
- for (int i = 0; i < iterations ; i++) {
- int length = Math.min(MAX_REVISION_FETCHES_PER_CONNECTION,
- allChangedFiles.length - (MAX_REVISION_FETCHES_PER_CONNECTION * i));
- String buffer[] = new String[length];
- System.arraycopy(allChangedFiles, i * MAX_REVISION_FETCHES_PER_CONNECTION, buffer, 0, length);
- session = new Session(repository, remoteRoot, false);
- session.open(Policy.subMonitorFor(monitor, 1));
- try {
- fetchFileRevisions(session, buffer, Policy.subMonitorFor(monitor, 2));
- } finally {
- session.close();
- }
- }
- }
-
- return remoteRoot;
-
- } finally {
- CVSProviderPlugin.getPlugin().setQuietness(quietness);
- monitor.done();
- }
- }
- private RemoteFile buildTree(ICVSFile file, IProgressMonitor monitor) throws CVSException {
- QuietOption quietness = CVSProviderPlugin.getPlugin().getQuietness();
- try {
- CVSProviderPlugin.getPlugin().setQuietness(Command.VERBOSE);
-
- monitor.beginTask(null, 100);
-
- // Query the server to see if there is a delta available
- Policy.checkCanceled(monitor);
- Session session = new Session(repository, root, false);
- session.open(Policy.subMonitorFor(monitor, 10));
- try {
- Policy.checkCanceled(monitor);
- fetchDelta(session, new String[] { file.getName() }, Policy.subMonitorFor(monitor, 50));
- if (projectDoesNotExist) {
- return null;
- }
- } finally {
- session.close();
- }
- // Create a parent for the remote resource
- remoteRoot =
- new RemoteFolderTree(null, root.getName(), repository,
- new Path(root.getFolderSyncInfo().getRepository()),
- tagForRemoteFolder(root, tag));
- // Create the remote resource (using the delta if there is one)
- RemoteFile remoteFile;
- Map deltas = (Map)fileDeltas.get(Path.EMPTY);
- if (deltas == null || deltas.isEmpty()) {
- // If the file is an addition, return null as the remote
- // Note: If there was a conflicting addition, the delta would not be empty
- if ( ! file.isManaged() || file.getSyncInfo().isAdded()) {
- return null;
- }
- remoteFile = new RemoteFile(remoteRoot, file.getSyncInfo());
- } else {
- DeltaNode d = (DeltaNode)deltas.get(file.getName());
- if (d.getRevision() == DELETED) {
- return null;
- }
- remoteFile = new RemoteFile(remoteRoot, d.getSyncState(), file.getName(), tagForRemoteFolder(remoteRoot, tag));
- }
- // Add the resource to its parent
- remoteRoot.setChildren(new ICVSRemoteResource[] {remoteFile});
- // If there was a delta, ftech the new revision
- if (!changedFiles.isEmpty()) {
- // Add the remote folder to the remote folder lookup table (used to update file revisions)
- remoteFolderTable.put(new Path(remoteRoot.getFolderSyncInfo().getRemoteLocation()), remoteRoot);
- session = new Session(repository, remoteRoot, false);
- session.open(Policy.subMonitorFor(monitor, 10));
- try {
- fetchFileRevisions(session, (String[])changedFiles.toArray(new String[changedFiles.size()]), Policy.subMonitorFor(monitor, 20));
- } finally {
- session.close();
- }
- }
- return remoteFile;
-
- } finally {
- CVSProviderPlugin.getPlugin().setQuietness(quietness);
- monitor.done();
- }
- }
-
- /*
- * Build the base remote tree from the local tree.
- *
- * The localPath is used to retrieve deltas from the recorded deltas
- *
- * Does 1 work for each managed file and folder
- */
- private RemoteFolderTree buildBaseTree(RemoteFolderTree parent, ICVSFolder local, IProgressMonitor monitor) throws CVSException {
-
- Policy.checkCanceled(monitor);
-
- // Create a remote folder tree corresponding to the local resource
- RemoteFolderTree remote = new RemoteFolderTree(parent, local.getName(), repository, new Path(local.getFolderSyncInfo().getRepository()), local.getFolderSyncInfo().getTag());
-
- // Create a List to contain the created children
- List children = new ArrayList();
-
- // Build the child folders corresponding to local folders base
- ICVSResource[] folders = local.members(ICVSFolder.FOLDER_MEMBERS);
- for (int i=0;i<folders.length;i++) {
- ICVSFolder folder = (ICVSFolder)folders[i];
- if (folder.isManaged() && folder.isCVSFolder()) {
- monitor.worked(1);
- children.add(buildBaseTree(remote, folder, monitor));
- }
- }
-
- // Build the child files corresponding to local files base
- ICVSResource[] files = local.members(ICVSFolder.FILE_MEMBERS);
- for (int i=0;i<files.length;i++) {
- ICVSFile file = (ICVSFile)files[i];
- ResourceSyncInfo info = file.getSyncInfo();
- // if there is no sync info then there is no base
- if (info==null)
- continue;
- // There is no remote if the file was added
- if (info.isAdded())
- continue;
- // If the file was deleted locally, we need to generate a new sync info without the delete flag
- if (info.isDeleted()) {
- MutableResourceSyncInfo undeletedInfo = info.cloneMutable();
- undeletedInfo.setDeleted(false);
- info = undeletedInfo;
- }
- children.add(new RemoteFile(remote, info));
- monitor.worked(1);
- }
-
- // Add the children to the remote folder tree
- remote.setChildren((ICVSRemoteResource[])children.toArray(new ICVSRemoteResource[children.size()]));
-
- return remote;
- }
-
- /*
- * Build the remote tree from the local tree and the recorded deltas.
- *
- * The localPath is used to retrieve deltas from the recorded deltas
- *
- * Does 1 work for each file and folder delta processed
- */
- private void buildRemoteTree(Session session, ICVSFolder local, RemoteFolderTree remote, IPath localPath, IProgressMonitor monitor) throws CVSException {
-
- Policy.checkCanceled(monitor);
-
- // Add the remote folder to the remote folder lookup table (used to update file revisions)
- remoteFolderTable.put(new Path(remote.getFolderSyncInfo().getRemoteLocation()), remote);
-
- // Create a map to contain the created children
- Map children = new HashMap();
-
- // If there's no corresponding local resource then we need to fetch its contents in order to populate the deltas
- if (local == null) {
- fetchNewDirectory(session, remote, localPath, monitor);
- }
-
- // Fetch the delta's for the folder
- Map deltas = (Map)fileDeltas.get(localPath);
- if (deltas == null)
- deltas = EMPTY_MAP;
-
- // If there is a local, use the local children to start buidling the remote children
- if (local != null) {
- // Build the child folders corresponding to local folders
- ICVSResource[] folders = local.members(ICVSFolder.FOLDER_MEMBERS);
- for (int i=0;i<folders.length;i++) {
- ICVSFolder folder = (ICVSFolder)folders[i];
- DeltaNode d = (DeltaNode)deltas.get(folder.getName());
- if (folder.isCVSFolder() && ! isOrphanedSubtree(session, folder) && (d==null || d.getRevision() != DELETED)) {
- children.put(folders[i].getName(),
- new RemoteFolderTree(remote, folders[i].getName(), repository,
- new Path(folder.getFolderSyncInfo().getRepository()),
- tagForRemoteFolder(folder,tag)));
- }
- }
- // Build the child files corresponding to local files
- ICVSResource[] files = local.members(ICVSFolder.FILE_MEMBERS);
- for (int i=0;i<files.length;i++) {
- ICVSFile file = (ICVSFile)files[i];
-
- DeltaNode d = (DeltaNode)deltas.get(file.getName());
- ResourceSyncInfo info = file.getSyncInfo();
- // if there is no sync info then there isn't a remote file for this local file on the
- // server.
- if (info==null)
- continue;
- // There is no remote if the file was added and we didn't get a conflict (C) indicator from the server
- if (info.isAdded() && d==null)
- continue;
- // There is no remote if the file was deleted and we didn;t get a remove (R) indicator from the server
- if (info.isDeleted() && d==null)
- continue;
-
- int type = d==null ? Update.STATE_NONE : d.getSyncState();
- children.put(file.getName(), new RemoteFile(remote, type, info));
- }
- }
-
- // Build the children for new or out-of-date resources from the deltas
- Iterator i = deltas.keySet().iterator();
- while (i.hasNext()) {
- String name = (String)i.next();
- DeltaNode d = (DeltaNode)deltas.get(name);
- String revision = d.getRevision();
- if (revision == FOLDER) {
- // XXX should getRemotePath() return an IPath instead of a String?
- children.put(name, new RemoteFolderTree(remote, repository,
- new Path(remote.getRepositoryRelativePath()).append(name),
- tagForRemoteFolder(remote, tag)));
- } else if (revision == ADDED) {
- children.put(name, new RemoteFile(remote, d.getSyncState(), name, tagForRemoteFolder(remote, tag)));
- } else if (revision == UNKNOWN) {
- // The local resource is out of sync with the remote.
- // Create a RemoteFile associated with the tag so we are assured of getting the proper revision
- // (Note: this will replace the RemoteFile added from the local base)
- children.put(name, new RemoteFile(remote, d.getSyncState(), name, tagForRemoteFolder(remote, tag)));
- } else if (revision == DELETED) {
- // This should have been deleted while creating from the local resources.
- // If it wasn't, delete it now.
- if (children.containsKey(name))
- children.remove(name);
- } else {
- // We should never get here
- }
- monitor.worked(1);
- }
-
- // Add the children to the remote folder tree
- remote.setChildren((ICVSRemoteResource[])children.values().toArray(new ICVSRemoteResource[children.size()]));
-
- // We have to delay building the child folders to support the proper fetching of new directories
- // due to the fact that the same CVS home directory (i.e. the same root directory) must
- // be used for all requests sent over the same connection
- Iterator childIterator = children.entrySet().iterator();
- List emptyChildren = new ArrayList();
- while (childIterator.hasNext()) {
- Map.Entry entry = (Map.Entry)childIterator.next();
- if (((RemoteResource)entry.getValue()).isFolder()) {
- RemoteFolderTree remoteFolder = (RemoteFolderTree)entry.getValue();
- String name = (String)entry.getKey();
- ICVSFolder localFolder;
- DeltaNode d = (DeltaNode)deltas.get(name);
- // for directories that are new on the server
- if (d!=null && d.getRevision() == FOLDER)
- localFolder = null;
- else
- localFolder = local.getFolder(name);
- buildRemoteTree(session, localFolder, remoteFolder, localPath.append(name), monitor);
- // Record any children that are empty
- if (pruneEmptyDirectories() && remoteFolder.getChildren().length == 0) {
- // Prune if the local folder is also empty.
- if (localFolder == null || (localFolder.members(ICVSFolder.ALL_MEMBERS).length == 0))
- emptyChildren.add(remoteFolder);
- else {
- // Also prune if the tag we are fetching is not HEAD and differs from the tag of the local folder
- FolderSyncInfo info = localFolder.getFolderSyncInfo();
- if (tag != null && info != null && ! tag.equals(CVSTag.DEFAULT) && ! tag.equals(info.getTag()))
- emptyChildren.add(remoteFolder);
- }
- }
- }
- }
-
- // Prune any empty child folders
- if (pruneEmptyDirectories() && !emptyChildren.isEmpty()) {
- List newChildren = new ArrayList();
- newChildren.addAll(Arrays.asList(remote.getChildren()));
- newChildren.removeAll(emptyChildren);
- remote.setChildren((ICVSRemoteResource[])newChildren.toArray(new ICVSRemoteResource[newChildren.size()]));
-
- }
- }
-
- /*
- * This method fetches the delta between the local state and the remote state of the resource tree
- * and records the deltas in the fileDeltas instance variable
- *
- * Returns the list of changed files
- */
- private List fetchDelta(Session session, String[] arguments, final IProgressMonitor monitor) throws CVSException {
-
- // Create an listener that will accumulate new and removed files and folders
- final List newChildDirectories = new ArrayList();
- IUpdateMessageListener listener = new IUpdateMessageListener() {
- public void directoryInformation(ICVSFolder root, IPath path, boolean newDirectory) {
- if (newDirectory) {
- // Record new directory with parent so it can be retrieved when building the parent
- recordDelta(path, FOLDER, Update.STATE_NONE);
- monitor.subTask(Policy.bind("RemoteFolderTreeBuilder.receivingDelta", path.toString())); //$NON-NLS-1$
- // Record new directory to be used as a parameter to fetch its contents
- newChildDirectories.add(path.toString());
- }
- }
- public void directoryDoesNotExist(ICVSFolder root, IPath path) {
- // Record removed directory with parent so it can be removed when building the parent
- if (path.isEmpty()) {
- projectDoesNotExist = true;
- } else {
- recordDelta(path, DELETED, Update.STATE_NONE);
- monitor.subTask(Policy.bind("RemoteFolderTreeBuilder.receivingDelta", path.toString())); //$NON-NLS-1$
- }
- }
- public void fileInformation(int type, ICVSFolder root, String filename) {
- // Cases that do not require action are:
- // case 'A' : = A locally added file that does not exists remotely
- // case '?' : = A local file that has not been added and does not exists remotely
- // case 'M' : = A locally modified file that has not been modified remotely
- switch(type) {
- case Update.STATE_MERGEABLE_CONFLICT :
- case Update.STATE_CONFLICT :
- // We have an remote change to a modified local file
- // The change could be a local change conflicting with a remote deletion.
- // If so, the deltas may already have a DELETED for the file.
- // We shouldn't override this DELETED
- IPath filePath = new Path(filename);
- Map deltas = deltas = (Map)fileDeltas.get(filePath.removeLastSegments(1));
- DeltaNode d = deltas != null ? (DeltaNode)deltas.get(filePath.lastSegment()) : null;
- if ((d!=null) && (d.getRevision() == DELETED))
- break;
- case Update.STATE_DELETED : // We have a locally removed file that still exists remotely
- case Update.STATE_REMOTE_CHANGES : // We have an remote change to an unmodified local file
- changedFiles.add(filename);
- recordDelta(new Path(filename), UNKNOWN, type);
- monitor.subTask(Policy.bind("RemoteFolderTreeBuilder.receivingDelta", filename)); //$NON-NLS-1$
- break;
- }
- }
- public void fileDoesNotExist(ICVSFolder root, String filename) {
- recordDelta(new Path(filename), DELETED, Update.STATE_NONE);
- monitor.subTask(Policy.bind("RemoteFolderTreeBuilder.receivingDelta", filename)); //$NON-NLS-1$
- }
- };
-
- // Perform a "cvs -n update -d [-r tag] ." in order to get the
- // messages from the server that will indicate what has changed on the
- // server.
- IStatus status = Command.UPDATE.execute(session,
- new GlobalOption[] { Command.DO_NOT_CHANGE },
- updateLocalOptions,
- arguments,
- new UpdateListener(listener),
- monitor);
- return changedFiles;
- }
- /*
- * Fetch the children of a previously unknown directory.
- *
- * The fetch may do up to 2 units of work in the provided monitor.
- */
- private void fetchNewDirectory(Session session, RemoteFolderTree newFolder, IPath localPath, final IProgressMonitor monitor) throws CVSException {
-
- // Create an listener that will accumulate new files and folders
- IUpdateMessageListener listener = new IUpdateMessageListener() {
- public void directoryInformation(ICVSFolder root, IPath path, boolean newDirectory) {
- if (newDirectory) {
- // Record new directory with parent so it can be retrieved when building the parent
- // NOTE: Check path prefix
- recordDelta(path, FOLDER, Update.STATE_NONE);
- monitor.subTask(Policy.bind("RemoteFolderTreeBuilder.receivingDelta", path.toString())); //$NON-NLS-1$
- }
- }
- public void directoryDoesNotExist(ICVSFolder root, IPath path) {
- }
- public void fileInformation(int type, ICVSFolder root, String filename) {
- // NOTE: Check path prefix
- changedFiles.add(filename);
- recordDelta(new Path(filename), ADDED, type);
- monitor.subTask(Policy.bind("RemoteFolderTreeBuilder.receivingDelta", filename)); //$NON-NLS-1$
- }
- public void fileDoesNotExist(ICVSFolder root, String filename) {
- }
- };
-
- // NOTE: Should use the path relative to the remoteRoot
- IPath path = new Path(newFolder.getRepositoryRelativePath());
- IStatus status = Command.UPDATE.execute(session,
- new GlobalOption[] { Command.DO_NOT_CHANGE },
- updateLocalOptions,
- new String[] { localPath.toString() },
- new UpdateListener(listener),
- Policy.subMonitorFor(monitor, 1));
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- // FIXME: This should be refactored (maybe static methods on CVSException?)
- CVSServerException e = new CVSServerException(status);
- if ( ! e.isNoTagException() && e.containsErrors())
- throw e;
- // we now know that this is an exception caused by a cvs bug.
- // if the folder has no files in it (just subfolders) cvs does not respond with the subfolders...
- // workaround: retry the request with no tag to get the directory names (if any)
- Policy.checkCanceled(monitor);
- status = Command.UPDATE.execute(session,
- new GlobalOption[] { Command.DO_NOT_CHANGE },
- getOptionsWithoutTag(),
- new String[] { localPath.toString() },
- new UpdateListener(listener),
- Policy.subMonitorFor(monitor, 1));
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSServerException(status);
- }
- }
- }
-
- // Get the file revisions for the given filenames
- private void fetchFileRevisions(Session session, String[] fileNames, final IProgressMonitor monitor) throws CVSException {
-
- // Create a listener for receiving the revision info
- final Map revisions = new HashMap();
- final List exceptions = new ArrayList();
- IStatusListener listener = new IStatusListener() {
- public void fileStatus(ICVSFolder root, IPath path, String remoteRevision) {
- try {
- updateRevision(path, remoteRevision);
- monitor.subTask(Policy.bind("RemoteFolderTreeBuilder.receivingRevision", path.toString())); //$NON-NLS-1$
- } catch (CVSException e) {
- exceptions.add(e);
- }
- }
- };
-
- // Perform a "cvs status..." with a custom message handler
- IStatus status = Command.STATUS.execute(session,
- Command.NO_GLOBAL_OPTIONS,
- Command.NO_LOCAL_OPTIONS,
- fileNames,
- new StatusListener(listener),
- monitor);
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSServerException(status);
- }
-
- // Report any exceptions that occured fecthing the revisions
- if ( ! exceptions.isEmpty()) {
- if (exceptions.size() == 1) {
- throw (CVSException)exceptions.get(0);
- } else {
- MultiStatus multi = new MultiStatus(CVSProviderPlugin.ID, 0, Policy.bind("RemoteFolder.errorFetchingRevisions"), null); //$NON-NLS-1$
- for (int i = 0; i < exceptions.size(); i++) {
- multi.merge(((CVSException)exceptions.get(i)).getStatus());
- }
- throw new CVSException(multi);
- }
- }
- }
-
- private boolean pruneEmptyDirectories() {
- return CVSProviderPlugin.getPlugin().getPruneEmptyDirectories();
- }
- /*
- * Record the deltas in a double map where the outer key is the parent directory
- * and the inner key is the file name. The value is the revision of the file or
- * DELETED (file or folder). New folders have a revision of FOLDER.
- *
- * A revison of UNKNOWN indicates that the revision has not been fetched
- * from the repository yet.
- */
- private void recordDelta(IPath path, String revision, int syncState) {
- IPath parent = path.removeLastSegments(1);
- Map deltas = (Map)fileDeltas.get(parent);
- if (deltas == null) {
- deltas = new HashMap();
- fileDeltas.put(parent, deltas);
- }
- String name = path.lastSegment();
- deltas.put(name, new DeltaNode(name, revision, syncState));
- }
-
- private void updateRevision(IPath path, String revision) throws CVSException {
- RemoteFolderTree folder = (RemoteFolderTree)remoteFolderTable.get(path.removeLastSegments(1));
- if (folder == null) {
- throw new CVSException(Policy.bind("RemoteFolderTreeBuilder.missingParent", path.toString(), revision));//$NON-NLS-1$
- }
- ((RemoteFile)folder.getFile(path.lastSegment())).setRevision(revision);
- }
-
- /*
- * Return the tag that should be associated with a remote folder.
- *
- * This method is used to ensure that new directories contain the tag
- * derived from the parant local folder when appropriate. For instance,
- *
- * The tag should be the provided tag. However, if tag is null, the
- * tag for the folder should be derived from the provided reference folder
- * which could be the local resource corresponding to the remote or the parent
- * of the remote.
- */
- private CVSTag tagForRemoteFolder(ICVSFolder folder, CVSTag tag) throws CVSException {
- return tag == null ? folder.getFolderSyncInfo().getTag() : tag;
- }
-
- private boolean isOrphanedSubtree(Session session, ICVSFolder mFolder) throws CVSException {
- return mFolder.isCVSFolder() && ! mFolder.isManaged() && ! mFolder.equals(session.getLocalRoot()) && mFolder.getParent().isCVSFolder();
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteModule.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteModule.java
deleted file mode 100644
index 079e3e674..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteModule.java
+++ /dev/null
@@ -1,318 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.resources;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.client.Checkout;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.client.Update;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-
-public class RemoteModule extends RemoteFolder {
-
- private String label;
- private ICVSRemoteResource[] referencedModules;
- private LocalOption[] localOptions;
- private boolean expandable;
-
- public static RemoteModule[] getRemoteModules(ICVSRepositoryLocation repository, CVSTag tag, IProgressMonitor monitor) throws TeamException {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(Policy.bind("RemoteModule.getRemoteModules"), 100); //$NON-NLS-1$
- try {
- RemoteModule[] modules;
- Session s = new Session(repository, (ICVSFolder)CVSWorkspaceRoot.getCVSResourceFor(ResourcesPlugin.getWorkspace().getRoot()), false);
- s.open(Policy.subMonitorFor(monitor, 10));
- try {
- modules = Command.CHECKOUT.getRemoteModules(s, tag, Policy.subMonitorFor(monitor, 90));
- } finally {
- s.close();
- }
- return modules;
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Create a set of RemoteModules from the provided module definition strings returned from the server
- *
- * At the moment, we are very restrictive on the types of modules we support.
- */
- public static RemoteModule[] createRemoteModules(String[] moduleDefinitionStrings, ICVSRepositoryLocation repository, CVSTag tag) {
-
- Map modules = new HashMap();
- Map referencedModulesTable = new HashMap();
- Map moduleAliases = new HashMap();
- List acceptableModules = new ArrayList();
-
- // First pass: Create the remote module instances based on remote mapping
- for (int i = 0; i < moduleDefinitionStrings.length; i++) {
-
- // Read the module name
- StringTokenizer tokenizer = new StringTokenizer(moduleDefinitionStrings[i]);
- String moduleName = tokenizer.nextToken();
- if ( ! tokenizer.hasMoreTokens()) {
- // If it only has a name and no tokens, skip it.
- continue;
- }
-
- // Read the options associated with the module
- List localOptionsList = new ArrayList();
- String next = tokenizer.nextToken();
- while (next.charAt(0) == '-') {
- switch (next.charAt(1)) {
- case 'a': // alias
- localOptionsList.add(Checkout.ALIAS);
- break;
- case 'l': // don't recurse
- localOptionsList.add(Checkout.DO_NOT_RECURSE);
- break;
- case 'd': // directory
- localOptionsList.add(Checkout.makeDirectoryNameOption(tokenizer.nextToken()));
- break;
- case 'e':
- case 'i':
- case 'o':
- case 't':
- case 'u': // Ignore any programs
- tokenizer.nextToken();
- break;
- case 's': // status
- localOptionsList.add(Checkout.makeStatusOption(tokenizer.nextToken()));
- break;
- default: // unanticipated option. Ignore it and go on
- }
- next = tokenizer.nextToken();
- }
- LocalOption[] localOptions = (LocalOption[]) localOptionsList.toArray(new LocalOption[localOptionsList.size()]);
-
- if (Checkout.ALIAS.isElementOf(localOptions)) {
-
- if (localOptions.length > 1) {
- // XXX This is an error condition that needs to be reported
- }
-
- // An alias expands to one or more modules or paths
- List expansions = new ArrayList(10);
- expansions.add(next);
- while (tokenizer.hasMoreTokens())
- expansions.add(tokenizer.nextToken());
-
- moduleAliases.put(moduleName, (String[]) expansions.toArray(new String[expansions.size()]));
- modules.put(moduleName, new RemoteModule(moduleName, null, repository, null, localOptions, tag, true));
-
- } else {
-
- // The module definition may have a leading directory which can be followed by some files
- if (!(next.charAt(0) == '&')) {
- String directory = next;
- List files = new ArrayList();
- while (tokenizer.hasMoreTokens() && (next.charAt(0) != '&')) {
- next = tokenizer.nextToken() ;
- if ((next.charAt(0) != '&'))
- files.add(next);
- }
- RemoteModule remoteModule = new RemoteModule(moduleName, null, repository, new Path(directory), localOptions, tag, ! files.isEmpty());
- modules.put(moduleName, remoteModule);
- if ( ! files.isEmpty()) {
- ICVSRemoteResource[] children = new ICVSRemoteResource[files.size()];
- for (int j = 0; j < children.length; j++) {
- children[j] = new RemoteFile(remoteModule, Update.STATE_NONE, (String)files.get(j), tag);
- remoteModule.setChildren(children);
- }
- }
- } else {
- modules.put(moduleName, new RemoteModule(moduleName, null, repository, null, localOptions, tag, true));
- }
-
- // Record any referenced modules so that can be cross-referenced below
- if (next.charAt(0) == '&') {
- List children = new ArrayList(10);
- children.add(next);
- while (tokenizer.hasMoreTokens())
- children.add(tokenizer.nextToken());
- referencedModulesTable.put(moduleName, (String[])children.toArray(new String[children.size()]));
- }
- }
- }
-
- // Second pass: Cross reference aliases to modules
- // XXX Aliases can reference other aliases which confuses the expansion!
- Iterator iter = moduleAliases.keySet().iterator();
- while (iter.hasNext()) {
- String moduleName = (String)iter.next();
- RemoteModule module = (RemoteModule)modules.get(moduleName);
- String[] expansion = (String[])moduleAliases.get(moduleName);
- List referencedFolders = new ArrayList();
- boolean expandable = true;
- for (int i = 0; i < expansion.length; i++) {
- if (expansion[i].charAt(0) == '!') {
- // XXX Unsupported for now
- expandable = false;
- } else {
- IPath path = new Path(expansion[i]);
- if (path.segmentCount() > 1) {
- // XXX Unsupported for now
- expandable = false;
- } else {
- RemoteModule child = (RemoteModule)modules.get(expansion[i]);
- if (child == null) {
- referencedFolders.add(new RemoteFolder(null, repository, path, tag));
- } else {
- // Need to check if the child is a module alias
- if (child.isAlias()) {
- // XXX Unsupported for now
- expandable = false;
- } else {
- referencedFolders.add(child);
- }
- }
- }
- }
- }
- if (expandable) {
- module.setChildren((ICVSRemoteResource[]) referencedFolders.toArray(new ICVSRemoteResource[referencedFolders.size()]));
- } else {
- module.setExpandable(false);
- }
- }
-
- // Third pass: Cross reference remote modules where necessary
- iter = modules.keySet().iterator();
- while (iter.hasNext()) {
- String moduleName = (String)iter.next();
- String[] children = (String[])referencedModulesTable.get(moduleName);
- if (children != null) {
- RemoteModule module = (RemoteModule)modules.get(moduleName);
- List referencedFolders = new ArrayList();
- boolean expandable = true;
- for (int i = 0; i < children.length; i++) {
- RemoteModule child = (RemoteModule)modules.get(children[i].substring(1));
- if (child == null) {
- // invalid module definition
- expandable = false;
- } else if (child.isAlias()) {
- // Include alias children in-line
- expandable = false;
-// referencedFolders.addAll(Arrays.asList(child.getChildren()));
- } else {
- // XXX not expandable if child has local directory option (-d)
- if (Command.findOption(child.getLocalOptions(), "-d") != null) { //$NON-NLS-1$
- expandable = false;
- } else {
- referencedFolders.add(child);
- }
- }
- }
- if (expandable) {
- module.setReferencedModules((ICVSRemoteResource[]) referencedFolders.toArray(new ICVSRemoteResource[referencedFolders.size()]));
- } else {
- module.setExpandable(false);
- }
- }
- }
-
- return (RemoteModule[])modules.values().toArray(new RemoteModule[modules.size()]);
- }
-
- public RemoteModule(String label, RemoteFolder parent, ICVSRepositoryLocation repository, IPath repositoryRelativePath, LocalOption[] localOptions, CVSTag tag, boolean isStatic) {
- super(parent,
- label,
- repository,
- repositoryRelativePath == null ? new Path(FolderSyncInfo.VIRTUAL_DIRECTORY) : repositoryRelativePath,
- tag,
- isStatic);
- this.localOptions = localOptions;
- this.label = label;
- this.expandable = true;
- }
-
- public LocalOption[] getLocalOptions() {
- return localOptions;
- }
- /*
- * Override of inherited getMembers in order to combine the physical members with any referenced modules
- */
- public ICVSRemoteResource[] getMembers(CVSTag tagName, IProgressMonitor monitor) throws CVSException {
-
- if ( ! expandable) return new ICVSRemoteResource[0];
-
- ICVSRemoteResource[] physicalChildren;
- if ( folderInfo.getIsStatic()) {
- physicalChildren = getChildren();
- } else {
- physicalChildren = super.getMembers(tagName, monitor);
- }
- ICVSRemoteResource[] allChildren;
- if (referencedModules != null && referencedModules.length > 0) {
- if (physicalChildren == null) {
- allChildren = referencedModules;
- } else {
- // Combine two sets of children
- allChildren = new ICVSRemoteResource[physicalChildren.length + referencedModules.length];
- for (int i = 0; i < physicalChildren.length; i++) {
- allChildren[i] = physicalChildren[i];
- }
- for (int i = 0; i < referencedModules.length; i++) {
- allChildren[i + physicalChildren.length] = referencedModules[i];
- }
- }
- } else if (physicalChildren != null) {
- allChildren = physicalChildren;
- } else {
- allChildren = new ICVSRemoteResource[0];
- }
- return allChildren;
- }
-
- /*
- * Set the children to a static set of children
- */
- protected void setChildren(ICVSRemoteResource[] children) {
- super.setChildren(children);
- if ( ! folderInfo.getIsStatic())
- this.folderInfo = new FolderSyncInfo(folderInfo.getRepository(), folderInfo.getRoot(), folderInfo.getTag(), true);
- }
-
- private void setReferencedModules(ICVSRemoteResource[] referencedModules) {
- this.referencedModules = referencedModules;
- }
-
- public boolean isAlias() {
- return Checkout.ALIAS.isElementOf(localOptions);
- }
-
- /**
- * @see ICVSRemoteFolder#isExpandable()
- */
- public boolean isExpandable() {
- return expandable;
- }
-
- private void setExpandable(boolean expandable) {
- this.expandable = expandable;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteResource.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteResource.java
deleted file mode 100644
index fee58046f..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteResource.java
+++ /dev/null
@@ -1,161 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.resources;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.client.Update;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.Assert;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-
-/**
- * The purpose of this class and its subclasses is to implement the corresponding
- * ICVSRemoteResource interfaces for the purpose of communicating information about
- * resources that reside in a CVS repository but have not necessarily been loaded
- * locally.
- */
-public abstract class RemoteResource extends PlatformObject implements ICVSRemoteResource {
-
- protected ResourceSyncInfo info;
- protected RemoteFolder parent;
-
- // relative synchronization state calculated by server of this remote file compare to the current local
- // workspace copy.
- private int workspaceSyncState = Update.STATE_NONE;
-
- /*
- * @see ICVSRemoteResource#getName()
- */
- public String getName() {
- return info.getName();
- }
-
- /*
- * @see ICVSResource#getRelativePath(ICVSFolder)
- */
- public String getRelativePath(ICVSFolder ancestor) throws CVSException {
- return Util.appendPath(parent.getRelativePath(ancestor), getName());
- }
-
- /*
- * @see ICVSRemoteResource#getParent()
- */
- public ICVSRemoteResource getRemoteParent() {
- return parent;
- }
-
- public abstract String getRepositoryRelativePath();
-
- public abstract ICVSRepositoryLocation getRepository();
-
- public int getWorkspaceSyncState() {
- return workspaceSyncState;
- }
-
- public void setWorkspaceSyncState(int workspaceSyncState) {
- this.workspaceSyncState = workspaceSyncState;
- }
-
- /*
- * @see ICVSResource#delete()
- */
- public void delete() {
- // XXX we should know how to delete a remote?
- }
-
- /*
- * @see ICVSResource#exists()
- *
- * This method is used by the Command framework so it must return true so that
- * the proper information gets sent to the server. (i.e. it is used to fake that
- * the file exists locally so cvs commands can be used to retrieve information about
- * the remote resource from the server)
- */
- public boolean exists() {
- return true;
- }
-
- /*
- * @see ICVSRemoteResource#exists(IProgressMonitor)
- */
- public boolean exists(IProgressMonitor monitor) throws TeamException {
- return parent.exists(this, monitor);
- }
-
- /*
- * @see ICVSResource#getParent()
- */
- public ICVSFolder getParent() {
- return parent;
- }
-
- /*
- * @see ICVSResource#isIgnored()
- */
- public boolean isIgnored() {
- return false;
- }
-
- /*
- * @see ICVSResource#isManaged()
- */
- public boolean isManaged() {
- return parent != null;
- }
-
- /*
- * @see ICVSResource#unmanage()
- */
- public void unmanage(IProgressMonitor monitor) throws CVSException {
- // do nothing
- }
-
- /*
- * @see ICVSResource#getSyncInfo()
- */
- public ResourceSyncInfo getSyncInfo() {
- return info;
- }
- /*
- * @see ICVSResource#setSyncInfo(ResourceSyncInfo)
- */
- public void setSyncInfo(ResourceSyncInfo info) {
- // ensure that clients are not trying to set sync info on remote handles.
- Assert.isTrue(false);
- }
-
- public boolean equals(Object target) {
- if (this == target)
- return true;
- if (!(target instanceof RemoteResource))
- return false;
- RemoteResource remote = (RemoteResource) target;
- return remote.isContainer() == isContainer() && remote.getRepositoryRelativePath().equals(getRepositoryRelativePath());
- }
- /*
- * @see ICVSResource#setIgnored()
- */
- public void setIgnored() throws CVSException {
- // ensure that clients are not trying to set sync info on remote handles.
- Assert.isTrue(false);
- }
-
- /*
- * @see ICVSResource#setIgnoredAs(String)
- */
- public void setIgnoredAs(String pattern) throws CVSException {
- // ensure that clients are not trying to set sync info on remote handles.
- Assert.isTrue(false);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/FolderSyncInfo.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/FolderSyncInfo.java
deleted file mode 100644
index 5433dd458..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/FolderSyncInfo.java
+++ /dev/null
@@ -1,182 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.syncinfo;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.resources.*;
-import org.eclipse.team.internal.ccvs.core.util.Assert;
-import org.eclipse.team.internal.ccvs.core.Policy;
-
-/**
- * Value (immutable) object that represents workspace state information about the contents of a
- * folder that was retreived from a CVS repository. It is a specialized representation of the files from
- * the CVS sub-directory that contain folder specific connection information (e.g. Root, Repository, Tag).
- *
- * @see ICVSFolder#getFolderSyncInfo()
- */
-public class FolderSyncInfo {
-
- // The Repository value for virtual directories (i.e. local with no corresponding remote)
- public static final String VIRTUAL_DIRECTORY = "CVSROOT/Emptydir"; //$NON-NLS-1$
-
- // relative path of this folder in the repository, project1/folder1/folder2
- private String repository;
-
- // :pserver:user@host:/home/user/repo
- private String root;
-
- // sticky tag (e.g. version, date, or branch tag applied to folder)
- private CVSEntryLineTag tag;
-
- // if true then it means only part of the folder was fetched from the repository, and CVS will not create
- // additional files in that folder.
- private boolean isStatic;
-
- /**
- * Construct a folder sync object.
- *
- * @param repo the relative path of this folder in the repository, cannot be <code>null</code>.
- * @param root the location of the repository, cannot be <code>null</code>.
- * @param tag the tag set for the folder or <code>null</code> if there is no tag applied.
- * @param isStatic to indicate is only part of the folder was fetched from the server.
- */
- public FolderSyncInfo(String repo, String root, CVSTag tag, boolean isStatic) {
- Assert.isNotNull(repo);
- Assert.isNotNull(root);
- this.repository = repo;
- this.root = root;
- this.isStatic = isStatic;
- setTag(tag);
- }
-
- public boolean equals(Object other) {
- if(other == this) return true;
- if (!(other instanceof FolderSyncInfo)) return false;
-
- FolderSyncInfo syncInfo = ((FolderSyncInfo)other);
- if (!getRoot().equals(syncInfo.getRoot())) return false;
- if (!getRepository().equals(syncInfo.getRepository())) return false;
- if (getIsStatic() != syncInfo.getIsStatic()) return false;
- if ((getTag() == null) || (syncInfo.getTag() == null)) {
- if ((getTag() == null) && (syncInfo.getTag() != null) && (syncInfo.getTag().getType() != CVSTag.HEAD)) {
- return false;
- } else if ((syncInfo.getTag() == null) && (getTag() != null) && (getTag().getType() != CVSTag.HEAD)) {
- return false;
- }
- } else if (!getTag().equals(syncInfo.getTag())) {
- return false;
- }
- return true;
- }
- /**
- * Gets the root, cannot be <code>null.
- *
- * @return Returns a String
- */
- public String getRoot() {
- return root;
- }
-
- /**
- * Gets the tag, may be <code>null</code>.
- *
- * @return Returns a String
- */
- public CVSEntryLineTag getTag() {
- return tag;
- }
-
- /**
- * Gets the repository, may be <code>null</code>.
- *
- * @return Returns a String
- */
- public String getRepository() {
- return repository;
- }
-
- /**
- * Gets the isStatic.
- *
- * @return Returns a boolean
- */
- public boolean getIsStatic() {
- return isStatic;
- }
-
- /**
- * Answers a full path to the folder on the remote server. This by appending the repository to the
- * repository location speficied in the root.
- *
- * Example:
- * root = :pserver:user@host:/home/user/repo
- * repository = folder1/folder2
- *
- * Returns:
- * /home/users/repo/folder1/folder2
- *
- * Note: CVS supports repository root directories that end in a slash (/).
- * For these directories, the remote location must contain two slashes (//)
- * between the root directory and the rest of the path. For example:
- * root = :pserver:user@host:/home/user/repo/
- * repository = folder1/folder2
- * must return:
- * /home/users/repo//folder1/folder2
- *
- * @return the full path of this folder on the server.
- * @throws a CVSException if the root or repository is malformed.
- */
- public String getRemoteLocation() throws CVSException {
-
- String result;
-
- try {
- String root = getRoot();
- int index = root.indexOf('@');
- if (index == -1) {
- // If the username is mising, we have to find the third ':' instead.
- index = root.indexOf(':');
- index = root.indexOf(':', index + 1);
- index = root.indexOf(':', index + 1);
- }
- result = getRoot().substring(index+1);
- result = result.substring(result.indexOf(":")+1); //$NON-NLS-1$
- result = result + "/" + getRepository(); //$NON-NLS-1$
- } catch (IndexOutOfBoundsException e) {
- throw new CVSException(Policy.bind("FolderSyncInfo_Maleformed_root_4")); //$NON-NLS-1$
- }
-
- return result;
- }
-
- /*
- * Provide a hashCode() method that gaurentees that equal object will have the
- * same hashCode
- */
- public int hashCode() {
- return getRoot().hashCode() | getRepository().hashCode();
- }
-
- /**
- * Sets the tag for the folder.
- *
- * @param tag The tag to set
- */
- private void setTag(CVSTag tag) {
- if (tag == null || tag.equals(CVSTag.DEFAULT)) {
- this.tag = null;
- } else {
- this.tag = new CVSEntryLineTag(tag);
- }
- }
- /*
- * @see Object#toString()
- */
- public String toString() {
- return getRoot() + "/" + getRepository() + "/" + getTag(); //$NON-NLS-1$ //$NON-NLS-2$
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/MutableResourceSyncInfo.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/MutableResourceSyncInfo.java
deleted file mode 100644
index fb47bdbb5..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/MutableResourceSyncInfo.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.syncinfo;
-
-import java.util.Date;
-
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.util.Assert;
-
-/**
- * Mutable version of ResourceSyncInfo. Can be used when either creating a resource sync
- * object from scratch (e.g. without an entry line) or want to modify an existing
- * <code>ResourceSyncInfo</code> instance. Example usage:
- * <pre>
- * ResourceSyncInfo info = resource.getSyncInfo();
- * if(info!=null) {
- * MutableResourceSyncInfo newInfo = info.cloneMutable();
- * newInfo.setRevision("1.22");
- * resource.setSyncInfo(newInfo);
- * }
- * </pre>
- * @see ResourceSyncInfo
- */
-public class MutableResourceSyncInfo extends ResourceSyncInfo {
-
- protected MutableResourceSyncInfo(ResourceSyncInfo info) {
- this.name = info.getName();
- setRevision(info.getRevision());
- setTag(info.getTag());
- this.permissions = info.getPermissions();
- this.timeStamp = info.getTimeStamp();
- this.isDirectory = info.isDirectory();
- this.keywordMode = info.getKeywordMode();
- this.isDeleted = info.isDeleted();
- if(info.isMergedWithConflicts()) {
- setSyncType(TYPE_MERGED_WITH_CONFLICTS);
- } else if(info.isMerged()) {
- setSyncType(TYPE_MERGED);
- } else {
- setSyncType(TYPE_REGULAR);
- }
- }
-
- /**
- * Creates a default sync info, if revision is <code>null</code> then
- * the sync info will be considered in the newly added state.
- */
- public MutableResourceSyncInfo(String name, String revision) {
- Assert.isNotNull(name);
- this.name = name;
- setRevision(revision);
- }
-
- void setResourceInfoType(int type) {
- this.syncType = type;
- }
-
- /**
- * Sets the revision.
- * @param revision The revision to set
- */
- public void setRevision(String revision) {
- super.setRevision(revision);
- }
-
- /**
- * Sets the timeStamp.
- * @param timeStamp The timeStamp to set
- */
- public void setTimeStamp(Date timeStamp) {
- this.timeStamp = timeStamp;
- }
-
- /**
- * Sets the keywordMode.
- * @param keywordMode The keywordMode to set
- */
- public void setKeywordMode(KSubstOption keywordMode) {
- this.keywordMode = keywordMode;
- }
-
- /**
- * Sets the tag.
- * @param tag The tag to set
- */
- public void setTag(CVSTag tag) {
- super.setTag(tag);
- }
-
- /**
- * Sets the permissions.
- * @param permissions The permissions to set
- */
- public void setPermissions(String permissions) {
- this.permissions = permissions;
- }
-
- /**
- * Sets the deleted state.
- * @param isDeleted The deleted state of this resource sync
- */
- public void setDeleted(boolean isDeleted) {
- this.isDeleted = isDeleted;
- }
-
- /**
- * Sets to the added state. The timestamp and other are cleared.
- */
- public void setAdded() {
- setRevision(ADDED_REVISION);
- }
-
- /**
- * Sets that this resource sync is a result of a non-conflicting merge
- */
- public void setMerged() {
- // if already merged state then ignore
- if(syncType==TYPE_REGULAR) {
- this.syncType = TYPE_MERGED;
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ReentrantLock.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ReentrantLock.java
deleted file mode 100644
index 7e33d893f..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ReentrantLock.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.syncinfo;
-
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.util.Assert;
-
-/**
- * Provides a per-thread nested locking mechanism. A thread can acquire a
- * lock and then call acquire() multiple times. Other threads that try
- * and acquire the lock will be blocked until the first thread releases all
- * it's nested locks.
- */
-public class ReentrantLock {
-
- private final static boolean DEBUG = Policy.DEBUG_THREADING;
- private Thread thread;
- private int nestingCount;
-
- public ReentrantLock() {
- this.thread = null;
- this.nestingCount = 0;
- }
-
- public synchronized void acquire() {
- // stop early if we've been interrupted -- don't enter the lock anew
- Thread thisThread = Thread.currentThread();
-
- // race for access to the lock -- does not guarantee fairness
- if (thread != thisThread) {
- while (nestingCount != 0) {
- try {
- if(DEBUG) System.out.println("["+ thisThread.getName() + "] waiting for CVS synchronizer lock"); //$NON-NLS-1$ //$NON-NLS-2$
- wait();
- } catch(InterruptedException e) {
- // keep waiting for the lock
- if(DEBUG) System.out.println("["+ thisThread.getName() + "] interrupted in CVS synchronizer lock"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- thread = thisThread;
- if(DEBUG) System.out.println("[" + thisThread.getName() + "] acquired CVS synchronizer lock"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- nestingCount++;
- }
-
- public synchronized void release() {
- Thread thisThread = Thread.currentThread();
- Assert.isLegal(thread == thisThread,
- "Thread attempted to release a lock it did not own"); //$NON-NLS-1$
- if (--nestingCount == 0) {
- if(DEBUG) System.out.println("[" + thread.getName() + "] released CVS synchronizer lock"); //$NON-NLS-1$ //$NON-NLS-2$
- thread = null;
- notifyAll();
- }
- }
-
- public int getNestingCount() {
- Thread thisThread = Thread.currentThread();
- Assert.isLegal(thread == thisThread,
- "Thread attempted to read nesting count of a lock it did not own"); //$NON-NLS-1$
- return nestingCount;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java
deleted file mode 100644
index 8a1b46801..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java
+++ /dev/null
@@ -1,502 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.syncinfo;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.text.ParseException;
-import java.util.Date;
-
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.resources.CVSEntryLineTag;
-import org.eclipse.team.internal.ccvs.core.util.Assert;
-import org.eclipse.team.internal.ccvs.core.util.CVSDateFormatter;
-import org.eclipse.team.internal.ccvs.core.util.EmptyTokenizer;
-
-/**
- * Value (immutable) object that represents workspace state information about a resource contained in
- * a CVS repository. It is a specialized representation of a line in the CVS/Entry file with the addition of
- * file permissions.
- * <p>
- * ResourceSyncInfo instances are created from entry lines from the CVS server and from the CVS/Entries
- * file. Although both entry lines have slightly different formats (e.g. timestamps) they can safely be passed
- * to the constructor.</p>
- * <p>
- * A class named <code>MutableResourceSyncInfo</code> can be used to modify an existing resource
- * sync or create sync info without an entry line.</p>
- *
- * Example entry line from the CVS/Entry file:
- *
- * /new.java/1.2/Fri Dec 7 00:17:52 2001/-kb/
- * D/src////
- *
- * @see MutableResourceSyncInfo
- * @see ICVSResource#getSyncInfo()
- */
-public class ResourceSyncInfo {
-
- // [Note: permissions aren't honoured in this current implementation]
- // safe default permissions. Permissions are saved separatly so that the correct permissions
- // can be sent back to the server on systems that don't save execute bits (e.g. windows).
- private static final String DEFAULT_PERMISSIONS = "u=rw,g=rw,o=r"; //$NON-NLS-1$
-
- // file sync information can be associated with a local resource that has been deleted. This is
- // noted by prefixing the revision with this character.
- private static final String DELETED_PREFIX = "-"; //$NON-NLS-1$
-
- // a sync element with a revision of '0' is considered a new file that has
- // not been comitted to the repo. Is visible so that clients can create sync infos
- // for new files.
- protected static final String ADDED_REVISION = "0"; //$NON-NLS-1$
-
- // Timestamp constants used to identify special cases
- protected static final int TYPE_REGULAR = 1;
- protected static final int TYPE_MERGED = 2;
- protected static final int TYPE_MERGED_WITH_CONFLICTS = 3;
-
- protected static final String TIMESTAMP_DUMMY = "dummy timestamp"; //$NON-NLS-1$
- protected static final String TIMESTAMP_MERGED = "Result of merge"; //$NON-NLS-1$
- protected static final String TIMESTAMP_MERGED_WITH_CONFLICT = TIMESTAMP_MERGED + "+"; //$NON-NLS-1$
-
- protected static final String TIMESTAMP_SERVER_MERGED = "+modified"; //$NON-NLS-1$
- protected static final String TIMESTAMP_SERVER_MERGED_WITH_CONFLICT = "+="; //$NON-NLS-1$
-
- // a directory sync info will have nothing more than a name
- protected boolean isDirectory = false;
- protected boolean isDeleted = false;
-
- // utility constants
- protected static final String DIRECTORY_PREFIX = "D/"; //$NON-NLS-1$
- protected static final String SEPERATOR = "/"; //$NON-NLS-1$
-
- // fields describing the synchronization of a resource in CVS parlance
- protected String name;
- protected String revision;
- protected Date timeStamp;
- protected KSubstOption keywordMode;
- protected CVSEntryLineTag tag;
- protected String permissions;
-
- // type of sync
- protected int syncType = TYPE_REGULAR;
- protected ResourceSyncInfo() {
- }
-
- /**
- * Constructor to create a sync object from entry line formats. The entry lines are parsed by this class.
- * The constructor can handle parsing entry lines from the server or from an entry file.
- *
- * @param entryLine the entry line (e.g. /new.java/1.2/Fri Dec 07 00:17:52 2001/-kb/)
- * @param permissions the file permission (e.g. u=rw,g=rw,o=r). May be <code>null</code>.
- * @param timestamp if not included in the entry line. May be <code>null</code>.
- *
- * @exception CVSException is thrown if the entry cannot be parsed.
- */
- public ResourceSyncInfo(String entryLine, String permissions, Date timestamp) throws CVSException {
- Assert.isNotNull(entryLine);
- setEntryLine(entryLine);
-
- if (permissions != null) {
- this.permissions = permissions;
- }
- // override the timestamp that may of been in entryLine. In some cases the timestamp is not in the
- // entry line (e.g. receiving entry lines from the server versus reading them from the Entry file).
- if(timestamp!=null) {
- this.timeStamp = timestamp;
- }
- }
-
- /**
- * Constructor to create a resource sync object for a folder.
- *
- * @param name of the resource for which this sync state is associatied, cannot be <code>null</code>.
- */
- public ResourceSyncInfo(String name) {
- Assert.isNotNull(name);
- this.name = name;
- this.isDirectory = true;
- }
- /**
- * Answers if this sync information is for a folder in which case only a name is
- * available.
- *
- * @return <code>true</code> if the sync information is for a folder and <code>false</code>
- * if it is for a file.
- */
- public boolean isDirectory() {
- return isDirectory;
- }
-
- /**
- * Answers if this sync information is for a resource that has been merged by the cvs server with
- * conflicts and has not been modified yet relative to the given timestamp.
- *
- * @param otherTimestamp is the timestamp of the file associated with this resource sync
- * @return <code>true</code> if the sync information is for a file that has been merged and
- * <code>false</code> for folders and for files that have not been merged.
- */
- public boolean isNeedsMerge(Date otherTimestamp) {
- return syncType == TYPE_MERGED_WITH_CONFLICTS && timeStamp.equals(otherTimestamp);
- }
-
- /**
- * Answers if this sync information is for a resource that has been merged with conflicts by the
- * cvs server.
- *
- * @return <code>true</code> if the sync information is for a file that has been merged and
- * <code>false</code> for folders and for files that have not been merged.
- */
- public boolean isMergedWithConflicts() {
- return syncType == TYPE_MERGED_WITH_CONFLICTS;
- }
-
- /**
- * Answers if this sync information is for a resource that has been merged by the cvs server.
- *
- * @return <code>true</code> if the sync information is for a file that has been merged and
- * <code>false</code> for folders and for files that have not been merged.
- */
- public boolean isMerged() {
- return syncType == TYPE_MERGED || isMergedWithConflicts();
- }
-
- /**
- * Answers if this sync information is for a file that has been added but not comitted
- * to the CVS repository yet.
- *
- * @return <code>true</code> if the sync information is new or <code>false</code> if
- * the sync is for an file that exists remotely. For folder sync info this returns
- * <code>false</code>.
- */
- public boolean isAdded() {
- if(!isDirectory) {
- return getRevision().equals(ADDED_REVISION);
- } else {
- return false;
- }
- }
-
- /**
- * Answers if this sync information is for a file that is scheduled to be deleted
- * from the repository but the deletion has not yet been comitted.
- *
- * @return <code>true</code> if the sync information is deleted or <code>false</code> if
- * the sync is for an file that exists remotely.
- */
- public boolean isDeleted() {
- return isDeleted;
- }
-
- /**
- * Returns an entry line that can be saved in the CVS/Entries file. For sending entry lines to the
- * server use <code>getServerEntryLine</code>.
- *
- * @return a file or folder entry line reflecting the state of this sync object.
- */
- public String getEntryLine() {
- return getEntryLine(true /*include timestamps*/, null /*no timestamp override*/);
- }
-
- /**
- * Same as <code>getEntryLine</code> except it considers merged files in entry line timestamp format.
- * This is only valid for sending the file to the server.
- *
- * @param fileTimestamp is timestamp of the resource associated with this sync info.
- * @return a file or folder entry line reflecting the state of this sync object.
- */
- public String getServerEntryLine(Date fileTimestamp) {
- String serverTimestamp;
- if(fileTimestamp != null && (isMerged() || isMergedWithConflicts())) {
- if(isNeedsMerge(fileTimestamp)) {
- serverTimestamp = TIMESTAMP_SERVER_MERGED_WITH_CONFLICT;
- } else {
- serverTimestamp = TIMESTAMP_SERVER_MERGED;
- }
- return getEntryLine(true, serverTimestamp);
- } else {
- return getEntryLine(false, null);
- }
- }
-
- /**
- * Anwsers a compatible permissions line for files.
- *
- * @return a permission line for files and <code>null</code> if this sync object is
- * a directory.
- */
- public String getPermissionLine() {
- if(isDirectory) {
- return null;
- } else {
- String permissions = this.permissions;
- if (permissions == null)
- permissions = DEFAULT_PERMISSIONS;
- return SEPERATOR + name + SEPERATOR + permissions;
- }
- }
-
- /**
- * Gets the permissions. Returns <code>null</code> for directories and
- * a non-null permission for files.
- *
- * @return a string of the format "u=rw,g=rw,o=r"
- */
- public String getPermissions() {
- if(isDirectory) {
- return null;
- } else {
- if(permissions==null) {
- return DEFAULT_PERMISSIONS;
- } else {
- return permissions;
- }
- }
- }
- /**
- * Gets the tag or <code>null</code> if a tag is not available.
- *
- * @return Returns a String
- */
- public CVSTag getTag() {
- return tag;
- }
- /**
- * Gets the timeStamp or <code>null</code> if a timestamp is not available.
- *
- * @return a date instance representing the timestamp
- */
- public Date getTimeStamp() {
- return timeStamp;
- }
- /**
- * Gets the version or <code>null</code> if this is a folder sync info. The returned
- * revision will never include the DELETED_PREFIX. To found out if this sync info is
- * for a deleted resource call isDeleted().
- *
- * @return Returns a String
- */
- public String getRevision() {
- return revision;
- }
-
- /**
- * Gets the name.
- *
- * @return Returns a String
- */
- public String getName() {
- return name;
- }
- /**
- * Gets the keyword mode.
- * @return the keyword substitution option
- */
- public KSubstOption getKeywordMode() {
- return keywordMode;
- }
-
- /**
- * Answers the default permissions string.
- */
- public static String getDefaultPermissions() {
- return DEFAULT_PERMISSIONS;
- }
-
- /**
- * Name equality between resource sync info objects.
- */
- public boolean equals(Object other) {
- if(other instanceof ResourceSyncInfo) {
- ResourceSyncInfo syncInfo = ((ResourceSyncInfo)other);
- if(other == this) return true;
- if(getName() == syncInfo.getName()) return true;
- return getName().equals(syncInfo.getName());
- } else {
- return false;
- }
- }
-
- public int hashCode() {
- return getName().hashCode();
- }
-
- /*
- * @see Object#toString()
- */
- public String toString() {
- return getEntryLine(true, null /*no timestamp override*/);
- }
- public MutableResourceSyncInfo cloneMutable() {
- MutableResourceSyncInfo newSync = new MutableResourceSyncInfo(this);
- return newSync;
- }
- /**
- * Sets the tag for the resource.
- */
- protected void setTag(CVSTag tag) {
- if(tag!=null) {
- this.tag = new CVSEntryLineTag(tag);
- } else {
- this.tag = null;
- }
- }
-
-
- /*
- * Sets the sync type
- */
- protected void setSyncType(int syncType) {
- this.syncType = syncType;
- }
- /**
- * Sets the version and decides if the revision is for a deleted resource the revision field
- * will not include the deleted prefix '-'.
- *
- * @param version the version to set
- */
- protected void setRevision(String revision) {
- if(revision==null || revision.equals(ADDED_REVISION)) {
- this.revision = ADDED_REVISION;
- timeStamp = null;
- syncType = TYPE_REGULAR;
- isDeleted = false;
- } else if(revision.startsWith(DELETED_PREFIX)) {
- this.revision = revision.substring(DELETED_PREFIX.length());
- isDeleted = true;
- } else {
- this.revision = revision;
- isDeleted = false;
- }
- }
-
- /**
- * Set the entry line
- *
- * @throws CVSException if the entryLine is malformed
- */
- private void setEntryLine(String entryLine) throws CVSException {
- if(entryLine.startsWith(DIRECTORY_PREFIX)) {
- isDirectory = true;
- entryLine = entryLine.substring(1);
- } else {
- isDirectory = false;
- }
- EmptyTokenizer tokenizer = new EmptyTokenizer(entryLine,SEPERATOR);
- if(tokenizer.countTokens() != 5) {
- throw new CVSException(Policy.bind("Malformed_entry_line___11") + entryLine); //$NON-NLS-1$
- }
-
- name = tokenizer.nextToken();
-
- if(name.length()==0) {
- throw new CVSException(Policy.bind("Malformed_entry_line,_missing_name___12") + entryLine); //$NON-NLS-1$
- }
-
- String rev = tokenizer.nextToken();
-
- if(rev.length()==0 && !isDirectory()) {
- throw new CVSException(Policy.bind("Malformed_entry_line,_missing_revision___13") + entryLine); //$NON-NLS-1$
- } else {
- setRevision(rev);
- }
-
- String date = tokenizer.nextToken();
-
- // possible timestamps are:
- // from server: "+=" and "+modified"
- // from entry line: "Result of Merge+Thu May 25 12:33:33 2002"
- // "Result of Merge"
- // "Thu May 25 12:33:33 2002"
- //
- // The server will send a timestamp of "+=" if
- // the file was merged with conflicts. The '+' indicates that there are conflicts and the
- // '=' indicate that the timestamp for the file should be used. If the merge does not
- // have conflicts, simply add a text only timestamp and the file will be regarded as
- // having outgoing changes.
- // The purpose for having the two different timestamp options for merges is to
- // dissallow commit of files that have conflicts until they have been manually edited.
- if(date.indexOf(ResourceSyncInfo.TIMESTAMP_SERVER_MERGED) != -1) {
- syncType = TYPE_MERGED;
- date = null;
- } else if(date.indexOf(ResourceSyncInfo.TIMESTAMP_SERVER_MERGED_WITH_CONFLICT) != -1) {
- syncType = TYPE_MERGED_WITH_CONFLICTS;
- date = null;
- } else if(date.indexOf(TIMESTAMP_MERGED_WITH_CONFLICT)!=-1) {
- date = date.substring(date.indexOf("+") + 1); //$NON-NLS-1$
- syncType = TYPE_MERGED_WITH_CONFLICTS;
- } else if(date.indexOf(TIMESTAMP_MERGED)!=-1) {
- syncType = TYPE_MERGED;
- date = null;
- }
-
- if(date==null || "".equals(date)) { //$NON-NLS-1$
- timeStamp = null;
- } else {
- try {
- timeStamp = CVSDateFormatter.entryLineToDate(date);
- } catch(ParseException e) {
- // something we don't understand, just make this sync have no timestamp and
- // never be in sync with the server.
- timeStamp = null;
- }
- }
- keywordMode = KSubstOption.fromMode(tokenizer.nextToken());
- String tagEntry = tokenizer.nextToken();
-
- if(tagEntry.length()>0) {
- tag = new CVSEntryLineTag(tagEntry);
- } else {
- tag = null;
- }
- }
-
- private String getEntryLine(boolean includeTimeStamp, String timestampOverride) {
- StringBuffer result = new StringBuffer();
-
- if(isDirectory) {
- result.append(DIRECTORY_PREFIX);
- result.append(name + "////"); //$NON-NLS-1$
- } else {
- result.append(SEPERATOR);
- result.append(name);
- result.append(SEPERATOR);
-
- if(isDeleted){
- result.append(DELETED_PREFIX);
- }
- result.append(revision);
- result.append(SEPERATOR);
- if(includeTimeStamp) {
- String entryLineTimestamp = ""; //$NON-NLS-1$
- if(timestampOverride!=null) {
- entryLineTimestamp = timestampOverride;
- } else {
- switch(syncType) {
- case TYPE_REGULAR:
- if(timeStamp==null) {
- entryLineTimestamp = TIMESTAMP_DUMMY;
- } else {
- entryLineTimestamp = CVSDateFormatter.dateToEntryLine(timeStamp);
- } break;
- case TYPE_MERGED:
- entryLineTimestamp = TIMESTAMP_MERGED; break;
- case TYPE_MERGED_WITH_CONFLICTS:
- entryLineTimestamp = TIMESTAMP_MERGED_WITH_CONFLICT + CVSDateFormatter.dateToEntryLine(timeStamp); break;
- }
- }
- result.append(entryLineTimestamp);
- }
- result.append(SEPERATOR);
- if (keywordMode != null) result.append(keywordMode.toMode());
- result.append(SEPERATOR);
- if (tag != null) {
- result.append(tag.toEntryLineFormat(true));
- }
- }
- return result.toString();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/AddDeleteMoveListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/AddDeleteMoveListener.java
deleted file mode 100644
index bbb5bfa01..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/AddDeleteMoveListener.java
+++ /dev/null
@@ -1,447 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.util;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IResourceDeltaVisitor;
-import org.eclipse.core.resources.IResourceVisitor;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResourceVisitor;
-import org.eclipse.team.internal.ccvs.core.ICVSRunnable;
-import org.eclipse.team.internal.ccvs.core.IResourceStateChangeListener;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-import org.eclipse.team.internal.ccvs.core.syncinfo.MutableResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-/**
- * Listen for the addition of orphaned subtrees as a result of a copy or move.
- */
-public class AddDeleteMoveListener implements IResourceDeltaVisitor, IResourceChangeListener, IResourceStateChangeListener {
-
- public static final String CVS_MARKER = "org.eclipse.team.cvs.core.cvsmarker";//$NON-NLS-1$
- public static final String DELETION_MARKER = "org.eclipse.team.cvs.core.cvsremove";//$NON-NLS-1$
- public static final String ADDITION_MARKER = "org.eclipse.team.cvs.core.cvsadd";//$NON-NLS-1$
-
- public static final String NAME_ATTRIBUTE = "name";//$NON-NLS-1$
-
- public static IResource getResourceFor(IProject container, IResource destination, IPath originating) {
- switch(destination.getType()) {
- case IResource.FILE : return container.getFile(originating);
- case IResource.FOLDER: return container.getFolder(originating);
- case IResource.PROJECT: return ResourcesPlugin.getWorkspace().getRoot().getProject(originating.toString());
- }
- return destination;
- }
-
- /**
- * @see IResourceDeltaVisitor#visit(IResourceDelta)
- */
- public boolean visit(IResourceDelta delta) throws CoreException {
- IResource resource = delta.getResource();
- IProject project = resource.getProject();
- boolean movedTo = (delta.getFlags() & IResourceDelta.MOVED_TO) > 0;
- boolean movedFrom = (delta.getFlags() & IResourceDelta.MOVED_FROM) > 0;
- switch (delta.getKind()) {
- case IResourceDelta.ADDED :
- if (resource.getType() == IResource.FOLDER) {
- handleOrphanedSubtree((IContainer)resource);
- handleAddedFolder((IFolder) resource);
- } else if (resource.getType() == IResource.FILE) {
- handleAddedFile((IFile)resource);
- }
- break;
- case IResourceDelta.REMOVED :
- if (resource.getType() == IResource.FILE) {
- handleDeletedFile((IFile)resource);
- }
- break;
- case IResourceDelta.CHANGED :
- // This state means there is a resource before and after but changes were made by deleting and moving.
- // For files, we shouldn'd do anything.
- // For folders, we should purge the CVS info
- if (resource.getType() == IResource.FOLDER) {
- // When folders are moved, purge the CVS folders
- if (movedFrom)
- return ! handleOrphanedSubtree((IContainer)resource);
- }
- handleChangedResource(resource);
- break;
- }
- return true;
- }
-
- /*
- * Determine if the container is an orphaned subtree.
- * If it is, handle it and return true.
- * Otherwise, return false
- */
- private boolean handleOrphanedSubtree(IContainer resource) {
- try {
- ICVSFolder mFolder = CVSWorkspaceRoot.getCVSFolderFor((IContainer)resource);
- if (mFolder.isCVSFolder() && ! mFolder.isManaged() && mFolder.getParent().isCVSFolder()) {
- mFolder.unmanage(null);
- return true;
- }
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- }
- return false;
- }
-
-
- /*
- * Mark deleted managed files as outgoing deletions
- */
- private void handleDeletedFile(IFile resource) {
- try {
- ICVSFile mFile = CVSWorkspaceRoot.getCVSFileFor((IFile)resource);
- if (mFile.isManaged()) {
- ResourceSyncInfo info = mFile.getSyncInfo();
- if (info.isAdded()) {
- mFile.unmanage(null);
- } else if ( ! info.isDeleted()) {
- MutableResourceSyncInfo deletedInfo = info.cloneMutable();
- deletedInfo.setDeleted(true);
- mFile.setSyncInfo(deletedInfo);
- }
- }
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- }
- }
-
- /*
- * Handle the case where an added file has the same name as a "cvs removed" file
- * by restoring the sync info to what it was before the delete
- */
- private void handleAddedFile(IFile resource) {
- try {
- ICVSFile mFile = CVSWorkspaceRoot.getCVSFileFor((IFile)resource);
- if (mFile.isManaged()) {
- ResourceSyncInfo info = mFile.getSyncInfo();
- if (info.isDeleted()) {
- // Handle a replaced deletion
- MutableResourceSyncInfo undeletedInfo = info.cloneMutable();
- undeletedInfo.setDeleted(false);
- mFile.setSyncInfo(undeletedInfo);
- try {
- IMarker marker = getDeletionMarker(resource);
- if (marker != null) marker.delete();
- } catch (CoreException e) {
- CVSProviderPlugin.log(e.getStatus());
- }
- } else if (info.isDirectory()) {
- // XXX This is a gender change against the server! We should prevent this creation.
- mFile.unmanage(null);
- }
- }
- createNecessaryMarkers(new IResource[] {resource});
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- }
- }
-
- private void handleAddedFolder(IFolder resource) {
- try {
- ICVSFolder mFolder = CVSWorkspaceRoot.getCVSFolderFor(resource);
- if (mFolder.isManaged()) {
- ResourceSyncInfo info = mFolder.getSyncInfo();
- if ( ! info.isDirectory()) {
- // XXX This is a gender change against the server! We should prevent this creation.
- mFolder.unmanage(null);
- }
- }
- createNecessaryMarkers(new IResource[] {resource});
- } catch (CVSException e) {
- CVSProviderPlugin.log(e);
- }
- }
-
- private void handleChangedResource(IResource resource) {
- if (resource.getType() == IResource.PROJECT) return;
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- // Make sure that unmanaged resources whose parent is a cvs folder have an addition task on them
- try {
- if ( ! cvsResource.isManaged() && ! cvsResource.isIgnored() && cvsResource.getParent().isCVSFolder()) {
- createAdditonMarker(resource);
- }
- } catch (CVSException e) {
- // If the above fails, just log the exception
- CVSProviderPlugin.log(e.getStatus());
- }
- }
-
- public void resourceChanged(IResourceChangeEvent event) {
- try {
- IResourceDelta root = event.getDelta();
- IResourceDelta[] projectDeltas = root.getAffectedChildren();
- for (int i = 0; i < projectDeltas.length; i++) {
- IResourceDelta delta = projectDeltas[i];
- IResource resource = delta.getResource();
- RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId());
-
- // Make sure that the project is a CVS folder.
- if (provider != null) {
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor(resource.getProject());
- try {
- if (! folder.isCVSFolder()) {
- RepositoryProvider.unmap(resource.getProject());
- }
- } catch (TeamException e) {
- CVSProviderPlugin.log(e.getStatus());
- }
- }
-
- // if a project is moved the originating project will not be associated with the CVS provider
- // however listeners will probably still be interested in the move delta.
- if ((delta.getFlags() & IResourceDelta.MOVED_TO) > 0) {
- IResource destination = getResourceFor(resource.getProject(), resource, delta.getMovedToPath());
- provider = RepositoryProvider.getProvider(destination.getProject());
- }
-
- if(provider!=null) {
- delta.accept(this);
- }
- }
- } catch (CoreException e) {
- Util.logError(Policy.bind("ResourceDeltaVisitor.visitError"), e);//$NON-NLS-1$
- }
- }
-
- /*
- * @see IResourceStateChangeListener#resourceStateChanged(IResource[])
- */
- public void resourceStateChanged(IResource[] changedResources) {
- createNecessaryMarkers(changedResources);
- }
-
- /**
- * @see IResourceStateChangeListener#projectConfigured(IProject)
- */
- public void projectConfigured(final IProject project) {
- try {
- final ICVSFolder root = CVSWorkspaceRoot.getCVSFolderFor(project);
- root.accept(new ICVSResourceVisitor() {
- public void visitFile(ICVSFile file) throws CVSException {
- if (file.getParent().isCVSFolder()) {
- if (file.isManaged() && file.getSyncInfo().isDeleted()) {
- createDeleteMarker(project.getFile(file.getRelativePath(root)));
- } else if ( ! file.isManaged() && ! file.isIgnored()) {
- createAdditonMarker(project.getFile(file.getRelativePath(root)));
- }
- }
- }
- public void visitFolder(ICVSFolder folder) throws CVSException {
- if (folder.isCVSFolder()) {
- folder.acceptChildren(this);
- } else if ( ! folder.isIgnored() && folder.getParent().isCVSFolder()) {
- createAdditonMarker(project.getFolder(folder.getRelativePath(root)));
- }
- }
- });
- } catch (CVSException e) {
- CVSProviderPlugin.log(e.getStatus());
- }
- }
-
- /**
- * @see IResourceStateChangeListener#projectDeconfigured(IProject)
- */
- public void projectDeconfigured(IProject project) {
- try {
- clearCVSMarkers(project);
- } catch (CoreException e) {
- CVSProviderPlugin.log(e.getStatus());
- }
- }
-
- public static void refreshAllMarkers() throws CoreException {
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- if(RepositoryProvider.getProvider(project, CVSProviderPlugin.getTypeId()) != null) {
- refreshMarkers(project);
- }
- }
- }
-
- private static IMarker createDeleteMarker(IResource resource) {
- if (! CVSProviderPlugin.getPlugin().getShowTasksOnAddAndDelete()) {
- return null;
- }
- try {
- IMarker marker = getDeletionMarker(resource);
- if (marker != null) {
- return marker;
- }
- IContainer parent = resource.getParent();
- if (! parent.exists()) return null;
- marker = parent.createMarker(DELETION_MARKER);
- marker.setAttribute("name", resource.getName());//$NON-NLS-1$
- marker.setAttribute(IMarker.MESSAGE, Policy.bind("AddDeleteMoveListener.deletedResource", resource.getName()));//$NON-NLS-1$
- marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_INFO);
- return marker;
- } catch (CoreException e) {
- Util.logError(Policy.bind("AddDeleteMoveListener.Error_creating_deletion_marker_1"), e); //$NON-NLS-1$
- }
- return null;
- }
-
- private static IMarker createAdditonMarker(IResource resource) {
- if (! CVSProviderPlugin.getPlugin().getShowTasksOnAddAndDelete()) {
- return null;
- }
- try {
- IMarker marker = getAdditionMarker(resource);
- if (marker != null) {
- return marker;
- }
- marker = resource.createMarker(ADDITION_MARKER);
- marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_INFO);
- marker.setAttribute(IMarker.MESSAGE, Policy.bind("AddDeleteMoveListener.Local_addition_not_under_CVS_control_2")); //$NON-NLS-1$
- return marker;
- } catch (CoreException e) {
- Util.logError(Policy.bind("AddDeleteMoveListener.Error_creating_addition_marker_3"), e); //$NON-NLS-1$
- }
- return null;
- }
-
- private static IMarker getAdditionMarker(IResource resource) throws CoreException {
- IMarker[] markers = resource.findMarkers(ADDITION_MARKER, false, IResource.DEPTH_ZERO);
- if (markers.length == 1) {
- return markers[0];
- }
- return null;
- }
-
- private static IMarker getDeletionMarker(IResource resource) throws CoreException {
- if (resource.getParent().exists()) {
- String name = resource.getName();
- IMarker[] markers = resource.getParent().findMarkers(DELETION_MARKER, false, IResource.DEPTH_ZERO);
- for (int i = 0; i < markers.length; i++) {
- IMarker iMarker = markers[i];
- String markerName = (String)iMarker.getAttribute(NAME_ATTRIBUTE);
- if (markerName.equals(name))
- return iMarker;
- }
- }
- return null;
- }
-
- private static void createNecessaryMarkers(IResource[] changedResources) {
- for (int i = 0; i < changedResources.length; i++) {
- try {
- final IResource resource = changedResources[i];
- // Only update markers for projects with a provider
- RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId());
- if (provider == null) break;
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- // Handle addition markers
- if (cvsResource.isManaged() || cvsResource.isIgnored()) {
- if (cvsResource.exists()) {
- // Remove the addition marker for managed or ignored resources
- IMarker marker = getAdditionMarker(resource);
- if (marker != null)
- marker.delete();
- // For managed folders, add addition markers to unmanaged/unignored children
- if (cvsResource.isManaged() && cvsResource.isFolder()) {
- IResource[] children = ((IFolder)resource).members();
- for (int j = 0; j < children.length; j++) {
- IResource iResource = children[j];
- ICVSResource child = CVSWorkspaceRoot.getCVSResourceFor(iResource);
- if ( ! child.isManaged() && ! child.isIgnored()) {
- createAdditonMarker(iResource);
- }
- }
- }
- }
- } else if (cvsResource.exists() && cvsResource.getParent().isCVSFolder()) {
- // If the parent is a CVS folder, place an addition marker on the resource
- IMarker marker = getAdditionMarker(resource);
- if (marker == null) {
- createAdditonMarker(resource);
- }
- }
-
- // Handle deletion markers
- if (resource.getType() == IResource.FILE) {
- if (cvsResource.exists()) {
- IMarker marker = getDeletionMarker(resource);
- if (marker != null)
- marker.delete();
- } else {
- if (cvsResource.isManaged()) {
- createDeleteMarker(resource);
- } else {
- IMarker marker = getDeletionMarker(resource);
- if (marker != null)
- marker.delete();
- }
- }
- }
- } catch (CVSException e) {
- Util.logError(Policy.bind("AddDeleteMoveListener.Error_updating_marker_state_4"), e); //$NON-NLS-1$
- } catch (CoreException e) {
- Util.logError(Policy.bind("AddDeleteMoveListener.Error_updating_marker_state_4"), e); //$NON-NLS-1$
- }
- }
- }
-
- private static void refreshMarkers(IResource resource) throws CoreException {
- final List resources = new ArrayList();
- clearCVSMarkers(resource);
- resource.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- if(resource.getType() != IResource.PROJECT) {
- resources.add(resource);
- }
- return true;
- }
- }, IResource.DEPTH_INFINITE, true /*include phantoms*/);
- createNecessaryMarkers((IResource[]) resources.toArray(new IResource[resources.size()]));
- }
-
- public static void clearAllCVSMarkers() throws CoreException {
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- if(RepositoryProvider.getProvider(project, CVSProviderPlugin.getTypeId()) != null) {
- clearCVSMarkers(project);
- }
- }
- }
-
- private static void clearCVSMarkers(IResource resource) throws CoreException {
- IMarker[] markers = resource.findMarkers(CVS_MARKER, true, IResource.DEPTH_INFINITE);
- for (int i = 0; i < markers.length; i++) {
- markers[i].delete();
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/Assert.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/Assert.java
deleted file mode 100644
index 0204f2e24..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/Assert.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.util;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-/**
- * <code>Assert</code> is useful for for embedding runtime sanity checks
- * in code.
- * The predicate methods all test a condition and throw some
- * type of unchecked exception if the condition does not hold.
- * <p>
- * Assertion failure exceptions, like most runtime exceptions, are
- * thrown when something is misbehaving. Assertion failures are invariably
- * unspecified behavior; consequently, clients should never rely on
- * these being thrown (and certainly should not being catching them
- * specifically).
- * </p>
- */
-public final class Assert {
- /* This class is not intended to be instantiated. */
- private Assert() {
- }
- /** Asserts that an argument is legal. If the given boolean is
- * not <code>true</code>, an <code>IllegalArgumentException</code>
- * is thrown.
- *
- * @param expression the outcode of the check
- * @return <code>true</code> if the check passes (does not return
- * if the check fails)
- * @exception IllegalArgumentException if the legality test failed
- */
- public static boolean isLegal(boolean expression) {
- return isLegal(expression, ""); //$NON-NLS-1$
- }
- /** Asserts that an argument is legal. If the given boolean is
- * not <code>true</code>, an <code>IllegalArgumentException</code>
- * is thrown.
- * The given message is included in that exception, to aid debugging.
- *
- * @param expression the outcode of the check
- * @param message the message to include in the exception
- * @return <code>true</code> if the check passes (does not return
- * if the check fails)
- * @exception IllegalArgumentException if the legality test failed
- */
- public static boolean isLegal(boolean expression, String message) {
- if (!expression)
- throw new IllegalArgumentException(message);
- return expression;
- }
- /** Asserts that the given object is not <code>null</code>. If this
- * is not the case, some kind of unchecked exception is thrown.
- *
- * @param object the value to test
- * @exception IllegalArgumentException if the object is <code>null</code>
- */
- public static void isNotNull(Object object) {
- isNotNull(object, ""); //$NON-NLS-1$
- }
- /** Asserts that the given object is not <code>null</code>. If this
- * is not the case, some kind of unchecked exception is thrown.
- * The given message is included in that exception, to aid debugging.
- *
- * @param object the value to test
- * @param message the message to include in the exception
- * @exception IllegalArgumentException if the object is <code>null</code>
- */
- public static void isNotNull(Object object, String message) {
- if (object == null)
- throw new AssertionFailedException("null argument:" + message); //$NON-NLS-1$
- }
- /** Asserts that the given boolean is <code>true</code>. If this
- * is not the case, some kind of unchecked exception is thrown.
- *
- * @param expression the outcode of the check
- * @return <code>true</code> if the check passes (does not return
- * if the check fails)
- */
- public static boolean isTrue(boolean expression) {
- return isTrue(expression, ""); //$NON-NLS-1$
- }
- /** Asserts that the given boolean is <code>true</code>. If this
- * is not the case, some kind of unchecked exception is thrown.
- * The given message is included in that exception, to aid debugging.
- *
- * @param expression the outcode of the check
- * @param message the message to include in the exception
- * @return <code>true</code> if the check passes (does not return
- * if the check fails)
- */
- public static boolean isTrue(boolean expression, String message) {
- if (!expression)
- throw new AssertionFailedException("assertion failed: " + message); //$NON-NLS-1$
- return expression;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/AssertionFailedException.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/AssertionFailedException.java
deleted file mode 100644
index df2926d74..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/AssertionFailedException.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.util;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-/**
- * <code>AssertionFailedException</code> is a runtime exception thrown
- * by some of the methods in <code>Assert</code>.
- * <p>
- * This class is not declared public to prevent some misuses; programs that catch
- * or otherwise depend on assertion failures are susceptible to unexpected
- * breakage when assertions in the code are added or removed.
- * </p>
- */
-/* package */
-class AssertionFailedException extends RuntimeException {
-/** Constructs a new exception.
- */
-public AssertionFailedException() {
-}
-/** Constructs a new exception with the given message.
- */
-public AssertionFailedException(String detail) {
- super(detail);
-}
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/CVSDateFormatter.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/CVSDateFormatter.java
deleted file mode 100644
index 6a38b97af..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/CVSDateFormatter.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.util;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.Locale;
-import java.util.TimeZone;
-
-/**
- * Utility class for converting timestamps used in Entry file lines. The format
- * required in the Entry file is ISO C asctime() function (Sun Apr 7 01:29:26 1996).
- * <p>
- * To be compatible with asctime(), the day field in the entryline format is
- * padded with a space and not a zero. Most other CVS clients use string comparison
- * for timestamps based on the result of the C function asctime().
- * </p>
- */
-public class CVSDateFormatter {
-
- private static final String ENTRYLINE_FORMAT = "E MMM dd HH:mm:ss yyyy"; //$NON-NLS-1$
- private static final String SERVER_FORMAT = "dd MMM yyyy HH:mm:ss";//$NON-NLS-1$
- private static final int ENTRYLINE_TENS_DAY_OFFSET = 8;
-
- private static final SimpleDateFormat serverFormat = new SimpleDateFormat(SERVER_FORMAT, Locale.US);
- private static SimpleDateFormat entryLineFormat = new SimpleDateFormat(ENTRYLINE_FORMAT, Locale.US);
-
- static {
- entryLineFormat.setTimeZone(TimeZone.getTimeZone("GMT")); //$NON-NLS-1$
- }
- static public Date serverStampToDate(String text) throws ParseException {
- serverFormat.setTimeZone(getTimeZone(text));
- Date date = serverFormat.parse(text);
- return date;
- }
-
- static public String dateToServerStamp(Date date) {
- serverFormat.setTimeZone(TimeZone.getTimeZone("GMT"));//$NON-NLS-1$
- return serverFormat.format(date) + " -0000"; //$NON-NLS-1$
- }
-
- static public Date entryLineToDate(String text) throws ParseException {
- if (text.charAt(ENTRYLINE_TENS_DAY_OFFSET) == ' ') {
- StringBuffer buf = new StringBuffer(text);
- buf.setCharAt(ENTRYLINE_TENS_DAY_OFFSET, '0');
- text = buf.toString();
- }
- return entryLineFormat.parse(text);
- }
-
- static public String dateToEntryLine(Date date) {
- String passOne = entryLineFormat.format(date);
- if (passOne.charAt(ENTRYLINE_TENS_DAY_OFFSET) != '0') return passOne;
- StringBuffer passTwo = new StringBuffer(passOne);
- passTwo.setCharAt(ENTRYLINE_TENS_DAY_OFFSET, ' ');
- return passTwo.toString();
- }
-
- /*
- * Converts timezone text from date string from CVS server and
- * returns a timezone representing the received timezone.
- * Timezone string is of the following format: [-|+]MMSS
- */
- static private TimeZone getTimeZone(String dateFromServer) {
- String tz = null;
- StringBuffer resultTz = new StringBuffer("GMT");//$NON-NLS-1$
- if (dateFromServer.indexOf("-") != -1) {//$NON-NLS-1$
- resultTz.append("-");//$NON-NLS-1$
- tz = dateFromServer.substring(dateFromServer.indexOf("-"));//$NON-NLS-1$
- } else if (dateFromServer.indexOf("+") != -1) {//$NON-NLS-1$
- resultTz.append('+');
- tz = dateFromServer.substring(dateFromServer.indexOf("+"));//$NON-NLS-1$
- }
- try {
- if(tz!=null) {
- resultTz.append(tz.substring(1, 3) /*hours*/ + ":" + tz.substring(3, 5) /*minutes*/);//$NON-NLS-1$
- return TimeZone.getTimeZone(resultTz.toString());
- }
- } catch(IndexOutOfBoundsException e) {
- return TimeZone.getTimeZone("GMT");//$NON-NLS-1$
- }
- return TimeZone.getTimeZone("GMT");//$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/EmptyTokenizer.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/EmptyTokenizer.java
deleted file mode 100644
index 6708bb4d1..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/EmptyTokenizer.java
+++ /dev/null
@@ -1,132 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.util;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.NoSuchElementException;
-import java.util.StringTokenizer;
-
-/**
- * The EmptyTokenizer is essentialy a StringTokenizer.
- *
- * The difference is that empty Tokens are given back as
- * empty Strings.
- *
- * If giveFirst an emptyString is the first return of nextToken()
- * on line that starts with its delim.
- *
- * If giveLast an emptyString is the last retrun of nextToken() on
- * line that ends with its delim.
- */
-public class EmptyTokenizer {
-
- private StringTokenizer st;
- private boolean lastWasDelim;
- private final boolean giveLast;
- private final boolean giveFirst;
- private String delim;
- private String line;
-
- private String cacheToken;
-
- public EmptyTokenizer(String line, String delim) {
- this(line, delim, false, true);
- }
-
- public EmptyTokenizer(String line, String delim, boolean giveFirst, boolean giveLast) {
-
- this.delim = delim;
- this.line = line;
- this.giveFirst = giveFirst;
- lastWasDelim = giveFirst;
- this.giveLast = giveLast;
-
- st = new StringTokenizer(line, delim, true);
- startCacheToken();
-
- }
-
- /**
- * Call this before using cachedNextToken().
- */
- private void startCacheToken() {
- if (st.hasMoreTokens()) {
- cacheToken = st.nextToken();
- } else {
- cacheToken = null;
- }
- }
-
- /**
- * Gives the next Token back. Ensures that cacheToken holds the
- * next Token to be given back.
- * This is done to have a chance to predict if we have got a token
- * at the end of the entry.
- */
- private String cachedNextToken() throws NoSuchElementException {
-
- String oldCacheToken = cacheToken;
-
- if (cacheToken == null) {
- throw new NoSuchElementException();
- }
-
- if (st.hasMoreTokens()) {
- cacheToken = st.nextToken();
- } else {
- cacheToken = null;
- }
-
- return oldCacheToken;
- }
-
-
- public boolean hasMoreTokens() {
- return (giveLast && lastWasDelim) ||
- (cacheToken != null && !cacheToken.equals(delim)) ||
- (cacheToken != null && cacheToken.equals(delim) && st.hasMoreTokens()) ||
- (cacheToken != null && cacheToken.equals(delim) && giveLast);
- }
-
- public String nextToken() {
-
- String token;
-
- if (giveLast && lastWasDelim && cacheToken == null) {
- lastWasDelim = false;
- return ""; //$NON-NLS-1$
- }
-
- token = cachedNextToken();
-
- if (!token.equals(delim)) {
- lastWasDelim = false;
- return token;
- }
-
- if (lastWasDelim) {
- return ""; //$NON-NLS-1$
- } else {
- lastWasDelim = true;
- return nextToken();
- }
- }
-
- public int countTokens() {
-
- EmptyTokenizer tmpEmptyTokenizer;
- int i=0;
-
- tmpEmptyTokenizer = new EmptyTokenizer(line, delim, giveFirst, giveLast);
- while (tmpEmptyTokenizer.hasMoreTokens()) {
- tmpEmptyTokenizer.nextToken();
- i++;
- }
-
- return i;
-
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/FileNameMatcher.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/FileNameMatcher.java
deleted file mode 100644
index c08302ece..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/FileNameMatcher.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.util;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.team.internal.ccvs.core.CVSException;
-
-/**
- * A FileNameMatcher associates a String with a String pattern.
- */
-public class FileNameMatcher {
-
- private List matchers = new ArrayList();
- private List results = new ArrayList();
- private static final String TRUE = "true"; //$NON-NLS-1$
-
- public FileNameMatcher() {
- }
-
- public FileNameMatcher(String[] patterns) {
- register(patterns);
- }
-
- void register(String[] patterns) {
- for (int i = 0; i < patterns.length; i++) {
- register(patterns[i],TRUE);
- }
- }
-
- public void register(String pattern, String result) {
-
- Assert.isTrue(matchers.size() == results.size());
-
- pattern = pattern.trim();
-
- // The empty pattern matches everything, but we want to match
- // nothing with it, so we just do not register anything
- if (pattern.length() == 0) {
- return;
- }
-
- matchers.add(new StringMatcher(pattern,false,false));
- results.add(result);
-
- }
-
- public String getMatch(String name) {
- StringMatcher stringMatcher;
-
- for (int i = 0; i < matchers.size(); i++) {
- stringMatcher = (StringMatcher) matchers.get(i);
- if (stringMatcher.match(name)) {
- return (String)results.get(i);
- }
- }
-
- return null;
- }
-
- public boolean match(String name) {
- return getMatch(name) != null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook.java
deleted file mode 100644
index daaffbc8b..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook.java
+++ /dev/null
@@ -1,281 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.util;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.team.IMoveDeleteHook;
-import org.eclipse.core.resources.team.IResourceTree;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.ICVSRunnable;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-import org.eclipse.team.internal.ccvs.core.syncinfo.MutableResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-/**
- * This hook exists to ensure that folders deletions will be recorded so that outgoing file
- * deletions can be properly communicated to the server.
- */
-public class MoveDeleteHook implements IMoveDeleteHook {
-
- /*
- * Delete the file and return true if an outgoing deletion will result
- * and the parent folder sync info needs to remain
- */
- private boolean makeFileOutgoingDeletion(IResourceTree tree, IFile source, IFile destination, int updateFlags, IProgressMonitor monitor) throws CoreException {
- // Delete or move the file
- if (destination == null) {
- tree.standardDeleteFile(source, updateFlags, monitor);
- } else {
- tree.standardMoveFile(source, destination, updateFlags, monitor);
- }
- // Indicate whether the parent folder sync info must remain for outgoing deletions
- // and update the file sync info to be a deletion
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor(source);
- boolean mustRemain = false;
- try {
- ResourceSyncInfo info = cvsFile.getSyncInfo();
- mustRemain = (info != null && ! info.isAdded());
- if (mustRemain) {
- MutableResourceSyncInfo newInfo = info.cloneMutable();
- newInfo.setDeleted(true);
- cvsFile.setSyncInfo(newInfo);
- }
- } catch (CVSException e) {
- tree.failed(e.getStatus());
- }
- return mustRemain;
- }
-
- /*
- * Delete the files contained in the folder structure rooted at source.
- * Return true if at least one file has been marked as an outgoing deletion and the parent folder must remain
- */
- private boolean makeFolderOutgoingDeletion(IResourceTree tree, IFolder source, IFolder destination, int updateFlags, IProgressMonitor monitor) throws CoreException {
- boolean fileFound = false;
-
- // Create the destination for a move
- if (destination != null && ! destination.exists()) {
- destination.create(false, true, monitor);
- }
-
- // Move or delete the children
- IResource[] members = source.members();
- for (int i = 0; i < members.length; i++) {
- IResource child = members[i];
- if (child.getType() == IResource.FOLDER) {
- // Determine the corresponding destination folder
- IFolder destFolder = null;
- if (destination != null) {
- destFolder = destination.getFolder(child.getFullPath().removeFirstSegments(source.getFullPath().segmentCount()));
- }
-
- // Try to delete/move the child
- if (makeFolderOutgoingDeletion(tree, (IFolder)child, destFolder, updateFlags, monitor)) {
- fileFound = true;
- }
- } else if (child.getType() == IResource.FILE) {
- IFile destFile = null;
- if (destination != null) {
- destFile = destination.getFile(child.getFullPath().removeFirstSegments(source.getFullPath().segmentCount()));
- }
- fileFound = makeFileOutgoingDeletion(tree, (IFile)child, destFile, updateFlags, monitor);
- }
- }
-
- // If there were no files, we need to check if the folder already has outgoing deletions
- if ( ! fileFound) {
- try {
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor(source);
- ICVSResource[] files = folder.members(ICVSFolder.FILE_MEMBERS | ICVSFolder.MANAGED_MEMBERS);
- for (int i = 0; i < files.length; i++) {
- ICVSFile cvsFile = (ICVSFile)files[i];
- if (cvsFile.isManaged() && ! cvsFile.getSyncInfo().isAdded()) {
- fileFound = true;
- break;
- }
- }
- // if there is still no file, look for phantom folders that may hold file deletions
- if ( ! fileFound) {
- ICVSResource[] folders = folder.members(ICVSFolder.FOLDER_MEMBERS | ICVSFolder.MANAGED_MEMBERS);
- for (int i = 0; i < folders.length; i++) {
- ICVSFolder cvsFolder = (ICVSFolder)folders[i];
- if ( ! cvsFolder.exists() && cvsFolder.isCVSFolder()) {
- // The only time we should have a non-existant CVS folder
- // is when it holds outgoing file deletions
- fileFound = true;
- break;
- }
- }
- }
-
- // If there is still no file, we can delete the folder without any special handling
- if ( ! fileFound) {
- tree.standardDeleteFolder(source, updateFlags, monitor);
- folder.unmanage(null);
- }
- } catch (CVSException e) {
- tree.failed(e.getStatus());
- }
- }
-
- // If there were managed files found, we must remember the folder's sync info
- if (fileFound) {
- try {
- EclipseSynchronizer.getInstance().prepareForDeletion(source);
- } catch (CVSException e) {
- tree.failed(e.getStatus());
- }
- tree.standardDeleteFolder(source, updateFlags, monitor);
- }
-
- return fileFound;
- }
-
- /**
- * @see IMoveDeleteHook#deleteFile(IResourceTree, IFile, int, IProgressMonitor)
- */
- public boolean deleteFile(
- IResourceTree tree,
- IFile file,
- int updateFlags,
- IProgressMonitor monitor) {
-
- // No special action is required here.
- // The AddDeleteMoveListener will update the sync info of the file
- return false;
- }
-
- /**
- * @see IMoveDeleteHook#deleteFolder(IResourceTree, IFolder, int, IProgressMonitor)
- */
- public boolean deleteFolder(
- final IResourceTree tree,
- final IFolder folder,
- final int updateFlags,
- IProgressMonitor monitor) {
-
- final ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor(folder);
- try {
- if (cvsFolder.isManaged()) {
- cvsFolder.run(new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- try {
- makeFolderOutgoingDeletion(tree, folder, null, updateFlags, monitor);
- } catch (CoreException e) {
- tree.failed(e.getStatus());
- }
- }
- }, monitor);
- return true;
- }
- } catch (CVSException e) {
- tree.failed(e.getStatus());
- }
- return false;
- }
-
- /**
- * @see IMoveDeleteHook#deleteProject(IResourceTree, IProject, int, IProgressMonitor)
- */
- public boolean deleteProject(
- IResourceTree tree,
- IProject project,
- int updateFlags,
- IProgressMonitor monitor) {
-
- // We need to flush any remembered folder deletions for the deleted project
- try {
- EclipseSynchronizer.getInstance().prepareForDeletion(project);
- } catch (CVSException e) {
- CVSProviderPlugin.log(e.getStatus());
- }
- return false;
- }
-
- /**
- * @see IMoveDeleteHook#moveFile(IResourceTree, IFile, IFile, int, IProgressMonitor)
- */
- public boolean moveFile(
- IResourceTree tree,
- IFile source,
- IFile destination,
- int updateFlags,
- IProgressMonitor monitor) {
-
- // No special action is required here.
- // The AddDeleteMoveListener will update the sync info of the source
- return false;
- }
-
- /**
- * @see IMoveDeleteHook#moveFolder(IResourceTree, IFolder, IFolder, int, IProgressMonitor)
- */
- public boolean moveFolder(
- final IResourceTree tree,
- final IFolder source,
- final IFolder destination,
- final int updateFlags,
- IProgressMonitor monitor) {
-
- final ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor(source);
- try {
- if (cvsFolder.isManaged()) {
- cvsFolder.run(new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- try {
- makeFolderOutgoingDeletion(tree, source, destination, updateFlags, monitor);
- } catch (CoreException e) {
- tree.failed(e.getStatus());
- }
- }
- }, monitor);
- return true;
- }
- } catch (CVSException e) {
- tree.failed(e.getStatus());
- }
-
- return false;
- }
-
- /**
- * @see IMoveDeleteHook#moveProject(IResourceTree, IProject, IProjectDescription, int, IProgressMonitor)
- */
- public boolean moveProject(
- IResourceTree tree,
- IProject source,
- IProjectDescription description,
- int updateFlags,
- IProgressMonitor monitor) {
-
- // We need to move (or flush) any remembered folder deletions for the deleted project
- // XXX We flush for now. This means that deleting a managed folder and then moving the
- // project will mean that the file deletions will be lost.
- try {
- EclipseSynchronizer.getInstance().prepareForDeletion(source);
- } catch (CVSException e) {
- CVSProviderPlugin.log(e.getStatus());
- }
- return false;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/PrepareForReplaceVisitor.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/PrepareForReplaceVisitor.java
deleted file mode 100644
index bbd539ea3..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/PrepareForReplaceVisitor.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.util;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResourceVisitor;
-import org.eclipse.team.internal.ccvs.core.ICVSRunnable;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-/**
- * This class is used to prepare a local CVS workspace for replacement by
- * the corresponding remote resources. More specifically, this class will
- * unmanage added and deleted resources so that, after the operation, the
- * resources in the local workspace will either correspond to the remote
- * counterparts or be unmanaged.
- */
-public class PrepareForReplaceVisitor implements ICVSResourceVisitor {
-
- private IProgressMonitor monitor;
- private int depth;
-
- /**
- * @see ICVSResourceVisitor#visitFile(ICVSFile)
- */
- public void visitFile(ICVSFile file) throws CVSException {
- ResourceSyncInfo info = file.getSyncInfo();
- if (info == null) {
- // Delete unmanaged files if the user wants them deleted
- if (CVSProviderPlugin.getPlugin().isReplaceUnmanaged()) {
- file.delete();
- }
- } else if (info.isAdded()) {
- file.delete();
- file.unmanage(null);
- } else if (info.isDeleted()) {
- // If deleted, null the sync info so the file will be refetched
- file.unmanage(null);
- } else if (file.isModified()) {
- // If the file is modified, delee and unmanage it and allow the
- // replace operaton to fetch it again. This isrequired because "update -C"
- // will fail for locally modified resources that have been deleted remotely.
- file.unmanage(null);
- file.delete();
- }
- monitor.worked(1);
- }
-
- /**
- * @see ICVSResourceVisitor#visitFolder(ICVSFolder)
- */
- public void visitFolder(ICVSFolder folder) throws CVSException {
- // Delete unmanaged folders if the user wants them deleted
- if (!folder.isCVSFolder() && CVSProviderPlugin.getPlugin().isReplaceUnmanaged()) {
- folder.delete();
- } else {
- // Visit the children of the folder as appropriate
- if (depth == IResource.DEPTH_INFINITE) {
- folder.acceptChildren(this);
- } else if (depth == IResource.DEPTH_ONE) {
- ICVSResource[] files = folder.members(ICVSFolder.FILE_MEMBERS);
- for (int i = 0; i < files.length; i++) {
- files[i].accept(this);
- }
- }
- // Also delete ignored child files that start with .#
- ICVSResource[] ignoredFiles = folder.members(ICVSFolder.FILE_MEMBERS | ICVSFolder.IGNORED_MEMBERS);
- for (int i = 0; i < ignoredFiles.length; i++) {
- ICVSResource cvsResource = ignoredFiles[i];
- if (cvsResource.getName().startsWith(".#")) { //$NON-NLS-1$
- cvsResource.delete();
- }
- }
- }
- monitor.worked(1);
- }
-
- public void visitResources(IProject project, final IResource[] resources, final String key, int depth, IProgressMonitor pm) throws CVSException {
- this.depth = depth;
- CVSWorkspaceRoot.getCVSFolderFor(project).run(new ICVSRunnable() {
- public void run(IProgressMonitor pm) throws CVSException {
- monitor = Policy.infiniteSubMonitorFor(pm, 100);
- monitor.beginTask(null, 512);
- for (int i = 0; i < resources.length; i++) {
- if (key != null) {
- monitor.subTask(Policy.bind(key, resources[i].getFullPath().toString())); //$NON-NLS-1$
- }
- IResource resource = resources[i];
- CVSWorkspaceRoot.getCVSResourceFor(resource).accept(PrepareForReplaceVisitor.this);
- }
- monitor.done();
- }
- }, pm);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ProjectDescriptionContentHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ProjectDescriptionContentHandler.java
deleted file mode 100644
index 45b5fce2f..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ProjectDescriptionContentHandler.java
+++ /dev/null
@@ -1,160 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.util;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Stack;
-
-import org.eclipse.core.resources.ICommand;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-
-public class ProjectDescriptionContentHandler implements ContentHandler {
-
- IProjectDescription desc;
- boolean inProjectDescription = false;
-
- boolean inComment = false;
- StringBuffer buffer = new StringBuffer();
-
- boolean inBuilder = false;
- List builders = new ArrayList();
- ICommand currentBuilder = null;
- Map args = new HashMap();
-
- List natures = new ArrayList();
-
- List references = new ArrayList();
-
- Stack tagStack = new Stack();
-
- ProjectDescriptionContentHandler(IProjectDescription desc) {
- this.desc = desc;
- }
- /**
- * @see ContentHandler#characters(char[], int, int)
- */
- public void characters(char[] chars, int startIndex, int length)
- throws SAXException {
- buffer.append(chars, startIndex, length);
- }
- /**
- * @see ContentHandler#endDocument()
- */
- public void endDocument() throws SAXException {
- }
- /**
- * @see ContentHandler#endElement(java.lang.String, java.lang.String, java.lang.String)
- */
- public void endElement(String namespaceURI, String localName, String qName)
- throws SAXException {
- if (localName.equals("project-description") && inProjectDescription) { //$NON-NLS-1$
- inProjectDescription = false;
- desc.setBuildSpec((ICommand[]) builders.toArray(new ICommand[builders.size()]));
- desc.setNatureIds((String[]) natures.toArray(new String[natures.size()]));
- desc.setReferencedProjects(
- (IProject[]) references.toArray(new IProject[references.size()]));
- } else if (localName.equals("comment") && inProjectDescription && inComment) { //$NON-NLS-1$
- inComment = false;
- desc.setComment(buffer.toString());
- } else if (localName.equals("builder") && inProjectDescription && inBuilder) { //$NON-NLS-1$
- inBuilder = false;
- currentBuilder.setArguments(args);
- if (currentBuilder.getBuilderName() != null)
- builders.add(currentBuilder);
- }
- if (!localName.equals(tagStack.peek())) {
- throw new RuntimeException(Policy.bind("ProjectDescriptionContentHandler.xml")); //$NON-NLS-1$
- }
- tagStack.pop();
- }
- /**
- * @see ContentHandler#endPrefixMapping(java.lang.String)
- */
- public void endPrefixMapping(String arg0) throws SAXException {
- }
- /**
- * @see ContentHandler#ignorableWhitespace(char[], int, int)
- */
- public void ignorableWhitespace(char[] arg0, int arg1, int arg2)
- throws SAXException {
- }
- /**
- * @see ContentHandler#processingInstruction(java.lang.String, java.lang.String)
- */
- public void processingInstruction(String arg0, String arg1)
- throws SAXException {
- }
- /**
- * @see ContentHandler#setDocumentLocator(org.xml.sax.Locator)
- */
- public void setDocumentLocator(Locator arg0) {
- }
- /**
- * @see ContentHandler#skippedEntity(java.lang.String)
- */
- public void skippedEntity(String e) throws SAXException {
- }
- /**
- * @see ContentHandler#startDocument()
- */
- public void startDocument() throws SAXException {
- }
- /**
- * @see ContentHandler#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
- */
- public void startElement(
- String namespaceURI,
- String localName,
- String qName,
- Attributes atts)
- throws SAXException {
- if (localName.equals("project-description") && !inProjectDescription) { //$NON-NLS-1$
- inProjectDescription = true;
- } else if (localName.equals("comment") && inProjectDescription && !inComment) { //$NON-NLS-1$
- inComment = true;
- } else if (localName.equals("builder") && inProjectDescription && !inBuilder) { //$NON-NLS-1$
- String builderName = atts.getValue("name"); //$NON-NLS-1$
- if (builderName != null) {
- inBuilder = true;
- currentBuilder = desc.newCommand();
- currentBuilder.setBuilderName(builderName);
- args = new HashMap(11);
- }
- } else if (localName.equals("arg") && inProjectDescription && inBuilder) { //$NON-NLS-1$
- String argName = atts.getValue("name"); //$NON-NLS-1$
- String argValue = atts.getValue("value"); //$NON-NLS-1$
- if (argName != null && argValue != null)
- args.put(argName, argValue);
- } else if (localName.equals("nature") && inProjectDescription && !inBuilder) { //$NON-NLS-1$
- String natureId = atts.getValue("id"); //$NON-NLS-1$
- if (natureId != null)
- natures.add(natureId);
- } else if (
- localName.equals("reference") && inProjectDescription && !inBuilder) { //$NON-NLS-1$
- String projectName = atts.getValue("project-name"); //$NON-NLS-1$
- if (projectName != null)
- references.add(
- ResourcesPlugin.getWorkspace().getRoot().getProject(projectName));
- }
- // empty buffer
- buffer = new StringBuffer();
- tagStack.push(localName);
- }
- /**
- * @see ContentHandler#startPrefixMapping(java.lang.String, java.lang.String)
- */
- public void startPrefixMapping(String arg0, String arg1) throws SAXException {
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ProjectDescriptionManager.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ProjectDescriptionManager.java
deleted file mode 100644
index c9b134a8c..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ProjectDescriptionManager.java
+++ /dev/null
@@ -1,268 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.util;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.apache.xerces.parsers.SAXParser;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-/**
- * This class handles the updating of the .vcm_meta file in projects managed by the CVSTeamProvider.
- *
- * It does so by listening to deltas on the project description and the .vcm_meta file itself.
- *
- */
-public class ProjectDescriptionManager implements IResourceChangeListener {
-
- public final static IPath PROJECT_DESCRIPTION_PATH = new Path(".vcm_meta"); //$NON-NLS-1$
- public final static IPath CORE_PROJECT_DESCRIPTION_PATH = new Path(".project"); //$NON-NLS-1$
- public final static boolean UPDATE_PROJECT_DESCRIPTION_ON_LOAD = true;
-
- public static final String VCMMETA_MARKER = "org.eclipse.team.cvs.core.vcmmeta"; //$NON-NLS-1$
-
- /*
- * Read the project meta file into the provider description
- */
- public static void readProjectDescription(IProjectDescription desc, InputStream stream) throws IOException, CVSException {
- SAXParser parser = new SAXParser();
- parser.setContentHandler(new ProjectDescriptionContentHandler(desc));
- try {
- parser.parse(new InputSource(stream));
- } catch (SAXException ex) {
- throw new CVSException(IStatus.ERROR, IStatus.ERROR, Policy.bind("ProjectDescriptionManager.unableToReadDescription"), ex); //$NON-NLS-1$
- }
- }
-
- public static void writeProjectDescription(IProject project, IProgressMonitor progress) throws CVSException {
-
- // generate the new contents of the project meta file into a string
- ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream();
- String newContents = null;
- try {
- IProjectDescription desc = project.getDescription();
- ProjectDescriptionWriter.writeProjectDescription(desc, byteOutputStream);
- byteOutputStream.close();
- newContents = byteOutputStream.toString("UTF8"); //$NON-NLS-1$
- } catch (IOException ex) {
- throw CVSException.wrapException(project, Policy.bind("ProjectDescriptionManager.ioDescription"), ex); //$NON-NLS-1$
- } catch (CoreException ex) {
- throw CVSException.wrapException(project, Policy.bind("ProjectDescriptionManager.coreDescription"), ex); //$NON-NLS-1$
- }
-
- IFile descResource = project.getFile(PROJECT_DESCRIPTION_PATH);
- if (descResource.exists()) {
- // check if the existing contents are the same before rewriting
- String oldContents = null;
- try {
- StringBuffer stringBuffer = new StringBuffer();
- InputStream is = ((IFile) descResource).getContents();
- byte[] buf = new byte[512];
- int result = is.read(buf);
- while (result != -1) {
- stringBuffer.append(new String(buf, 0, result, "UTF8")); //$NON-NLS-1$
- result = is.read(buf);
- }
- oldContents = stringBuffer.toString();
- is.close();
- } catch (IOException ex) {
- throw CVSException.wrapException(project, Policy.bind("ProjectDescriptionManager.ioDescription"), ex); //$NON-NLS-1$
- } catch (CoreException ex) {
- throw CVSException.wrapException(project, Policy.bind("ProjectDescriptionManager.coreDescription"), ex); //$NON-NLS-1$
- }
-
- if (oldContents.equals(newContents)) {
- // the contents of the new file would be the same as the old
- return;
- }
- try {
- descResource.setContents(
- new ByteArrayInputStream(byteOutputStream.toByteArray()),
- false,
- false,
- progress);
- } catch (CoreException ex) {
- throw CVSException.wrapException(project, Policy.bind("ProjectDescriptionManager.coreDescription"), ex); //$NON-NLS-1$
- }
- } else {
- try {
- descResource.create(
- new ByteArrayInputStream(byteOutputStream.toByteArray()),
- false,
- progress);
- } catch (CoreException ex) {
- throw CVSException.wrapException(descResource, Policy.bind("ProjectDescriptionManager.coreDescription"), ex); //$NON-NLS-1$
- }
-
- }
- }
-
- /*
- * To be called whenever the project description file is believed to have changed by
- * a load/loadIfIncoming operation.
- */
- public static void updateProjectIfNecessary(IProject project, IProgressMonitor progress) throws CoreException, CVSException {
-
- IFile descResource = project.getFile(PROJECT_DESCRIPTION_PATH);
- if (descResource.exists() && UPDATE_PROJECT_DESCRIPTION_ON_LOAD) {
-
- // If a managed .project files exists, don't read the .vcm_meta
- ICVSFile coreDescResource = CVSWorkspaceRoot.getCVSFileFor(project.getFile(CORE_PROJECT_DESCRIPTION_PATH));
- if (coreDescResource.exists() && coreDescResource.isManaged()) {
- createVCMMetaMarker(descResource);
- Util.logError(Policy.bind("ProjectDescriptionManager.vcmmetaIgnored", project.getName()), null); //$NON-NLS-1$
- return;
- } else {
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor(project);
- if (! folder.isCVSFolder()) {
- createVCMMetaMarker(descResource);
- Util.logError(Policy.bind("ProjectDescriptionManager.vcmmetaIgnored", project.getName()), null); //$NON-NLS-1$
- return;
- }
- }
-
- // update project description file (assuming it has changed)
- IProjectDescription desc = project.getDescription();
- DataInputStream is = null;
- try {
- is = new DataInputStream(((IFile) descResource).getContents());
- try {
- readProjectDescription(desc, is);
- } finally {
- is.close();
- }
- try {
- project.setDescription(desc, IResource.FORCE | IResource.KEEP_HISTORY, progress);
- } catch (CoreException ex) {
- // Failing to set the description is probably due to a missing nature
- // Other natures are still set
- Util.logError(Policy.bind("ProjectDescriptionManager.unableToSetDescription"), ex); //$NON-NLS-1$
- }
-
- // Make sure we are still marked as a CVS project
- if(RepositoryProvider.getProvider(project, CVSProviderPlugin.getTypeId()) == null)
- RepositoryProvider.map(project, CVSProviderPlugin.getTypeId());
-
- // Mark the .vcm_meta file with a problem marker
- if (project.getFile(CORE_PROJECT_DESCRIPTION_PATH).exists()) {
- createVCMMetaMarker(descResource);
- }
- } catch(TeamException ex) {
- Util.logError(Policy.bind("ProjectDescriptionManager.unableToReadDescription"), ex); //$NON-NLS-1$
- // something went wrong, delete the project description file
- descResource.delete(true, progress);
- } catch (IOException ex) {
- Util.logError(Policy.bind("ProjectDescriptionManager.unableToReadDescription"), ex); //$NON-NLS-1$
- // something went wrong, delete the project description file
- descResource.delete(true, progress);
- }
- }
- }
-
- /*
- * Write out the project description file.
- *
- * For now just do it. It would be nice to detect the proper conditions
- *
- */
- public static void writeProjectDescriptionIfNecessary(CVSTeamProvider provider, IResource resource, IProgressMonitor monitor) throws CVSException {
- if (resource.getType() == IResource.PROJECT || isProjectDescription(resource)) {
- IProject project = resource.getProject();
- if (project.getFile(PROJECT_DESCRIPTION_PATH).exists() /* || ! project.getFile(CORE_PROJECT_DESCRIPTION_PATH).exists() */) {
- writeProjectDescription(project, monitor);
- }
- }
- }
-
- public static boolean isProjectDescription(IResource resource) {
- return resource.getProjectRelativePath().equals(PROJECT_DESCRIPTION_PATH);
- }
-
- public void resourceChanged(IResourceChangeEvent event) {
- try {
- IResourceDelta root = event.getDelta();
- IResourceDelta[] projectDeltas = root.getAffectedChildren(IResourceDelta.CHANGED | IResourceDelta.ADDED);
- for (int i = 0; i < projectDeltas.length; i++) {
- IResourceDelta delta = projectDeltas[i];
- IResource resource = delta.getResource();
- if (resource.getType() == IResource.PROJECT) {
- IProject project = (IProject)resource;
- RepositoryProvider provider = RepositoryProvider.getProvider(project, CVSProviderPlugin.getTypeId());
- if (provider == null) continue;
- // First, check if the .vcm_meta file for the project is in the delta.
- IResourceDelta[] children = delta.getAffectedChildren(IResourceDelta.ADDED);
- boolean inSync = false;
- for (int j = 0; j < children.length; j++) {
- IResourceDelta childDelta = children[j];
- IResource childResource = childDelta.getResource();
- if (isProjectDescription(childResource))
- switch (childDelta.getKind()) {
- case IResourceDelta.REMOVED:
- writeProjectDescriptionIfNecessary((CVSTeamProvider)provider, project, Policy.monitorFor(null));
- inSync = true;
- break;
- case IResourceDelta.CHANGED:
- case IResourceDelta.ADDED:
- updateProjectIfNecessary(project, Policy.monitorFor(null));
- inSync = true;
- break;
- }
- }
- // Check if we didn't do anything above and the project description changed.
- if (! inSync && (delta.getFlags() & IResourceDelta.DESCRIPTION) != 0) {
- writeProjectDescriptionIfNecessary((CVSTeamProvider)provider, project, Policy.monitorFor(null));
- }
- }
- }
- } catch (CVSException ex) {
- Util.logError(Policy.bind("ProjectDescriptionManager.cannotUpdateDesc"), ex); //$NON-NLS-1$
- } catch (CoreException ex) {
- Util.logError(Policy.bind("ProjectDescriptionManager.cannotUpdateDesc"), ex); //$NON-NLS-1$
- }
- }
-
- protected static IMarker createVCMMetaMarker(IResource resource) {
- try {
- IMarker[] markers = resource.findMarkers(VCMMETA_MARKER, false, IResource.DEPTH_ZERO);
- if (markers.length == 1) {
- return markers[0];
- }
- IMarker marker = resource.createMarker(VCMMETA_MARKER);
- marker.setAttribute(IMarker.MESSAGE, Policy.bind("ProjectDescriptionManager.vcmmetaMarker" , resource.getName(), resource.getProject().getName())); //$NON-NLS-1$
- return marker;
- } catch (CoreException e) {
- Util.logError(Policy.bind("ProjectDescriptionManager.markerError"), e); //$NON-NLS-1$
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ProjectDescriptionWriter.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ProjectDescriptionWriter.java
deleted file mode 100644
index a0bd2b49c..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ProjectDescriptionWriter.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.util;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-import java.util.*;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-
-import java.io.*;
-
-// NIK: Maybe we should make the Strings constants ?
-
-public class ProjectDescriptionWriter {
- private static void appendEscapedChar(StringBuffer buffer, char c) {
- String replacement = getReplacement(c);
- if (replacement != null) {
- buffer.append('&');
- buffer.append(replacement);
- buffer.append(';');
- } else {
- if ((c >= ' ' && c <= 0x7E) || c == '\n' || c == '\r' || c == '\t') {
- buffer.append(c);
- } else {
- buffer.append("&#"); //$NON-NLS-1$
- buffer.append(Integer.toString(c));
- buffer.append(';');
- }
- }
- }
- public static String getEscaped(String s) {
- StringBuffer result = new StringBuffer(s.length() + 10);
- for (int i = 0; i < s.length(); ++i)
- appendEscapedChar(result, s.charAt(i));
- return result.toString();
- }
- private static String getReplacement(char c) {
- // Encode special XML characters into the equivalent character references.
- // These five are defined by default for all XML documents.
- switch (c) {
- case '<' :
- return "lt"; //$NON-NLS-1$
- case '>' :
- return "gt"; //$NON-NLS-1$
- case '"' :
- return "quot"; //$NON-NLS-1$
- case '\'' :
- return "apos"; //$NON-NLS-1$
- case '&' :
- return "amp"; //$NON-NLS-1$
- }
- return null;
- }
- public static void writeProjectDescription(
- IProjectDescription desc,
- OutputStream os)
- throws IOException {
- PrintWriter writer = new PrintWriter(new OutputStreamWriter(os, "UTF8")); //$NON-NLS-1$
- writer.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); //$NON-NLS-1$
- writer.println("<project-description>"); //$NON-NLS-1$
-
- String comment = desc.getComment();
- if (comment != null) {
- writer.print("\t<comment>"); //$NON-NLS-1$
- writer.print(getEscaped(desc.getComment()));
- writer.println("</comment>"); //$NON-NLS-1$
- }
-
- String[] natures = desc.getNatureIds();
- for (int i = 0; i < natures.length; i++) {
- if ( ! natures[i].equals(CVSProviderPlugin.getTypeId()))
- writer.println("\t<nature id=\"" + getEscaped(natures[i]) + "\"/>"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- IProject[] references = desc.getReferencedProjects();
- for (int i = 0; i < references.length; i++) {
- writer.println(
- "\t<reference project-name=\"" + getEscaped(references[i].getName()) + "\"/>"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- ICommand[] commands = desc.getBuildSpec();
- for (int i = 0; i < commands.length; i++) {
- writer.println(
- "\t<builder name=\"" + getEscaped(commands[i].getBuilderName()) + "\">"); //$NON-NLS-1$ //$NON-NLS-2$
- Map args = commands[i].getArguments();
- for (Iterator it = args.keySet().iterator(); it.hasNext();) {
- String argName = (String) it.next();
- String argValue = (String) args.get(argName);
- writer.println(
- "\t\t<arg name=\"" //$NON-NLS-1$
- + getEscaped(argName)
- + "\" value=\"" //$NON-NLS-1$
- + getEscaped(argValue)
- + "\"/>"); //$NON-NLS-1$
- }
- writer.println("\t</builder>"); //$NON-NLS-1$
- }
-
- writer.println("</project-description>"); //$NON-NLS-1$
- writer.flush();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ReplaceWithBaseVisitor.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ReplaceWithBaseVisitor.java
deleted file mode 100644
index 2a126e028..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ReplaceWithBaseVisitor.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.util;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResourceVisitor;
-import org.eclipse.team.internal.ccvs.core.ICVSRunnable;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.client.Update;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.MutableResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-public class ReplaceWithBaseVisitor implements ICVSResourceVisitor {
-
- private IProgressMonitor monitor;
- private int depth;
-
- /**
- * @see ICVSResourceVisitor#visitFile(ICVSFile)
- */
- public void visitFile(final ICVSFile file) throws CVSException {
- ResourceSyncInfo info = file.getSyncInfo();
- if (info == null) {
- // Delete unmanaged files if the user wants them deleted
- if (CVSProviderPlugin.getPlugin().isReplaceUnmanaged()) {
- file.delete();
- }
- } else if (info.isAdded()) {
- file.delete();
- file.unmanage(null);
- } else {
- CVSTag tag = info.getTag();
- boolean isModified = file.isModified();
- if (info.isDeleted()) {
- // If deleted, null the sync info so the file will be refetched
- MutableResourceSyncInfo mutable = info.cloneMutable();
- mutable.setDeleted(false);
- file.setSyncInfo(mutable);
- isModified = true;
- }
- // Fetch the file from the server
- if (isModified) {
- ICVSFolder parent = file.getParent();
- FolderSyncInfo folderInfo = parent.getFolderSyncInfo();
- Session.run(CVSProviderPlugin.getProvider().getRepository(folderInfo.getRoot()), parent, true, new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- Command.UPDATE.execute(Command.NO_GLOBAL_OPTIONS,
- new LocalOption[] {Update.makeTagOption(CVSTag.BASE), Update.IGNORE_LOCAL_CHANGES},
- new ICVSResource[] { file }, null, monitor);
- }
- }, Policy.subMonitorFor(monitor, 1));
-
- // Set the tag to be the original tag
- info = file.getSyncInfo();
- MutableResourceSyncInfo mutable = info.cloneMutable();
- mutable.setTag(tag);
- file.setSyncInfo(mutable);
- }
- }
- monitor.worked(1);
- }
-
- /**
- * @see ICVSResourceVisitor#visitFolder(ICVSFolder)
- */
- public void visitFolder(ICVSFolder folder) throws CVSException {
- // Visit the children of the folder as appropriate
- if (depth == IResource.DEPTH_INFINITE) {
- folder.acceptChildren(this);
- } else if (depth == IResource.DEPTH_ONE) {
- ICVSResource[] files = folder.members(ICVSFolder.FILE_MEMBERS);
- for (int i = 0; i < files.length; i++) {
- files[i].accept(this);
- }
- }
- // Also delete ignored child files that start with .#
- ICVSResource[] ignoredFiles = folder.members(ICVSFolder.FILE_MEMBERS | ICVSFolder.IGNORED_MEMBERS);
- for (int i = 0; i < ignoredFiles.length; i++) {
- ICVSResource cvsResource = ignoredFiles[i];
- if (cvsResource.getName().startsWith(".#")) { //$NON-NLS-1$
- cvsResource.delete();
- }
- }
- monitor.worked(1);
- }
-
- public void replaceWithBase(IProject project, final IResource[] resources, int depth, IProgressMonitor pm) throws CVSException {
- this.depth = depth;
- final ICVSFolder root = CVSWorkspaceRoot.getCVSFolderFor(project);
- FolderSyncInfo folderInfo = root.getFolderSyncInfo();
- Session.run(CVSProviderPlugin.getProvider().getRepository(folderInfo.getRoot()), root, true, new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- root.run(new ICVSRunnable() {
- public void run(IProgressMonitor pm) throws CVSException {
- ReplaceWithBaseVisitor.this.monitor = Policy.infiniteSubMonitorFor(pm, 100);
- ReplaceWithBaseVisitor.this.monitor.beginTask(null, 512);
- for (int i = 0; i < resources.length; i++) {
- ReplaceWithBaseVisitor.this.monitor.subTask(Policy.bind("ReplaceWithBaseVisitor.replacing", resources[i].getFullPath().toString())); //$NON-NLS-1$
- CVSWorkspaceRoot.getCVSResourceFor(resources[i]).accept(ReplaceWithBaseVisitor.this);
- }
- ReplaceWithBaseVisitor.this.monitor.done();
- }
- }, monitor);
- }
- }, pm);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/StringMatcher.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/StringMatcher.java
deleted file mode 100644
index 59fdc9ed7..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/StringMatcher.java
+++ /dev/null
@@ -1,389 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.util;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.*;
-
-/**
- * A string pattern matcher, suppporting * and ? wildcards.
- * Note: code copied from org.eclipse.jdt.internal.core.util.StringMatcher on April 3, 2001
- * (version 0.1 - 010901H18 [rename jbl]).
- */
-public class StringMatcher {
- protected String fPattern;
- protected int fLength; // pattern length
- protected boolean fIgnoreWildCards;
- protected boolean fIgnoreCase;
- protected boolean fHasLeadingStar;
- protected boolean fHasTrailingStar;
- protected String fSegments[]; //the given pattern is split into * separated segments
-
- /* boundary value beyond which we don't need to search in the text */
- protected int fBound = 0;
-
-
- protected static final char fSingleWildCard = '\u0000';
-
- public static class Position {
- int start; //inclusive
- int end; //exclusive
- public Position(int start, int end) {
- this.start = start;
- this.end = end;
- }
- public int getStart() {
- return start;
- }
- public int getEnd() {
- return end;
- }
- }
- /**
- * Find the first occurrence of the pattern between <code>start</code)(inclusive)
- * and <code>end</code>(exclusive).
- * @param <code>text</code>, the String object to search in
- * @param <code>start</code>, the starting index of the search range, inclusive
- * @param <code>end</code>, the ending index of the search range, exclusive
- * @return an <code>StringMatcher.Position</code> object that keeps the starting
- * (inclusive) and ending positions (exclusive) of the first occurrence of the
- * pattern in the specified range of the text; return null if not found or subtext
- * is empty (start==end). A pair of zeros is returned if pattern is empty string
- * Note that for pattern like "*abc*" with leading and trailing stars, position of "abc"
- * is returned. For a pattern like"*??*" in text "abcdf", (1,3) is returned
- */
-
- public StringMatcher.Position find(String text, int start, int end) {
- if (fPattern == null|| text == null)
- throw new IllegalArgumentException();
-
- int tlen = text.length();
- if (start < 0)
- start = 0;
- if (end > tlen)
- end = tlen;
- if (end < 0 ||start >= end )
- return null;
- if (fLength == 0)
- return new Position(start, start);
- if (fIgnoreWildCards) {
- int x = posIn(text, start, end);
- if (x < 0)
- return null;
- return new Position(x, x+fLength);
- }
-
- int segCount = fSegments.length;
- if (segCount == 0)//pattern contains only '*'(s)
- return new Position (start, end);
-
- int curPos = start;
- int matchStart = -1;
- int i;
- for (i = 0; i < segCount && curPos < end; ++i) {
- String current = fSegments[i];
- int nextMatch = regExpPosIn(text, curPos, end, current);
- if (nextMatch < 0 )
- return null;
- if(i == 0)
- matchStart = nextMatch;
- curPos = nextMatch + current.length();
- }
- if (i < segCount)
- return null;
- return new Position(matchStart, curPos);
- }
- /**
- * StringMatcher constructor takes in a String object that is a simple
- * pattern which may contain *  for 0 and many characters and
- * ?  for exactly one character.
- *
- * Literal '*' and '?' characters must be escaped in the pattern
- * e.g., "\*" means literal "*", etc.
- *
- * Escaping any other character (including the escape character itself),
- * just results in that character in the pattern.
- * e.g., "\a" means "a" and "\\" means "\"
- *
- * If invoking the StringMatcher with string literals in Java, don't forget
- * escape characters are represented by "\\".
- *
- * @param aPattern the pattern to match text with
- * @param ignoreCase if true, case is ignored
- * @param ignoreWildCards if true, wild cards and their escape sequences are ignored
- * (everything is taken literally).
- */
- public StringMatcher(String aPattern, boolean ignoreCase, boolean ignoreWildCards) {
- fIgnoreCase = ignoreCase;
- fIgnoreWildCards = ignoreWildCards;
- fLength = aPattern.length();
-
- /* convert case */
- if (fIgnoreCase) {
- fPattern = aPattern.toUpperCase();
- } else {
- fPattern = aPattern;
- }
-
- if (fIgnoreWildCards) {
- parseNoWildCards();
- } else {
- parseWildCards();
- }
- }
- /**
- * Given the starting (inclusive) and the ending (exclusive) poisitions in the
- * <code>text</code>, determine if the given substring matches with aPattern
- * @return true if the specified portion of the text matches the pattern
- * @param String <code>text</code>, a String object that contains the substring to match
- * @param int <code>start<code> marks the starting position (inclusive) of the substring
- * @param int <code>end<code> marks the ending index (exclusive) of the substring
- */
- public boolean match(String text, int start, int end) {
- if (null == fPattern || null == text)
- throw new IllegalArgumentException();
-
- if (start >= end)
- return false;
-
- if (fIgnoreWildCards)
- return fPattern.regionMatches(fIgnoreCase, 0, text, start, fLength);
- int segCount = fSegments.length;
- if (segCount == 0)//pattern contains only '*'(s) or empty pattern
- return true;
- if (start == end)
- return fLength == 0;
- if (fLength == 0)
- return start == end;
-
- int tlen = text.length();
- if (start < 0)
- start = 0;
- if (end > tlen)
- end = tlen;
-
- int tCurPos = start;
- int bound = end - fBound;
- if ( bound < 0)
- return false;
- int i=0;
- String current = fSegments[i];
- int segLength = current.length();
-
- /* process first segment */
- if (!fHasLeadingStar){
- if(!regExpRegionMatches(text, start, current, 0, segLength)) {
- return false;
- } else {
- ++i;
- tCurPos = tCurPos + segLength;
- }
- }
-
- /* process middle segments */
- while ( i < segCount) {
- current = fSegments[i];
- int currentMatch;
- int k = current.indexOf(fSingleWildCard);
- if (k < 0) {
- currentMatch = textPosIn(text, tCurPos, end, current);
- if (currentMatch < 0)
- return false;
- } else {
- currentMatch = regExpPosIn(text, tCurPos, end, current);
- if (currentMatch < 0)
- return false;
- }
- tCurPos = currentMatch + current.length();
- i++;
- }
-
- /* process final segment */
- if (!fHasTrailingStar && tCurPos != end) {
- int clen = current.length();
- return regExpRegionMatches(text, end - clen, current, 0, clen);
- }
- return i == segCount ;
- }
- /**
- * match the given <code>text</code> with the pattern
- * @return true if matched eitherwise false
- * @param <code>text</code>, a String object
- */
- public boolean match(String text) {
- return match(text, 0, text.length());
- }
- /**
- * This method parses the given pattern into segments seperated by wildcard '*' characters.
- * Since wildcards are not being used in this case, the pattern consists of a single segment.
- */
- private void parseNoWildCards() {
- fSegments = new String[1];
- fSegments[0] = fPattern;
- fBound = fLength;
- }
- /**
- * This method parses the given pattern into segments seperated by wildcard '*' characters.
- * @param p, a String object that is a simple regular expression with *  and/or ? 
- */
- private void parseWildCards() {
- if(fPattern.startsWith("*"))//$NON-NLS-1$
- fHasLeadingStar = true;
- if(fPattern.endsWith("*")) {//$NON-NLS-1$
- /* make sure it's not an escaped wildcard */
- if (fLength > 1 && fPattern.charAt(fLength - 2) != '\\') {
- fHasTrailingStar = true;
- }
- }
-
- Vector temp = new Vector();
-
- int pos = 0;
- StringBuffer buf = new StringBuffer();
- while (pos < fLength) {
- char c = fPattern.charAt(pos++);
- switch (c) {
- case '\\':
- if (pos >= fLength) {
- buf.append(c);
- } else {
- char next = fPattern.charAt(pos++);
- /* if it's an escape sequence */
- if (next == '*' || next == '?' || next == '\\') {
- buf.append(next);
- } else {
- /* not an escape sequence, just insert literally */
- buf.append(c);
- buf.append(next);
- }
- }
- break;
- case '*':
- if (buf.length() > 0) {
- /* new segment */
- temp.addElement(buf.toString());
- fBound += buf.length();
- buf.setLength(0);
- }
- break;
- case '?':
- /* append special character representing single match wildcard */
- buf.append(fSingleWildCard);
- break;
- default:
- buf.append(c);
- }
- }
-
- /* add last buffer to segment list */
- if (buf.length() > 0) {
- temp.addElement(buf.toString());
- fBound += buf.length();
- }
-
- fSegments = new String[temp.size()];
- temp.copyInto(fSegments);
- }
- /**
- * @param <code>text</code>, a string which contains no wildcard
- * @param <code>start</code>, the starting index in the text for search, inclusive
- * @param <code>end</code>, the stopping point of search, exclusive
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int posIn(String text, int start, int end) {//no wild card in pattern
- int max = end - fLength;
-
- if (!fIgnoreCase) {
- int i = text.indexOf(fPattern, start);
- if (i == -1 || i > max)
- return -1;
- return i;
- }
-
- for (int i = start; i <= max; ++i) {
- if (text.regionMatches(true, i, fPattern, 0, fLength))
- return i;
- }
-
- return -1;
- }
- /**
- * @param <code>text</code>, a simple regular expression that may only contain '?'(s)
- * @param <code>start</code>, the starting index in the text for search, inclusive
- * @param <code>end</code>, the stopping point of search, exclusive
- * @param <code>p</code>, a simple regular expression that may contains '?'
- * @param <code>caseIgnored</code>, wether the pattern is not casesensitive
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int regExpPosIn(String text, int start, int end, String p) {
- int plen = p.length();
-
- int max = end - plen;
- for (int i = start; i <= max; ++i) {
- if (regExpRegionMatches(text, i, p, 0, plen))
- return i;
- }
- return -1;
- }
- /**
- *
- * @return boolean
- * @param <code>text</code>, a String to match
- * @param <code>start</code>, int that indicates the starting index of match, inclusive
- * @param <code>end</code> int that indicates the ending index of match, exclusive
- * @param <code>p</code>, String, String, a simple regular expression that may contain '?'
- * @param <code>ignoreCase</code>, boolean indicating wether code>p</code> is case sensitive
- */
- protected boolean regExpRegionMatches(String text, int tStart, String p, int pStart, int plen) {
- while (plen-- > 0) {
- char tchar = text.charAt(tStart++);
- char pchar = p.charAt(pStart++);
-
- /* process wild cards */
- if (!fIgnoreWildCards) {
- /* skip single wild cards */
- if (pchar == fSingleWildCard) {
- continue;
- }
- }
- if (pchar == tchar)
- continue;
- if (fIgnoreCase) {
- char tc = Character.toUpperCase(tchar);
- if (tc == pchar)
- continue;
- }
- return false;
- }
- return true;
- }
- /**
- * @param <code>text</code>, the string to match
- * @param <code>start</code>, the starting index in the text for search, inclusive
- * @param <code>end</code>, the stopping point of search, exclusive
- * @param code>p</code>, a string that has no wildcard
- * @param <code>ignoreCase</code>, boolean indicating wether code>p</code> is case sensitive
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int textPosIn(String text, int start, int end, String p) {
-
- int plen = p.length();
- int max = end - plen;
-
- if (!fIgnoreCase) {
- int i = text.indexOf(p, start);
- if (i == -1 || i > max)
- return -1;
- return i;
- }
-
- for (int i = start; i <= max; ++i) {
- if (text.regionMatches(true, i, p, 0, plen))
- return i;
- }
-
- return -1;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileChangeListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileChangeListener.java
deleted file mode 100644
index 422679659..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileChangeListener.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.core.util;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IResourceDeltaVisitor;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-
-/*
- * Listens to CVS meta-file changes and notifies the EclipseSynchronizer of changes made to sync files
- * by 3rd parties.
- *
- * If CVS meta-directories are created outside of the CVS plugin their team-private state will be set
- * by this listener however this change won't be known to other plugins because it does not generate
- * a delta. As a result views, such as the navigator, may show CVS team-private directories. There
- * are some common scenarios where a user may (depending on the order of delta traversal) see
- * this behavior:
- *
- * 1. A user has an existing CVS project outside of Eclipse. By creating the project in Eclipse to point
- * to the existing location the project's contents will be brought into Eclipse and the CVS folders
- * will be marlked as team-private but other delta listeners that have handled the event already won't receive
- * notification that the resource is now team-private. As a result, the user may have to close views or
- * restart the workbench to have the CVS folders filtered.
- *
- * 2. A user performs CVS command line operations outside of Eclipse that result in new CVS folders.
- * From Eclipse the refresh local will bring in the new folders and they will be marked as team-private.
- * But as in 1, they may not appear in the UI.
- *
- * See: http://dev.eclipse.org/bugs/show_bug.cgi?id=12386
- */
-public class SyncFileChangeListener implements IResourceChangeListener {
- /*
- * When a resource changes this method will detect if the changed resources is a meta file that has changed
- * by a 3rd party. For example, if the command line tool was run and then the user refreshed from local. To
- * distinguish changes made by this class and thoses made by others a modification stamp is persisted with each
- * metafile.
- *
- * @see IResourceChangeListener#resourceChanged(IResourceChangeEvent)
- */
- public void resourceChanged(IResourceChangeEvent event) {
- try {
- final Set changedContainers = new HashSet();
- event.getDelta().accept(new IResourceDeltaVisitor() {
- public boolean visit(IResourceDelta delta) throws CoreException {
- IResource resource = delta.getResource();
-
- if(resource.getType()==IResource.ROOT) {
- // continue with the delta
- return true;
- }
-
- String name = resource.getName();
- int kind = delta.getKind();
- IResource[] toBeNotified = new IResource[0];
-
- if(name.equals(SyncFileWriter.CVS_DIRNAME)) {
- handleCVSDir((IContainer)resource, kind);
- } else {
- // Inform the synchronizer about folder creations
- if (kind == delta.ADDED && resource.getType() == IResource.FOLDER) {
- try {
- EclipseSynchronizer.getInstance().folderCreated((IFolder)resource);
- } catch (CVSException e) {
- throw new CoreException(e.getStatus());
- }
- }
- }
-
- if(isMetaFile(resource)) {
- toBeNotified = handleChangedMetaFile(resource, kind);
- } else if(name.equals(SyncFileWriter.IGNORE_FILE)) {
- toBeNotified = handleChangedIgnoreFile(resource, kind);
- }
-
- if(toBeNotified.length>0 && isModifiedBy3rdParty(resource)) {
- for (int i = 0; i < toBeNotified.length; i++) {
- changedContainers.add(toBeNotified[i]);
- }
- if(Policy.DEBUG_METAFILE_CHANGES) {
- System.out.println("[cvs] metafile changed by 3rd party: " + resource.getFullPath()); //$NON-NLS-1$
- }
- return false; /*don't visit any children we have all the information we need*/
- } else {
- return true;
- }
- }
- }, IContainer.INCLUDE_TEAM_PRIVATE_MEMBERS);
-
- if(!changedContainers.isEmpty()) {
- EclipseSynchronizer.getInstance().syncFilesChanged((IContainer[])changedContainers.toArray(new IContainer[changedContainers.size()]));
- }
- } catch(CoreException e) {
- CVSProviderPlugin.log(e.getStatus());
- } catch(CVSException e) {
- CVSProviderPlugin.log(e.getStatus());
- }
- }
-
- /*
- * Consider non-existing resources as being recently deleted and thus modified, and resources
- * with modification stamps that differ from when the CVS plugin last modified the meta-file.
- */
- protected boolean isModifiedBy3rdParty(IResource resource) {
- if(!resource.exists()) return true;
- long modStamp = resource.getModificationStamp();
- Long whenWeWrote;
- try {
- whenWeWrote = (Long)resource.getSessionProperty(SyncFileWriter.MODSTAMP_KEY);
- } catch(CoreException e) {
- CVSProviderPlugin.log(e.getStatus());
- whenWeWrote = null;
- }
- return (whenWeWrote==null || whenWeWrote.longValue() != modStamp);
- }
-
- /*
- * If it's a new CVS directory with the canonical child metafiles then mark it as team-private. Otherwise
- * if changed or deleted
- */
- protected void handleCVSDir(IContainer cvsDir, int kind) {
- if((kind & IResourceDelta.ALL_WITH_PHANTOMS)!=0) {
- if(kind==IResourceDelta.ADDED) {
- // should this dir be made team-private? If it contains CVS/Root and CVS/Repository then yes!
- IFile rootFile = cvsDir.getFile(new Path(SyncFileWriter.ROOT));
- IFile repositoryFile = cvsDir.getFile(new Path(SyncFileWriter.REPOSITORY));
- if(rootFile.exists() && repositoryFile.exists() && !cvsDir.isTeamPrivateMember()) {
- try {
- cvsDir.setTeamPrivateMember(true);
- if(Policy.DEBUG_METAFILE_CHANGES) {
- System.out.println("[cvs] found a new CVS meta folder, marking as team-private: " + cvsDir.getFullPath()); //$NON-NLS-1$
- }
- } catch(CoreException e) {
- CVSProviderPlugin.log(CVSException.wrapException(cvsDir, Policy.bind("SyncFileChangeListener.errorSettingTeamPrivateFlag"), e)); //$NON-NLS-1$
- }
- }
- }
- }
- }
-
- /*
- * It's a meta file if it's parent is a team-private CVS folder.
- */
- protected boolean isMetaFile(IResource resource) {
- IContainer parent = resource.getParent();
- return resource.getType() == IResource.FILE &&
- parent!=null &&
- parent.getName().equals(SyncFileWriter.CVS_DIRNAME) &&
- parent.isTeamPrivateMember();
- }
-
- /*
- * This is a meta file (e.g. folder/CVS/Entries), notify that 'folder' and it's immediate children
- * may have their CVS sync state changed. If the 'folder' is deleted than no notification is
- * required.
- */
- protected IContainer[] handleChangedMetaFile(IResource resource, int kind) {
- IContainer changedContainer = resource.getParent().getParent();
- if(changedContainer.exists()) {
- return new IContainer[] {changedContainer};
- } else {
- return new IContainer[0];
- }
- }
-
- /*
- * This is an ignore file (e.g. folder/.cvsignore), notify that 'folder' and it's immediate children
- * may have their CVS sync state changed.
- */
- protected IContainer[] handleChangedIgnoreFile(IResource resource, int kind) {
- IContainer changedContainer = resource.getParent();
- if(changedContainer.exists()) {
- return new IContainer[] {changedContainer};
- } else {
- return new IContainer[0];
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileWriter.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileWriter.java
deleted file mode 100644
index 7f2aa2359..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileWriter.java
+++ /dev/null
@@ -1,376 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.util;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IResourceDeltaVisitor;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.resources.CVSEntryLineTag;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-/*
- * This is a helper class that knows the format of the CVS metafiles. It
- * provides a bridge between the CVS metafile formats and location to the
- * Eclipse CVS client ResourceSyncInfo and FolderSyncInfo types.
- */
-public class SyncFileWriter {
-
- // the famous CVS meta directory name
- public static final String CVS_DIRNAME = "CVS"; //$NON-NLS-1$
-
- // CVS meta files located in the CVS subdirectory
- public static final String REPOSITORY = "Repository"; //$NON-NLS-1$
- public static final String ROOT = "Root"; //$NON-NLS-1$
- public static final String STATIC = "Entries.Static"; //$NON-NLS-1$
- public static final String TAG = "Tag"; //$NON-NLS-1$
- public static final String ENTRIES = "Entries"; //$NON-NLS-1$
- //private static final String PERMISSIONS = "Permissions"; //$NON-NLS-1$
- public static final String ENTRIES_LOG="Entries.Log"; //$NON-NLS-1$
-
- // the local workspace file that contains pattern for ignored resources
- public static final String IGNORE_FILE = ".cvsignore"; //$NON-NLS-1$
-
- // Some older CVS clients may of added a line to the entries file consisting
- // of only a 'D'. It is safe to ingnore these entries.
- private static final String FOLDER_TAG="D"; //$NON-NLS-1$
-
- // Command characters found in the Entries.log file
- private static final String ADD_TAG="A "; //$NON-NLS-1$
- private static final String REMOVE_TAG="R "; //$NON-NLS-1$
-
- // file and folder patterns that are ignored by default by the CVS server on import.
- public static final String[] PREDEFINED_IGNORE_PATTERNS = {
- "CVS", ".#*", "#*", ",*", "_$*", "*~", "*$", "*.a", "*.bak", "*.BAK", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
- "*.elc", "*.exe", "*.ln", "*.o", "*.obj", "*.olb", "*.old", "*.orig", "*.rej", "*.so", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
- "*.Z", ".del-*", ".make.state", ".nse_depinfo", "CVS.adm", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- "cvslog.*", "RCS", "RCSLOG", "SCCS", "tags", "TAGS"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
-
- // file and folder patterns that are ignored by default by the CVS server on import.
- public static final String[] BASIC_IGNORE_PATTERNS = {"CVS", ".#*"}; //$NON-NLS-1$ //$NON-NLS-2$
-
- // key for saving the mod stamp for each writen meta file
- public static final QualifiedName MODSTAMP_KEY = new QualifiedName("org.eclipse.team.cvs.core", "meta-file-modtime"); //$NON-NLS-1$ //$NON-NLS-2$
-
- /**
- * Reads the CVS/Entries, CVS/Entries.log and CVS/Permissions files from the
- * specified folder and returns ResourceSyncInfo instances for the data stored therein.
- * If the folder does not have a CVS subdirectory then <code>null</code> is returned.
- */
- public static ResourceSyncInfo[] readAllResourceSync(IContainer parent) throws CVSException {
- IFolder cvsSubDir = getCVSSubdirectory(parent);
- if (! cvsSubDir.exists()) return null;
-
- // process Entries file contents
- String[] entries = readLines(cvsSubDir.getFile(ENTRIES));
- if (entries == null) return null;
- Map infos = new TreeMap();
- for (int i = 0; i < entries.length; i++) {
- String line = entries[i];
- if(!FOLDER_TAG.equals(line) && !"".equals(line)) { //$NON-NLS-1$
- ResourceSyncInfo info = new ResourceSyncInfo(line, null, null);
- infos.put(info.getName(), info);
- }
- }
-
- // process Entries.log file contents
- String[] entriesLog = readLines(cvsSubDir.getFile(ENTRIES_LOG));
- if (entriesLog != null) {
- for (int i = 0; i < entriesLog.length; i++) {
- String line = entriesLog[i];
- if (line.startsWith(ADD_TAG)) {
- line = line.substring(ADD_TAG.length());
- ResourceSyncInfo info = new ResourceSyncInfo(line, null, null);
- infos.put(info.getName(), info);
- } else if (line.startsWith(REMOVE_TAG)) {
- line = line.substring(REMOVE_TAG.length());
- ResourceSyncInfo info = new ResourceSyncInfo(line, null, null);
- infos.remove(info.getName());
- }
- }
- }
-
- // XXX no longer processes CVS/Permissions (was never written) -- should we?
-
- return (ResourceSyncInfo[])infos.values().toArray(new ResourceSyncInfo[infos.size()]);
- }
-
- /**
- * Writes the CVS/Entries, CVS/Entries.log and CVS/Permissions files to the
- * specified folder using the data contained in the specified ResourceSyncInfo instance.
- * If the folder does not have a CVS subdirectory then <code>null</code> is returned.
- */
- public static void writeAllResourceSync(IContainer parent, ResourceSyncInfo[] infos) throws CVSException {
- try {
- IFolder cvsSubDir = createCVSSubdirectory(parent);
-
- // format file contents
- String[] entries = new String[infos.length];
- for (int i = 0; i < infos.length; i++) {
- ResourceSyncInfo info = infos[i];
- entries[i] = info.getEntryLine();
- }
-
- // write Entries
- writeLines(cvsSubDir.getFile(ENTRIES), entries);
-
- // delete Entries.log
- cvsSubDir.getFile(ENTRIES_LOG).delete(IResource.NONE, null);
- } catch(CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /**
- * Reads the CVS/Root, CVS/Repository, CVS/Tag, and CVS/Entries.static files from
- * the specified folder and returns a FolderSyncInfo instance for the data stored therein.
- * If the folder does not have a CVS subdirectory then <code>null</code> is returned.
- */
- public static FolderSyncInfo readFolderSync(IContainer folder) throws CVSException {
- IFolder cvsSubDir = getCVSSubdirectory(folder);
- if (! cvsSubDir.exists()) return null;
-
- // read CVS/Root
- String root = readFirstLine(cvsSubDir.getFile(ROOT));
- if (root == null) return null;
-
- // read CVS/Repository
- String repository = readFirstLine(cvsSubDir.getFile(REPOSITORY));
- if (repository == null) return null;
-
- // read CVS/Tag
- String tag = readFirstLine(cvsSubDir.getFile(TAG));
- CVSTag cvsTag = (tag != null) ? new CVSEntryLineTag(tag) : null;
-
- // read Entries.Static
- String staticDir = readFirstLine(cvsSubDir.getFile(STATIC));
- boolean isStatic = (staticDir != null);
-
- // return folder sync
- return new FolderSyncInfo(repository, root, cvsTag, isStatic);
- }
-
- /**
- * Writes the CVS/Root, CVS/Repository, CVS/Tag, and CVS/Entries.static files to the
- * specified folder using the data contained in the specified FolderSyncInfo instance.
- */
- public static void writeFolderSync(IContainer folder, FolderSyncInfo info) throws CVSException {
- try {
- IFolder cvsSubDir = createCVSSubdirectory(folder);
-
- // write CVS/Root
- writeLines(cvsSubDir.getFile(ROOT), new String[] {info.getRoot()});
-
- // write CVS/Repository
- writeLines(cvsSubDir.getFile(REPOSITORY), new String[] {info.getRepository()});
-
- // write CVS/Tag
- IFile tagFile = cvsSubDir.getFile(TAG);
- if (info.getTag() != null) {
- writeLines(tagFile, new String[] {info.getTag().toEntryLineFormat(false)});
- } else {
- if(tagFile.exists()) {
- tagFile.delete(IResource.NONE, null);
- }
- }
-
- // write CVS/Entries.Static
- IFile staticFile = cvsSubDir.getFile(STATIC);
- if(info.getIsStatic()) {
- // the existance of the file is all that matters
- writeLines(staticFile, new String[] {""}); //$NON-NLS-1$
- } else {
- if(staticFile.exists()) {
- staticFile.delete(IResource.NONE, null);
- }
- }
- } catch(CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /**
- * Returns all .cvsignore entries for the specified folder.
- */
- public static String[] readCVSIgnoreEntries(IContainer folder) throws CVSException {
- IFile ignoreFile = folder.getFile(new Path(IGNORE_FILE));
- if (ignoreFile != null) {
- return readLines(ignoreFile);
- }
- return null;
- }
-
- /**
- * Writes all entries to the specified folder's .cvsignore file, overwriting any
- * previous edition of the file.
- */
- public static void writeCVSIgnoreEntries(IContainer folder, String[] patterns) throws CVSException {
- IFile ignoreFile = folder.getFile(new Path(IGNORE_FILE));
- writeLines(ignoreFile, patterns);
- }
-
- /**
- * Delete folder sync is equilavent to removing the CVS subdir.
- */
- public static void deleteFolderSync(IContainer folder) throws CVSException {
- try {
- getCVSSubdirectory(folder).delete(IResource.NONE, null);
- } catch(CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /**
- * Returns the CVS subdirectory for this folder.
- */
- private static IFolder getCVSSubdirectory(IContainer folder) throws CVSException {
- return folder.getFolder(new Path(CVS_DIRNAME));
- }
-
- /**
- * Creates and makes team-private and returns a CVS subdirectory in this folder.
- */
- private static IFolder createCVSSubdirectory(IContainer folder) throws CVSException {
- try {
- final IFolder cvsSubDir = getCVSSubdirectory(folder);
- if (! cvsSubDir.exists()) {
- // important to have both the folder creation and setting of team-private in the
- // same runnable so that the team-private flag is set before other delta listeners
- // sees the CVS folder creation.
- ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- cvsSubDir.create(false /*don't force*/, true /*make local*/, null);
- cvsSubDir.setTeamPrivateMember(true);
- }
- }, null);
- }
- return cvsSubDir;
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /*
- * Reads the first line of the specified file.
- * Returns null if the file does not exist, or the empty string if it is blank.
- */
- private static String readFirstLine(IFile file) throws CVSException {
- if (! file.exists()) return null;
- try {
- BufferedReader reader = new BufferedReader(new InputStreamReader(file.getContents()));
- try {
- String line = reader.readLine();
- if (line == null) return ""; //$NON-NLS-1$
- return line;
- } finally {
- reader.close();
- }
- } catch (IOException e) {
- throw CVSException.wrapException(e);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /*
- * Reads all lines of the specified file.
- * Returns null if the file does not exist.
- */
- private static String[] readLines(IFile file) throws CVSException {
- if (! file.exists()) return null;
- try {
- BufferedReader reader = new BufferedReader(new InputStreamReader(file.getContents()));
- List fileContentStore = new ArrayList();
- try {
- String line;
- while ((line = reader.readLine()) != null) {
- fileContentStore.add(line);
- }
- return (String[]) fileContentStore.toArray(new String[fileContentStore.size()]);
- } finally {
- reader.close();
- }
- } catch (IOException e) {
- throw CVSException.wrapException(e);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- /*
- * Writes all lines to the specified file, using linefeed terminators for
- * compatibility with other CVS clients.
- */
- private static void writeLines(final IFile file, final String[] contents) throws CVSException {
- try {
- // The creation of sync files has to be in a runnable in order for the resulting delta
- // to include the MODSTAMP value. If not in a runnable then create/setContents
- // will trigger a delta and the SyncFileWriter change listener won't know that the delta
- // was a result of our own creation.
- ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- try {
- ByteArrayOutputStream os = new ByteArrayOutputStream();
- writeLinesToStreamAndClose(os, contents);
- if(!file.exists()) {
- file.create(new ByteArrayInputStream(os.toByteArray()), IResource.NONE /*don't keep history and don't force*/, null);
- } else {
- file.setContents(new ByteArrayInputStream(os.toByteArray()), IResource.NONE /*don't keep history and don't force*/, null);
- }
- file.setSessionProperty(MODSTAMP_KEY, new Long(file.getModificationStamp()));
- } catch(CVSException e) {
- throw new CoreException(e.getStatus());
- }
- }
- }, null);
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
-
- private static void writeLinesToStreamAndClose(OutputStream os, String[] contents) throws CVSException {
- try {
- try {
- for (int i = 0; i < contents.length; i++) {
- os.write(contents[i].getBytes()); // XXX should we specify a character encoding?
- os.write(0x0A); // newline byte
- }
- } finally {
- os.close();
- }
- } catch (IOException e) {
- throw CVSException.wrapException(e);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/Util.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/Util.java
deleted file mode 100644
index 46deb13ea..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/Util.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.util;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-
-/**
- * Unsorted static helper-methods
- */
-public class Util {
- /**
- * Get the extention of the path of resource
- * relative to the path of root
- *
- * @throws CVSException if root is not a root-folder of resource
- */
- public static String getRelativePath(String rootName, String resourceName)
- throws CVSException {
-
- if (!resourceName.startsWith(rootName) || rootName.length() > resourceName.length()) {
- throw new CVSException(Policy.bind("Util.Internal_error,_resource_does_not_start_with_root_3")); //$NON-NLS-1$
- }
-
- // Otherwise we would get an ArrayOutOfBoundException
- // in case of two equal Resources
- if (rootName.length() == resourceName.length()) {
- return ""; //$NON-NLS-1$
- }
-
- // Remove leading slash if there is one
- String result = resourceName.substring(rootName.length()).replace('\\', '/');
- if (result.startsWith("/")) { //$NON-NLS-1$
- result = result.substring(1);
- }
- return result;
- }
-
- /**
- * Append the prefix and suffix to form a valid CVS path.
- */
- public static String appendPath(String prefix, String suffix) {
- if (prefix.length() == 0 || prefix.equals(Session.CURRENT_LOCAL_FOLDER)) {
- return suffix;
- } else if (prefix.endsWith(Session.SERVER_SEPARATOR)) {
- if (suffix.startsWith(Session.SERVER_SEPARATOR))
- return prefix + suffix.substring(1);
- else
- return prefix + suffix;
- } else if (suffix.startsWith(Session.SERVER_SEPARATOR))
- return prefix + suffix;
- else
- return prefix + Session.SERVER_SEPARATOR + suffix;
- }
-
- public static void logError(String message, Throwable throwable) {
- CVSProviderPlugin.log(new Status(IStatus.ERROR, CVSProviderPlugin.ID, IStatus.ERROR, message, throwable));
- }
-
- /**
- * If the number of segments in the relative path of <code>resource</code> to <code>root</code> is
- * greater than <code>split</code> then the returned path is truncated to <code>split</code> number
- * of segments and '...' is shown as the first segment of the path.
- */
- public static String toTruncatedPath(ICVSResource resource, ICVSFolder root, int split) {
- try {
- IPath path = new Path(resource.getRelativePath(root));
- int segments = path.segmentCount();
- if(segments>split) {
- IPath last = path.removeFirstSegments(segments - split);
- return "..." + path.SEPARATOR + last.toString(); //$NON-NLS-1$
- }
- return path.toString();
- } catch(CVSException e) {
- return resource.getName();
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ssh/.classpath b/bundles/org.eclipse.team.cvs.ssh/.classpath
deleted file mode 100644
index 6b186df10..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/.classpath
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="/org.eclipse.team.core"/>
- <classpathentry kind="src" path="/org.eclipse.team.cvs.core"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.team.cvs.ssh/.cvsignore b/bundles/org.eclipse.team.cvs.ssh/.cvsignore
deleted file mode 100644
index c5e82d745..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ssh/.project b/bundles/org.eclipse.team.cvs.ssh/.project
deleted file mode 100644
index ebdaaf300..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/.project
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.team.cvs.ssh</name>
- <comment></comment>
- <projects>
- <project>org.eclipse.team.core</project>
- <project>org.eclipse.core.runtime</project>
- <project>org.eclipse.team.cvs.core</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.team.cvs.core.cvsnature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.team.cvs.ssh/about.html b/bundles/org.eclipse.team.cvs.ssh/about.html
deleted file mode 100644
index 9a93c726f..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/about.html
+++ /dev/null
@@ -1,104 +0,0 @@
-<html>
-<head>
-<title>About</title>
-<style type="text/css">
-p, table, td, th { font-family: arial, helvetica, geneva; font-size: 10pt}
-pre { font-family: "Courier New", Courier, mono; font-size: 10pt}
-h2 { font-family: arial, helvetica, geneva; font-size: 18pt; font-weight: bold ; line-height: 14px}
-code { font-family: "Courier New", Courier, mono; font-size: 10pt}
-sup { font-family: arial,helvetica,geneva; font-size: 10px}
-h3 { font-family: arial, helvetica, geneva; font-size: 14pt; font-weight: bold}
-li { font-family: arial, helvetica, geneva; font-size: 10pt}
-h1 { font-family: arial, helvetica, geneva; font-size: 28px; font-weight: bold}
-body { font-family: arial, helvetica, geneva; font-size: 10pt; clip: rect( ); margin-top: 5mm; margin-left: 3mm}
-</style>
-</head>
-<body lang="EN-US" link="blue" vlink="purple">
-<table border="0" cellspacing="5" cellpadding="2" width="100%" >
- <tr>
- <td align="LEFT" valign="TOP" colspan="2" bgcolor="#0080C0"><b><font color="#FFFFFF">About This Content</font></b></td>
- </tr>
- <tr>
- <td>
-<p>26th March, 2002</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in &quot;Content&quot;. Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-<a href="http://www.eclipse.org/legal/cpl-v05.html">Common Public License Version 0.5</a> &quot;CPL&quot;. For purposes of the CPL, &quot;Program&quot; will mean the Content.</p>
-
-<h3>Third Party Content</h3>
-
-<p>The Content includes items that have been sourced from third parties as follows:</p>
-
-<p><b>The Java (TM) Ssh Applet</b></p>
-<p>The plug-in is based on software developed by Cedric Gourio.
-If the source code is included, it is located in teamcvssshsrc.zip. The binary code is located in teamcvsssh.jar. The Java Ssh Applet includes the following copyright notice which
-must be included in any redistribution:</p>
-
-<blockquote>
- Copyright (c) 1998 Cedric Gourio<br />
- (<a href="http://www.cl.cam.ac.uk/~fapp2/software/java-ssh/">http://www.cl.cam.ac.uk/~fapp2/software/java-ssh/</a>)<br />
- (<a href="mailto:javassh@france-mail.com">javassh@france-mail.com</a>)
-
- <p>This program is FREE FOR COMMERCIAL AND NON-COMMERCIAL USE.<br />
- You can freely modify the code.</p>
-
- <p>You should however include this copyright notice in any redistribution<br />
- and please keep in touch with the author for any feedback.</p>
-</blockquote>
-
-<p><b>The Blowfish Encryption Algorithm</b></p>
-<p>The plug-in is based on an algorithm developed by Bruce Schneier. The algorithm was originally published in
-a paper that is located at <a href="http://www.counterpane.com/bfsverlag.html">http://www.counterpane.com/bfsverlag.html</a>.
-Your use of the Blowfish Encryption Algorithm in both source and binary code form contained in the plug-in is not subject to any
-additional terms and conditions. If the source code, Blowfish.java is included, it is located in teamcvssshsrc.zip. The binary code, Blowfish.class is located in
-teamcvsssh.jar.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL &quot;Other License&quot;, any modifications, enhancements and/or
-other code and/or documentation &quot;Modifications&quot; uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-
-<h3>Cryptography</h3>
-
-<p><b>Export Control</b></p>
-<p>The plug-in contains encryption software. The country in which you are currently may have restrictions on the import, possession,
-and use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check the country's
-laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this
-is permitted.</p>
-
-<p><b>Encryption Items</b></p>
-
-<p>Details of the encryption software in this plug-in are provided to assist in obtaining relevant export control classification and approval.
-Cryptography in this plug-in has been classified as Export Commodity Control Number (ECCN) 5D002.c.1 by the U.S. Government Department of Commerce,
-Bureau of Export Administration and deemed eligible for export under License Exception Technology Software Unrestricted (TSU) for object code
-and (cryptographic) source code, and License Exception ENC Retail for object code and no (cryptographic) source code.</p>
-
-<p>The plug-in contains an implementation of the Secure Shell (SSH) protocol that encrypts the network traffic (program code files
-in file versioning systems) between a Concurrent Versions System (CVS) server and a CVS client. Data is encrypted using the Blowfish algorithm
-which is a 64-bit symmetric cipher that uses a key varying in length from 32 bits to 448 bits. The RSA PKCS #1 v1.5 key exchange algorithm is
-used to authenticate and exchange keys with a minimum modulus size of 96 bits and a maximum modulus size theoretically unlimited since the
-implementation uses the java.math.BigInteger class which has a maximum positive integer range limited only by the available memory in the computer.
-In practice, the key length is defined by the CVS server with which communication is initiated.</p>
-
-<p>The following Java classes contain encryption items (the plug-in may contain both binary and source code):</p>
-
-<ul>
- <li>org.eclipse.team.internal.ccvs.ssh.Blowfish</li>
- <li>org.eclipse.team.internal.ccvs.ssh.Cipher</li>
- <li>org.eclipse.team.internal.ccvs.ssh.Client</li>
- <li>org.eclipse.team.internal.ccvs.ssh.ClientPacket</li>
- <li>org.eclipse.team.internal.ccvs.ssh.Misc</li>
-</ul>
-
-<small>Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.</small>
-</td></tr></table>
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ssh/build.properties b/bundles/org.eclipse.team.cvs.ssh/build.properties
deleted file mode 100644
index 705ac882c..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-# Eclipse build contribution
-source.teamcvsssh.jar=src/
-src.includes=about.html
-bin.includes=about.html,plugin.xml,plugin.properties,*.jar \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ssh/plugin.properties b/bundles/org.eclipse.team.cvs.ssh/plugin.properties
deleted file mode 100644
index 47ea87785..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/plugin.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-providerName=Eclipse.org
-pluginName=CVS SSH Core \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ssh/plugin.xml b/bundles/org.eclipse.team.cvs.ssh/plugin.xml
deleted file mode 100644
index 65eec1a32..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/plugin.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin
- name="%pluginName"
- id="org.eclipse.team.cvs.ssh"
- version="2.0.0"
- provider-name="%providerName"
- class="org.eclipse.team.internal.ccvs.ssh.SSHPlugin">
-
- <requires>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.team.cvs.core"/>
- <import plugin="org.eclipse.team.core"/>
- </requires>
-
- <runtime>
- <library name="teamcvsssh.jar">
- <export name="*"/>
- </library>
- </runtime>
-
- <extension id="ssh" point="org.eclipse.team.cvs.core.connectionmethods">
- <adapter>
- <run class="org.eclipse.team.internal.ccvs.ssh.SSHMethod">
- <parameter name="trace" value="false" />
- </run>
- </adapter>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Blowfish.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Blowfish.java
deleted file mode 100644
index 6af1ae215..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Blowfish.java
+++ /dev/null
@@ -1,1214 +0,0 @@
-package org.eclipse.team.internal.ccvs.ssh;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-public class Blowfish extends Cipher {
- private int[] P = new int[18];
- private int[][] S = new int[4][256];
-
- private int lastEncipherXL = 0;
- private int lastEncipherXR = 0;
- private int lastDecipherXL = 0;
- private int lastDecipherXR = 0;
-
- private final static int[] INIT_DATA =
- {
- 0x243f6a88,
- 0x85a308d3,
- 0x13198a2e,
- 0x03707344,
- 0xa4093822,
- 0x299f31d0,
- 0x082efa98,
- 0xec4e6c89,
- 0x452821e6,
- 0x38d01377,
- 0xbe5466cf,
- 0x34e90c6c,
- 0xc0ac29b7,
- 0xc97c50dd,
- 0x3f84d5b5,
- 0xb5470917,
- 0x9216d5d9,
- 0x8979fb1b,
- 0xd1310ba6,
- 0x98dfb5ac,
- 0x2ffd72db,
- 0xd01adfb7,
- 0xb8e1afed,
- 0x6a267e96,
- 0xba7c9045,
- 0xf12c7f99,
- 0x24a19947,
- 0xb3916cf7,
- 0x0801f2e2,
- 0x858efc16,
- 0x636920d8,
- 0x71574e69,
- 0xa458fea3,
- 0xf4933d7e,
- 0x0d95748f,
- 0x728eb658,
- 0x718bcd58,
- 0x82154aee,
- 0x7b54a41d,
- 0xc25a59b5,
- 0x9c30d539,
- 0x2af26013,
- 0xc5d1b023,
- 0x286085f0,
- 0xca417918,
- 0xb8db38ef,
- 0x8e79dcb0,
- 0x603a180e,
- 0x6c9e0e8b,
- 0xb01e8a3e,
- 0xd71577c1,
- 0xbd314b27,
- 0x78af2fda,
- 0x55605c60,
- 0xe65525f3,
- 0xaa55ab94,
- 0x57489862,
- 0x63e81440,
- 0x55ca396a,
- 0x2aab10b6,
- 0xb4cc5c34,
- 0x1141e8ce,
- 0xa15486af,
- 0x7c72e993,
- 0xb3ee1411,
- 0x636fbc2a,
- 0x2ba9c55d,
- 0x741831f6,
- 0xce5c3e16,
- 0x9b87931e,
- 0xafd6ba33,
- 0x6c24cf5c,
- 0x7a325381,
- 0x28958677,
- 0x3b8f4898,
- 0x6b4bb9af,
- 0xc4bfe81b,
- 0x66282193,
- 0x61d809cc,
- 0xfb21a991,
- 0x487cac60,
- 0x5dec8032,
- 0xef845d5d,
- 0xe98575b1,
- 0xdc262302,
- 0xeb651b88,
- 0x23893e81,
- 0xd396acc5,
- 0x0f6d6ff3,
- 0x83f44239,
- 0x2e0b4482,
- 0xa4842004,
- 0x69c8f04a,
- 0x9e1f9b5e,
- 0x21c66842,
- 0xf6e96c9a,
- 0x670c9c61,
- 0xabd388f0,
- 0x6a51a0d2,
- 0xd8542f68,
- 0x960fa728,
- 0xab5133a3,
- 0x6eef0b6c,
- 0x137a3be4,
- 0xba3bf050,
- 0x7efb2a98,
- 0xa1f1651d,
- 0x39af0176,
- 0x66ca593e,
- 0x82430e88,
- 0x8cee8619,
- 0x456f9fb4,
- 0x7d84a5c3,
- 0x3b8b5ebe,
- 0xe06f75d8,
- 0x85c12073,
- 0x401a449f,
- 0x56c16aa6,
- 0x4ed3aa62,
- 0x363f7706,
- 0x1bfedf72,
- 0x429b023d,
- 0x37d0d724,
- 0xd00a1248,
- 0xdb0fead3,
- 0x49f1c09b,
- 0x075372c9,
- 0x80991b7b,
- 0x25d479d8,
- 0xf6e8def7,
- 0xe3fe501a,
- 0xb6794c3b,
- 0x976ce0bd,
- 0x04c006ba,
- 0xc1a94fb6,
- 0x409f60c4,
- 0x5e5c9ec2,
- 0x196a2463,
- 0x68fb6faf,
- 0x3e6c53b5,
- 0x1339b2eb,
- 0x3b52ec6f,
- 0x6dfc511f,
- 0x9b30952c,
- 0xcc814544,
- 0xaf5ebd09,
- 0xbee3d004,
- 0xde334afd,
- 0x660f2807,
- 0x192e4bb3,
- 0xc0cba857,
- 0x45c8740f,
- 0xd20b5f39,
- 0xb9d3fbdb,
- 0x5579c0bd,
- 0x1a60320a,
- 0xd6a100c6,
- 0x402c7279,
- 0x679f25fe,
- 0xfb1fa3cc,
- 0x8ea5e9f8,
- 0xdb3222f8,
- 0x3c7516df,
- 0xfd616b15,
- 0x2f501ec8,
- 0xad0552ab,
- 0x323db5fa,
- 0xfd238760,
- 0x53317b48,
- 0x3e00df82,
- 0x9e5c57bb,
- 0xca6f8ca0,
- 0x1a87562e,
- 0xdf1769db,
- 0xd542a8f6,
- 0x287effc3,
- 0xac6732c6,
- 0x8c4f5573,
- 0x695b27b0,
- 0xbbca58c8,
- 0xe1ffa35d,
- 0xb8f011a0,
- 0x10fa3d98,
- 0xfd2183b8,
- 0x4afcb56c,
- 0x2dd1d35b,
- 0x9a53e479,
- 0xb6f84565,
- 0xd28e49bc,
- 0x4bfb9790,
- 0xe1ddf2da,
- 0xa4cb7e33,
- 0x62fb1341,
- 0xcee4c6e8,
- 0xef20cada,
- 0x36774c01,
- 0xd07e9efe,
- 0x2bf11fb4,
- 0x95dbda4d,
- 0xae909198,
- 0xeaad8e71,
- 0x6b93d5a0,
- 0xd08ed1d0,
- 0xafc725e0,
- 0x8e3c5b2f,
- 0x8e7594b7,
- 0x8ff6e2fb,
- 0xf2122b64,
- 0x8888b812,
- 0x900df01c,
- 0x4fad5ea0,
- 0x688fc31c,
- 0xd1cff191,
- 0xb3a8c1ad,
- 0x2f2f2218,
- 0xbe0e1777,
- 0xea752dfe,
- 0x8b021fa1,
- 0xe5a0cc0f,
- 0xb56f74e8,
- 0x18acf3d6,
- 0xce89e299,
- 0xb4a84fe0,
- 0xfd13e0b7,
- 0x7cc43b81,
- 0xd2ada8d9,
- 0x165fa266,
- 0x80957705,
- 0x93cc7314,
- 0x211a1477,
- 0xe6ad2065,
- 0x77b5fa86,
- 0xc75442f5,
- 0xfb9d35cf,
- 0xebcdaf0c,
- 0x7b3e89a0,
- 0xd6411bd3,
- 0xae1e7e49,
- 0x00250e2d,
- 0x2071b35e,
- 0x226800bb,
- 0x57b8e0af,
- 0x2464369b,
- 0xf009b91e,
- 0x5563911d,
- 0x59dfa6aa,
- 0x78c14389,
- 0xd95a537f,
- 0x207d5ba2,
- 0x02e5b9c5,
- 0x83260376,
- 0x6295cfa9,
- 0x11c81968,
- 0x4e734a41,
- 0xb3472dca,
- 0x7b14a94a,
- 0x1b510052,
- 0x9a532915,
- 0xd60f573f,
- 0xbc9bc6e4,
- 0x2b60a476,
- 0x81e67400,
- 0x08ba6fb5,
- 0x571be91f,
- 0xf296ec6b,
- 0x2a0dd915,
- 0xb6636521,
- 0xe7b9f9b6,
- 0xff34052e,
- 0xc5855664,
- 0x53b02d5d,
- 0xa99f8fa1,
- 0x08ba4799,
- 0x6e85076a,
- 0x4b7a70e9,
- 0xb5b32944,
- 0xdb75092e,
- 0xc4192623,
- 0xad6ea6b0,
- 0x49a7df7d,
- 0x9cee60b8,
- 0x8fedb266,
- 0xecaa8c71,
- 0x699a17ff,
- 0x5664526c,
- 0xc2b19ee1,
- 0x193602a5,
- 0x75094c29,
- 0xa0591340,
- 0xe4183a3e,
- 0x3f54989a,
- 0x5b429d65,
- 0x6b8fe4d6,
- 0x99f73fd6,
- 0xa1d29c07,
- 0xefe830f5,
- 0x4d2d38e6,
- 0xf0255dc1,
- 0x4cdd2086,
- 0x8470eb26,
- 0x6382e9c6,
- 0x021ecc5e,
- 0x09686b3f,
- 0x3ebaefc9,
- 0x3c971814,
- 0x6b6a70a1,
- 0x687f3584,
- 0x52a0e286,
- 0xb79c5305,
- 0xaa500737,
- 0x3e07841c,
- 0x7fdeae5c,
- 0x8e7d44ec,
- 0x5716f2b8,
- 0xb03ada37,
- 0xf0500c0d,
- 0xf01c1f04,
- 0x0200b3ff,
- 0xae0cf51a,
- 0x3cb574b2,
- 0x25837a58,
- 0xdc0921bd,
- 0xd19113f9,
- 0x7ca92ff6,
- 0x94324773,
- 0x22f54701,
- 0x3ae5e581,
- 0x37c2dadc,
- 0xc8b57634,
- 0x9af3dda7,
- 0xa9446146,
- 0x0fd0030e,
- 0xecc8c73e,
- 0xa4751e41,
- 0xe238cd99,
- 0x3bea0e2f,
- 0x3280bba1,
- 0x183eb331,
- 0x4e548b38,
- 0x4f6db908,
- 0x6f420d03,
- 0xf60a04bf,
- 0x2cb81290,
- 0x24977c79,
- 0x5679b072,
- 0xbcaf89af,
- 0xde9a771f,
- 0xd9930810,
- 0xb38bae12,
- 0xdccf3f2e,
- 0x5512721f,
- 0x2e6b7124,
- 0x501adde6,
- 0x9f84cd87,
- 0x7a584718,
- 0x7408da17,
- 0xbc9f9abc,
- 0xe94b7d8c,
- 0xec7aec3a,
- 0xdb851dfa,
- 0x63094366,
- 0xc464c3d2,
- 0xef1c1847,
- 0x3215d908,
- 0xdd433b37,
- 0x24c2ba16,
- 0x12a14d43,
- 0x2a65c451,
- 0x50940002,
- 0x133ae4dd,
- 0x71dff89e,
- 0x10314e55,
- 0x81ac77d6,
- 0x5f11199b,
- 0x043556f1,
- 0xd7a3c76b,
- 0x3c11183b,
- 0x5924a509,
- 0xf28fe6ed,
- 0x97f1fbfa,
- 0x9ebabf2c,
- 0x1e153c6e,
- 0x86e34570,
- 0xeae96fb1,
- 0x860e5e0a,
- 0x5a3e2ab3,
- 0x771fe71c,
- 0x4e3d06fa,
- 0x2965dcb9,
- 0x99e71d0f,
- 0x803e89d6,
- 0x5266c825,
- 0x2e4cc978,
- 0x9c10b36a,
- 0xc6150eba,
- 0x94e2ea78,
- 0xa5fc3c53,
- 0x1e0a2df4,
- 0xf2f74ea7,
- 0x361d2b3d,
- 0x1939260f,
- 0x19c27960,
- 0x5223a708,
- 0xf71312b6,
- 0xebadfe6e,
- 0xeac31f66,
- 0xe3bc4595,
- 0xa67bc883,
- 0xb17f37d1,
- 0x018cff28,
- 0xc332ddef,
- 0xbe6c5aa5,
- 0x65582185,
- 0x68ab9802,
- 0xeecea50f,
- 0xdb2f953b,
- 0x2aef7dad,
- 0x5b6e2f84,
- 0x1521b628,
- 0x29076170,
- 0xecdd4775,
- 0x619f1510,
- 0x13cca830,
- 0xeb61bd96,
- 0x0334fe1e,
- 0xaa0363cf,
- 0xb5735c90,
- 0x4c70a239,
- 0xd59e9e0b,
- 0xcbaade14,
- 0xeecc86bc,
- 0x60622ca7,
- 0x9cab5cab,
- 0xb2f3846e,
- 0x648b1eaf,
- 0x19bdf0ca,
- 0xa02369b9,
- 0x655abb50,
- 0x40685a32,
- 0x3c2ab4b3,
- 0x319ee9d5,
- 0xc021b8f7,
- 0x9b540b19,
- 0x875fa099,
- 0x95f7997e,
- 0x623d7da8,
- 0xf837889a,
- 0x97e32d77,
- 0x11ed935f,
- 0x16681281,
- 0x0e358829,
- 0xc7e61fd6,
- 0x96dedfa1,
- 0x7858ba99,
- 0x57f584a5,
- 0x1b227263,
- 0x9b83c3ff,
- 0x1ac24696,
- 0xcdb30aeb,
- 0x532e3054,
- 0x8fd948e4,
- 0x6dbc3128,
- 0x58ebf2ef,
- 0x34c6ffea,
- 0xfe28ed61,
- 0xee7c3c73,
- 0x5d4a14d9,
- 0xe864b7e3,
- 0x42105d14,
- 0x203e13e0,
- 0x45eee2b6,
- 0xa3aaabea,
- 0xdb6c4f15,
- 0xfacb4fd0,
- 0xc742f442,
- 0xef6abbb5,
- 0x654f3b1d,
- 0x41cd2105,
- 0xd81e799e,
- 0x86854dc7,
- 0xe44b476a,
- 0x3d816250,
- 0xcf62a1f2,
- 0x5b8d2646,
- 0xfc8883a0,
- 0xc1c7b6a3,
- 0x7f1524c3,
- 0x69cb7492,
- 0x47848a0b,
- 0x5692b285,
- 0x095bbf00,
- 0xad19489d,
- 0x1462b174,
- 0x23820e00,
- 0x58428d2a,
- 0x0c55f5ea,
- 0x1dadf43e,
- 0x233f7061,
- 0x3372f092,
- 0x8d937e41,
- 0xd65fecf1,
- 0x6c223bdb,
- 0x7cde3759,
- 0xcbee7460,
- 0x4085f2a7,
- 0xce77326e,
- 0xa6078084,
- 0x19f8509e,
- 0xe8efd855,
- 0x61d99735,
- 0xa969a7aa,
- 0xc50c06c2,
- 0x5a04abfc,
- 0x800bcadc,
- 0x9e447a2e,
- 0xc3453484,
- 0xfdd56705,
- 0x0e1e9ec9,
- 0xdb73dbd3,
- 0x105588cd,
- 0x675fda79,
- 0xe3674340,
- 0xc5c43465,
- 0x713e38d8,
- 0x3d28f89e,
- 0xf16dff20,
- 0x153e21e7,
- 0x8fb03d4a,
- 0xe6e39f2b,
- 0xdb83adf7,
- 0xe93d5a68,
- 0x948140f7,
- 0xf64c261c,
- 0x94692934,
- 0x411520f7,
- 0x7602d4f7,
- 0xbcf46b2e,
- 0xd4a20068,
- 0xd4082471,
- 0x3320f46a,
- 0x43b7d4b7,
- 0x500061af,
- 0x1e39f62e,
- 0x97244546,
- 0x14214f74,
- 0xbf8b8840,
- 0x4d95fc1d,
- 0x96b591af,
- 0x70f4ddd3,
- 0x66a02f45,
- 0xbfbc09ec,
- 0x03bd9785,
- 0x7fac6dd0,
- 0x31cb8504,
- 0x96eb27b3,
- 0x55fd3941,
- 0xda2547e6,
- 0xabca0a9a,
- 0x28507825,
- 0x530429f4,
- 0x0a2c86da,
- 0xe9b66dfb,
- 0x68dc1462,
- 0xd7486900,
- 0x680ec0a4,
- 0x27a18dee,
- 0x4f3ffea2,
- 0xe887ad8c,
- 0xb58ce006,
- 0x7af4d6b6,
- 0xaace1e7c,
- 0xd3375fec,
- 0xce78a399,
- 0x406b2a42,
- 0x20fe9e35,
- 0xd9f385b9,
- 0xee39d7ab,
- 0x3b124e8b,
- 0x1dc9faf7,
- 0x4b6d1856,
- 0x26a36631,
- 0xeae397b2,
- 0x3a6efa74,
- 0xdd5b4332,
- 0x6841e7f7,
- 0xca7820fb,
- 0xfb0af54e,
- 0xd8feb397,
- 0x454056ac,
- 0xba489527,
- 0x55533a3a,
- 0x20838d87,
- 0xfe6ba9b7,
- 0xd096954b,
- 0x55a867bc,
- 0xa1159a58,
- 0xcca92963,
- 0x99e1db33,
- 0xa62a4a56,
- 0x3f3125f9,
- 0x5ef47e1c,
- 0x9029317c,
- 0xfdf8e802,
- 0x04272f70,
- 0x80bb155c,
- 0x05282ce3,
- 0x95c11548,
- 0xe4c66d22,
- 0x48c1133f,
- 0xc70f86dc,
- 0x07f9c9ee,
- 0x41041f0f,
- 0x404779a4,
- 0x5d886e17,
- 0x325f51eb,
- 0xd59bc0d1,
- 0xf2bcc18f,
- 0x41113564,
- 0x257b7834,
- 0x602a9c60,
- 0xdff8e8a3,
- 0x1f636c1b,
- 0x0e12b4c2,
- 0x02e1329e,
- 0xaf664fd1,
- 0xcad18115,
- 0x6b2395e0,
- 0x333e92e1,
- 0x3b240b62,
- 0xeebeb922,
- 0x85b2a20e,
- 0xe6ba0d99,
- 0xde720c8c,
- 0x2da2f728,
- 0xd0127845,
- 0x95b794fd,
- 0x647d0862,
- 0xe7ccf5f0,
- 0x5449a36f,
- 0x877d48fa,
- 0xc39dfd27,
- 0xf33e8d1e,
- 0x0a476341,
- 0x992eff74,
- 0x3a6f6eab,
- 0xf4f8fd37,
- 0xa812dc60,
- 0xa1ebddf8,
- 0x991be14c,
- 0xdb6e6b0d,
- 0xc67b5510,
- 0x6d672c37,
- 0x2765d43b,
- 0xdcd0e804,
- 0xf1290dc7,
- 0xcc00ffa3,
- 0xb5390f92,
- 0x690fed0b,
- 0x667b9ffb,
- 0xcedb7d9c,
- 0xa091cf0b,
- 0xd9155ea3,
- 0xbb132f88,
- 0x515bad24,
- 0x7b9479bf,
- 0x763bd6eb,
- 0x37392eb3,
- 0xcc115979,
- 0x8026e297,
- 0xf42e312d,
- 0x6842ada7,
- 0xc66a2b3b,
- 0x12754ccc,
- 0x782ef11c,
- 0x6a124237,
- 0xb79251e7,
- 0x06a1bbe6,
- 0x4bfb6350,
- 0x1a6b1018,
- 0x11caedfa,
- 0x3d25bdd8,
- 0xe2e1c3c9,
- 0x44421659,
- 0x0a121386,
- 0xd90cec6e,
- 0xd5abea2a,
- 0x64af674e,
- 0xda86a85f,
- 0xbebfe988,
- 0x64e4c3fe,
- 0x9dbc8057,
- 0xf0f7c086,
- 0x60787bf8,
- 0x6003604d,
- 0xd1fd8346,
- 0xf6381fb0,
- 0x7745ae04,
- 0xd736fccc,
- 0x83426b33,
- 0xf01eab71,
- 0xb0804187,
- 0x3c005e5f,
- 0x77a057be,
- 0xbde8ae24,
- 0x55464299,
- 0xbf582e61,
- 0x4e58f48f,
- 0xf2ddfda2,
- 0xf474ef38,
- 0x8789bdc2,
- 0x5366f9c3,
- 0xc8b38e74,
- 0xb475f255,
- 0x46fcd9b9,
- 0x7aeb2661,
- 0x8b1ddf84,
- 0x846a0e79,
- 0x915f95e2,
- 0x466e598e,
- 0x20b45770,
- 0x8cd55591,
- 0xc902de4c,
- 0xb90bace1,
- 0xbb8205d0,
- 0x11a86248,
- 0x7574a99e,
- 0xb77f19b6,
- 0xe0a9dc09,
- 0x662d09a1,
- 0xc4324633,
- 0xe85a1f02,
- 0x09f0be8c,
- 0x4a99a025,
- 0x1d6efe10,
- 0x1ab93d1d,
- 0x0ba5a4df,
- 0xa186f20f,
- 0x2868f169,
- 0xdcb7da83,
- 0x573906fe,
- 0xa1e2ce9b,
- 0x4fcd7f52,
- 0x50115e01,
- 0xa70683fa,
- 0xa002b5c4,
- 0x0de6d027,
- 0x9af88c27,
- 0x773f8641,
- 0xc3604c06,
- 0x61a806b5,
- 0xf0177a28,
- 0xc0f586e0,
- 0x006058aa,
- 0x30dc7d62,
- 0x11e69ed7,
- 0x2338ea63,
- 0x53c2dd94,
- 0xc2c21634,
- 0xbbcbee56,
- 0x90bcb6de,
- 0xebfc7da1,
- 0xce591d76,
- 0x6f05e409,
- 0x4b7c0188,
- 0x39720a3d,
- 0x7c927c24,
- 0x86e3725f,
- 0x724d9db9,
- 0x1ac15bb4,
- 0xd39eb8fc,
- 0xed545578,
- 0x08fca5b5,
- 0xd83d7cd3,
- 0x4dad0fc4,
- 0x1e50ef5e,
- 0xb161e6f8,
- 0xa28514d9,
- 0x6c51133c,
- 0x6fd5c7e7,
- 0x56e14ec4,
- 0x362abfce,
- 0xddc6c837,
- 0xd79a3234,
- 0x92638212,
- 0x670efa8e,
- 0x406000e0,
- 0x3a39ce37,
- 0xd3faf5cf,
- 0xabc27737,
- 0x5ac52d1b,
- 0x5cb0679e,
- 0x4fa33742,
- 0xd3822740,
- 0x99bc9bbe,
- 0xd5118e9d,
- 0xbf0f7315,
- 0xd62d1c7e,
- 0xc700c47b,
- 0xb78c1b6b,
- 0x21a19045,
- 0xb26eb1be,
- 0x6a366eb4,
- 0x5748ab2f,
- 0xbc946e79,
- 0xc6a376d2,
- 0x6549c2c8,
- 0x530ff8ee,
- 0x468dde7d,
- 0xd5730a1d,
- 0x4cd04dc6,
- 0x2939bbdb,
- 0xa9ba4650,
- 0xac9526e8,
- 0xbe5ee304,
- 0xa1fad5f0,
- 0x6a2d519a,
- 0x63ef8ce2,
- 0x9a86ee22,
- 0xc089c2b8,
- 0x43242ef6,
- 0xa51e03aa,
- 0x9cf2d0a4,
- 0x83c061ba,
- 0x9be96a4d,
- 0x8fe51550,
- 0xba645bd6,
- 0x2826a2f9,
- 0xa73a3ae1,
- 0x4ba99586,
- 0xef5562e9,
- 0xc72fefd3,
- 0xf752f7da,
- 0x3f046f69,
- 0x77fa0a59,
- 0x80e4a915,
- 0x87b08601,
- 0x9b09e6ad,
- 0x3b3ee593,
- 0xe990fd5a,
- 0x9e34d797,
- 0x2cf0b7d9,
- 0x022b8b51,
- 0x96d5ac3a,
- 0x017da67d,
- 0xd1cf3ed6,
- 0x7c7d2d28,
- 0x1f9f25cf,
- 0xadf2b89b,
- 0x5ad6b472,
- 0x5a88f54c,
- 0xe029ac71,
- 0xe019a5e6,
- 0x47b0acfd,
- 0xed93fa9b,
- 0xe8d3c48d,
- 0x283b57cc,
- 0xf8d56629,
- 0x79132e28,
- 0x785f0191,
- 0xed756055,
- 0xf7960e44,
- 0xe3d35e8c,
- 0x15056dd4,
- 0x88f46dba,
- 0x03a16125,
- 0x0564f0bd,
- 0xc3eb9e15,
- 0x3c9057a2,
- 0x97271aec,
- 0xa93a072a,
- 0x1b3f6d9b,
- 0x1e6321f5,
- 0xf59c66fb,
- 0x26dcf319,
- 0x7533d928,
- 0xb155fdf5,
- 0x03563482,
- 0x8aba3cbb,
- 0x28517711,
- 0xc20ad9f8,
- 0xabcc5167,
- 0xccad925f,
- 0x4de81751,
- 0x3830dc8e,
- 0x379d5862,
- 0x9320f991,
- 0xea7a90c2,
- 0xfb3e7bce,
- 0x5121ce64,
- 0x774fbe32,
- 0xa8b6e37e,
- 0xc3293d46,
- 0x48de5369,
- 0x6413e680,
- 0xa2ae0810,
- 0xdd6db224,
- 0x69852dfd,
- 0x09072166,
- 0xb39a460a,
- 0x6445c0dd,
- 0x586cdecf,
- 0x1c20c8ae,
- 0x5bbef7dd,
- 0x1b588d40,
- 0xccd2017f,
- 0x6bb4e3bb,
- 0xdda26a7e,
- 0x3a59ff45,
- 0x3e350a44,
- 0xbcb4cdd5,
- 0x72eacea8,
- 0xfa6484bb,
- 0x8d6612ae,
- 0xbf3c6f47,
- 0xd29be463,
- 0x542f5d9e,
- 0xaec2771b,
- 0xf64e6370,
- 0x740e0d8d,
- 0xe75b1357,
- 0xf8721671,
- 0xaf537d5d,
- 0x4040cb08,
- 0x4eb4e2cc,
- 0x34d2466a,
- 0x0115af84,
- 0xe1b00428,
- 0x95983a1d,
- 0x06b89fb4,
- 0xce6ea048,
- 0x6f3f3b82,
- 0x3520ab82,
- 0x011a1d4b,
- 0x277227f8,
- 0x611560b1,
- 0xe7933fdc,
- 0xbb3a792b,
- 0x344525bd,
- 0xa08839e1,
- 0x51ce794b,
- 0x2f32c9b7,
- 0xa01fbac9,
- 0xe01cc87e,
- 0xbcc7d1f6,
- 0xcf0111c3,
- 0xa1e8aac7,
- 0x1a908749,
- 0xd44fbd9a,
- 0xd0dadecb,
- 0xd50ada38,
- 0x0339c32a,
- 0xc6913667,
- 0x8df9317c,
- 0xe0b12b4f,
- 0xf79e59b7,
- 0x43f5bb3a,
- 0xf2d519ff,
- 0x27d9459c,
- 0xbf97222c,
- 0x15e6fc2a,
- 0x0f91fc71,
- 0x9b941525,
- 0xfae59361,
- 0xceb69ceb,
- 0xc2a86459,
- 0x12baa8d1,
- 0xb6c1075e,
- 0xe3056a0c,
- 0x10d25065,
- 0xcb03a442,
- 0xe0ec6e0e,
- 0x1698db3b,
- 0x4c98a0be,
- 0x3278e964,
- 0x9f1f9532,
- 0xe0d392df,
- 0xd3a0342b,
- 0x8971f21e,
- 0x1b0a7441,
- 0x4ba3348c,
- 0xc5be7120,
- 0xc37632d8,
- 0xdf359f8d,
- 0x9b992f2e,
- 0xe60b6f47,
- 0x0fe3f11d,
- 0xe54cda54,
- 0x1edad891,
- 0xce6279cf,
- 0xcd3e7e6f,
- 0x1618b166,
- 0xfd2c1d05,
- 0x848fd2c5,
- 0xf6fb2299,
- 0xf523f357,
- 0xa6327623,
- 0x93a83531,
- 0x56cccd02,
- 0xacf08162,
- 0x5a75ebb5,
- 0x6e163697,
- 0x88d273cc,
- 0xde966292,
- 0x81b949d0,
- 0x4c50901b,
- 0x71c65614,
- 0xe6c6c7bd,
- 0x327a140a,
- 0x45e1d006,
- 0xc3f27b9a,
- 0xc9aa53fd,
- 0x62a80f00,
- 0xbb25bfe2,
- 0x35bdd2f6,
- 0x71126905,
- 0xb2040222,
- 0xb6cbcf7c,
- 0xcd769c2b,
- 0x53113ec0,
- 0x1640e3d3,
- 0x38abbd60,
- 0x2547adf0,
- 0xba38209c,
- 0xf746ce76,
- 0x77afa1c5,
- 0x20756060,
- 0x85cbfe4e,
- 0x8ae88dd8,
- 0x7aaaf9b0,
- 0x4cf9aa7e,
- 0x1948c25c,
- 0x02fb8a8c,
- 0x01c36ae4,
- 0xd6ebe1f9,
- 0x90d4f869,
- 0xa65cdea0,
- 0x3f09252d,
- 0xc208e69f,
- 0xb74e6132,
- 0xce77e25b,
- 0x578fdfe3,
- 0x3ac372e6 };
-public void decipher(byte[] src, int srcOff, byte[] dst, int dstOff, int len) {
- int xL = lastDecipherXL;
- int xR = lastDecipherXR;
-
- int dataXL;
- int dataXR;
-
- int[] xLxR = new int[2];
-
- for (int i = 0; i < len; i = i + 8) {
- dataXL = (src[srcOff + i] & 0xff) | ((src[srcOff + i + 1] & 0xff) << 8) | ((src[srcOff + i + 2] & 0xff) << 16) | ((src[srcOff + i + 3] & 0xff) << 24);
- dataXR = (src[srcOff + i + 4] & 0xff) | ((src[srcOff + i + 5] & 0xff) << 8) | ((src[srcOff + i + 6] & 0xff) << 16) | ((src[srcOff + i + 7] & 0xff) << 24);
-
- decipher(dataXL, dataXR, xLxR);
-
- xL ^= xLxR[0];
- xR ^= xLxR[1];
-
- dst[dstOff + i] = (byte) (xL & 0xff);
- dst[dstOff + i + 1] = (byte) ((xL >> 8) & 0xff);
- dst[dstOff + i + 2] = (byte) ((xL >> 16) & 0xff);
- dst[dstOff + i + 3] = (byte) ((xL >> 24) & 0xff);
- dst[dstOff + i + 4] = (byte) (xR & 0xff);
- dst[dstOff + i + 5] = (byte) ((xR >> 8) & 0xff);
- dst[dstOff + i + 6] = (byte) ((xR >> 16) & 0xff);
- dst[dstOff + i + 7] = (byte) ((xR >> 24) & 0xff);
-
- xL = dataXL;
- xR = dataXR;
- }
-
- lastDecipherXL = xL;
- lastDecipherXR = xR;
-}
-private void decipher(int xL, int xR, int[] xLxR) {
- xL ^= P[17];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[16];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[15];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[14];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[13];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[12];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[11];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[10];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[9];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[8];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[7];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[6];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[5];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[4];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[3];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[2];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[1];
- xR ^= P[0];
-
- xLxR[0] = xR;
- xLxR[1] = xL;
-}
-public void encipher(byte[] src, int srcOff, byte[] dst, int dstOff, int len) {
- int xL = lastEncipherXL;
- int xR = lastEncipherXR;
-
- int[] xLxR = new int[2];
-
- for (int i = 0; i < len; i = i + 8) {
- xL ^= (src[srcOff + i] & 0xff) | ((src[srcOff + i + 1] & 0xff) << 8) | ((src[srcOff + i + 2] & 0xff) << 16) | ((src[srcOff + i + 3] & 0xff) << 24);
- xR ^= (src[srcOff + i + 4] & 0xff) | ((src[srcOff + i + 5] & 0xff) << 8) | ((src[srcOff + i + 6] & 0xff) << 16) | ((src[srcOff + i + 7] & 0xff) << 24);
-
- encipher(xL, xR, xLxR);
-
- xL = xLxR[0];
- xR = xLxR[1];
-
- dst[dstOff + i] = (byte) (xL & 0xff);
- dst[dstOff + i + 1] = (byte) ((xL >> 8) & 0xff);
- dst[dstOff + i + 2] = (byte) ((xL >> 16) & 0xff);
- dst[dstOff + i + 3] = (byte) ((xL >> 24) & 0xff);
- dst[dstOff + i + 4] = (byte) (xR & 0xff);
- dst[dstOff + i + 5] = (byte) ((xR >> 8) & 0xff);
- dst[dstOff + i + 6] = (byte) ((xR >> 16) & 0xff);
- dst[dstOff + i + 7] = (byte) ((xR >> 24) & 0xff);
- }
-
- lastEncipherXL = xL;
- lastEncipherXR = xR;
-}
-private void encipher(int xL, int xR, int[] xLxR) {
- xL ^= P[0];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[1];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[2];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[3];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[4];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[5];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[6];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[7];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[8];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[9];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[10];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[11];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[12];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[13];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[14];
- xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[15];
- xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[16];
- xR ^= P[17];
-
- xLxR[0] = xR;
- xLxR[1] = xL;
-}
-public void setKey(byte key[]) {
- int data = 0;
- int offset = 0;
-
- for (int i = 0; i < P.length; ++i) {
- P[i] = INIT_DATA[offset++];
- }
-
- for (int i = 0; i < S.length; ++i) {
- for (int j = 0; j < S[i].length; ++j) {
- S[i][j] = INIT_DATA[offset++];
- }
- }
-
- offset = 0;
- for (int i = 0; i < P.length; ++i) {
- data = 0;
- for (int k = 0; k < 4; ++k) {
- data = (data << 8) | (key[offset++] & 0xff);
- if (offset >= key.length) {
- offset = 0;
- }
- }
- P[i] = P[i] ^ data;
- }
-
- int[] lr = new int[] { 0, 0 };
- for (int i = 0; i < P.length; i += 2) {
- encipher(lr[0], lr[1], lr);
- P[i] = lr[0];
- P[i + 1] = lr[1];
- }
-
- for (int i = 0; i < S.length; ++i) {
- for (int j = 0; j < S[i].length; j += 2) {
- encipher(lr[0], lr[1], lr);
- S[i][j] = lr[0];
- S[i][j + 1] = lr[1];
- }
- }
-
- lastEncipherXL = 0;
- lastEncipherXR = 0;
- lastDecipherXL = 0;
- lastDecipherXR = 0;
-}
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Cipher.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Cipher.java
deleted file mode 100644
index 14c6270d2..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Cipher.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package org.eclipse.team.internal.ccvs.ssh;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-public abstract class Cipher {
-public abstract void decipher(byte[] src, int srcPos, byte[] dst, int dstPos, int len);
-public abstract void encipher(byte[] src, int srcPos, byte[] dst, int dstPos, int len);
-public static Cipher getInstance(String algorithm) {
- try {
- Class c = Class.forName("org.eclipse.team.internal.ccvs.ssh." + algorithm); //$NON-NLS-1$
- return (Cipher) c.newInstance();
- } catch (Exception e) {
- return null;
- }
-}
-public abstract void setKey(byte[] key);
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Client.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Client.java
deleted file mode 100644
index 4abff9756..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Client.java
+++ /dev/null
@@ -1,679 +0,0 @@
-package org.eclipse.team.internal.ccvs.ssh;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-/**
- * An SSH 1.5 client..
- */
-
-import java.io.BufferedInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InterruptedIOException;
-import java.io.OutputStream;
-import java.net.Socket;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.connection.CVSAuthenticationException;
-import org.eclipse.team.internal.core.streams.PollingInputStream;
-import org.eclipse.team.internal.core.streams.PollingOutputStream;
-import org.eclipse.team.internal.core.streams.TimeoutOutputStream;
-
-public class Client {
- // client identification string
- private static final String clientId = "SSH-1.5-Java 1.2.2\n"; //$NON-NLS-1$
-
- // server identification string
- private static String serverId = null;
-
- // maximum outgoing packet size
- private static final int MAX_CLIENT_PACKET_SIZE = 1024;
-
- // packet types
- private static final int SSH_MSG_DISCONNECT = 1;
- private static final int SSH_SMSG_PUBLIC_KEY = 2;
- private static final int SSH_CMSG_SESSION_KEY = 3;
- private static final int SSH_CMSG_USER = 4;
- private static final int SSH_CMSG_AUTH_PASSWORD = 9;
- private static final int SSH_CMSG_REQUEST_PTY = 10;
- private static final int SSH_CMSG_EXEC_SHELL = 12;
- private static final int SSH_CMSG_EXEC_CMD = 13;
- private static final int SSH_SMSG_SUCCESS = 14;
- private static final int SSH_SMSG_FAILURE = 15;
- private static final int SSH_CMSG_STDIN_DATA = 16;
- private static final int SSH_SMSG_STDOUT_DATA = 17;
- private static final int SSH_SMSG_STDERR_DATA = 18;
- private static final int SSH_SMSG_EXITSTATUS = 20;
- private static final int SSH_CMSG_EXIT_CONFIRMATION = 33;
- private static final int SSH_MSG_DEBUG = 36;
-
- // cipher names
- private static String[] cipherNames = { "None", "IDEA", "DES", "3DES", "TSS", "RC4", "Blowfish" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
-
- // cipher types
- private static int SSH_CIPHER_NONE = 0;
- private static int SSH_CIPHER_IDEA = 1;
- private static int SSH_CIPHER_DES = 2;
- private static int SSH_CIPHER_3DES = 3;
- private static int SSH_CIPHER_TSS = 4;
- private static int SSH_CIPHER_RC4 = 5;
- private static int SSH_CIPHER_BLOWFISH = 6;
-
- // preferred cipher types
- private int[] preferredCipherTypes = { SSH_CIPHER_BLOWFISH };
-
- // authentication methods
- private final int SSH_AUTH_RHOSTS = 1;
- private final int SSH_AUTH_RSA = 2;
- private final int SSH_AUTH_PASSWORD = 3;
- private final int SSH_AUTH_RHOSTS_RSA = 4;
-
- private String host;
- private int port;
- private String username;
- private String password;
- private String command;
-
- private Socket socket;
- private InputStream socketIn;
- private OutputStream socketOut;
- private InputStream is;
- private OutputStream os;
- private boolean connected = false;
- private int timeout = -1;
-
- private Cipher cipher = null;
-
- private class StandardInputStream extends InputStream {
- private ServerPacket packet = null;
- private InputStream buffer = null;
- private int buflen = 0;
- private boolean atEnd = false;
- private boolean closed = false;
- private int exitStatus = 0;
-
- public int available() throws IOException {
- if (closed) {
- throw new IOException(Policy.bind("closed")); //$NON-NLS-1$
- }
-
- int available = buffer == null ? 0 : buffer.available();
-
- if (available == 0 && socketIn.available() > 0) {
- fill();
- if (atEnd) {
- return 0;
- }
- available = buffer.available();
- }
-
- return available;
- }
-
- public void close() throws IOException {
- if (!closed) {
- closed = true;
- if (packet != null) {
- packet.close(false);
- buffer = null;
- packet = null;
- buflen = 0;
- }
- }
- }
-
- public int read() throws IOException {
- if (closed) {
- throw new IOException(Policy.bind("closed"));//$NON-NLS-1$
- }
-
- if (atEnd) {
- return -1;
- }
-
- if (buffer == null || buffer.available() == 0) {
- fill();
- if (atEnd) {
- return -1;
- }
- }
-
- return buffer.read();
- }
-
- public int read(byte b[], int off, int len) throws IOException {
- if (closed) {
- throw new IOException(Policy.bind("closed"));//$NON-NLS-1$
- }
-
- if (atEnd) {
- return -1;
- }
-
- if (buffer == null || buffer.available() == 0) {
- fill();
- if (atEnd) {
- return -1;
- }
- }
-
- return buffer.read(b, off, len);
- }
-
- private void fill() throws IOException {
- if (buffer != null) {
- buffer.close();
- }
-
- packet = new ServerPacket(socketIn, cipher);
- int packetType = packet.getType();
-
- switch (packetType) {
- case SSH_SMSG_STDOUT_DATA :
- case SSH_SMSG_STDERR_DATA :
- case SSH_MSG_DEBUG :
- buffer = packet.getInputStream();
- buflen = Misc.readInt(buffer);
- break;
- case SSH_SMSG_EXITSTATUS :
- buffer = null;
- buflen = 0;
- atEnd = true;
- InputStream pis = packet.getInputStream();
- exitStatus = Misc.readInt(pis);
- pis.close();
- send(SSH_CMSG_EXIT_CONFIRMATION, null);
- break;
- case SSH_MSG_DISCONNECT :
- buffer = null;
- buflen = 0;
- atEnd = true;
- handleDisconnect(packet.getInputStream());
- break;
- default :
- throw new IOException(Policy.bind("Client.packetType", new Object[] {new Integer(packetType)} ));//$NON-NLS-1$
- }
- }
-
- private void handleDisconnect(InputStream in) throws IOException {
- String description = null;
- try {
- description = Misc.readString(in);
- } catch (IOException e) {
- } finally {
- in.close();
- }
-
- // Log the description provided by the server
- if (description == null) {
- description = Policy.bind("Client.noDisconnectDescription"); //$NON-NLS-1$
- }
-
- // Throw an IOException with the proper text
- throw new IOException(Policy.bind("Client.disconnectDescription", new Object[] {description}));//$NON-NLS-1$
- }
- }
-
- private class StandardOutputStream extends OutputStream {
- private int MAX_BUFFER_SIZE = MAX_CLIENT_PACKET_SIZE;
- private byte[] buffer = new byte[MAX_BUFFER_SIZE];
- private int bufpos = 0;
- private boolean closed = false;
-
- public void close() throws IOException {
- if (!closed) {
- try {
- flush();
- } finally {
- closed = true;
- }
- }
- }
-
- public void flush() throws IOException {
- if (closed) {
- throw new IOException(Policy.bind("closed"));//$NON-NLS-1$
- }
-
- if (bufpos > 0) {
- send(SSH_CMSG_STDIN_DATA, buffer, 0, bufpos);
- bufpos = 0;
- }
- }
-
- public void write(int b) throws IOException {
- if (closed) {
- throw new IOException(Policy.bind("closed"));//$NON-NLS-1$
- }
-
- buffer[bufpos++] = (byte) b;
-
- if (bufpos == MAX_BUFFER_SIZE) {
- flush();
- }
- }
-
- public void write(byte b[], int off, int len) throws IOException {
- if (closed) {
- throw new IOException(Policy.bind("closed")); //$NON-NLS-1$
- }
-
- int bytesWritten = 0;
- int totalBytesWritten = 0;
-
- if (bufpos > 0) {
- bytesWritten = Math.min(MAX_BUFFER_SIZE - bufpos, len);
- System.arraycopy(b, off, buffer, bufpos, bytesWritten);
- bufpos += bytesWritten;
- totalBytesWritten += bytesWritten;
-
- if (bufpos == MAX_BUFFER_SIZE) {
- flush();
- }
- }
-
- while (len - totalBytesWritten >= MAX_BUFFER_SIZE) {
- send(SSH_CMSG_STDIN_DATA, b, off + totalBytesWritten, MAX_BUFFER_SIZE);
- totalBytesWritten += MAX_BUFFER_SIZE;
- }
-
- if (totalBytesWritten < len) {
- bytesWritten = len - totalBytesWritten;
- System.arraycopy(b, off + totalBytesWritten, buffer, 0, bytesWritten);
- bufpos += bytesWritten;
- }
- }
- }
-public Client(InputStream socketIn, OutputStream socketOut, String username, String password) {
- this.socketIn = socketIn;
- this.socketOut = socketOut;
- this.username = username;
- this.password = password;
-}
-public Client(InputStream socketIn, OutputStream socketOut, String username, String password, String command) {
- this(socketIn, socketOut, username, password);
- this.command = command;
-}
-public Client(String host, int port, String username, String password) {
- this.host = host;
- this.port = port;
- this.username = username;
- this.password = password;
-}
-public Client(String host, int port, String username, String password, String command) {
- this(host, port, username, password);
- this.command = command;
-}
-public Client(String host, int port, String username, String password, String command, int timeout) {
- this(host, port, username, password, command);
- this.timeout = timeout;
-}
-/**
- * Close all streams and sockets.
- */
-private void cleanup() throws IOException {
- try {
- if (is != null)
- is.close();
- } finally {
- try {
- if (os != null)
- os.close();
- } finally {
- try {
- if (socketIn != null)
- socketIn.close();
- } finally {
- try {
- if (socketOut != null)
- socketOut.close();
- } finally {
- try {
- if (socket != null)
- socket.close();
- } finally {
- socket = null;
- }
- }
- }
- }
- }
-}
-/**
- * Connect to the remote server. If an exception is thrown, the caller
- * can asssume that all streams and sockets are closed.
- */
-public void connect(IProgressMonitor monitor) throws IOException, CVSAuthenticationException {
- // If we're already connected, just ignore the invokation
- if (connected)
- return;
-
- // Otherwise, set up the connection
- try {
-
- // Create the socket (the socket should always be null here)
- if (socket == null) {
- try {
- socket = new Socket(host, port);
- } catch (InterruptedIOException e) {
- // If we get this exception, chances are the host is not responding
- throw new InterruptedIOException(Policy.bind("Client.socket", new Object[] {host}));//$NON-NLS-1$
-
- }
- if (timeout >= 0) {
- socket.setSoTimeout(1000);
- }
- socketIn = new BufferedInputStream(new PollingInputStream(socket.getInputStream(),
- timeout > 0 ? timeout : 1, monitor));
- socketOut = new PollingOutputStream(new TimeoutOutputStream(
- socket.getOutputStream(), 8192 /*bufferSize*/, 1000 /*writeTimeout*/, 1000 /*closeTimeout*/),
- timeout > 0 ? timeout : 1, monitor);
- }
-
- // read the ssh server id. The socket creation may of failed if the
- // server cannot accept our connection request. We don't expect the
- // socket to be closed at this point.
- StringBuffer buf = new StringBuffer();
- int c;
- while ((c = socketIn.read()) != '\n') {
- if (c == -1)
- throw new IOException(Policy.bind("Client.socketClosed"));//$NON-NLS-1$
- buf.append((char) c);
- }
- serverId = buf.toString();
-
- // send our id.
- socketOut.write(clientId.getBytes());
- socketOut.flush();
-
- login();
-
- // start a shell and enter interactive session or start by
- // executing the given command.
- if( command == null ) {
- startShell();
- } else {
- executeCommand();
- }
-
- is = new StandardInputStream();
- os = new StandardOutputStream();
-
- connected = true;
- // If an exception occurs while connected, make sure we disconnect before passing the exception on
- } finally {
- if (! connected) cleanup();
- }
-}
-/**
- * Terminate the connection to the server.
- */
-public void disconnect() throws IOException {
- if (connected) {
- connected = false;
- send(SSH_MSG_DISCONNECT, null);
- cleanup();
- }
-}
-public InputStream getInputStream() throws IOException {
- if (!connected) {
- throw new IOException(Policy.bind("Client.notConnected"));//$NON-NLS-1$
- }
-
- return is;
-}
-public OutputStream getOutputStream() throws IOException {
- if (!connected) {
- throw new IOException(Policy.bind("Client.notConnected"));//$NON-NLS-1$
- }
-
- return os;
-}
-
-private void startShell() throws IOException {
- ServerPacket packet = null;
- int packetType;
-
- send_SSH_CMSG_REQUEST_PTY();
-
- try {
- packet = new ServerPacket(socketIn, cipher);
- packetType = packet.getType();
-
- if (packetType != SSH_SMSG_SUCCESS) {
- throw new IOException(Policy.bind("Client.packetType", new Object[] {new Integer(packetType)} ));//$NON-NLS-1$
- }
- } finally {
- if (packet != null) {
- packet.close(true /*perform crc check*/);
- }
- }
-
- send(SSH_CMSG_EXEC_SHELL, null);
-}
-
-private void executeCommand() throws IOException {
- send(SSH_CMSG_EXEC_CMD, command);
-}
-
-private void login() throws IOException, CVSAuthenticationException {
- ServerPacket packet = null;
- int packetType;
-
- try {
- packet = new ServerPacket(socketIn, cipher);
- packetType = packet.getType();
-
- if (packetType != SSH_SMSG_PUBLIC_KEY) {
- throw new IOException(Policy.bind("Client.packetType", new Object[] {new Integer(packetType)} ));//$NON-NLS-1$
- }
-
- receive_SSH_SMSG_PUBLIC_KEY(packet);
- } finally {
- if (packet != null) {
- packet.close(true);
- }
- }
-
- try {
- packet = new ServerPacket(socketIn, cipher);
- packetType = packet.getType();
-
- if (packetType != SSH_SMSG_SUCCESS) {
- throw new IOException(Policy.bind("Client.packetType", new Object[] {new Integer(packetType)} ));//$NON-NLS-1$
- }
- } finally {
- if (packet != null) {
- packet.close(true);
- }
- }
-
- send(SSH_CMSG_USER, username);
-
- try {
- packet = new ServerPacket(socketIn, cipher);
- packetType = packet.getType();
-
- if (packetType != SSH_SMSG_FAILURE) {
- throw new IOException(Policy.bind("Client.packetType", new Object[] {new Integer(packetType)} ));//$NON-NLS-1$
- }
- } finally {
- if (packet != null) {
- packet.close(true);
- }
- }
-
- send(SSH_CMSG_AUTH_PASSWORD, password);
-
- try {
- packet = new ServerPacket(socketIn, cipher);
- packetType = packet.getType();
-
- if (packetType == SSH_SMSG_FAILURE) {
- throw new CVSAuthenticationException(Policy.bind("Client.authenticationFailed"));//$NON-NLS-1$
- }
-
- if (packetType != SSH_SMSG_SUCCESS) {
- throw new IOException(Policy.bind("Client.packetType", new Object[] {new Integer(packetType)} ));//$NON-NLS-1$
- }
- } finally {
- if (packet != null) {
- packet.close(true);
- }
- }
-}
-private void receive_SSH_SMSG_PUBLIC_KEY(ServerPacket packet) throws IOException {
- InputStream pis = packet.getInputStream();
-
- byte[] anti_spoofing_cookie = new byte[8];
- Misc.readFully(pis, anti_spoofing_cookie);
-
- byte[] server_key_bits = new byte[4];
- Misc.readFully(pis, server_key_bits);
-
- byte[] server_key_public_exponent = Misc.readMpInt(pis);
- byte[] server_key_public_modulus = Misc.readMpInt(pis);
-
- byte[] host_key_bits = new byte[4];
- Misc.readFully(pis, host_key_bits);
-
- byte[] host_key_public_exponent = Misc.readMpInt(pis);
- byte[] host_key_public_modulus = Misc.readMpInt(pis);
-
- byte[] protocol_flags = new byte[4];
- Misc.readFully(pis, protocol_flags);
-
- byte[] supported_ciphers_mask = new byte[4];
- Misc.readFully(pis, supported_ciphers_mask);
-
- byte[] supported_authentications_mask = new byte[4];
- Misc.readFully(pis, supported_authentications_mask);
-
- pis.close();
-
- send_SSH_CMSG_SESSION_KEY(anti_spoofing_cookie, server_key_public_modulus, host_key_public_modulus, supported_ciphers_mask, server_key_public_exponent, host_key_public_exponent);
-}
-private void send(int packetType, String s) throws IOException {
- byte[] data = s == null ? new byte[0] : s.getBytes("UTF-8"); //$NON-NLS-1$
- send(packetType, data, 0, data.length);
-}
-private void send(int packetType, byte[] data, int off, int len) throws IOException {
- data = data == null ? null : Misc.lengthEncode(data, off, len);
- ClientPacket packet = new ClientPacket(packetType, data, cipher);
- socketOut.write(packet.getBytes());
- socketOut.flush();
-}
-private void send_SSH_CMSG_REQUEST_PTY() throws IOException {
- byte packet_type = SSH_CMSG_REQUEST_PTY;
-
- byte[] termType = Misc.lengthEncode("dumb".getBytes(), 0, 4);//$NON-NLS-1$
- byte[] row = {0, 0, 0, 0};
- byte[] col = {0, 0, 0, 0};
- byte[] XPixels = {0, 0, 0, 0};
- byte[] YPixels = {0, 0, 0, 0};
- byte[] terminalModes = {0};
-
- byte[] data = new byte[termType.length + row.length + col.length + XPixels.length + YPixels.length + terminalModes.length];
-
- int offset = 0;
- System.arraycopy(termType, 0, data, offset, termType.length);
-
- offset += termType.length;
- System.arraycopy(row, 0, data, offset, row.length);
-
- offset += row.length;
- System.arraycopy(col, 0, data, offset, col.length);
-
- offset += col.length;
- System.arraycopy(XPixels, 0, data, offset, XPixels.length);
-
- offset += XPixels.length;
- System.arraycopy(YPixels, 0, data, offset, YPixels.length);
-
- offset += YPixels.length;
- System.arraycopy(terminalModes, 0, data, offset, terminalModes.length);
-
- ClientPacket packet = new ClientPacket(packet_type, data, cipher);
- socketOut.write(packet.getBytes());
- socketOut.flush();
-}
-private void send_SSH_CMSG_SESSION_KEY(byte[] anti_spoofing_cookie, byte[] server_key_public_modulus, byte[] host_key_public_modulus, byte[] supported_ciphers_mask, byte[] server_key_public_exponent, byte[] host_key_public_exponent) throws IOException {
- byte packet_type = SSH_CMSG_SESSION_KEY;
-
- // session_id
- byte[] session_id = new byte[host_key_public_modulus.length + server_key_public_modulus.length + anti_spoofing_cookie.length];
-
- int offset = 0;
- System.arraycopy(host_key_public_modulus, 0, session_id, offset, host_key_public_modulus.length);
-
- offset += host_key_public_modulus.length;
- System.arraycopy(server_key_public_modulus, 0, session_id, offset, server_key_public_modulus.length);
-
- offset += server_key_public_modulus.length;
- System.arraycopy(anti_spoofing_cookie, 0, session_id, offset, anti_spoofing_cookie.length);
-
- session_id = Misc.md5(session_id);
-
- // cipher_type
- byte cipher_type = 0;
- boolean foundSupportedCipher = false;
-
- for (int i = 0; i < preferredCipherTypes.length && !foundSupportedCipher; ++i) {
- cipher_type = (byte) preferredCipherTypes[i];
- foundSupportedCipher = (supported_ciphers_mask[3] & (byte) (1 << cipher_type)) != 0;
- }
-
- if (!foundSupportedCipher) {
- throw new IOException(Policy.bind("Client.cipher"));//$NON-NLS-1$
- }
-
- // session_key
- byte[] session_key = new byte[32];
- byte[] session_key_xored = new byte[32];
- byte[] session_key_encrypted = null;
-
- Misc.random(session_key, 0, session_key.length, true);
- System.arraycopy(session_key, 0, session_key_xored, 0, session_key.length);
- Misc.xor(session_key_xored, 0, session_id, 0, session_key_xored, 0, session_id.length);
-
- byte[] result = Misc.encryptRSAPkcs1(session_key_xored, server_key_public_exponent, server_key_public_modulus);
- result = Misc.encryptRSAPkcs1(result, host_key_public_exponent, host_key_public_modulus);
-
- session_key_encrypted = new byte[result.length + 2];
- session_key_encrypted[1] = (byte) ((8 * result.length) & 0xff);
- session_key_encrypted[0] = (byte) (((8 * result.length) >> 8) & 0xff);
-
- for (int i = 0; i < result.length; i++) {
- session_key_encrypted[i + 2] = result[i];
- }
-
- // protocol_flags
- byte[] protocol_flags = {0, 0, 0, 0};
-
- // data
- byte[] data = new byte[1 + anti_spoofing_cookie.length + session_key_encrypted.length + protocol_flags.length];
-
- offset = 0;
- data[offset++] = (byte) cipher_type;
-
- System.arraycopy(anti_spoofing_cookie, 0, data, offset, anti_spoofing_cookie.length);
-
- offset += anti_spoofing_cookie.length;
- System.arraycopy(session_key_encrypted, 0, data, offset, session_key_encrypted.length);
-
- offset += session_key_encrypted.length;
- System.arraycopy(protocol_flags, 0, data, offset, protocol_flags.length);
-
- // cipher
- cipher = Cipher.getInstance(cipherNames[cipher_type]);
- cipher.setKey(session_key);
-
- // packet
- ClientPacket packet = new ClientPacket(packet_type, data, null);
- socketOut.write(packet.getBytes());
- socketOut.flush();
-}
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/ClientPacket.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/ClientPacket.java
deleted file mode 100644
index 839a6ef30..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/ClientPacket.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.eclipse.team.internal.ccvs.ssh;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-class ClientPacket extends Packet {
- byte[] packet;
-public ClientPacket(int type, byte[] data, Cipher cipher) {
- packetLength = data == null ? 5 : data.length + 5;
- paddingLength = 8 - (packetLength % 8);
- packetType = type;
- packet = new byte[4 + paddingLength + packetLength];
-
- int packetOff = 0;
- Misc.writeInt(packetLength, packet, packetOff);
- packetOff += 4;
-
- if (cipher == null) {
- for (int i = 0; i < paddingLength; i++) {
- packet[packetOff++] = 0;
- }
- } else {
- Misc.random(packet, packetOff, paddingLength, false);
- packetOff += paddingLength;
- }
-
- packet[packetOff++] = (byte) packetType;
-
- if (data != null) {
- for (int i = 0; i < data.length; ++i) {
- packet[packetOff++] = data[i];
- }
- }
-
- long crc = Misc.crc32(packet, 4, packet.length - 8, 0);
- Misc.writeInt((int) crc, packet, packetOff);
- packetOff += 4;
-
- if (cipher != null) {
- cipher.encipher(packet, 4, packet, 4, packet.length - 4);
- }
-}
-public byte[] getBytes() {
- return packet;
-}
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Misc.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Misc.java
deleted file mode 100644
index 5b848b66d..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Misc.java
+++ /dev/null
@@ -1,462 +0,0 @@
-package org.eclipse.team.internal.ccvs.ssh;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-import java.io.IOException;
-import java.io.InputStream;
-import java.math.BigInteger;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.security.SecureRandom;
-
-class Misc {
- private static MessageDigest md5 = null;
- private static SecureRandom random = null;
- private static long crc32_tab[] = {
- 0x00000000L,
- 0x77073096L,
- 0xee0e612cL,
- 0x990951baL,
- 0x076dc419L,
- 0x706af48fL,
- 0xe963a535L,
- 0x9e6495a3L,
- 0x0edb8832L,
- 0x79dcb8a4L,
- 0xe0d5e91eL,
- 0x97d2d988L,
- 0x09b64c2bL,
- 0x7eb17cbdL,
- 0xe7b82d07L,
- 0x90bf1d91L,
- 0x1db71064L,
- 0x6ab020f2L,
- 0xf3b97148L,
- 0x84be41deL,
- 0x1adad47dL,
- 0x6ddde4ebL,
- 0xf4d4b551L,
- 0x83d385c7L,
- 0x136c9856L,
- 0x646ba8c0L,
- 0xfd62f97aL,
- 0x8a65c9ecL,
- 0x14015c4fL,
- 0x63066cd9L,
- 0xfa0f3d63L,
- 0x8d080df5L,
- 0x3b6e20c8L,
- 0x4c69105eL,
- 0xd56041e4L,
- 0xa2677172L,
- 0x3c03e4d1L,
- 0x4b04d447L,
- 0xd20d85fdL,
- 0xa50ab56bL,
- 0x35b5a8faL,
- 0x42b2986cL,
- 0xdbbbc9d6L,
- 0xacbcf940L,
- 0x32d86ce3L,
- 0x45df5c75L,
- 0xdcd60dcfL,
- 0xabd13d59L,
- 0x26d930acL,
- 0x51de003aL,
- 0xc8d75180L,
- 0xbfd06116L,
- 0x21b4f4b5L,
- 0x56b3c423L,
- 0xcfba9599L,
- 0xb8bda50fL,
- 0x2802b89eL,
- 0x5f058808L,
- 0xc60cd9b2L,
- 0xb10be924L,
- 0x2f6f7c87L,
- 0x58684c11L,
- 0xc1611dabL,
- 0xb6662d3dL,
- 0x76dc4190L,
- 0x01db7106L,
- 0x98d220bcL,
- 0xefd5102aL,
- 0x71b18589L,
- 0x06b6b51fL,
- 0x9fbfe4a5L,
- 0xe8b8d433L,
- 0x7807c9a2L,
- 0x0f00f934L,
- 0x9609a88eL,
- 0xe10e9818L,
- 0x7f6a0dbbL,
- 0x086d3d2dL,
- 0x91646c97L,
- 0xe6635c01L,
- 0x6b6b51f4L,
- 0x1c6c6162L,
- 0x856530d8L,
- 0xf262004eL,
- 0x6c0695edL,
- 0x1b01a57bL,
- 0x8208f4c1L,
- 0xf50fc457L,
- 0x65b0d9c6L,
- 0x12b7e950L,
- 0x8bbeb8eaL,
- 0xfcb9887cL,
- 0x62dd1ddfL,
- 0x15da2d49L,
- 0x8cd37cf3L,
- 0xfbd44c65L,
- 0x4db26158L,
- 0x3ab551ceL,
- 0xa3bc0074L,
- 0xd4bb30e2L,
- 0x4adfa541L,
- 0x3dd895d7L,
- 0xa4d1c46dL,
- 0xd3d6f4fbL,
- 0x4369e96aL,
- 0x346ed9fcL,
- 0xad678846L,
- 0xda60b8d0L,
- 0x44042d73L,
- 0x33031de5L,
- 0xaa0a4c5fL,
- 0xdd0d7cc9L,
- 0x5005713cL,
- 0x270241aaL,
- 0xbe0b1010L,
- 0xc90c2086L,
- 0x5768b525L,
- 0x206f85b3L,
- 0xb966d409L,
- 0xce61e49fL,
- 0x5edef90eL,
- 0x29d9c998L,
- 0xb0d09822L,
- 0xc7d7a8b4L,
- 0x59b33d17L,
- 0x2eb40d81L,
- 0xb7bd5c3bL,
- 0xc0ba6cadL,
- 0xedb88320L,
- 0x9abfb3b6L,
- 0x03b6e20cL,
- 0x74b1d29aL,
- 0xead54739L,
- 0x9dd277afL,
- 0x04db2615L,
- 0x73dc1683L,
- 0xe3630b12L,
- 0x94643b84L,
- 0x0d6d6a3eL,
- 0x7a6a5aa8L,
- 0xe40ecf0bL,
- 0x9309ff9dL,
- 0x0a00ae27L,
- 0x7d079eb1L,
- 0xf00f9344L,
- 0x8708a3d2L,
- 0x1e01f268L,
- 0x6906c2feL,
- 0xf762575dL,
- 0x806567cbL,
- 0x196c3671L,
- 0x6e6b06e7L,
- 0xfed41b76L,
- 0x89d32be0L,
- 0x10da7a5aL,
- 0x67dd4accL,
- 0xf9b9df6fL,
- 0x8ebeeff9L,
- 0x17b7be43L,
- 0x60b08ed5L,
- 0xd6d6a3e8L,
- 0xa1d1937eL,
- 0x38d8c2c4L,
- 0x4fdff252L,
- 0xd1bb67f1L,
- 0xa6bc5767L,
- 0x3fb506ddL,
- 0x48b2364bL,
- 0xd80d2bdaL,
- 0xaf0a1b4cL,
- 0x36034af6L,
- 0x41047a60L,
- 0xdf60efc3L,
- 0xa867df55L,
- 0x316e8eefL,
- 0x4669be79L,
- 0xcb61b38cL,
- 0xbc66831aL,
- 0x256fd2a0L,
- 0x5268e236L,
- 0xcc0c7795L,
- 0xbb0b4703L,
- 0x220216b9L,
- 0x5505262fL,
- 0xc5ba3bbeL,
- 0xb2bd0b28L,
- 0x2bb45a92L,
- 0x5cb36a04L,
- 0xc2d7ffa7L,
- 0xb5d0cf31L,
- 0x2cd99e8bL,
- 0x5bdeae1dL,
- 0x9b64c2b0L,
- 0xec63f226L,
- 0x756aa39cL,
- 0x026d930aL,
- 0x9c0906a9L,
- 0xeb0e363fL,
- 0x72076785L,
- 0x05005713L,
- 0x95bf4a82L,
- 0xe2b87a14L,
- 0x7bb12baeL,
- 0x0cb61b38L,
- 0x92d28e9bL,
- 0xe5d5be0dL,
- 0x7cdcefb7L,
- 0x0bdbdf21L,
- 0x86d3d2d4L,
- 0xf1d4e242L,
- 0x68ddb3f8L,
- 0x1fda836eL,
- 0x81be16cdL,
- 0xf6b9265bL,
- 0x6fb077e1L,
- 0x18b74777L,
- 0x88085ae6L,
- 0xff0f6a70L,
- 0x66063bcaL,
- 0x11010b5cL,
- 0x8f659effL,
- 0xf862ae69L,
- 0x616bffd3L,
- 0x166ccf45L,
- 0xa00ae278L,
- 0xd70dd2eeL,
- 0x4e048354L,
- 0x3903b3c2L,
- 0xa7672661L,
- 0xd06016f7L,
- 0x4969474dL,
- 0x3e6e77dbL,
- 0xaed16a4aL,
- 0xd9d65adcL,
- 0x40df0b66L,
- 0x37d83bf0L,
- 0xa9bcae53L,
- 0xdebb9ec5L,
- 0x47b2cf7fL,
- 0x30b5ffe9L,
- 0xbdbdf21cL,
- 0xcabac28aL,
- 0x53b39330L,
- 0x24b4a3a6L,
- 0xbad03605L,
- 0xcdd70693L,
- 0x54de5729L,
- 0x23d967bfL,
- 0xb3667a2eL,
- 0xc4614ab8L,
- 0x5d681b02L,
- 0x2a6f2b94L,
- 0xb40bbe37L,
- 0xc30c8ea1L,
- 0x5a05df1bL,
- 0x2d02ef8dL
- };
-static public long crc32(byte[] b, int off, int len) {
- return crc32(b, off, len, 0);
-}
-/**
- * Compute the crc Cyclic Redundancy Check, with the polynomial 0xedb88320,
- * The polynomial is X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0
- * We take it "backwards" and put the highest-order term in the lowest-order bit.
- * The X^32 term is "implied"; the LSB is the X^31 term, etc.
- * The X^0 term (usually shown as "+1") results in the MSB being 1.
- * so the poly is 0x04c11db7 (used for Ethernet)
- * The buf will be the Padding, Packet type, and Data fields.
- * The crc is computed before any encryption.
- * R =X^n * M rem P M message P polynomial crc R : crc calculated.
- * T(x) = x^n * M(x) + R(x) property: T rem P = 0
- */
-static public long crc32(byte[] b, int off, int len, long crc32val) {
- for (int i = 0; i < len; i++) {
- crc32val = crc32_tab[(int) ((crc32val ^ b[off + i]) & 0xff)] ^ (crc32val >> 8);
- }
-
- return crc32val;
-}
-static public byte[] lengthEncode(byte[] b, int off, int len) throws IOException {
- byte[] result = new byte[len + 4];
- writeInt(len, result, 0);
- System.arraycopy(b, off, result, 4, len);
- return result;
-}
-static public byte[] readMpInt(InputStream is) throws IOException {
- int a = (byte) is.read();
- int b = (byte) is.read();
-
- if(a == -1 || b == -1){
- throw new IOException(Policy.bind("stream"));//$NON-NLS-1$
- }
-
- int bits = (a << 8) + b;
- int bytes = (bits + 7) / 8;
-
- byte[] result = new byte[bytes];
-
- readFully(is, result);
-
- return result;
-}
-public static byte[] md5(byte[] b) {
- if (md5 == null) {
- try {
- md5 = MessageDigest.getInstance("MD5");//$NON-NLS-1$
- } catch (NoSuchAlgorithmException e) {
- }
- }
-
- return md5.digest(b);
-}
-public static byte[] md5(String s) {
- return md5(s.getBytes());
-}
-public static void readFully(InputStream is, byte[] b) throws IOException {
- readFully(is, b, 0, b.length);
-}
-public static void readFully(InputStream is, byte[] b, int off, int len) throws IOException {
- int bytesRead = 0;
- int totalBytesRead = 0;
-
- while (totalBytesRead < len) {
- bytesRead = is.read(b, totalBytesRead + off, len - totalBytesRead);
-
- if (bytesRead == -1) {
- throw new IOException(Policy.bind("stream"));//$NON-NLS-1$
- }
-
- totalBytesRead += bytesRead;
- }
-}
-public static int readInt(byte[] arr, int off) throws IOException {
- int a = arr[off] & 0xff;
- int b = arr[off + 1] & 0xff;
- int c = arr[off + 2] & 0xff;
- int d = arr[off + 3] & 0xff;
-
- return (a << 24) + (b << 16) + (c << 8) + d;
-}
-public static int readInt(InputStream is) throws IOException {
- int a = is.read();
- int b = is.read();
- int c = is.read();
- int d = is.read();
-
- if (a == -1 || b == -1 || c == -1 || d == -1) {
- throw new IOException(Policy.bind("stream"));//$NON-NLS-1$
- }
-
- return (a << 24) + (b << 16) + (c << 8) + d;
-}
-public static String readString(InputStream is) throws IOException {
- int size = Misc.readInt(is);
- byte[] buffer = new byte[size];
- for (int i = 0; i < buffer.length; i++) {
- int next = is.read();
- if (next == -1) {
- throw new IOException(Policy.bind("stream")); //$NON-NLS-1$
- } else {
- buffer[i] = (byte)next;
- }
- }
- return new String(buffer);
-}
-public static void skipFully(InputStream is, long n) throws IOException {
- while (n != 0) {
- int b = is.read();
-
- if (b == -1) {
- if (n > 0) {
- throw new IOException(Policy.bind("stream"));//$NON-NLS-1$
- }
-
- return;
- }
-
- --n;
- }
-}
-public static void writeInt(int i, byte[] b, int off) {
- b[off] = (byte) ((i >> 24) & 0xff);
- b[off + 1] = (byte) ((i >> 16) & 0xff);
- b[off + 2] = (byte) ((i >> 8) & 0xff);
- b[off + 3] = (byte) (i & 0xff);
-}
-static public void xor(byte[] src_a, int off_a, byte[] src_b, int off_b, byte[] dst, int dst_off, int len) {
- for(int i = 0; i < len; ++i){
- dst[i + dst_off] = (byte) (src_a[i + off_a] ^ src_b[i + off_b]);
- }
-}
-static public void random(byte[] b, int off, int len, boolean allowZeroBytes) {
- if (random == null) {
- try {
- random = SecureRandom.getInstance("SHA1PRNG");//$NON-NLS-1$
- } catch (NoSuchAlgorithmException e) {
- }
- }
-
- for(int i = off; i < off + len; ++i){
- do {
- b[i] = (byte) random.nextInt();
- } while(!allowZeroBytes && b[i] == 0);
- }
-}
-static public byte[] encryptRSAPkcs1(byte[] data, byte[] public_key_exponent, byte[] public_key_modulus) {
- byte[] block;
-
- int offset = 0;
- block = new byte[public_key_modulus.length];
- block[offset++] = 0;
- block[offset++] = 2;
-
- Misc.random(block, offset, block.length - data.length - 3, false);
- offset += block.length - data.length - 3;
-
- block[offset++] = 0;
-
- for (int i = 0; i < data.length; i++){
- block[offset++] = data[i];
- }
-
- BigInteger m, e, message;
- byte[] messageByte;
-
- m = new BigInteger(1, public_key_modulus);
- e = new BigInteger(1, public_key_exponent);
- message = new BigInteger(1, block);
- message = message.modPow(e, m);
-
- byte[] messageByteTemp = message.toByteArray();
- messageByte = new byte[public_key_modulus.length];
-
- int tempOffset = 0;
- while (messageByteTemp[tempOffset] == 0){
- tempOffset++;
- }
-
- for (int i = messageByte.length - messageByteTemp.length + tempOffset; i < messageByte.length; i++){
- messageByte[i] = messageByteTemp[tempOffset++];
- }
-
- return messageByte;
-}
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Packet.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Packet.java
deleted file mode 100644
index ae83339ac..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Packet.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.eclipse.team.internal.ccvs.ssh;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-class Packet {
- protected int packetLength;
- protected int paddingLength;
- protected int packetType;
-public int getType() {
- return packetType;
-}
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Policy.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Policy.java
deleted file mode 100644
index efa38c8fe..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Policy.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.eclipse.team.internal.ccvs.ssh;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Policy {
- protected static ResourceBundle bundle = null;
-
- /**
- * Creates a NLS catalog for the given locale.
- */
- public static void localize(String bundleName) {
- bundle = ResourceBundle.getBundle(bundleName);
- }
-
- /**
- * Gets a string from the resource bundle. We don't want to crash because of a missing String.
- * Returns the key if not found.
- */
- 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.
- */
- 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$
- }
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHMethod.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHMethod.java
deleted file mode 100644
index db82f96c5..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHMethod.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.eclipse.team.internal.ccvs.ssh;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.IConnectionMethod;
-import org.eclipse.team.internal.ccvs.core.IServerConnection;
-
-public class SSHMethod implements IConnectionMethod {
- /**
- * @see IConnectionMethod#getName
- */
- public String getName() {
- return "extssh";//$NON-NLS-1$
- }
-
- /**
- * @see IConnectionMethod#createConnection
- */
- public IServerConnection createConnection(ICVSRepositoryLocation repositoryRoot, String password) {
- return new SSHServerConnection(repositoryRoot, password);
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHPlugin.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHPlugin.java
deleted file mode 100644
index d01c52238..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHPlugin.java
+++ /dev/null
@@ -1 +0,0 @@
-package org.eclipse.team.internal.ccvs.ssh; /* * (c) Copyright IBM Corp. 2000, 2002. * All Rights Reserved. */ import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPluginDescriptor; import org.eclipse.core.runtime.Plugin; public class SSHPlugin extends Plugin { public static String ID = "org.eclipse.team.cvs.ssh";//$NON-NLS-1$ /** * Constructor for SSHPlugin */ public SSHPlugin(IPluginDescriptor d) { super(d); } /** * @see Plugin#startup() */ public void startup() throws CoreException { super.startup(); Policy.localize("org.eclipse.team.internal.ccvs.ssh.messages"); //$NON-NLS-1$ } } \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHServerConnection.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHServerConnection.java
deleted file mode 100644
index 7decb91f4..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHServerConnection.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package org.eclipse.team.internal.ccvs.ssh;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.IServerConnection;
-import org.eclipse.team.internal.ccvs.core.connection.CVSAuthenticationException;
-
-public class SSHServerConnection implements IServerConnection {
-
- // command to start remote cvs in server mode
- private static final String INVOKE_SVR_CMD = "cvs server"; //$NON-NLS-1$
-
- private static final int DEFAULT_PORT = 22;
-
- // cvs format for the repository (e.g. :extssh:user@host:/home/cvs/repo)
- private ICVSRepositoryLocation location;
-
- // password for user specified in repository location string
- private String password;
-
- // incoming from remote host
- InputStream inputStream;
-
- // outgoing to remote host
- OutputStream outputStream;
-
- // ssh client
- Client client;
-
- protected SSHServerConnection(ICVSRepositoryLocation location, String password) {
- this.location = location;
- this.password = password;
- }
-
- public void close() throws IOException {
- client.disconnect();
- }
- /**
- * Returns the <code>InputStream</code> used to read data from the
- * server.
- */
- public InputStream getInputStream() {
- return inputStream;
- }
- /**
- * Returns the <code>OutputStream</code> used to send data to the
- * server.
- */
- public OutputStream getOutputStream() {
- return outputStream;
- }
-
- /**
- * Opens the connection and invokes cvs in server mode.
- *
- * @see Connection.open()
- */
- public void open(IProgressMonitor monitor) throws IOException, CVSAuthenticationException {
- monitor.subTask(Policy.bind("SSHServerConnection.authenticating")); //$NON-NLS-1$
- monitor.worked(1);
- String hostname = location.getHost();
- String username = location.getUsername();
- int port = location.getPort();
- if (port == location.USE_DEFAULT_PORT)
- port = DEFAULT_PORT;
- // create the connection using host, username, and password
- client = new Client(hostname, port, username, password, INVOKE_SVR_CMD, location.getTimeout());
- client.connect(monitor);
- inputStream = client.getInputStream();
- outputStream = client.getOutputStream();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/ServerPacket.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/ServerPacket.java
deleted file mode 100644
index 7fcc895b2..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/ServerPacket.java
+++ /dev/null
@@ -1,158 +0,0 @@
-package org.eclipse.team.internal.ccvs.ssh;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-class ServerPacket extends Packet {
- private PacketInputStream pis = null;
-
- private static class PacketInputStream extends FilterInputStream {
- private static int MAX_BUFFER_SIZE = 1024;
-
- private byte[] buffer = new byte[MAX_BUFFER_SIZE];
- private int bufpos = 0;
- private int buflen = 0;
- private int bufrem = 0;
-
- private long remaining = 0;
- private Cipher cipher = null;
-
- private long crc = 0;
- private boolean closed = false;
-
- public PacketInputStream(InputStream in, long length, Cipher cipher) {
- super(in);
-
- this.remaining = length;
- this.cipher = cipher;
- }
-
- public int available() throws IOException {
- if (closed) {
- throw new IOException(Policy.bind("closed"));//$NON-NLS-1$
- }
-
- return (int) Math.min(remaining - 4, Integer.MAX_VALUE);
- }
-
- public void close() throws IOException {
- close(true);
- }
-
- public void close(boolean doCrcCheck) throws IOException {
- if (!closed) {
- try {
- long toRead = doCrcCheck ? remaining - 4 : remaining;
-
- try {
- Misc.skipFully(this, toRead);
- } catch(IOException e) {
- // we tried our best, keep going
- }
-
- if(doCrcCheck) {
- if ((int) crc != Misc.readInt(buffer, bufpos)) {
- throw new IOException(Policy.bind("ServerPacket.crc"));//$NON-NLS-1$
- }
- }
- } finally {
- closed = true;
- }
- }
- }
-
- private void fill() throws IOException {
- if (bufrem > 0) {
- System.arraycopy(buffer, bufpos, buffer, 0, bufrem);
- }
-
- int totalBytesRead = bufrem;
- int read = 0;
- int toRead = (int)Math.min(remaining - totalBytesRead, MAX_BUFFER_SIZE - totalBytesRead);
-
- while (toRead > 0) {
- read = in.read(buffer, totalBytesRead, toRead);
-
- if (read == -1) {
- throw new IOException(Policy.bind("stream"));//$NON-NLS-1$
- }
-
- totalBytesRead += read;
- toRead -= read;
- }
-
- bufpos = 0;
-
- buflen = (totalBytesRead / 8) * 8;
- bufrem = totalBytesRead - buflen;
-
- if (cipher != null) {
- cipher.decipher(buffer, 0, buffer, 0, buflen);
- }
-
- crc = Misc.crc32(buffer, 0, buflen == remaining ? buflen - 4 : buflen, crc);
- }
-
- public int read() throws IOException {
- if (closed) {
- throw new IOException(Policy.bind("closed"));//$NON-NLS-1$
- }
-
- if (remaining - 4 == 0) {
- return -1;
- }
-
- if (bufpos == buflen) {
- fill();
- }
-
- int b = buffer[bufpos] & 0xff;
-
- ++bufpos;
- --remaining;
-
- return b;
- }
-
- public int read(byte b[], int off, int len) throws IOException {
- if (closed) {
- throw new IOException(Policy.bind("closed"));//$NON-NLS-1$
- }
-
- if (remaining - 4 == 0) {
- return -1;
- }
-
- if (bufpos == buflen) {
- fill();
- }
-
- len = (int) Math.min(len, (buflen == remaining + bufpos ? buflen - 4 : buflen) - bufpos);
-
- System.arraycopy(buffer, bufpos, b, off, len);
-
- bufpos += len;
- remaining -= len;
-
- return len;
- }
- }
-public ServerPacket(InputStream is, Cipher cipher) throws java.io.IOException {
- packetLength = Misc.readInt(is);
- paddingLength = 8 - (packetLength % 8);
- pis = new PacketInputStream(is, packetLength + paddingLength, cipher);
- Misc.skipFully(pis, paddingLength);
- packetType = (byte) pis.read();
-}
-public void close(boolean doCrcCheck) throws IOException {
- pis.close(doCrcCheck);
-}
-public InputStream getInputStream() {
- return pis;
-}
-}
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/messages.properties b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/messages.properties
deleted file mode 100644
index 6ac196b71..000000000
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/messages.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-###########################
-# (c) Copyright IBM Corp. 2000, 2001.
-# All Rights Reserved.
-###########################
-
-# String resources for vcm.core.cvs.ssh
-###########################
-
-closed=Closed
-stream=Unexpected end of stream
-
-Client.packetType=unexpected packet type: {0}
-Client.notConnected=Not connected
-Client.cipher=Supported cipher not found
-Client.socketClosed=Connection closed by server
-Client.authenticationFailed=Invalid username, password, host or repository
-Client.socket=Cannot connect to host: {0}
-Client.disconnectDescription=SSH server disconnected: {0}
-Client.noDisconnectDescription=No reason could be obtained.
-
-ServerPacket.crc=crc error
-
-SSHServerConnection.authenticating=Authenticating over extssh
-
diff --git a/bundles/org.eclipse.team.cvs.ui/.classpath b/bundles/org.eclipse.team.cvs.ui/.classpath
deleted file mode 100644
index f33f7a462..000000000
--- a/bundles/org.eclipse.team.cvs.ui/.classpath
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="/org.eclipse.team.core"/>
- <classpathentry kind="src" path="/org.eclipse.team.ui"/>
- <classpathentry kind="src" path="/org.eclipse.team.cvs.core"/>
- <classpathentry kind="src" path="/org.apache.xerces"/>
- <classpathentry kind="src" path="/org.eclipse.core.boot"/>
- <classpathentry kind="src" path="/org.eclipse.core.resources"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
- <classpathentry kind="src" path="/org.eclipse.help"/>
- <classpathentry kind="src" path="/org.eclipse.swt"/>
- <classpathentry kind="src" path="/org.eclipse.ui"/>
- <classpathentry kind="src" path="/org.eclipse.compare"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.team.cvs.ui/.cvsignore b/bundles/org.eclipse.team.cvs.ui/.cvsignore
deleted file mode 100644
index fe99505dc..000000000
--- a/bundles/org.eclipse.team.cvs.ui/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-bin
-
diff --git a/bundles/org.eclipse.team.cvs.ui/.project b/bundles/org.eclipse.team.cvs.ui/.project
deleted file mode 100644
index 050d5458f..000000000
--- a/bundles/org.eclipse.team.cvs.ui/.project
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.team.cvs.ui</name>
- <comment></comment>
- <projects>
- <project>org.eclipse.swt</project>
- <project>org.apache.xerces</project>
- <project>org.eclipse.core.runtime</project>
- <project>org.eclipse.team.cvs.core</project>
- <project>org.eclipse.compare</project>
- <project>org.eclipse.ui</project>
- <project>org.eclipse.core.resources</project>
- <project>org.eclipse.team.ui</project>
- <project>org.eclipse.core.boot</project>
- <project>org.eclipse.help</project>
- <project>org.eclipse.team.core</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.team.cvs.core.cvsnature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.team.cvs.ui/about.html b/bundles/org.eclipse.team.cvs.ui/about.html
deleted file mode 100644
index 441774f92..000000000
--- a/bundles/org.eclipse.team.cvs.ui/about.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<html>
-<head>
-<title>About</title>
-<style type="text/css">
-p, table, td, th { font-family: arial, helvetica, geneva; font-size: 10pt}
-pre { font-family: "Courier New", Courier, mono; font-size: 10pt}
-h2 { font-family: arial, helvetica, geneva; font-size: 18pt; font-weight: bold ; line-height: 14px}
-code { font-family: "Courier New", Courier, mono; font-size: 10pt}
-sup { font-family: arial,helvetica,geneva; font-size: 10px}
-h3 { font-family: arial, helvetica, geneva; font-size: 14pt; font-weight: bold}
-li { font-family: arial, helvetica, geneva; font-size: 10pt}
-h1 { font-family: arial, helvetica, geneva; font-size: 28px; font-weight: bold}
-body { font-family: arial, helvetica, geneva; font-size: 10pt; clip: rect( ); margin-top: 5mm; margin-left: 3mm}
-</style>
-</head>
-<body lang="EN-US" link="blue" vlink="purple">
-<table border="0" cellspacing="5" cellpadding="2" width="100%" >
- <tr>
- <td align="LEFT" valign="TOP" colspan="2" bgcolor="#0080C0"><b><font color="#FFFFFF">About This Content</font></b></td>
- </tr>
- <tr>
- <td>
-<p>11th December, 2001</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in &quot;Content&quot;. Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-<a href="http://www.eclipse.org/legal/cpl-v05.html">Common Public License Version 0.5</a> &quot;CPL&quot;. For purposes of the CPL, &quot;Program&quot; will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL &quot;Other License&quot;, any modifications, enhancements and/or
-other code and/or documentation &quot;Modifications&quot; uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-</td></tr></table>
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/build.properties b/bundles/org.eclipse.team.cvs.ui/build.properties
deleted file mode 100644
index 3ec8fd9aa..000000000
--- a/bundles/org.eclipse.team.cvs.ui/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-# Eclipse build contribution
-source.teamcvsui.jar=src/
-src.includes=about.html
-bin.includes=about.html,icons/,plugin.xml,plugin.properties,*.jar,help_contexts.xml \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/help_contexts.xml b/bundles/org.eclipse.team.cvs.ui/help_contexts.xml
deleted file mode 100644
index 81f6ff956..000000000
--- a/bundles/org.eclipse.team.cvs.ui/help_contexts.xml
+++ /dev/null
@@ -1,419 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.contexts"?>
-<contexts>
- <context id="new_cvs_connection_action_context" >
- <description>example</description>
- <topic label="Repositories - Concept" href="concepts/concepts-27c.htm"/>
- <topic label="Repositories - Reference" href="reference/ref-47.htm"/>
- <topic label="CVS Repositories" href="reference/ref-47.htm"/>
- <topic label="Create a Repository Location" href="tasks/tasks-92.htm"/>
- <topic label="Disconnecting from a Repository" href="tasks/tasks-94.htm"/>
- </context>
-
- <!-- ********************************** -->
- <!-- TagSelectionDialog -->
- <!-- ********************************** -->
-
- <context id="replace_tag_selection_dialog_context">
- <description>Replace the selected resource(s) with those that are tagged with the selected tag.
- </description>
- </context>
-
- <context id="compare_tag_selection_dialog_context">
- <description>Compare the selected resource(s) with those that are tagged with the selected tag.
- </description>
- </context>
-
- <context id="tag_remote_with_existing_dialog_context">
- <description>Tags the selected resource(s) with the selected tag, moving the tag if required.
- </description>
- </context>
-
- <context id="share_with_existing_tag_selection_dialog_context">
- <description>Synchronizes the previously unshared project with the selected branch of the corresponding remote project
- </description>
- </context>
-
- <!-- ********************************** -->
- <!-- TagAsVersionDialog -->
- <!-- ********************************** -->
-
- <context id="tag_as_version_dialog_context">
- <description>Tags the project with the version name provided.
- </description>
- </context>
-
- <!-- ********************************** -->
- <!-- WizardPages -->
- <!-- ********************************** -->
-
- <context id="sharing_autoconnect_page_context">
- <description>Project already has CVS information. Continuing will allow the use of CVS operations.
- </description>
- </context>
-
- <context id="sharing_select_repository_page_context">
- <description>Here you can select an exisiting repository to use.
- </description>
- </context>
-
- <context id="sharing_new_repository_page_context">
- <description>Here you can create a new repository to use for your project.
- </description>
- </context>
-
- <context id="sharing_module_page_context">
- <description>Here you can decide whether to use the project name as the module name or give the module a different name.
- </description>
- </context>
-
- <context id="sharing_finish_page_context">
- <description>All you need to do now is hit the 'Finish' button to share the project.
- </description>
- </context>
-
- <context id="patch_selection_page_context">
- <description>Here you can select where you want to save the patch.
- </description>
- </context>
-
- <context id="patch_options_page_context">
- <description>Here you can specify the kind of patch you would like.
- </description>
- </context>
-
- <context id="keyword_substituton_selection_page_context">
- <description>
- </description>
- </context>
-
- <context id="keyword_substituton_summary_page_context">
- <description>
- </description>
- </context>
-
- <context id="keyword_substituton_shared_page_context">
- <description>
- </description>
- </context>
-
- <context id="keyword_substituton_changed_page_context">
- <description>
- </description>
- </context>
-
- <!-- ********************************** -->
- <!-- TeamMenuActions -->
- <!-- ********************************** -->
-
- <context id="team_synchronize_action_context">
- <description>Finds all differences between remote and local versions of the project.
- </description>
- </context>
-
- <context id="team_synchronize_outgoing_action_context">
- <description>Find all outgoing changes.
- </description>
- </context>
-
- <context id="team_commit_action_context">
- <description>Updates the remote project with any changes that have been made locally.
- </description>
- </context>
-
- <context id="team_update_action_context">
- <description>Updates the local project with any changes that have been made remotely.
- </description>
- </context>
-
- <context id="team_create_patch_action_context">
- <description>Creates a patch that can be applied to the base project to bring it in sync with this copy.
- </description>
- </context>
-
- <context id="team_tag_as_version_action_context">
- <description>Tags a project with a version name that you can provide.
- </description>
- </context>
-
- <context id="team_branch_action_context">
- <description>Branch off a project into 2 streams.
- </description>
- </context>
-
- <context id="team_merge_action_context">
- <description>Merge 2 disparate streams into one cohesive whole.
- </description>
- </context>
-
- <context id="team_set_keyword_mode_action_context">
- <description>
- </description>
- </context>
-
- <context id="team_disconnect_action_context">
- <description>Stop managing the project with this repo provider.
- </description>
- </context>
-
- <context id="team_add_action_context">
- <description>Add this file to the repository
- </description>
- </context>
-
- <context id="team_ignore_action_context">
- <description>Ignore this file for all remote sync operations.
- </description>
- </context>
-
- <context id="team_nature_to_property_action_context">
- <description>Convert a project that has a CVS nature on it to one that has a persitant property.
- </description>
- </context>
-
- <!-- ********************************** -->
- <!-- Other Menu Actions -->
- <!-- ********************************** -->
-
- <context id="compare_with_tag_action_context">
- <description>Compare the selected resource(s) with the corresponding remote resources tagged with a given version or branch tag.
- </description>
- </context>
-
- <context id="compare_with_latest_action_context">
- <description>Compare the selected resource(s) with the corresponding remote resources on the same branch (or HEAD).
- </description>
- </context>
-
- <context id="compare_with_revision_action_context">
- <description>Compare the selected file with a given remote revision of the file.
- </description>
- </context>
-
- <context id="replace_with_tag_action_context">
- <description>Replace the selected resource(s) with the corresponding remote resources tagged with a given version or branch tag.
- </description>
- </context>
-
- <context id="replace_with_latest_action_context">
- <description>Replace the selected resource(s) with the corresponding remote resources on the same branch (or HEAD).
- </description>
- </context>
-
- <context id="replace_with_revision_action_context">
- <description>Replace the selected file with a given remote revision of the file.
- </description>
- </context>
-
- <context id="checkout_as_action_context">
- <description>Checkout the selected resource into a user configured project.
- </description>
- </context>
-
- <context id="checkout_as_project_action_context">
- <description>Checkout the selected resource(s) into a project(s) that corresponds to the name of the remote resource.
- </description>
- </context>
-
- <context id="checkout_module_action_context">
- <description>Checkout the selected module(s) into the local workspace.
- </description>
- </context>
-
- <context id="open_remote_file_action_context">
- <description>Open the contents of the selected remote file into an editor.
- </description>
- </context>
-
- <context id="show_in_history_action_context">
- <description>Display the revision history of the selected local or remote file in the history view.
- </description>
- </context>
-
- <context id="compare_remote_resources_action_context">
- <description>Compare the 2 selected remote resources with each other.
- </description>
- </context>
-
- <context id="copy_repository_name_action_context">
- <description>Copy the name of the selected repository location to the clipboard.
- </description>
- </context>
-
- <context id="remove_root_action_context">
- <description>Remove the selected repository location(s) from the Repositories View.
- </description>
- </context>
-
- <context id="define_branch_action_context">
- <description>Add a branch to the selected repository location. This operation only adds the branch to the view and does not effect the repository itself.
- </description>
- </context>
-
- <context id="remove_branch_action_context">
- <description>Remove a branch from the selected repository location. This operation only removes the branch to the view and does not effect the repository itself.
- </description>
- </context>
-
- <context id="move_remote_tag_action_context">
- <description>Tags the selected resource(s) with the selected tag, moving the tag if required.
- </description>
- </context>
-
- <context id="tag_remote_action_context">
- <description>Tags the selected resource(s) with the selected tag.
- </description>
- </context>
-
- <!-- ********************************** -->
- <!-- TagConfiguration -->
- <!-- ********************************** -->
-
- <context id="tag_configuration_overview" >
- <description>Configure the branch and version tags that are shown in the workbench. By browsing remote CVS files for tags you can selectively choose, from the list of tags on each file, which tags should be remembered and which ones shouldn't. You can also select the files that will be automatically examined for tags.
- </description>
- </context>
-
- <context id="tag_configuration_refreshlist" >
- <description>This lists the files that are automatically examined for tags. By default, the .project file is examined. But in some cases other files may have a more complete tag history and should be examined instead.
- </description>
- </context>
-
- <context id="tag_configuration_refreshaction" >
- <description>This will fetch branch and version tags from the files that have been configured to be automatically searched for tags. If tags that you expected to see don't appear, try changing the list of files to examined via the tag configuration dialog.</description>
- </context>
-
- <!-- ********************************** -->
- <!-- Dialogs -->
- <!-- ********************************** -->
-
- <context id="release_comment_dialog_context">
- <description>Enter a comment to describe the contents of this release.</description>
- <!-- Below copied from old VCM
- <topic label="%context_ref_vcm_releasing" href="tasks/tasks-114.htm" />
- -->
- </context>
- <context id="user_validation_dialog_context">
- <description>In this dialog, enter the appropriate information to log in to the repository.
- </description>
- <!-- Below copied from old VCM
- <topic label="%context_ref_vcm_repositories_concept" href="concepts/concepts-27c.htm" />
- <topic label="%context_ref_vcm_create_repository_location" href="tasks/tasks-92.htm" />
- <topic label="%context_ref_vcm_repositories_reference" href="reference/ref-47.htm" />
- -->
- </context>
- <context id="tag_local_as_version_dialog_context">
- <description>Enter the name of the version tag to be applied to the revisions that exist locally.
- </description>
- </context>
- <context id="branch_dialog_context">
- <description>Enter the name of the branch tag to be applied to the revisions that exist locally.
- </description>
- </context>
- <context id="add_to_cvsignore_context">
- <description>In this dialog choose how to add the selected resources to the .cvsignore files. For each resource to be ignored, a .cvsignore file will created in its parent directory containing the pattern specified in the dialog. This won't affect resources already under version control.
- </description>
- </context>
-
- <!-- ********************************** -->
- <!-- Preference Pages -->
- <!-- ********************************** -->
-
- <context id="prune_empty_directories_pref" >
- <description>Enables pruning of empty directories on update and in the synchronization view. Although pruned directories aren't shown in the workbench there is actually still an empty directory in the repository.
- </description>
- </context>
-
- <context id="quietness_level_pref" >
- <description>Sets the amount of status information CVS prints for a command. In "Somewhat quiet" mode the printing of unimportant informational messages is supressed. The consideration of what is important depends on each command. In "Very quiet" mode all output except what is absolutely necessary to complete the command is suppressed. In "Very Quiet" mode, some cvs servers may not communicate important information about errors that have occured. You may want to consider using "Somewhat quiet" mode instead.
- </description>
- </context>
-
- <context id="compression_level_pref" >
- <description>Sets the compression level on communications with the server if it is supported by the server. Level 1 is minimal compression (very fast/low compression) and level 9 maximum compression (very slow/maximum compression).
- </description>
- </context>
-
- <context id="default_keywordmode_pref" >
- <description>Sets the default keyword substitution mode to use for text files.
- </description>
- </context>
-
- <context id="comms_timeout_pref" >
- <description>Sets the amount of time in seconds to wait before timing out from a connection to the CVS server.
- </description>
- </context>
-
- <context id="consider_content_pref" >
- <description>Sets the default compare method for comparing and synchronizing CVS resources. By default timestamps are used to compare CVS files, and this is by far the fastest method. However, in some cases a more accurate comparison can be achieved by comparing file content. This setting can be toggled from within a compare editor or the synchronization view.
- </description>
- </context>
-
- <context id="markers_enabled_pref" >
- <description>Enables markers to be added to the task view for resources that have been locally removed but not committed and resources that have been locally added but not placed under CVS control.
- </description>
- </context>
-
- <context id="replace_deletion_of_unmanaged_pref" >
- <description>Allows resources not under CVS control to be deleted when replacing with resources from the repository.
- </description>
- </context>
-
- <!-- ********************************** -->
- <!-- Views -->
- <!-- ********************************** -->
-
- <context id="console_view_context" >
- <description>This view shows the output of CVS operations.
- </description>
- </context>
- <context id="repositories_view_context" >
- <description>This view allows the browsing of a remote CVS repository.
- </description>
- </context>
- <context id="resource_history_view_context" >
- <description>This view shows the revision history of a resource under CVS control.
- </description>
- </context>
- <context id="catchup_release_viewer_context" >
- <description>This view shows the incoming, outgoing and conflicting changes.
- </description>
- </context>
- <context id="compare_revisions_view_context" >
- <description>This view allows the comparision of the local copy of a file with the revisions from the respoitory.
- Actions availabel of a revision are "Get Contents" and "Get Revision". Although both replace the local file with the contents of the remote rvision, "Get Revision" will make the local file "sticky". This means that changes to the file cannot be committed back to the repository.
- </description>
- </context>
-
- <!-- ********************************** -->
- <!-- Actions -->
- <!-- ********************************** -->
-
- <context id="get_file_revision_action_context" >
- <description>Load the revision of the file into the workspace. The file will be "sticky" and the user will be unable to commit changes to the repository.
- </description>
- </context>
- <context id="get_file_contents_action_context" >
- <description>Load the contents of the file into the workspace. The base revision of the local file will not change and the file will become dirty. Perform this action if you wich to revert to the contents of an older revision of the file.
- </description>
- </context>
-
- <!-- ********************************** -->
- <!-- Team Actions -->
- <!-- ********************************** -->
-
- <context id="team_commit_action_context" >
- <description>Commit outgoing changes to the respository
- </description>
- </context>
-
- <!-- ********************************** -->
- <!-- Sync Actions -->
- <!-- ********************************** -->
-
- <context id="sync_commit_action_context" >
- <description>Commit outgoing changes to the respository
- </description>
- </context>
-
-</contexts>
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/clcl16/clear_co.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/clcl16/clear_co.gif
deleted file mode 100644
index 255832653..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/clcl16/clear_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/clcl16/filter_history.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/clcl16/filter_history.gif
deleted file mode 100644
index 1492b4efa..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/clcl16/filter_history.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/clcl16/newstream_wiz.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/clcl16/newstream_wiz.gif
deleted file mode 100644
index fffccf7a7..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/clcl16/newstream_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/clcl16/refresh.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/clcl16/refresh.gif
deleted file mode 100644
index a063c230a..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/clcl16/refresh.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/ctool16/checkout.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/ctool16/checkout.gif
deleted file mode 100644
index 1409330d8..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/ctool16/checkout.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/ctool16/contents.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/ctool16/contents.gif
deleted file mode 100644
index 133140dc6..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/ctool16/contents.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/cview16/console_view.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/cview16/console_view.gif
deleted file mode 100644
index 99aed6cba..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/cview16/console_view.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/cview16/cvs_persp.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/cview16/cvs_persp.gif
deleted file mode 100644
index 4761ce75a..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/cview16/cvs_persp.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/cview16/history_view.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/cview16/history_view.gif
deleted file mode 100644
index 24ed918b3..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/cview16/history_view.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/cview16/repo_rep.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/cview16/repo_rep.gif
deleted file mode 100644
index 8ade8a019..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/cview16/repo_rep.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph1.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph1.gif
deleted file mode 100644
index 706dc020e..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph1.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph2.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph2.gif
deleted file mode 100644
index 1492b4efa..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph2.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph3.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph3.gif
deleted file mode 100644
index 5a8c7ea96..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph3.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph4.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph4.gif
deleted file mode 100644
index 6152fd7e2..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph4.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph5.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph5.gif
deleted file mode 100644
index 19df9ae7d..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph5.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph6.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph6.gif
deleted file mode 100644
index 9b278e6fa..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph6.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph7.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph7.gif
deleted file mode 100644
index a063c230a..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph7.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph8.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph8.gif
deleted file mode 100644
index 9ed470d02..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph8.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/branches_rep.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/branches_rep.gif
deleted file mode 100644
index 21cc9f7b0..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/branches_rep.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/module_rep.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/module_rep.gif
deleted file mode 100644
index 8d414e623..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/module_rep.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/prjversions_rep.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/prjversions_rep.gif
deleted file mode 100644
index 72258bdef..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/prjversions_rep.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/repository_rep.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/repository_rep.gif
deleted file mode 100644
index 197a669f6..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/repository_rep.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/tag.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/tag.gif
deleted file mode 100644
index dc5a486d3..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/tag.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/versions_rep.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/versions_rep.gif
deleted file mode 100644
index 9b55c268c..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/obj16/versions_rep.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/confauto_ov.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/confauto_ov.gif
deleted file mode 100644
index 65d335d36..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/confauto_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/merged_ov.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/merged_ov.gif
deleted file mode 100644
index 2616852d4..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/merged_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/question_ov.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/question_ov.gif
deleted file mode 100644
index e5175c96f..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/question_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/wizards/newconnect_wiz.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/wizards/newconnect_wiz.gif
deleted file mode 100644
index ead6e3cc4..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/wizards/newconnect_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/wizards/newlocation_wiz.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/wizards/newlocation_wiz.gif
deleted file mode 100644
index 81483819d..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/wizards/newlocation_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/createpatch_wizban.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/createpatch_wizban.gif
deleted file mode 100644
index 442f976f6..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/createpatch_wizban.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/keywordsub_wizban.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/keywordsub_wizban.gif
deleted file mode 100644
index e5f67afb5..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/keywordsub_wizban.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/mergestream_wizban.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/mergestream_wizban.gif
deleted file mode 100644
index 147335887..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/mergestream_wizban.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/newconnect_wizban.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/newconnect_wizban.gif
deleted file mode 100644
index b4314dec2..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/newconnect_wizban.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/newlocation_wizban.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/newlocation_wizban.gif
deleted file mode 100644
index 8f6b2dfca..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/newlocation_wizban.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/newstream_wizban.gif b/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/newstream_wizban.gif
deleted file mode 100644
index 339e7dd8c..000000000
--- a/bundles/org.eclipse.team.cvs.ui/icons/full/wizban/newstream_wizban.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.cvs.ui/plugin.properties b/bundles/org.eclipse.team.cvs.ui/plugin.properties
deleted file mode 100644
index 5f1f449dc..000000000
--- a/bundles/org.eclipse.team.cvs.ui/plugin.properties
+++ /dev/null
@@ -1,145 +0,0 @@
-providerName=Eclipse.org
-pluginName=CVS Team Provider UI
-
-CVS=CVS
-
-CVSRepositoryExploring=CVS Repository Exploring
-
-CVSGroupMenu.label=C&VS
-
-SharingWizard.name=CVS
-
-PreferencePage.name=CVS
-ConsolePreferencePage.name=Console
-DecoratorPreferencePage.name=Label Decorations
-ExtMethodPreferencePage.name=Ext Connection Method
-
-DecoratorStandard.name=CVS
-DecoratorStandard.description=Shows CVS specific information on resources in projects under CVS control. Information includes the revision number, branch or version name, etc.
-
-AddAction.label=&Add to Version Control
-AddAction.tooltip=Add the Selected Resources to Version Control
-
-MergeAction.label=&Merge...
-MergeAction.tooltip=Merge
-
-BranchAction.label=&Branch...
-BranchAction.tooltip=Branch
-
-CompareRemoteResourcesAction.label=Com&pare
-CompareRemoteResourcesAction.tooltip=Compare the Remote Resources with Each Other
-
-CompareWithRemoteAction.label=&Latest From Repository
-CompareWithRemoteAction.tooltip=Compare with Content on CVS Server
-
-CompareWithRevisionAction.label=&Revision...
-CompareWithRevisionAction.tooltip=Compare with Revision on CVS Server
-
-CompareWithTagAction.label=&Branch or Version...
-CompareWithTagAction.tooltip=Compare with a Branch or a Version on the CVS Server
-
-ContentAction.label=Compare File Contents
-ContentAction.tooltip=Use File Contents Instead of Timestamps When Comparing
-
-ConvertNature.label=Convert Provider from Nature
-ConvertNature.tooltip=Converts a CVS project from using natures to using properties
-
-CopyRepositoryNameAction.label=&Copy to Clipboard
-CopyRepositoryNameAction.tooltip=Copy Repository Names to Clipboard
-
-IgnoreAction.label=A&dd to .cvsignore
-IgnoreAction.tooltip=Ignore the Selected Resources when Synchronizing
-
-RemoveBranchTagAction.label=Discard &Branch
-RemoveBranchTagAction.tooltip=Discard Branch
-
-RemoveModuleVersionAction.label=Discard &Version
-RemoveModuleVersionAction.tooltip=Discard Version
-
-RemoveRootAction.label=Discard &Location
-RemoveRootAction.tooltip=Discard Location
-
-ReplaceWithRevisionAction.label=&Revision...
-ReplaceWithRevisionAction.tooltip=Replace with Revision on CVS Server
-
-ReplaceWithTagAction.label=&Branch or Version...
-ReplaceWithTagAction.tooltip=Replace with Branch or Version on the CVS Server
-
-TagAction.label=&Tag as Version...
-TagAction.tooltip=Tag the resources with a CVS version tag
-
-TagInRepositoryAction.label=&Tag as Version...
-TagInRepositoryAction.tooltip=Tag the resources with a CVS version tag
-
-MoveTagAction.label=Tag with &Existing...
-MoveTagAction.tooltip=Tag the selected resources with an existing tag
-
-SetKeywordSubstitutionAction.label=Set &Keyword Substitution...
-SetKeywordSubstitutionAction.tooltip=Set Keyword Substitution for Files on CVS Server
-
-DefineBranchAction.label=&Define Branch Tag...
-DefineBranchAction.tooltip=Define a Branch Tag that Exists on CVS Server
-
-DefineVersionAction.label=&Define Version Tag...
-DefineVersionAction.tooltip=Define a Version Tag that Exists on CVS Server
-
-UpdateAction.label=&Update
-UpdateAction.tooltip=Update
-
-ReplaceWithAction.label=&Latest From Repository
-ReplaceWithAction.tooltip=Replace with last committed content from CVS Server
-
-ConfigureTags.label=Configure &Branches and Versions...
-ConfigureTags.tooltip=Configure the branch and version tags shown in the workbench
-
-CommitAction.label=&Commit...
-CommitAction.tooltip=Commit
-
-CheckoutAction.label=Check Out &Module
-CheckoutAction.tooltip=Check out a module defined in CVSROOT/modules from the repository to the workspace
-
-AddToWorkspaceAction.label=&Check Out As Project
-AddToWorkspaceAction.tooltip=Check out a module from the repository to the workspace
-
-CheckoutAsAction.label=Check Out &As...
-CheckoutAsAction.tooltip=Check out a module from the repository to the workspace, specifying project name
-
-OpenLogEntryAction.label=&Open
-OpenLogEntryAction.tooltip=Open Remote File
-
-OpenRemoteFileAction.label=&Open
-OpenRemoteFileAction.tooltip=Open Remote File
-
-ShowHistoryAction.label=Show in Resource &History
-ShowHistoryAction.tooltip=Show in Resource History
-
-GenerateDiff.label=Create &Patch...
-GenerateDiff.tooltip=Compare your workspace contents with the server and generate a diff file that can be used as a patch file.
-
-RefreshFromLocal.label=&Refresh from local CVS state
-RefreshFromLocal.tooltip=Refresh the workbench with changes made to CVS projects from outside the workbench.
-
-Synchronize.label=&Synchronize with Repository...
-Synchronize.tooltip=Synchronize the workspace resources with those in the repository
-
-SynchronizeOutgoing.label=&Synchronize Outgoing Changes...
-SynchronizeOutgoing.tooltip=Synchronize the outgoing changes with the repository
-
-viewCategory=&CVS
-
-Console.name=CVS Console
-
-RepositoriesView.name=CVS Repositories
-
-HistoryFilter.label=&Filter History
-HistoryFilter.tooltip=Filter History
-
-HistoryView.name=CVS Resource History
-
-UnmanageFolder.label=&Disconnect...
-UnmanageFolder.tooltip=Disconnect from the CVS repository.
-
-CVSActionSet.description=Actions that apply when working with CVS repositories
-CVSActionSet.newLabel=New CVS Repository Location
-CVSActionSet.newTooltip=Create a new CVS Repository Location
-
diff --git a/bundles/org.eclipse.team.cvs.ui/plugin.xml b/bundles/org.eclipse.team.cvs.ui/plugin.xml
deleted file mode 100644
index 9969cae21..000000000
--- a/bundles/org.eclipse.team.cvs.ui/plugin.xml
+++ /dev/null
@@ -1,703 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin
- id="org.eclipse.team.cvs.ui"
- name="%pluginName"
- version="2.0.0"
- provider-name="%providerName"
- class="org.eclipse.team.internal.ccvs.ui.CVSUIPlugin">
-
- <runtime>
- <library name="teamcvsui.jar">
- <export name="*"/>
- </library>
- </runtime>
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.team.core"/>
- <import plugin="org.eclipse.team.ui"/>
- <import plugin="org.eclipse.team.cvs.core"/>
- <import plugin="org.eclipse.compare"/>
- </requires>
-
-<!-- *************** Help **************** -->
- <extension point="org.eclipse.help.contexts">
- <contexts file="help_contexts.xml" plugin="org.eclipse.team.cvs.ui"/>
- </extension>
-
-<!-- *************** Authenticator **************** -->
- <extension
- point="org.eclipse.team.cvs.core.authenticator">
- <authenticator>
- <run
- class="org.eclipse.team.internal.ccvs.ui.WorkbenchUserAuthenticator">
- </run>
- </authenticator>
- </extension>
-<!-- ******************* Wizards ****************** -->
- <extension
- point="org.eclipse.team.ui.configurationWizards">
- <wizard
- name="%SharingWizard.name"
- icon="icons/full/wizards/newconnect_wiz.gif"
- class="org.eclipse.team.internal.ccvs.ui.wizards.SharingWizard"
- id="org.eclipse.team.ccvs.ui.SharingWizard">
- </wizard>
- </extension>
-<!-- ************** Property Pages *************** -->
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- objectClass="org.eclipse.core.resources.IFile"
- adaptable="true"
- name="%CVS"
- class="org.eclipse.team.internal.ccvs.ui.CVSFilePropertiesPage"
- id="org.eclipse.team.ccvs.ui.propertyPages.CVSFilePropertiesPage">
- <filter
- name="projectPersistentProperty"
- value="org.eclipse.team.core.repository=org.eclipse.team.cvs.core.cvsnature">
- </filter>
- </page>
- <page
- objectClass="org.eclipse.core.resources.IFolder"
- adaptable="true"
- name="%CVS"
- class="org.eclipse.team.internal.ccvs.ui.CVSFolderPropertiesPage"
- id="org.eclipse.team.ccvs.ui.propertyPages.CVSFolderPropertiesPage">
- <filter
- name="projectPersistentProperty"
- value="org.eclipse.team.core.repository=org.eclipse.team.cvs.core.cvsnature">
- </filter>
- </page>
- <page
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true"
- name="%CVS"
- class="org.eclipse.team.internal.ccvs.ui.CVSProjectPropertiesPage"
- id="org.eclipse.team.ccvs.ui.propertyPages.CVSProjectPropertiesPage">
- <filter
- name="projectPersistentProperty"
- value="org.eclipse.team.core.repository=org.eclipse.team.cvs.core.cvsnature">
- </filter>
- </page>
- <page
- objectClass="org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation"
- name="%CVS"
- class="org.eclipse.team.internal.ccvs.ui.CVSRepositoryPropertiesPage"
- id="org.eclipse.team.ccvs.ui.propertyPages.CVSRepositoryPropertiesPage">
- </page>
- </extension>
-<!-- ******************* Menus ******************** -->
- <extension
- point="org.eclipse.ui.popupMenus">
- <objectContribution
- objectClass="org.eclipse.core.resources.IFile"
- adaptable="true"
- id="org.eclipse.team.ccvs.ui.IFileContributions">
- <filter
- name="projectPersistentProperty"
- value="org.eclipse.team.core.repository=org.eclipse.team.cvs.core.cvsnature">
- </filter>
- <action
- label="%IgnoreAction.label"
- tooltip="%IgnoreAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.IgnoreAction"
- menubarPath="team.main/group3"
- helpContextId="org.eclipse.team.cvs.ui.team_ignore_action_context"
- id="org.eclipse.team.ccvs.ui.ignore">
- </action>
- <action
- label="%AddAction.label"
- tooltip="%AddAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.AddAction"
- menubarPath="team.main/group3"
- helpContextId="org.eclipse.team.cvs.ui.team_add_action_context"
- id="org.eclipse.team.ccvs.ui.add">
- </action>
- <action
- label="%ShowHistoryAction.label"
- tooltip="%ShowHistoryAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.ShowResourceInHistoryAction"
- menubarPath="team.main/group2"
- helpContextId="org.eclipse.team.cvs.ui.show_in_history_action_context"
- id="org.eclipse.team.ccvs.ui.showHistory">
- </action>
- <action
- label="%CompareWithRevisionAction.label"
- tooltip="%CompareWithRevisionAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.CompareWithRevisionAction"
- menubarPath="compareWithMenu/compareWithGroup"
- helpContextId="org.eclipse.team.cvs.ui.compare_with_revision_action_context"
- id="org.eclipse.team.ccvs.ui.compareWithRevision">
- </action>
- <action
- label="%ReplaceWithRevisionAction.label"
- tooltip="%ReplaceWithRevisionAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.CompareWithRevisionAction"
- menubarPath="replaceWithMenu/replaceWithGroup"
- helpContextId="org.eclipse.team.cvs.ui.replace_with_revision_action_context"
- id="org.eclipse.team.ccvs.ui.replaceWithRevision">
- </action>
- </objectContribution>
- <objectContribution
- objectClass="org.eclipse.core.resources.IResource"
- adaptable="true"
- id="org.eclipse.team.ccvs.ui.ResourceContributions">
- <filter
- name="projectPersistentProperty"
- value="org.eclipse.team.core.repository=org.eclipse.team.cvs.core.cvsnature">
- </filter>
- <action
- label="%SetKeywordSubstitutionAction.label"
- tooltip="%SetKeywordSubstitutionAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.SetKeywordSubstitutionAction"
- menubarPath="team.main/group3"
- helpContextId="org.eclipse.team.cvs.ui.team_set_keyword_mode_action_context"
- id="org.eclipse.team.ccvs.ui.setKeywordSubstitution">
- </action>
- <action
- label="%MergeAction.label"
- tooltip="%MergeAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.MergeAction"
- menubarPath="team.main/group2"
- helpContextId="org.eclipse.team.cvs.ui.team_merge_action_context"
- id="org.eclipse.team.ccvs.ui.merge">
- </action>
- <action
- label="%BranchAction.label"
- tooltip="%BranchAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.BranchAction"
- menubarPath="team.main/group2"
- helpContextId="org.eclipse.team.cvs.ui.team_branch_action_context"
- id="org.eclipse.team.ccvs.ui.branch">
- </action>
- <action
- label="%TagAction.label"
- tooltip="%TagAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.TagAction"
- menubarPath="team.main/group2"
- helpContextId="org.eclipse.team.cvs.ui.team_tag_as_version_action_context"
- id="org.eclipse.team.ccvs.ui.tag">
- </action>
- <action
- label="%CompareWithTagAction.label"
- tooltip="%CompareWithTagAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.CompareWithTagAction"
- menubarPath="compareWithMenu/compareWithGroup"
- helpContextId="org.eclipse.team.cvs.ui.compare_with_tag_action_context"
- id="org.eclipse.team.ccvs.ui.compareWithTag">
- </action>
- <action
- label="%CompareWithRemoteAction.label"
- tooltip="%CompareWithRemoteAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.CompareWithRemoteAction"
- menubarPath="compareWithMenu/compareWithGroup"
- helpContextId="org.eclipse.team.cvs.ui.compare_with_latest_action_context"
- id="org.eclipse.team.ccvs.ui.compareWithRemote">
- </action>
- <action
- label="%ReplaceWithTagAction.label"
- tooltip="%ReplaceWithTagAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithTagAction"
- menubarPath="replaceWithMenu/replaceWithGroup"
- helpContextId="org.eclipse.team.cvs.ui.replace_with_tag_action_context"
- id="org.eclipse.team.ccvs.ui.replaceWithTag">
- </action>
- <action
- label="%ReplaceWithAction.label"
- tooltip="%ReplaceWithAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithRemoteAction"
- menubarPath="replaceWithMenu/replaceWithGroup"
- helpContextId="org.eclipse.team.cvs.ui.replace_with_latest_action_context"
- id="org.eclipse.team.ccvs.ui.replace">
- </action>
- <action
- label="%GenerateDiff.label"
- tooltip="%GenerateDiff.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.GenerateDiffFileAction"
- menubarPath="team.main/group1"
- helpContextId="org.eclipse.team.cvs.ui.team_create_patch_action_context"
- id="org.eclipse.team.ccvs.ui.GenerateDiff">
- </action>
- <action
- label="%UpdateAction.label"
- tooltip="%UpdateAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.UpdateAction"
- menubarPath="team.main/group1"
- helpContextId="org.eclipse.team.cvs.ui.team_update_action_context"
- id="org.eclipse.team.ccvs.ui.update">
- </action>
- <action
- label="%CommitAction.label"
- tooltip="%CommitAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.CommitAction"
- menubarPath="team.main/group1"
- helpContextId="org.eclipse.team.cvs.ui.team_commit_action_context"
- id="org.eclipse.team.ccvs.ui.commit">
- </action>
- <action
- label="%SynchronizeOutgoing.label"
- tooltip="%SynchronizeOutgoing.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.SyncOutgoingAction"
- menubarPath="team.main/group1"
- helpContextId="org.eclipse.team.cvs.ui.team_synchronize_outgoing_action_context"
- id="org.eclipse.team.ccvs.ui.syncOutgoing">
- </action>
- <action
- label="%Synchronize.label"
- tooltip="%Synchronize.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.SyncAction"
- menubarPath="team.main/group1
- helpContextId="org.eclipse.team.cvs.ui.team_synchronize_action_context"
- id="org.eclipse.team.ccvs.ui.sync">
- </action>
- </objectContribution>
-
- <!-- ************** Project Menu *************** -->
-
-
- <objectContribution
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true"
- id="org.eclipse.team.ccvs.ui.IProjectContributions">
- <filter
- name="projectNature"
- value="org.eclipse.team.cvs.core.cvsnature">
- </filter>
- <action
- label="%ConvertNature.label"
- tooltip="%ConvertNature.tooltip"
- class="org.eclipse.team.internal.ui.NatureToPropertyAction"
- menubarPath="team.main/projectGroup"
- helpContextId="org.eclipse.team.cvs.ui.team_nature_to_property_action_context"
- id="org.eclipse.team.ccvs.ui.convertNature">
- </action>
- </objectContribution>
-
- <objectContribution
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true"
- id="org.eclipse.team.ccvs.ui.IProjectContributions">
- <filter
- name="projectPersistentProperty"
- value="org.eclipse.team.core.repository=org.eclipse.team.cvs.core.cvsnature">
- </filter>
- <action
- label="%UnmanageFolder.label"
- tooltip="%UnmanageFolder.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.UnmanageAction"
- menubarPath="team.main/projectGroup"
- helpContextId="org.eclipse.team.cvs.ui.team_disconnect_action_context"
- id="org.eclipse.team.ccvs.ui.unmanage">
- </action>
- </objectContribution>
- <objectContribution
- objectClass="org.eclipse.core.resources.IFolder"
- adaptable="true"
- id="org.eclipse.team.ccvs.ui.IFolderContributions">
- <filter
- name="projectPersistentProperty"
- value="org.eclipse.team.core.repository=org.eclipse.team.cvs.core.cvsnature">
- </filter>
- <action
- label="%IgnoreAction.label"
- tooltip="%IgnoreAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.IgnoreAction"
- menubarPath="team.main/group3"
- helpContextId="org.eclipse.team.cvs.ui.team_ignore_action_context"
- id="org.eclipse.team.ccvs.ui.ignore">
- </action>
- <action
- label="%AddAction.label"
- tooltip="%AddAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.AddAction"
- menubarPath="team.main/group3"
- helpContextId="org.eclipse.team.cvs.ui.team_add_action_context"
- id="org.eclipse.team.ccvs.ui.add">
- </action>
- </objectContribution>
- <objectContribution
- objectClass="org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder"
- id="org.eclipse.team.ccvs.ui.RemoteFolderContributions">
- <action
- label="%CheckoutAsAction.label"
- tooltip="%CheckoutAsAction.tooltip"
- menubarPath="checkoutGroup"
- class="org.eclipse.team.internal.ccvs.ui.actions.CheckoutAsAction"
- helpContextId="org.eclipse.team.cvs.ui.checkout_as_action_context"
- id="org.eclipse.team.ccvs.ui.checkoutAs">
- </action>
- <action
- label="%AddToWorkspaceAction.label"
- tooltip="%AddToWorkspaceAction.tooltip"
- menubarPath="checkoutGroup"
- class="org.eclipse.team.internal.ccvs.ui.actions.AddToWorkspaceAction"
- helpContextId="org.eclipse.team.cvs.ui.checkout_as_project_action_context"
- id="org.eclipse.team.ccvs.ui.addToWorkspace">
- </action>
- <action
- id="org.eclipse.team.ccvs.ui.configureTagsOnRemoteFolder"
- label="%ConfigureTags.label"
- menubarPath="miscGroup"
- tooltip="%ConfigureTags.label"
- icon="icons/full/clcl16/newstream_wiz.gif"
- helpContextId="org.eclipse.team.cvs.ui.tag_configuration_overview"
- class="org.eclipse.team.internal.ccvs.ui.actions.ConfigureTagsFromRepoViewOnFolder"/>
- </objectContribution>
- <objectContribution
- objectClass="org.eclipse.team.internal.ccvs.core.ICVSRemoteFile"
- id="org.eclipse.team.ccvs.ui.RemoteFileContributions">
- <action
- label="%OpenRemoteFileAction.label"
- tooltip="%OpenRemoteFileAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.OpenRemoteFileAction"
- helpContextId="org.eclipse.team.cvs.ui.open_remote_file_action_context"
- id="org.eclipse.team.ccvs.ui.openRemoteFile">
- </action>
- <action
- label="%ShowHistoryAction.label"
- tooltip="%ShowHistoryAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.ShowHistoryAction"
- helpContextId="org.eclipse.team.cvs.ui.show_in_history_action_context"
- id="org.eclipse.team.ccvs.ui.showHistory">
- </action>
- </objectContribution>
- <objectContribution
- objectClass="org.eclipse.team.internal.ccvs.core.resources.RemoteModule"
- id="org.eclipse.team.ccvs.ui.RemoteModuleContributions">
- <action
- label="%CheckoutAction.label"
- tooltip="%CheckoutAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.CheckoutAction"
- helpContextId="org.eclipse.team.cvs.ui.checkout_module_action_context"
- id="org.eclipse.team.ccvs.ui.checkout">
- </action>
- </objectContribution>
- <objectContribution
- objectClass="org.eclipse.team.internal.ccvs.core.ILogEntry"
- id="org.eclipse.team.ccvs.ui.LogEntryContributions">
- <action
- label="%OpenLogEntryAction.label"
- tooltip="%OpenLogEntryAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.OpenLogEntryAction"
- helpContextId="org.eclipse.team.cvs.ui.open_remote_file_action_context"
- id="org.eclipse.team.ccvs.ui.openLogEntry">
- </action>
- <action
- label="%CompareRemoteResourcesAction.label"
- tooltip="%CompareRemoteResourcesAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.CompareRemoteResourcesAction"
- enablesFor="2"
- helpContextId="org.eclipse.team.cvs.ui.compare_remote_resources_action_context"
- id="org.eclipse.team.ccvs.ui.compareLogEntries">
- </action>
- </objectContribution>
- <objectContribution
- objectClass="org.eclipse.team.internal.ccvs.ui.model.RemoteModule"
- id="org.eclipse.team.ccvs.ui.VersionCategoryContributions">
- <action
- id="org.eclipse.team.ccvs.ui.configureTagsOnRemoteModule"
- label="%ConfigureTags.label"
- tooltip="%ConfigureTags.label"
- icon="icons/full/clcl16/newstream_wiz.gif"
- helpContextId="org.eclipse.team.cvs.ui.tag_configuration_overview"
- class="org.eclipse.team.internal.ccvs.ui.actions.ConfigureTagsFromRepoViewOnFolder"/>
- </objectContribution>
- <objectContribution
- objectClass="org.eclipse.team.internal.ccvs.ui.model.ProjectVersion"
- id="org.eclipse.team.ccvs.ui.ProjectVersionContributions">
- <action
- id="org.eclipse.team.ccvs.ui.configureTagsOnProjectVersion"
- label="%ConfigureTags.label"
- tooltip="%ConfigureTags.label"
- icon="icons/full/clcl16/newstream_wiz.gif"
- helpContextId="org.eclipse.team.cvs.ui.tag_configuration_overview"
- class="org.eclipse.team.internal.ccvs.ui.actions.ConfigureTagsFromRepoView"/>
- </objectContribution>
-
- <objectContribution
- objectClass="org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation"
- id="org.eclipse.team.ccvs.ui.RemoteRootContributions">
- <action
- label="%CopyRepositoryNameAction.label"
- tooltip="%CopyRepositoryNameAction.tooltip"
- menubarPath="miscGroup"
- class="org.eclipse.team.internal.ccvs.ui.actions.CopyRepositoryNameAction"
- helpContextId="org.eclipse.team.cvs.ui.copy_repository_name_action_context"
- id="org.eclipse.team.ccvs.ui.copyNames">
- </action>
- <action
- label="%RemoveRootAction.label"
- tooltip="%RemoveRootAction.tooltip"
- menubarPath="miscGroup"
- class="org.eclipse.team.internal.ccvs.ui.actions.RemoveRootAction"
- helpContextId="org.eclipse.team.cvs.ui.remove_root_action_context"
- id="org.eclipse.team.ccvs.ui.removeRoot">
- </action>
- <action
- label="%DefineBranchAction.label"
- icon="icons/full/clcl16/newstream_wiz.gif"
- tooltip="%DefineBranchAction.tooltip"
- menubarPath="tagGroup"
- class="org.eclipse.team.internal.ccvs.ui.actions.DefineBranchAction"
- helpContextId="org.eclipse.team.cvs.ui.define_branch_action_context"
- id="org.eclipse.team.ccvs.ui.defineBranch">
- </action>
- <action
- id="org.eclipse.team.ccvs.ui.configureTagsOnBranchCategory"
- label="%ConfigureTags.label"
- tooltip="%ConfigureTags.label"
- menubarPath="tagGroup"
- icon="icons/full/clcl16/newstream_wiz.gif"
- helpContextId="org.eclipse.team.cvs.ui.tag_configuration_overview"
- class="org.eclipse.team.internal.ccvs.ui.actions.ConfigureTagsFromRepoView"/>
- </objectContribution>
- <objectContribution
- objectClass="org.eclipse.team.internal.ccvs.ui.model.BranchCategory"
- id="org.eclipse.team.ccvs.ui.BranchCategoryContributions">
- <action
- label="%DefineBranchAction.label"
- icon="icons/full/clcl16/newstream_wiz.gif"
- tooltip="%DefineBranchAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.DefineBranchAction"
- helpContextId="org.eclipse.team.cvs.ui.define_branch_action_context"
- id="org.eclipse.team.ccvs.ui.defineBranch">
- </action>
- <action
- id="org.eclipse.team.ccvs.ui.configureTagsOnBranchCategory"
- label="%ConfigureTags.label"
- tooltip="%ConfigureTags.label"
- icon="icons/full/clcl16/newstream_wiz.gif"
- helpContextId="org.eclipse.team.cvs.ui.tag_configuration_overview"
- class="org.eclipse.team.internal.ccvs.ui.actions.ConfigureTagsFromRepoView"/>
- </objectContribution>
- <objectContribution
- objectClass="org.eclipse.team.internal.ccvs.ui.model.BranchTag"
- id="org.eclipse.team.ccvs.ui.BranchTagContributions">
- <action
- label="%RemoveBranchTagAction.label"
- tooltip="%RemoveBranchTagAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.RemoveBranchTagAction"
- helpContextId="org.eclipse.team.cvs.ui.remove_branch_action_context"
- id="org.eclipse.team.ccvs.ui.removeBranchTag">
- </action>
- </objectContribution>
- <objectContribution
- objectClass="org.eclipse.team.internal.ccvs.core.ICVSRemoteResource"
- id="org.eclipse.team.ccvs.ui.RemoteResourceContributions">
- <action
- label="%CompareRemoteResourcesAction.label"
- menubarPath="miscGroup"
- tooltip="%CompareRemoteResourcesAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.CompareRemoteResourcesAction"
- enablesFor="2"
- helpContextId="org.eclipse.team.cvs.ui.compare_remote_resources_action_context"
- id="org.eclipse.team.ccvs.ui.compareRemoteResources">
- </action>
- <action
- label="%MoveTagAction.label"
- menubarPath="tagGroup"
- tooltip="%MoveTagAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.MoveRemoteTagAction"
- helpContextId="org.eclipse.team.cvs.ui.move_remote_tag_action_context"
- id="org.eclipse.team.ccvs.ui.moveTagInRepository">
- </action>
- <action
- label="%TagInRepositoryAction.label"
- menubarPath="tagGroup"
- tooltip="%TagInRepositoryAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.TagInRepositoryAction"
- helpContextId="org.eclipse.team.cvs.ui.tag_remote_action_context"
- id="org.eclipse.team.ccvs.ui.tagInRepository">
- </action>
- </objectContribution>
- </extension>
-<!-- ************** Views ********************** -->
- <extension
- point="org.eclipse.ui.views">
- <category
- name="%viewCategory"
- id="org.eclipse.team.ccvs.ui">
- </category>
- <view
- name="%Console.name"
- icon="icons/full/cview16/console_view.gif"
- category="org.eclipse.team.ccvs.ui"
- class="org.eclipse.team.internal.ccvs.ui.Console"
- id="org.eclipse.team.ccvs.ui.console">
- </view>
- <view
- name="%RepositoriesView.name"
- icon="icons/full/cview16/repo_rep.gif"
- category="org.eclipse.team.ccvs.ui"
- fastViewWidthRatio="0.5"
- class="org.eclipse.team.internal.ccvs.ui.RepositoriesView"
- id="org.eclipse.team.ccvs.ui.RepositoriesView">
- </view>
- <view
- name="%HistoryView.name"
- icon="icons/full/cview16/history_view.gif"
- category="org.eclipse.team.ccvs.ui"
- class="org.eclipse.team.internal.ccvs.ui.HistoryView"
- id="org.eclipse.team.ccvs.ui.HistoryView">
- </view>
- </extension>
-<!-- **************** Preferences ******************* -->
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%PreferencePage.name"
- category="org.eclipse.team.ui.TeamPreferences"
- class="org.eclipse.team.internal.ccvs.ui.CVSPreferencesPage"
- id="org.eclipse.team.cvs.ui.CVSPreferences">
- </page>
- </extension>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%ConsolePreferencePage.name"
- category="org.eclipse.team.cvs.ui.CVSPreferences"
- class="org.eclipse.team.internal.ccvs.ui.ConsolePreferencesPage"
- id="org.eclipse.team.cvs.ui.ConsolePreferences">
- </page>
- </extension>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%DecoratorPreferencePage.name"
- category="org.eclipse.team.cvs.ui.CVSPreferences"
- class="org.eclipse.team.internal.ccvs.ui.CVSDecoratorPreferencesPage"
- id="org.eclipse.team.cvs.ui.CVSDecoratorPreferences">
- </page>
- </extension>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%ExtMethodPreferencePage.name"
- category="org.eclipse.team.cvs.ui.CVSPreferences"
- class="org.eclipse.team.internal.ccvs.ui.ExtMethodPreferencePage"
- id="org.eclipse.team.cvs.ui.ExtMethodPreferencePage">
- </page>
- </extension>
-<!-- **************** Decorator ******************* -->
- <extension
- point="org.eclipse.ui.decorators">
- <decorator
- objectClass="org.eclipse.core.resources.IResource"
- adaptable="true"
- label="%DecoratorStandard.name"
- state="false"
- class="org.eclipse.team.internal.ccvs.ui.CVSDecorator"
- id="org.eclipse.team.cvs.ui.decorator">
- <description>
- %DecoratorStandard.description
- </description>
- </decorator>
- </extension>
-<!-- *************** View Actions **************** -->
- <extension
- point="org.eclipse.ui.viewActions">
- <viewContribution
- targetID="org.eclipse.team.ccvs.ui.HistoryView"
- id="org.eclipse.team.cvs.ui.history">
- <action
- label="%HistoryFilter.label"
- icon="icons/full/clcl16/filter_history.gif"
- tooltip="%HistoryFilter.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.HistoryFilterAction"
- toolbarPath="actions"
- id="org.eclipse.team.cvs.ui.historyaction">
- </action>
- </viewContribution>
- </extension>
-<!-- **************** Markers ******************* -->
- <extension
- point="org.eclipse.ui.markerResolution">
- <markerResolutionGenerator
- markerType="org.eclipse.team.cvs.core.cvsremove"
- class="org.eclipse.team.internal.ccvs.ui.CVSRemoveResolutionGenerator">
- </markerResolutionGenerator>
- <markerResolutionGenerator
- markerType="org.eclipse.team.cvs.core.cvsadd"
- class="org.eclipse.team.internal.ccvs.ui.CVSAddResolutionGenerator">
- </markerResolutionGenerator>
- </extension>
-<!-- **************** CVS Perspective ******************* -->
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- name="%CVSRepositoryExploring"
- icon="icons/full/cview16/cvs_persp.gif"
- class="org.eclipse.team.internal.ccvs.ui.CVSPerspective"
- id="org.eclipse.team.cvs.ui.cvsPerspective">
- </perspective>
- </extension>
-<!-- ************** Perspective Extensions **************** -->
- <extension
- point="org.eclipse.ui.perspectiveExtensions">
- <perspectiveExtension
- targetID="org.eclipse.ui.resourcePerspective">
- <perspectiveShortcut
- id="org.eclipse.team.cvs.ui.cvsPerspective">
- </perspectiveShortcut>
- <view id="org.eclipse.team.ccvs.ui.console"
- relative="org.eclipse.ui.views.TaskList"
- visible="false"
- relationship="stack"/>
- <view id="org.eclipse.team.ccvs.ui.HistoryView"
- relative="org.eclipse.ui.views.TaskList"
- visible="false"
- relationship="stack"/>
- <view id="org.eclipse.team.ccvs.ui.RepositoriesView"
- relative="org.eclipse.ui.views.ResourceNavigator"
- visible="false"
- relationship="stack"/>
- </perspectiveExtension>
- <perspectiveExtension
- targetID="org.eclipse.team.cvs.ui.cvsPerspective">
- <actionSet id="org.eclipse.team.cvs.ui.CVSActionSet"/>
- </perspectiveExtension>
- </extension>
-
- <!-- ************** Project Sets **************** -->
- <extension point="org.eclipse.team.core.projectSets">
- <projectSet id="org.eclipse.team.cvs.core.cvsnature" class="org.eclipse.team.internal.ccvs.ui.CVSProjectSetSerializer"/>
- </extension>
-
-
- <!-- ************ Editor Actions ************** -->
- <extension point="org.eclipse.ui.editorActions">
- <editorContribution
- id="org.eclipse.team.cvs.ui.contentCompare"
- targetID="org.eclipse.compare.CompareEditor">
- <action
- id="org.eclipse.team.cvs.ui.ContentAction"
- state="false"
- toolbarPath="Normal/additions"
- icon="icons/full/ctool16/contents.gif"
- label="%ContentAction.label"
- tooltip="%ContentAction.tooltip"
- class="org.eclipse.team.internal.ccvs.ui.actions.ContentAction">
- </action>
- </editorContribution>
- </extension>
-
- <!-- ********** Action Sets ************** -->
- <extension point="org.eclipse.ui.actionSets">
- <actionSet
- label="%CVS"
- visible="false"
- id="org.eclipse.team.cvs.ui.CVSActionSet"
- description="%CVSActionSet.description">
- <action
- toolbarPath="Normal/CVS"
- label="%CVSActionSet.newLabel"
- tooltip="%CVSActionSet.newTooltip"
- icon="icons/full/ctool16/checkout.gif"
- class="org.eclipse.team.internal.ccvs.ui.actions.NewRepositoryAction"
- id="org.eclipse.team.cvs.ui.actions.NewRepositoryAction">
- </action>
- </actionSet>
- </extension>
-</plugin>
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AlternateUserValidationDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AlternateUserValidationDialog.java
deleted file mode 100644
index 4cd427b08..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AlternateUserValidationDialog.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.TraverseEvent;
-import org.eclipse.swt.events.TraverseListener;
-import org.eclipse.swt.events.VerifyEvent;
-import org.eclipse.swt.events.VerifyListener;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-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.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-public class AlternateUserValidationDialog extends Dialog {
- String user;
- String password = ""; //$NON-NLS-1$
- List numXs = new ArrayList();
- Font font;
- Label icon1;
- Label icon2;
- Label icon3;
- Label icon4;
- Text passwordText;
- boolean inUpdate = false;
-
- Image[] images;
-
- public AlternateUserValidationDialog(Shell parentShell, String user) {
- super(parentShell);
- this.user = user;
- initializeImages();
- }
-
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(Policy.bind("AlternateUserValidationDialog.Enter_Password_2")); //$NON-NLS-1$
- }
-
- protected Control createContents(Composite parent) {
- Composite main = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- main.setLayout(layout);
- main.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Composite iconComposite = new Composite(main, SWT.NONE);
- layout = new GridLayout();
- layout.numColumns = 2;
- iconComposite.setLayout(layout);
- iconComposite.setLayoutData(new GridData());
-
- icon1 = createLabel(iconComposite);
- icon2 = createLabel(iconComposite);
- icon3 = createLabel(iconComposite);
- icon4 = createLabel(iconComposite);
-
- Composite middleComposite = new Composite(main, SWT.NONE);
- middleComposite.setLayout(new GridLayout());
- middleComposite.setLayoutData(new GridData());
-
- Label l = new Label(middleComposite, SWT.NULL);
- l.setText(Policy.bind("AlternateUserValidationDialog.message", user)); //$NON-NLS-1$
- l.setLayoutData(new GridData());
- l = new Label(middleComposite, SWT.NULL);
- l.setText(""); //$NON-NLS-1$
- l.setLayoutData(new GridData());
- passwordText = new Text(middleComposite, SWT.SINGLE | SWT.BORDER);
- GridData data = new GridData();
- data.widthHint = 250;
- passwordText.setLayoutData(data);
-
- passwordText.setFont(font);
- passwordText.addVerifyListener(new VerifyListener() {
- public void verifyText(VerifyEvent e) {
- if (inUpdate) return;
- e.doit = false;
- inUpdate = true;
- switch ((int)e.character) {
- case 8: {
- // backspace pressed
- if (password.length() > 0) {
- password = password.substring(0, password.length() - 1);
- }
- // get rid of bogus Xs
- int numX = ((Integer)numXs.get(numXs.size() - 1)).intValue();
- numXs.remove(numXs.size() - 1);
- String oldText = passwordText.getText();
- String newText = oldText.substring(0, oldText.length() - numX);
- passwordText.setText(newText);
- passwordText.setSelection(newText.length());
- break;
- }
- default: {
- String oldText = passwordText.getText();
- String x = getXs();
- numXs.add(numXs.size(), new Integer(x.length()));
- String newText = oldText + x;
- passwordText.setText(newText);
- passwordText.setSelection(newText.length());
- password += e.character;
- }
- }
- inUpdate = false;
- updateImages();
- }
- });
- /*passwordText.addTraverseListener(new TraverseListener() {
- public void keyTraversed(TraverseEvent e) {
- switch (e.detail) {
- case SWT.TRAVERSE_ARROW_NEXT:
- case SWT.TRAVERSE_ARROW_PREVIOUS:
- e.detail = SWT.TRAVERSE_NONE;
- e.doit = false;
- break;
- }
- }
- });*/
- Composite buttonComposite = new Composite(main, SWT.NONE);
- buttonComposite.setLayout(new GridLayout());
- buttonComposite.setLayoutData(new GridData());
- Button b = new Button(buttonComposite, SWT.PUSH);
- b.setText(Policy.bind("AlternateUserValidationDialog.OK_6")); //$NON-NLS-1$
- data = new GridData();
- data.widthHint = 70;
- b.setLayoutData(data);
- b.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- okPressed();
- }
- });
- buttonComposite.getShell().setDefaultButton(b);
- b = new Button(buttonComposite, SWT.PUSH);
- b.setText(Policy.bind("AlternateUserValidationDialog.Cancel_7")); //$NON-NLS-1$
- data = new GridData();
- data.widthHint = 70;
- b.setLayoutData(data);
- b.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- cancelPressed();
- }
- });
-
- return main;
- }
-
- public boolean close() {
- boolean result = super.close();
- if (font != null) font.dispose();
- if (images != null) {
- for (int i = 0; i < images.length; i++) {
- images[i].dispose();
- images[i] = null;
- }
- images = null;
- }
- return result;
- }
- public String getPassword() {
- return password;
- }
-
- Label createLabel(Composite parent) {
- Label result = new Label(parent, SWT.NULL);
- GridData data = new GridData();
- data.widthHint = 22;
- data.heightHint = 22;
- result.setLayoutData(data);
- result.setImage(getImage());
- return result;
- }
- Image getImage() {
- double random = Math.random();
- random *= 7; // Random number between 0.0 and 7.0
- long num = Math.round(random);
- return images[(int)num];
- }
- void initializeImages() {
- images = new Image[8];
- for (int i = 0; i < images.length; i++) {
- images[i] = CVSUIPlugin.getPlugin().getImageDescriptor("glyphs/glyph" + (i+1) + ".gif").createImage(); //$NON-NLS-1$ //$NON-NLS-2$
- }
- FontData fd = new FontData();
- fd.setStyle(SWT.BOLD);
- fd.setHeight(10);
- // On Windows, set the font to Sans Serif for an authentic look
- if (System.getProperty("os.name").indexOf("Windows") != -1) { //$NON-NLS-1$ //$NON-NLS-2$
- fd.setName("Microsoft Sans Serif"); //$NON-NLS-1$
- }
- font = new Font(Display.getDefault(), fd);
- }
- void updateImages() {
- icon1.setImage(getImage());
- icon2.setImage(getImage());
- icon3.setImage(getImage());
- icon4.setImage(getImage());
- }
- public void setUsername(String user) {
- this.user = user;
- }
- String getXs() {
- double random = Math.random();
- random *= 2;
- random += 2;
- long num = Math.round(random);
- // Random number between 2 and 4
- switch ((int)num) {
- case 2:
- return "XX"; //$NON-NLS-1$
- case 3:
- return "XXX"; //$NON-NLS-1$
- case 4:
- return "XXXX"; //$NON-NLS-1$
- }
- return "X"; //$NON-NLS-1$
- }
- protected void cancelPressed() {
- password = null;
- super.cancelPressed();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AvoidableMessageDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AvoidableMessageDialog.java
deleted file mode 100644
index 03d67d968..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AvoidableMessageDialog.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-public class AvoidableMessageDialog extends MessageDialog {
- Button dontShowAgain;
- boolean dontShow;
- boolean showOption;
-
- public AvoidableMessageDialog(Shell shell, String dialogTitle, Image dialogTitleImage, String dialogMessage, int dialogImageType, String[] dialogButtonLabels, int defaultIndex) {
- this(shell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex, true);
- }
-
- public AvoidableMessageDialog(Shell shell, String dialogTitle, Image dialogTitleImage, String dialogMessage, int dialogImageType, String[] dialogButtonLabels, int defaultIndex, boolean showOption) {
- super(shell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex);
- this.showOption = showOption;
- }
-
- protected Control createCustomArea(Composite composite) {
- if ( ! showOption) return null;
- dontShow = false;
- dontShowAgain = new Button(composite, SWT.CHECK);
- GridData data = new GridData();
- data.horizontalIndent = 50;
- dontShowAgain.setLayoutData(data);
- dontShowAgain.setText(Policy.bind("AvoidableMessageDialog.dontShowAgain")); //$NON-NLS-1$
- dontShowAgain.setSelection(dontShow);
- dontShowAgain.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- dontShow = dontShowAgain.getSelection();
- }
- public void widgetDefaultSelected(SelectionEvent e) {
- widgetSelected(e);
- }
-
- });
- return dontShowAgain;
- }
-
- public boolean isDontShowAgain() {
- return dontShow;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/BranchPromptDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/BranchPromptDialog.java
deleted file mode 100644
index 0105bdc4b..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/BranchPromptDialog.java
+++ /dev/null
@@ -1,285 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-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.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.ui.wizards.CVSWizardPage;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ccvs.ui.merge.ProjectElement;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-public class BranchPromptDialog extends DetailsDialog {
-
- private ICVSFolder folder;
- private String branchTag = ""; //$NON-NLS-1$
- private String versionTag= ""; //$NON-NLS-1$
- private String versionName= ""; //$NON-NLS-1$
-
- private boolean allStickyResources;
- private boolean update;
-
- private Text versionText;
- private Text branchText;
-
- private static final int TABLE_HEIGHT_HINT = 150;
-
- // widgets;
- private TreeViewer tagTree;
-
- public BranchPromptDialog(Shell parentShell, String title, ICVSFolder folder, boolean allResourcesSticky, String versionName) {
- super(parentShell, title);
- this.folder = folder;
- this.allStickyResources = allResourcesSticky;
- this.versionName = versionName;
- }
-
- /**
- * @see DetailsDialog#createMainDialogArea(Composite)
- */
- protected void createMainDialogArea(Composite composite) {
- // create message
- Label label = new Label(composite, SWT.WRAP);
- String message;
- if(allStickyResources) {
- message = Policy.bind("BranchWizardPage.pageDescriptionVersion"); //$NON-NLS-1$
- } else {
- message = Policy.bind("BranchWizardPage.pageDescription"); //$NON-NLS-1$
- }
- label.setText(message);
- 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);
- label.setFont(composite.getFont());
-
- CVSWizardPage.createLabel(composite, Policy.bind("BranchWizardPage.branchName")); //$NON-NLS-1$
- branchText = CVSWizardPage.createTextField(composite);
- branchText.addListener(SWT.Modify, new Listener() {
- public void handleEvent(Event event) {
- branchTag = branchText.getText();
- updateEnablements();
- updateVersionName(branchTag);
- }
- });
-
- final Button check = new Button(composite, SWT.CHECK);
- data = new GridData();
- data.horizontalSpan = 2;
- check.setLayoutData(data);
- check.setText(Policy.bind("BranchWizardPage.startWorking")); //$NON-NLS-1$
- check.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- update = check.getSelection();
- }
- });
- check.setSelection(true);
- update = true;
-
- label = new Label(composite, SWT.WRAP);
- label.setText(Policy.bind("BranchWizardPage.specifyVersion")); //$NON-NLS-1$
- data = new GridData();
- data.horizontalSpan = 2;
- data.widthHint = 350;
- label.setLayoutData(data);
-
- CVSWizardPage.createLabel(composite, Policy.bind("BranchWizardPage.versionName")); //$NON-NLS-1$
- versionText = CVSWizardPage.createTextField(composite);
- versionText.addListener(SWT.Modify, new Listener() {
- public void handleEvent(Event event) {
- versionTag = versionText.getText();
- updateEnablements();
- }
- });
-
- if(allStickyResources) {
- versionText.setEditable(false);
- versionText.setText(versionName);
- }
-
- // F1 Help
- WorkbenchHelp.setHelp(composite, IHelpContextIds.BRANCH_DIALOG);
-
- branchText.setFocus();
- }
-
- /**
- * Updates version name
- */
- protected void updateVersionName(String branchName) {
- if(versionText!=null && !allStickyResources) {
- versionText.setText(Policy.bind("BranchWizardPage.versionPrefix") + branchName); //$NON-NLS-1$
- }
- }
-
- /**
- * @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));
- composite.setFont(parent.getFont());
-
- Label label = new Label(composite, SWT.WRAP);
- label.setText(Policy.bind("BranchWizardPage.existingVersionsAndBranches")); //$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);
- label.setFont(composite.getFont());
-
- tagTree = createTree(composite);
- tagTree.setInput(new ProjectElement(folder, ProjectElement.INCLUDE_BRANCHES | ProjectElement.INCLUDE_VERSIONS));
- Runnable refresh = new Runnable() {
- public void run() {
- getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- tagTree.refresh();
- }
- });
- }
- };
- TagConfigurationDialog.createTagDefinitionButtons(getShell(), composite, new ICVSFolder[] {folder},
- convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT),
- convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH),
- refresh, refresh);
- return composite;
- }
-
- /**
- * Creates the existing branch and version tree viewer in the details pane
- */
- protected TreeViewer createTree(Composite parent) {
- Tree tree = new Tree(parent, SWT.SINGLE | SWT.BORDER);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.heightHint = TABLE_HEIGHT_HINT;
- tree.setLayoutData(data);
- TreeViewer result = new TreeViewer(tree);
- result.setContentProvider(new WorkbenchContentProvider());
- result.setLabelProvider(new WorkbenchLabelProvider());
- result.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- }
- });
- result.setSorter(new RepositorySorter());
- return result;
- }
-
- /**
- * Validates branch and version names
- */
- protected void updateEnablements() {
- String message = null;
- boolean complete = false;
-
- if (branchTag.length() == 0) {
- message = ""; //$NON-NLS-1$
- } else {
- IStatus status = CVSTag.validateTagName(branchTag);
- if (!status.isOK()) {
- message = Policy.bind("BranchWizard.branchNameWarning", status.getMessage()); //$NON-NLS-1$
- } else {
- if(versionText!=null) {
- status = CVSTag.validateTagName(versionText.getText());
- if (!status.isOK()) {
- message = Policy.bind("BranchWizard.versionNameWarning", status.getMessage()); //$NON-NLS-1$
- } else {
- if(versionTag.length() != 0 && versionTag.equals(branchTag)) {
- message = Policy.bind("BranchWizard.branchAndVersionMustBeDifferent"); //$NON-NLS-1$
- }
- }
- }
- }
- }
- setPageComplete(message == null);
- setErrorMessage(message);
- }
-
- /**
- * Answers if the given tag name already exists
- */
- protected boolean doesTagNameExists(String name) {
- CVSTag[] tags = CVSUIPlugin.getPlugin().getRepositoryManager().getKnownVersionTags(folder);
- for (int i = 0; i < tags.length; i++) {
- if(tags[i].getName().equals(name)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Answers if the given branch name already exists
- */
- protected boolean doesBranchNameExists(String name) {
- CVSTag[] tags = CVSUIPlugin.getPlugin().getRepositoryManager().getKnownBranchTags(folder);
- for (int i = 0; i < tags.length; i++) {
- if(tags[i].getName().equals(name)) {
- return true;
- }
- }
- return false;
- }
-
-
- /**
- * Returns the branch tag name
- */
- public String getBranchTagName() {
- return branchTag;
- }
-
- /**
- * Returns the version tag name
- */
- public String getVersionTagName() {
- return versionTag;
- }
-
- /**
- * Returns the state of the update checkbox
- */
- public boolean getUpdate() {
- return update;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSAbstractResolutionGenerator.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSAbstractResolutionGenerator.java
deleted file mode 100644
index 2b2fdfc39..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSAbstractResolutionGenerator.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-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.ui.IMarkerResolutionGenerator;
-import org.eclipse.ui.IWorkbenchWindow;
-
-public abstract class CVSAbstractResolutionGenerator implements IMarkerResolutionGenerator {
- protected Shell getShell() {
- IWorkbenchWindow window = CVSUIPlugin.getPlugin().getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- return window.getShell();
- } else {
- Display display = Display.getCurrent();
- return new Shell(display);
- }
- }
-
- protected void run(final IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException {
- final Exception[] exception = new Exception[] {null};
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- try {
- new ProgressMonitorDialog(getShell()).run(true, true, runnable);
- } catch (InterruptedException e) {
- exception[0] = e;
- } catch (InvocationTargetException e) {
- exception[0] = e;
- }
- }
- });
- if (exception[0] != null) {
- if (exception[0] instanceof InvocationTargetException) {
- throw (InvocationTargetException)exception[0];
- } else if (exception[0] instanceof InterruptedException) {
- throw (InterruptedException)exception[0];
- } else {
- throw new InvocationTargetException(exception[0]);
- }
- }
- }
-
- /**
- * 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(Throwable exception, String title, final String message) {
- // Handle the target exception for InvocationTargetExceptions
- if (exception instanceof InvocationTargetException) {
- handle(((InvocationTargetException)exception).getTargetException(), title, message);
- return;
- }
-
- // Create a status to be displayed for the exception
- IStatus status = null;
- boolean log = false;
- boolean dialog = false;
- if (exception instanceof TeamException) {
- status = ((TeamException)exception).getStatus();
- log = false;
- dialog = true;
- } else if (exception instanceof CoreException) {
- status = ((CoreException)exception).getStatus();
- log = true;
- dialog = true;
- } else if (exception instanceof InterruptedException) {
- return;
- } else {
- status = new Status(IStatus.ERROR, CVSUIPlugin.ID, 1, Policy.bind("TeamAction.internal"), exception); //$NON-NLS-1$
- log = true;
- dialog = true;
- }
-
- // Display and/or log as appropriate
- 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 (dialog) {
- final IStatus showStatus = toShow;
- final String displayTitle = title;
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- ErrorDialog.openError(getShell(), displayTitle, message, showStatus);
- }
- });
- }
- if (log) CVSUIPlugin.log(toShow);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSAddResolutionGenerator.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSAddResolutionGenerator.java
deleted file mode 100644
index 565912a66..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSAddResolutionGenerator.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.ui.IMarkerResolution;
-
-/**
- * Generate marker resoultions for a cvs remove marker
- */
-public class CVSAddResolutionGenerator extends CVSAbstractResolutionGenerator {
- /*
- * @see IMarkerResolutionGenerator#getResolutions(IMarker)
- */
- public IMarkerResolution[] getResolutions(IMarker marker) {
- IMarkerResolution manage = new IMarkerResolution() {
- public String getLabel() {
- return Policy.bind("CVSAddResolutionGenerator.Add_Resource_to_CVS_1"); //$NON-NLS-1$
- }
- public void run(IMarker marker) {
- try {
- final IResource resource = marker.getResource();
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- final TeamException[] exception = new TeamException[] {null};
- if ( ! cvsResource.isManaged()) {
- CVSAddResolutionGenerator.this.run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)throws InvocationTargetException, InterruptedException {
- try {
- ((CVSTeamProvider)RepositoryProvider.getProvider(resource.getProject())).add(new IResource[] {resource}, IResource.DEPTH_ZERO, monitor);
- } catch (TeamException e) {
- exception[0] = e;
- }
- }
- });
- }
- if (exception[0] != null) {
- throw exception[0];
- }
- marker.delete();
- } catch (TeamException e) {
- handle(e, null, null);
- } catch (CoreException e) {
- handle(e, null, null);
- } catch (InvocationTargetException e) {
- handle(e, null, null);
- } catch (InterruptedException e) {
- // do nothing
- }
- }
- };
- IMarkerResolution manageDeep = new IMarkerResolution() {
- public String getLabel() {
- return Policy.bind("CVSAddResolutionGenerator.Add_Resource_and_Children_to_CVS_2"); //$NON-NLS-1$
- }
- public void run(IMarker marker) {
- try {
- final IResource resource = marker.getResource();
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- final TeamException[] exception = new TeamException[] {null};
- if ( ! cvsResource.isManaged()) {
- CVSAddResolutionGenerator.this.run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)throws InvocationTargetException, InterruptedException {
- try {
- ((CVSTeamProvider)RepositoryProvider.getProvider(resource.getProject())).add(new IResource[] {resource}, IResource.DEPTH_INFINITE, monitor);
- } catch (TeamException e) {
- exception[0] = e;
- }
- }
- });
- }
- if (exception[0] != null) {
- throw exception[0];
- }
- marker.delete();
- } catch (TeamException e) {
- handle(e, null, null);
- } catch (CoreException e) {
- handle(e, null, null);
- } catch (InvocationTargetException e) {
- handle(e, null, null);
- } catch (InterruptedException e) {
- // do nothing
- }
- }
-
- };
- IMarkerResolution ignore = new IMarkerResolution() {
- public String getLabel() {
- return Policy.bind("CVSAddResolutionGenerator.Add_to_.cvsignore_3"); //$NON-NLS-1$
- }
- public void run(IMarker marker) {
- try {
- ICVSResource resource = CVSWorkspaceRoot.getCVSResourceFor(marker.getResource());
- if ( resource.isManaged()) {
- resource.unmanage(null);
- }
- resource.setIgnored();
- marker.delete();
- } catch (CVSException e) {
- handle(e, null, null);
- } catch (CoreException e) {
- handle(e, null, null);
- }
- }
-
- };
- if (marker.getResource().getType() == IResource.FILE) {
- return new IMarkerResolution[] {manage, ignore};
- } else {
- return new IMarkerResolution[] {manageDeep, manage, ignore};
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareEditorInput.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareEditorInput.java
deleted file mode 100644
index 6ff815c24..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareEditorInput.java
+++ /dev/null
@@ -1,382 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.io.ByteArrayInputStream;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.CompareEditorInput;
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.compare.ResourceNode;
-import org.eclipse.compare.structuremergeviewer.DiffNode;
-import org.eclipse.compare.structuremergeviewer.Differencer;
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.compare.structuremergeviewer.IStructureComparator;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.ICVSRunnable;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-/**
- * A compare input for comparing remote resources. Use <code>CVSLocalCompareInput</code>
- * when comparing resources in the workspace to remote resources.
- */
-public class CVSCompareEditorInput extends CompareEditorInput {
- private ITypedElement left;
- private ITypedElement right;
- private ITypedElement ancestor;
-
- // comparison constants
- private static final int NODE_EQUAL = 0;
- private static final int NODE_NOT_EQUAL = 1;
- private static final int NODE_UNKNOWN = 2;
-
- /**
- * Creates a new CVSCompareEditorInput.
- */
- public CVSCompareEditorInput(ResourceEditionNode left, ResourceEditionNode right) {
- this(left, right, null);
- }
-
- /**
- * Creates a new CVSCompareEditorInput.
- */
- public CVSCompareEditorInput(ResourceEditionNode left, ResourceEditionNode right, ResourceEditionNode ancestor) {
- super(new CompareConfiguration());
- this.left = left;
- this.right = right;
- this.ancestor = ancestor;
- }
-
- /**
- * Returns the label for the given input element.
- */
- private String getLabel(ITypedElement element) {
- if (element instanceof ResourceEditionNode) {
- ICVSRemoteResource edition = ((ResourceEditionNode)element).getRemoteResource();
- ICVSResource resource = (ICVSResource)edition;
- if (edition instanceof ICVSRemoteFile) {
- try {
- return Policy.bind("nameAndRevision", resource.getName(), ((ICVSRemoteFile)edition).getRevision()); //$NON-NLS-1$
- } catch (TeamException e) {
- // fall through
- }
- }
- try {
- if (edition.isContainer()) {
- CVSTag tag = ((ICVSRemoteFolder)edition).getTag();
- if (tag == null) {
- return Policy.bind("CVSCompareEditorInput.inHead", edition.getName()); //$NON-NLS-1$
- } else if (tag.getType() == CVSTag.BRANCH) {
- return Policy.bind("CVSCompareEditorInput.inBranch", new Object[] {edition.getName(), tag.getName()}); //$NON-NLS-1$
- } else {
- return Policy.bind("CVSCompareEditorInput.repository", new Object[] {edition.getName(), tag.getName()}); //$NON-NLS-1$
- }
- } else {
- return Policy.bind("CVSCompareEditorInput.repository", new Object[] {edition.getName(), resource.getSyncInfo().getRevision()}); //$NON-NLS-1$
- }
- } catch (TeamException e) {
- handle(e);
- // Fall through and get the default label
- }
- }
- return element.getName();
- }
-
- /**
- * Returns the label for the given input element.
- */
- private String getVersionLabel(ITypedElement element) {
- if (element instanceof ResourceEditionNode) {
- ICVSRemoteResource edition = ((ResourceEditionNode)element).getRemoteResource();
- ICVSResource resource = (ICVSResource)edition;
- try {
- if (edition.isContainer()) {
- CVSTag tag = ((ICVSRemoteFolder)resource).getTag();
- if (tag == null) {
- return Policy.bind("CVSCompareEditorInput.headLabel"); //$NON-NLS-1$
- } else if (tag.getType() == CVSTag.BRANCH) {
- return Policy.bind("CVSCompareEditorInput.branchLabel", tag.getName()); //$NON-NLS-1$
- } else {
- return tag.getName();
- }
- } else {
- return resource.getSyncInfo().getRevision();
- }
- } catch (TeamException e) {
- handle(e);
- // Fall through and get the default label
- }
- }
- return element.getName();
- }
-
- /*
- * Returns a guess of the resource name being compared, for display
- * in the title.
- */
- private String guessResourceName() {
- if (left != null) {
- return left.getName();
- }
- if (right != null) {
- return right.getName();
- }
- if (ancestor != null) {
- return ancestor.getName();
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Handles a random exception and sanitizes it into a reasonable
- * error message.
- */
- private void handle(Exception e) {
- // create a status
- Throwable t = e;
- // unwrap the invocation target exception
- if (t instanceof InvocationTargetException) {
- t = ((InvocationTargetException)t).getTargetException();
- }
- IStatus error;
- if (t instanceof CoreException) {
- error = ((CoreException)t).getStatus();
- } else if (t instanceof TeamException) {
- error = ((TeamException)t).getStatus();
- } else {
- error = new Status(IStatus.ERROR, CVSUIPlugin.ID, 1, Policy.bind("internal"), t); //$NON-NLS-1$
- }
- setMessage(error.getMessage());
- if (!(t instanceof TeamException)) {
- CVSUIPlugin.log(error);
- }
- }
-
- /**
- * Sets up the title and pane labels for the comparison view.
- */
- private void initLabels() {
- CompareConfiguration cc = (CompareConfiguration) getCompareConfiguration();
- setLabels(cc, new StructuredSelection());
-
- String title;
- if (ancestor != null) {
- title = Policy.bind("CVSCompareEditorInput.titleAncestor", new Object[] {guessResourceName(), getVersionLabel(ancestor), getVersionLabel(left), getVersionLabel(right)} ); //$NON-NLS-1$
- } else {
- String leftName = null;
- if (left != null) leftName = left.getName();
- String rightName = null;
- if (right != null) rightName = right.getName();
- boolean differentNames = false;
- if (leftName != null && !leftName.equals(rightName)) {
- title = Policy.bind("CVSCompareEditorInput.titleNoAncestorDifferent", new Object[] {leftName, getVersionLabel(left), rightName, getVersionLabel(right)} ); //$NON-NLS-1$
- } else {
- title = Policy.bind("CVSCompareEditorInput.titleNoAncestor", new Object[] {guessResourceName(), getVersionLabel(left), getVersionLabel(right)} ); //$NON-NLS-1$
- }
- }
- setTitle(title);
- }
-
- private void setLabels(CompareConfiguration cc, IStructuredSelection selection) {
- ITypedElement left = this.left;
- ITypedElement right = this.right;
- ITypedElement ancestor = this.ancestor;
-
- if (left != null) {
- cc.setLeftLabel(getLabel(left));
- cc.setLeftImage(left.getImage());
- }
-
- if (right != null) {
- cc.setRightLabel(getLabel(right));
- cc.setRightImage(right.getImage());
- }
-
- if (ancestor != null) {
- cc.setAncestorLabel(getLabel(ancestor));
- cc.setAncestorImage(ancestor.getImage());
- }
- }
-
- /* (Non-javadoc)
- * Method declared on CompareEditorInput
- */
- public boolean isSaveNeeded() {
- return false;
- }
-
- /* (non-Javadoc)
- * Method declared on CompareEditorInput
- */
- protected Object prepareInput(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- final boolean threeWay = ancestor != null;
- if (right == null || left == null) {
- setMessage(Policy.bind("CVSCompareEditorInput.different")); //$NON-NLS-1$
- return null;
- }
-
- initLabels();
-
- final Differencer d = new Differencer() {
- protected boolean contentsEqual(Object input1, Object input2) {
- int compare = teamEqual(input1, input2);
- if (compare == NODE_EQUAL) {
- return true;
- }
- if (compare == NODE_NOT_EQUAL) {
- return false;
- }
- //revert to slow content comparison
- return super.contentsEqual(input1, input2);
- }
- protected void updateProgress(IProgressMonitor progressMonitor, Object node) {
- if (node instanceof ITypedElement) {
- ITypedElement element = (ITypedElement)node;
- progressMonitor.subTask(Policy.bind("CompareEditorInput.fileProgress", new String[] {element.getName()})); //$NON-NLS-1$
- progressMonitor.worked(1);
- }
- }
- protected Object[] getChildren(Object input) {
- if (input instanceof IStructureComparator) {
- Object[] children= ((IStructureComparator)input).getChildren();
- if (children != null)
- return children;
- }
- return null;
- }
- protected Object visit(Object data, int result, Object ancestor, Object left, Object right) {
- return new DiffNode((IDiffContainer) data, result, (ITypedElement)ancestor, (ITypedElement)left, (ITypedElement)right);
- }
- };
-
- try {
- // do the diff
- final Object[] result = new Object[] { null };
- Session.run(null, null, false, new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- monitor.beginTask(Policy.bind("CVSCompareEditorInput.comparing"), 30); //$NON-NLS-1$
- IProgressMonitor sub = new SubProgressMonitor(monitor, 30);
- sub.beginTask(Policy.bind("CVSCompareEditorInput.comparing"), 100); //$NON-NLS-1$
- try {
- result[0] = d.findDifferences(threeWay, sub, null, ancestor, left, right);
- } finally {
- sub.done();
- }
- }
- }, monitor);
- return result[0];
- } catch (OperationCanceledException e) {
- throw new InterruptedException(e.getMessage());
- } catch (RuntimeException e) {
- handle(e);
- return null;
- } catch (CVSException e) {
- handle(e);
- return null;
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Compares two nodes to determine if they are equal. Returns NODE_EQUAL
- * of they are the same, NODE_NOT_EQUAL if they are different, and
- * NODE_UNKNOWN if comparison was not possible.
- */
- protected int teamEqual(Object left, Object right) {
- // calculate the type for the left contribution
- ICVSRemoteResource leftEdition = null;
- if (left instanceof ResourceEditionNode) {
- leftEdition = ((ResourceEditionNode)left).getRemoteResource();
- }
-
- // calculate the type for the right contribution
- ICVSRemoteResource rightEdition = null;
- if (right instanceof ResourceEditionNode)
- rightEdition = ((ResourceEditionNode)right).getRemoteResource();
-
-
- // compare them
-
- if (leftEdition == null || rightEdition == null) {
- return NODE_UNKNOWN;
- }
- // if they're both non-files, they're the same
- if (leftEdition.isContainer() && rightEdition.isContainer()) {
- return NODE_EQUAL;
- }
- // if they have different types, they're different
- if (leftEdition.isContainer() != rightEdition.isContainer()) {
- return NODE_NOT_EQUAL;
- }
-
- String leftLocation = leftEdition.getRepository().getLocation();
- String rightLocation = rightEdition.getRepository().getLocation();
- if (!leftLocation.equals(rightLocation)) {
- return NODE_UNKNOWN;
- }
- try {
- ResourceSyncInfo leftInfo = ((ICVSResource)leftEdition).getSyncInfo();
- ResourceSyncInfo rightInfo = ((ICVSResource)rightEdition).getSyncInfo();
-
- if (leftEdition.getRepositoryRelativePath().equals(rightEdition.getRepositoryRelativePath()) &&
- leftInfo.getRevision().equals(rightInfo.getRevision())) {
- return NODE_EQUAL;
- } else {
- if(considerContentIfRevisionOrPathDiffers()) {
- return NODE_UNKNOWN;
- } else {
- return NODE_NOT_EQUAL;
- }
- }
- } catch (TeamException e) {
- handle(e);
- return NODE_UNKNOWN;
- }
- }
-
- private boolean considerContentIfRevisionOrPathDiffers() {
- return CVSUIPlugin.getPlugin().getPreferenceStore().getBoolean(ICVSUIConstants.PREF_CONSIDER_CONTENTS);
- }
-
- public Viewer createDiffViewer(Composite parent) {
- Viewer viewer = super.createDiffViewer(parent);
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- CompareConfiguration cc = getCompareConfiguration();
- setLabels(cc, (IStructuredSelection)event.getSelection());
- }
- });
- return viewer;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareRevisionsInput.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareRevisionsInput.java
deleted file mode 100644
index d11a8e717..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareRevisionsInput.java
+++ /dev/null
@@ -1,471 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.text.DateFormat;
-import java.util.Date;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.CompareEditorInput;
-import org.eclipse.compare.CompareUI;
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.compare.ResourceNode;
-import org.eclipse.compare.structuremergeviewer.DiffContainer;
-import org.eclipse.compare.structuremergeviewer.DiffNode;
-import org.eclipse.compare.structuremergeviewer.Differencer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.viewers.ColumnWeightData;
-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.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ILogEntry;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.actions.CVSAction;
-import org.eclipse.team.internal.core.TeamPlugin;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-public class CVSCompareRevisionsInput extends CompareEditorInput {
- IFile resource;
- ICVSRemoteFile currentEdition;
- ILogEntry[] editions;
- TableViewer viewer;
- Action getContentsAction;
- Action getRevisionAction;
- Shell shell;
-
- /**
- * This class is an edition node which knows the log entry it came from.
- */
- class ResourceRevisionNode extends ResourceEditionNode {
- ILogEntry entry;
- public ResourceRevisionNode(ILogEntry entry) {
- super(entry.getRemoteFile());
- this.entry = entry;
- }
- public ILogEntry getLogEntry() {
- return entry;
- }
- public String getName() {
- ICVSRemoteResource edition = getRemoteResource();
- String revisionName = entry.getRevision();
- if (revisionName != null) {
- IResource resource = CVSCompareRevisionsInput.this.resource;
- try {
- ICVSRemoteFile currentEdition = (ICVSRemoteFile) CVSWorkspaceRoot.getRemoteResourceFor(resource);
- if (currentEdition != null && currentEdition.getRevision().equals(revisionName)) {
- Policy.bind("currentRevision", revisionName); //$NON-NLS-1$
- } else {
- return revisionName;
- }
- } catch (TeamException e) {
- handle(e);
- }
- }
- return super.getName();
- }
- };
- /**
- * A compare node that gets its label from the right element
- */
- class VersionCompareDiffNode extends DiffNode {
- public VersionCompareDiffNode(ITypedElement left, ITypedElement right) {
- super(left, right);
- }
- public String getName() {
- return getRight().getName();
- }
- };
- /**
- * A content provider which knows how to get the children of the diff container
- */
- class VersionCompareContentProvider implements IStructuredContentProvider {
- public void dispose() {
- }
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
- public Object[] getElements(Object inputElement) {
- if (inputElement instanceof DiffContainer) {
- return ((DiffContainer)inputElement).getChildren();
- }
- return null;
- }
- };
- /**
- * A sorter which gets the remote resources from the diff nodes
- */
- class VersionSorter extends HistorySorter {
- public VersionSorter(int columnNumber) {
- super(columnNumber);
- }
- public int compare(Viewer viewer, Object o1, Object o2) {
- VersionCompareDiffNode d1 = (VersionCompareDiffNode)o1;
- VersionCompareDiffNode d2 = (VersionCompareDiffNode)o2;
- return super.compare(viewer, ((ResourceRevisionNode)d1.getRight()).getLogEntry(), ((ResourceRevisionNode)d2.getRight()).getLogEntry());
- }
-
- };
-
- //column constants
- private static final int COL_REVISION = 0;
- private static final int COL_TAGS = 1;
- private static final int COL_DATE = 2;
- private static final int COL_AUTHOR = 3;
- private static final int COL_COMMENT = 4;
-
- /**
- * A history label provider, largely copied from HistoryView.
- */
- class HistoryLabelProvider extends LabelProvider implements ITableLabelProvider {
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
- public String getColumnText(Object element, int columnIndex) {
- if (!(element instanceof DiffNode)) return ""; //$NON-NLS-1$
- ITypedElement right = ((DiffNode)element).getRight();
- if (!(right instanceof ResourceRevisionNode)) return ""; //$NON-NLS-1$
- ILogEntry entry = ((ResourceRevisionNode)right).getLogEntry();
- switch (columnIndex) {
- case COL_REVISION:
- try {
- if (currentEdition != null && currentEdition.getRevision().equals(entry.getRevision())) {
- return Policy.bind("currentRevision", entry.getRevision()); //$NON-NLS-1$
- } else {
- return entry.getRevision();
- }
- } catch (TeamException e) {
- handle(e);
- }
- return entry.getRevision();
- case COL_TAGS:
- CVSTag[] tags = entry.getTags();
- StringBuffer result = new StringBuffer();
- for (int i = 0; i < tags.length; i++) {
- result.append(tags[i].getName());
- if (i < tags.length - 1) {
- result.append(", "); //$NON-NLS-1$
- }
- }
- return result.toString();
- case COL_DATE:
- Date date = entry.getDate();
- if (date == null) return Policy.bind("notAvailable"); //$NON-NLS-1$
- return DateFormat.getInstance().format(date);
- case COL_AUTHOR:
- return entry.getAuthor();
- case COL_COMMENT:
- String comment = entry.getComment();
- int index = comment.indexOf("\n"); //$NON-NLS-1$
- if (index == -1) return comment;
- return Policy.bind("CVSCompareRevisionsInput.truncate", comment.substring(0, index)); //$NON-NLS-1$
- }
- return ""; //$NON-NLS-1$
- }
- }
-
- public CVSCompareRevisionsInput(IFile resource, ILogEntry[] editions) {
- super(new CompareConfiguration());
- this.resource = resource;
- this.editions = editions;
- updateCurrentEdition();
- initializeActions();
- }
- /**
- * Creates the columns for the history table.
- * Copied from HistoryView.
- */
- private void createColumns(Table table, TableLayout layout) {
- SelectionListener headerListener = getColumnListener();
- // revision
- TableColumn col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- col.setText(Policy.bind("HistoryView.revision")); //$NON-NLS-1$
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(20, true));
-
- // tags
- col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- col.setText(Policy.bind("HistoryView.tags")); //$NON-NLS-1$
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(20, true));
-
- // creation date
- col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- col.setText(Policy.bind("HistoryView.date")); //$NON-NLS-1$
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(20, true));
-
- // author
- col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- col.setText(Policy.bind("HistoryView.author")); //$NON-NLS-1$
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(20, true));
-
- //comment
- col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- col.setText(Policy.bind("HistoryView.comment")); //$NON-NLS-1$
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(50, true));
- }
- public Viewer createDiffViewer(Composite parent) {
- this.shell = parent.getShell();
- Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION);
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- GridData data = new GridData(GridData.FILL_BOTH);
- table.setLayoutData(data);
- table.setData(CompareUI.COMPARE_VIEWER_TITLE, Policy.bind("CVSCompareRevisionsInput.structureCompare")); //$NON-NLS-1$
-
- TableLayout layout = new TableLayout();
- table.setLayout(layout);
-
- createColumns(table, layout);
-
- viewer = new TableViewer(table);
- viewer.setContentProvider(new VersionCompareContentProvider());
- viewer.setLabelProvider(new HistoryLabelProvider());
-
- MenuManager mm = new MenuManager();
- mm.setRemoveAllWhenShown(true);
- mm.addMenuListener(
- new IMenuListener() {
- public void menuAboutToShow(IMenuManager mm) {
- mm.add(getContentsAction);
- mm.add(getRevisionAction);
- }
- }
- );
- table.setMenu(mm.createContextMenu(table));
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- ISelection selection = event.getSelection();
- if (!(selection instanceof IStructuredSelection)) {
- getContentsAction.setEnabled(false);
- getRevisionAction.setEnabled(false);
- return;
- }
- IStructuredSelection ss = (IStructuredSelection)selection;
- getContentsAction.setEnabled(ss.size() == 1);
- getRevisionAction.setEnabled(ss.size() == 1);
- }
- });
-
- // Add F1 help.
- WorkbenchHelp.setHelp(table, IHelpContextIds.COMPARE_REVISIONS_VIEW);
- WorkbenchHelp.setHelp(getContentsAction, IHelpContextIds.GET_FILE_CONTENTS_ACTION);
- WorkbenchHelp.setHelp(getRevisionAction, IHelpContextIds.GET_FILE_REVISION_ACTION);
-
- return viewer;
- }
- /**
- * Adds the listener that sets the sorter.
- */
- private SelectionListener getColumnListener() {
- /**
- * This class handles selections of the column headers.
- * Selection of the column header will cause resorting
- * of the shown tasks using that column's sorter.
- * Repeated selection of the header will toggle
- * sorting order (ascending versus descending).
- */
- return new SelectionAdapter() {
- /**
- * Handles the case of user selecting the
- * header area.
- * <p>If the column has not been selected previously,
- * it will set the sorter of that column to be
- * the current tasklist sorter. Repeated
- * presses on the same column header will
- * toggle sorting order (ascending/descending).
- */
- public void widgetSelected(SelectionEvent e) {
- // column selected - need to sort
- int column = viewer.getTable().indexOf((TableColumn) e.widget);
- VersionSorter oldSorter = (VersionSorter)viewer.getSorter();
- if (oldSorter != null && column == oldSorter.getColumnNumber()) {
- oldSorter.setReversed(!oldSorter.isReversed());
- viewer.refresh();
- } else {
- viewer.setSorter(new VersionSorter(column));
- }
- }
- };
- }
- private void initLabels() {
- CompareConfiguration cc = (CompareConfiguration)getCompareConfiguration();
- String resourceName = resource.getName();
-// if (editions[0].isTeamStreamResource()) {
-// setTitle(Policy.bind("CompareResourceEditorInput.compareResourceAndStream", new Object[] {resourceName, editions[0].getTeamStream().getName()}));
-// } else {
-// setTitle(Policy.bind("CompareResourceEditorInput.compareResourceAndVersions", new Object[] {resourceName}));
-// }
- setTitle(Policy.bind("CVSCompareRevisionsInput.compareResourceAndVersions", new Object[] {resourceName})); //$NON-NLS-1$
- cc.setLeftEditable(true);
- cc.setRightEditable(false);
-
- String leftLabel = Policy.bind("CVSCompareRevisionsInput.workspace", new Object[] {resourceName}); //$NON-NLS-1$
- cc.setLeftLabel(leftLabel);
- String rightLabel = Policy.bind("CVSCompareRevisionsInput.repository", new Object[] {resourceName}); //$NON-NLS-1$
- cc.setRightLabel(rightLabel);
- }
- private void initializeActions() {
- getContentsAction = new Action(Policy.bind("HistoryView.getContentsAction"), null) { //$NON-NLS-1$
- public void run() {
- try {
- new ProgressMonitorDialog(shell).run(false, true, new WorkspaceModifyOperation() {
- protected void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
- if (selection.size() != 1) return;
- VersionCompareDiffNode node = (VersionCompareDiffNode)selection.getFirstElement();
- ResourceEditionNode right = (ResourceEditionNode)node.getRight();
- ICVSRemoteResource edition = right.getRemoteResource();
- // Do the load. This just consists of setting the local contents. We don't
- // actually want to change the base.
- try {
- monitor.beginTask(null, 100);
- InputStream in = edition.getContents(new SubProgressMonitor(monitor, 50));
- resource.setContents(in, false, true, new SubProgressMonitor(monitor, 50));
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- });
- } catch (InterruptedException e) {
- // Do nothing
- return;
- } catch (InvocationTargetException e) {
- handle(e);
- }
- // recompute the labels on the viewer
- updateCurrentEdition();
- viewer.refresh();
- }
- };
-
- getRevisionAction = new Action(Policy.bind("HistoryView.getRevisionAction"), null) { //$NON-NLS-1$
- public void run() {
- try {
- new ProgressMonitorDialog(shell).run(false, true, new WorkspaceModifyOperation() {
- protected void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
- if (selection.size() != 1) return;
- VersionCompareDiffNode node = (VersionCompareDiffNode)selection.getFirstElement();
- ResourceEditionNode right = (ResourceEditionNode)node.getRight();
- ICVSRemoteResource edition = right.getRemoteResource();
- // Do the load. This just consists of setting the local contents. We don't
- // actually want to change the base.
- try {
- CVSTeamProvider provider = (CVSTeamProvider)RepositoryProvider.getProvider(resource.getProject());
- CVSTag revisionTag = new CVSTag(((ICVSRemoteFile)edition).getRevision(), CVSTag.VERSION);
- if(CVSAction.checkForMixingTags(shell, new IResource[] {resource}, revisionTag)) {
- provider.update(new IResource[] {resource}, new Command.LocalOption[] {Command.UPDATE.IGNORE_LOCAL_CHANGES},
- revisionTag, true /*create backups*/, monitor);
- currentEdition = (ICVSRemoteFile)edition;
- }
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InterruptedException e) {
- // Do nothing
- return;
- } catch (InvocationTargetException e) {
- handle(e);
- }
- // recompute the labels on the viewer
- viewer.refresh();
- }
- };
- }
- public boolean isSaveNeeded() {
- return false;
- }
- protected Object prepareInput(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- initLabels();
- DiffNode diffRoot = new DiffNode(Differencer.NO_CHANGE);
- for (int i = 0; i < editions.length; i++) {
- ITypedElement left = new ResourceNode(resource);
- ITypedElement right = new ResourceRevisionNode(editions[i]);
- diffRoot.add(new VersionCompareDiffNode(left, right));
- }
- return diffRoot;
- }
- private void updateCurrentEdition() {
- try {
- this.currentEdition = ((ICVSRemoteFile) CVSWorkspaceRoot.getRemoteResourceFor(resource));
- } catch (TeamException e) {
- handle(e);
- }
- }
- private void handle(Exception e) {
- // create a status
- Throwable t = e;
- // unwrap the invocation target exception
- if (t instanceof InvocationTargetException) {
- t = ((InvocationTargetException)t).getTargetException();
- }
- IStatus error;
- if (t instanceof CoreException) {
- error = ((CoreException)t).getStatus();
- } else if (t instanceof TeamException) {
- error = ((TeamException)t).getStatus();
- } else {
- error = new Status(IStatus.ERROR, CVSUIPlugin.ID, 1, Policy.bind("internal"), t); //$NON-NLS-1$
- }
- setMessage(error.getMessage());
- ErrorDialog.openError(shell, null, null, error);
- if (!(t instanceof TeamException)) {
- CVSUIPlugin.log(error);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoration.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoration.java
deleted file mode 100644
index a9f9cd790..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoration.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.List;
-import java.util.Map;
-
-public class CVSDecoration {
-
- private String format;
- private Map bindings;
- private List overlays;
- private int[] locations;
-
- public CVSDecoration() {
- this(null, null, null, null);
- }
-
- public CVSDecoration(String format, Map bindings, List overlays, int[] locations) {
- setFormat(format);
- setBindings(bindings);
- setOverlays(overlays);
- setLocations(locations);
- }
-
- public int hashCode() {
- return overlays.hashCode();
- }
-
- public boolean equals(Object o) {
- if (!(o instanceof CVSDecoration)) return false;
- return overlays.equals(((CVSDecoration)o).overlays);
- }
- /**
- * Gets the overlays.
- * @return Returns a List
- */
- public List getOverlays() {
- return overlays;
- }
-
- /**
- * Sets the overlays.
- * @param overlays The overlays to set
- */
- public void setOverlays(List overlays) {
- this.overlays = overlays;
- }
-
- /**
- * Gets the substitutions.
- * @return Returns a String[]
- */
- public Map getBindings() {
- return bindings;
- }
-
- /**
- * Sets the substitutions.
- * @param substitutions The substitutions to set
- */
- public void setBindings(Map bindings) {
- this.bindings = bindings;
- }
-
- /**
- * Gets the textBinding.
- * @return Returns a String
- */
- public String getFormat() {
- return format;
- }
-
- /**
- * Sets the textBinding.
- * @param textBinding The textBinding to set
- */
- public void setFormat(String format) {
- this.format = format;
- }
- /**
- * Gets the locations.
- * @return Returns a int[]
- */
- public int[] getLocations() {
- return locations;
- }
-
- /**
- * Sets the locations.
- * @param locations The locations to set
- */
- public void setLocations(int[] locations) {
- this.locations = locations;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecorationRunnable.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecorationRunnable.java
deleted file mode 100644
index 4ce371488..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecorationRunnable.java
+++ /dev/null
@@ -1,336 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.ui.ISharedImages;
-import org.eclipse.team.ui.TeamImages;
-
-/**
- * Performs the decoration calculation for elements made available via the decoration notifier.
- */
-public class CVSDecorationRunnable implements Runnable {
-
- // Images cached for better performance
- private static ImageDescriptor dirty;
- private static int dirtyLocation;
- private static ImageDescriptor checkedIn;
- private static int checkedInLocation;
- private static ImageDescriptor checkedOut;
- private static int checkedOutLocation;
- private static ImageDescriptor merged;
- private static int mergedLocation;
-
- // Provides resources to be decorated and is notified when decoration has been calculated
- private IDecorationNotifier notifier;
-
- // Remember the non posted decorated resources
- List resources = new ArrayList();
- List decorations = new ArrayList();
- private final static int NUM_TO_BATCH = 50;
-
- static {
- dirty = new CachedImageDescriptor(TeamImages.getImageDescriptor(ISharedImages.IMG_DIRTY_OVR));
- dirtyLocation = OverlayIcon.TOP_RIGHT;
- checkedIn = new CachedImageDescriptor(TeamImages.getImageDescriptor(ISharedImages.IMG_CHECKEDIN_OVR));
- checkedInLocation = OverlayIcon.BOTTOM_RIGHT;
- checkedOut = new CachedImageDescriptor(TeamImages.getImageDescriptor(ISharedImages.IMG_CHECKEDOUT_OVR));
- checkedOutLocation = OverlayIcon.BOTTOM_RIGHT;
- merged = new CachedImageDescriptor(CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_MERGED));
- mergedLocation = OverlayIcon.BOTTOM_RIGHT;
- }
-
- /*
- * Define a cached image descriptor which only creates the image data once
- */
- public static class CachedImageDescriptor extends ImageDescriptor {
- ImageDescriptor descriptor;
- ImageData data;
- public CachedImageDescriptor(ImageDescriptor descriptor) {
- this.descriptor = descriptor;
- }
- public ImageData getImageData() {
- if (data == null) {
- data = descriptor.getImageData();
- }
- return data;
- }
- }
-
- /* package */
- CVSDecorationRunnable(IDecorationNotifier notifier) {
- this.notifier = notifier;
- }
-
- /*
- * @see Runnable#run()
- */
- public void run() {
- while (true) {
- // will block if there are no resources to be decorated
- IResource resource = notifier.next();
-
- // if next() returned null, we are done and should shut down.
- if (resource == null) {
- return;
- }
-
- CVSDecoration decoration;
- try {
- decoration = CVSDecorator.getActiveCVSDecorator().isMemberDeconfiguredProject(resource)
- ? null
- : decorate(resource);
- } catch (Exception e) {
- // If there was a problem, log it and set the decoration to null
- CVSUIPlugin.log(new Status(IStatus.ERROR, CVSUIPlugin.ID, 0, Policy.bind("simpleInternal"), e));
- decoration = null;
- }
-
- // notify that decoration is ready
- if(decoration!=null) {
- resources.add(resource);
- decorations.add(decoration);
- if(!resources.isEmpty() && (notifier.remaining()==0 || resources.size() >= NUM_TO_BATCH)) {
- notifier.decorated((IResource[])resources.toArray(new IResource[resources.size()]),
- (CVSDecoration[])decorations.toArray(new CVSDecoration[decorations.size()]));
- resources.clear();
- decorations.clear();
- }
- }
- }
- }
-
- public CVSDecoration decorate(IResource resource) {
- // it is possible that the resource to be decorated is no longer associated
- // with a CVS provider. This could happen if the team nature was removed
- // between the time the decoration event was posted to the thread and the time
- // the thread processes the decoration.
- RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId());
- if(!resource.exists() || provider==null) {
- return null;
- }
-
- // if the resource is ignored return an empty decoration. This will
- // force a decoration update event and clear the existing CVS decoration.
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- try {
- if(cvsResource.isIgnored()) {
- return new CVSDecoration();
- }
- } catch (CVSException e) {
- // The was an exception in isIgnored. Don't decorate
- return new CVSDecoration();
- }
-
- // determine a if resource has outgoing changes (e.g. is dirty).
- IPreferenceStore store = CVSUIPlugin.getPlugin().getPreferenceStore();
- boolean isDirty = false;
- boolean computeDeepDirtyCheck = store.getBoolean(ICVSUIConstants.PREF_CALCULATE_DIRTY);
- int type = resource.getType();
- if(type == IResource.FILE || computeDeepDirtyCheck) {
- isDirty = CVSDecorator.isDirty(resource);
- }
-
- // compute decorations
- CVSDecoration decoration = computeTextLabelFor(resource, isDirty);
- computeLabelOverlaysFor(resource, decoration, isDirty, (CVSTeamProvider)provider);
- return decoration;
- }
-
- public static CVSDecoration computeTextLabelFor(IResource resource, boolean isDirty) {
- try {
- Map bindings = new HashMap(3);
- String format = ""; //$NON-NLS-1$
- IPreferenceStore store = CVSUIPlugin.getPlugin().getPreferenceStore();
-
- IPath resourceLocation = resource.getLocation();
- int type = resource.getType();
-
- // if the resource does not have a location then return. This can happen if the resource
- // has been deleted after we where asked to decorate it.
- if( resourceLocation == null) {
- return new CVSDecoration(format, bindings, null, null);
- }
-
- if (type == IResource.FOLDER) {
- format = store.getString(ICVSUIConstants.PREF_FOLDERTEXT_DECORATION);
- } else if (type == IResource.PROJECT) {
- format = store.getString(ICVSUIConstants.PREF_PROJECTTEXT_DECORATION);
- } else {
- format = store.getString(ICVSUIConstants.PREF_FILETEXT_DECORATION);
- }
-
- if (isDirty) {
- bindings.put(CVSDecoratorConfiguration.DIRTY_FLAG, store.getString(ICVSUIConstants.PREF_DIRTY_FLAG));
- }
-
- CVSTag tag = getTagToShow(resource);
- if (tag != null) {
- bindings.put(CVSDecoratorConfiguration.RESOURCE_TAG, tag.getName());
- }
-
- if (type != IResource.FILE) {
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor((IContainer) resource);
- FolderSyncInfo folderInfo = folder.getFolderSyncInfo();
- if (folderInfo != null) {
- ICVSRepositoryLocation location = CVSProviderPlugin.getProvider().getRepository(folderInfo.getRoot());
- bindings.put(CVSDecoratorConfiguration.REMOTELOCATION_HOST, location.getHost());
- bindings.put(CVSDecoratorConfiguration.REMOTELOCATION_METHOD, location.getMethod().getName());
- bindings.put(CVSDecoratorConfiguration.REMOTELOCATION_USER, location.getUsername());
- bindings.put(CVSDecoratorConfiguration.REMOTELOCATION_ROOT, location.getRootDirectory());
- bindings.put(CVSDecoratorConfiguration.REMOTELOCATION_REPOSITORY, folderInfo.getRepository());
- }
- } else {
- format = store.getString(ICVSUIConstants.PREF_FILETEXT_DECORATION);
- ICVSFile file = CVSWorkspaceRoot.getCVSFileFor((IFile) resource);
- ResourceSyncInfo fileInfo = file.getSyncInfo();
- if (fileInfo != null) {
- if (fileInfo.isAdded()) {
- bindings.put(CVSDecoratorConfiguration.ADDED_FLAG, store.getString(ICVSUIConstants.PREF_ADDED_FLAG));
- } else {
- bindings.put(CVSDecoratorConfiguration.FILE_REVISION, fileInfo.getRevision());
- }
- KSubstOption option = fileInfo.getKeywordMode() != null ?
- fileInfo.getKeywordMode() :
- KSubstOption.fromFile((IFile) resource);
- bindings.put(CVSDecoratorConfiguration.FILE_KEYWORD, option.getShortDisplayText());
- } else {
- // only show the type that cvs will use when comitting the file
- KSubstOption option = KSubstOption.fromFile((IFile) resource);
- bindings.put(CVSDecoratorConfiguration.FILE_KEYWORD, option.getShortDisplayText());
- }
- }
- return new CVSDecoration(format, bindings, null, null);
- } catch (CVSException e) {
- CVSUIPlugin.log(e.getStatus());
- return new CVSDecoration();
- }
- }
-
- /**
- * Only show the tag if the resources tag is different than the parents. Or else, tag
- * names will clutter the text decorations.
- */
- protected static CVSTag getTagToShow(IResource resource) throws CVSException {
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- CVSTag tag = null;
-
- // for unmanaged resources don't show a tag since they will be added in
- // the context of their parents tag. For managed resources only show tags
- // if different than parent.
- boolean managed = false;
-
- if(cvsResource.isFolder()) {
- FolderSyncInfo folderInfo = ((ICVSFolder)cvsResource).getFolderSyncInfo();
- if(folderInfo != null) {
- tag = folderInfo.getTag();
- managed = true;
- }
- } else {
- ResourceSyncInfo info = ((ICVSFile)cvsResource).getSyncInfo();
- if(info != null) {
- tag = info.getTag();
- managed = true;
- }
- }
-
- ICVSFolder parent = cvsResource.getParent();
- if(parent != null && managed) {
- FolderSyncInfo parentInfo = parent.getFolderSyncInfo();
- if(parentInfo != null) {
- CVSTag parentTag = parentInfo.getTag();
- parentTag = (parentTag == null ? CVSTag.DEFAULT : parentTag);
- tag = (tag == null ? CVSTag.DEFAULT : tag);
- // must compare tags by name because CVS doesn't do a good job of
- // using T and N prefixes for folders and files.
- if( parentTag.getName().equals(tag.getName())) {
- tag = null;
- }
- }
- }
- return tag;
- }
-
- public static void computeLabelOverlaysFor(IResource resource, CVSDecoration decoration, boolean isDirty, CVSTeamProvider provider) {
- List overlays = new ArrayList(3);
- List locations = new ArrayList(3);
-
- IPreferenceStore store = CVSUIPlugin.getPlugin().getPreferenceStore();
- boolean showDirty = store.getBoolean(ICVSUIConstants.PREF_SHOW_DIRTY_DECORATION);
- boolean showHasRemote = store.getBoolean(ICVSUIConstants.PREF_SHOW_HASREMOTE_DECORATION);
- boolean showAdded = store.getBoolean(ICVSUIConstants.PREF_SHOW_ADDED_DECORATION);
-
- if (showAdded && resource.getType() == IResource.FILE) {
- try {
- IPath location = resource.getLocation();
- if (location != null) {
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor((IFile) resource);
- ResourceSyncInfo info = cvsFile.getSyncInfo();
- // show merged icon if file has been merged but has not been edited (e.g. on commit it will be ignored)
- if (info != null && info.isNeedsMerge(cvsFile.getTimeStamp())) {
- overlays.add(merged);
- locations.add(new Integer(mergedLocation));
- // show added icon if file has been added locally.
- } else if (info != null && info.isAdded()) {
- overlays.add(checkedOut);
- locations.add(new Integer(checkedOutLocation));
- }
- }
- } catch (CVSException e) {
- CVSUIPlugin.log(e.getStatus());
- return;
- }
- }
-
- // show outgoing arrow
- if (showDirty && isDirty) {
- overlays.add(dirty);
- locations.add(new Integer(dirtyLocation));
- }
-
- // show remote icon
- if (showHasRemote && provider.hasRemote(resource)) {
- overlays.add(checkedIn);
- locations.add(new Integer(checkedInLocation));
- }
-
- if (!overlays.isEmpty()) {
- Integer[] integers = (Integer[])locations.toArray(new Integer[locations.size()]);
- int[] ints = new int[integers.length];
- for (int i = 0; i < integers.length; i++) {
- ints[i] = integers[i].intValue();
- }
- decoration.setLocations(ints);
- decoration.setOverlays(overlays);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecorator.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecorator.java
deleted file mode 100644
index 9f304a14e..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecorator.java
+++ /dev/null
@@ -1,526 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IResourceDeltaVisitor;
-import org.eclipse.core.resources.IResourceVisitor;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.LabelProviderChangedEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResourceVisitor;
-import org.eclipse.team.internal.ccvs.core.IResourceStateChangeListener;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.ui.IDecoratorManager;
-
-/**
- * Classes registered with the workbench decoration extension point. The <code>CVSDecorationRunnable</code> class
- * actually calculates the decoration, while this class is responsible for listening to the following sources
- * for indications that the decorators need updating:
- * <ul>
- * <li>workbench label requests (decorateText/decorateImage)
- * <li>workspace resource change events (resourceChanged)
- * <li>cvs state changes (resourceStateChanged)
- * </ul>
- * <p>
- * [Note: There are several optimization that can be implemented in this class: (1) cache something
- * so that computing the dirty state of containers does not imply traversal of all children, (2) improve
- * the queue used between the decorator and the decorator runnable such that priority can be
- * given to visible elements when decoration requests are made.]
- */
-public class CVSDecorator extends LabelProvider implements ILabelDecorator, IResourceChangeListener, IResourceStateChangeListener, IDecorationNotifier {
-
- // Resources that need an icon and text computed for display to the user
- private List decoratorNeedsUpdating = new ArrayList();
-
- // When decorations are computed they are added to this cache via decorated() method
- private Map cache = Collections.synchronizedMap(new HashMap());
-
- // Updater thread, computes decoration labels and images
- private Thread decoratorUpdateThread;
-
- private boolean shutdown = false;
-
- private OverlayIconCache iconCache = new OverlayIconCache();
-
- // Keep track of deconfigured projects
- private Set deconfiguredProjects = new HashSet();
-
- private static class DecoratorOverlayIcon extends OverlayIcon {
- public DecoratorOverlayIcon(Image base, ImageDescriptor[] overlays, int[] locations) {
- super(base, overlays, locations, new Point(base.getBounds().width, base.getBounds().height));
- }
- 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;
- }
- }
- }
- }
-
- /*
- * Return the CVSDecorator instance that is currently enabled.
- * Return null if we don't have a decorator or its not enabled.
- */
- /* package */ static CVSDecorator getActiveCVSDecorator() {
- IDecoratorManager manager = CVSUIPlugin.getPlugin().getWorkbench().getDecoratorManager();
- if (manager.getEnabled(CVSUIPlugin.DECORATOR_ID))
- return (CVSDecorator) manager.getLabelDecorator(CVSUIPlugin.DECORATOR_ID);
- return null;
- }
-
- /*
- * Blanket refresh the displaying of our decorator.
- */
- public static void refresh() {
- CVSDecorator activeDecorator = getActiveCVSDecorator();
-
- if(activeDecorator == null)
- return; //nothing to do, our decorator isn't active
- activeDecorator.clearCache(); //clear the cache of previous decorations so we can compute them anew
-
- //update all displaying of our decorator;
- activeDecorator.fireLabelProviderChanged(new LabelProviderChangedEvent(activeDecorator));
- }
-
- /*
- * Answers null if a provider does not exist or the provider is not a CVS provider. These resources
- * will be ignored by the decorator.
- */
- private static CVSTeamProvider getCVSProviderFor(IResource resource) {
- RepositoryProvider p = RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId());
- if (p == null) {
- return null;
- }
- return (CVSTeamProvider) p;
- }
-
-
- public CVSDecorator() {
- // thread that calculates the decoration for a resource
- decoratorUpdateThread = new Thread(new CVSDecorationRunnable(this), "CVS"); //$NON-NLS-1$
- decoratorUpdateThread.start();
- CVSProviderPlugin.addResourceStateChangeListener(this);
- ResourcesPlugin.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.PRE_AUTO_BUILD);
- }
-
- public String decorateText(String text, Object o) {
- IResource resource = getResource(o);
- if (resource == null || text == null || resource.getType() == IResource.ROOT)
- return text;
- if (getCVSProviderFor(resource) == null)
- return text;
-
- CVSDecoration decoration = (CVSDecoration) cache.get(resource);
-
- if (decoration != null) {
- String format = decoration.getFormat();
- if (format == null) {
- return text;
- } else {
- Map bindings = decoration.getBindings();
- if (bindings.isEmpty())
- return text;
- bindings.put(CVSDecoratorConfiguration.RESOURCE_NAME, text);
- return CVSDecoratorConfiguration.bind(format, bindings);
- }
- } else {
- addResourcesToBeDecorated(new IResource[] { resource });
- return text;
- }
- }
-
- public Image decorateImage(Image image, Object o) {
- IResource resource = getResource(o);
- if (resource == null || image == null || resource.getType() == IResource.ROOT)
- return image;
- if (getCVSProviderFor(resource) == null)
- return image;
-
- CVSDecoration decoration = (CVSDecoration) cache.get(resource);
-
- if (decoration != null) {
- List overlays = decoration.getOverlays();
- int[] locations = decoration.getLocations();
- if (overlays != null) {
- return iconCache.getImageFor(new DecoratorOverlayIcon(image,
- (ImageDescriptor[]) overlays.toArray(new ImageDescriptor[overlays.size()]), locations));
- }
- } else {
- addResourcesToBeDecorated(new IResource[] { resource });
- }
- return image;
- }
-
-
- /*
- * @see IDecorationNotifier#next()
- */
- public synchronized IResource next() {
- try {
- if (shutdown) return null;
-
- if (decoratorNeedsUpdating.isEmpty()) {
- wait();
- }
- // We were awakened.
- if (shutdown) {
- // The decorator was awakened by the plug-in as it was shutting down.
- return null;
- }
- IResource resource = (IResource) decoratorNeedsUpdating.remove(0);
-
- //System.out.println("++ Next: " + resource.getFullPath() + " remaining in cache: " + cache.size());
-
- return resource;
- } catch (InterruptedException e) {
- }
- return null;
- }
-
- /*
- * @see IDecorationNotifier#decorated(IResource[], CVSDecoration[])
- */
- public synchronized void decorated(IResource[] resources, CVSDecoration[] decorations) {
- if(!shutdown) {
- List decorated = new ArrayList();
-
- for (int i = 0; i < resources.length; i++) {
- IResource resource= resources[i];
- if(resource.exists()) {
- cache.put(resource, decorations[i]);
- decorated.add(resource);
- }
- }
- postLabelEvent(new LabelProviderChangedEvent(this, decorated.toArray()));
- }
- }
-
- /*
- * @see IDecorationNotifier#remaining()
- */
- public int remaining() {
- return decoratorNeedsUpdating.size();
- }
- /*
- * Handle resource changes and project description changes
- *
- * @see IResourceChangeListener#resourceChanged(IResourceChangeEvent)
- */
- public void resourceChanged(IResourceChangeEvent event) {
- try {
- final List changedResources = new ArrayList();
- event.getDelta().accept(new IResourceDeltaVisitor() {
- public boolean visit(IResourceDelta delta) throws CoreException {
- IResource resource = delta.getResource();
-
- if(resource.getType()==IResource.ROOT) {
- // continue with the delta
- return true;
- }
-
- if (resource.getType() == IResource.PROJECT) {
- // deconfigure if appropriate (see CVSDecorator#projectDeconfigured(IProject))
- // do this even if there is a provider (this is required since old projects may still have a cvs nature)
- if (deconfiguredProjects.contains(resource)) {
- deconfiguredProjects.remove(resource);
- refresh((IProject)resource);
- }
- // If there is no CVS provider, don't continue
- if (RepositoryProvider.getProvider((IProject)resource, CVSProviderPlugin.getTypeId()) == null) {
- return false;
- }
- }
-
- switch (delta.getKind()) {
- case IResourceDelta.REMOVED:
- // remove the cached decoration for any removed resource
- cache.remove(resource);
- break;
- case IResourceDelta.CHANGED:
- // for changed resources we have to update the decoration
- changedResources.add(resource);
- }
-
- return true;
- }
- });
- resourceStateChanged((IResource[])changedResources.toArray(new IResource[changedResources.size()]));
- changedResources.clear();
- } catch (CoreException e) {
- CVSProviderPlugin.log(e.getStatus());
- }
- }
- /*
- * @see IResourceStateChangeListener#resourceStateChanged(IResource[])
- */
- public void resourceStateChanged(IResource[] changedResources) {
- // add depth first so that update thread processes parents first.
- //System.out.println(">> State Change Event");
- List resources = new ArrayList();
- List noProviderResources = new ArrayList();
- for (int i = 0; i < changedResources.length; i++) {
- // ignore subtrees that aren't associated with a provider, this can happen on import
- // of a new project to CVS.
- IResource resource = changedResources[i];
- if (getCVSProviderFor(resource) == null) {
- // post a changed event but forget any cached information about this resource
- noProviderResources.add(resource);
- }
- resources.addAll(computeParents(resource));
- }
-
- addResourcesToBeDecorated((IResource[]) resources.toArray(new IResource[resources.size()]));
-
- // post label events for resources that cannot or should not be decorated by CVS
- if(!noProviderResources.isEmpty()) {
- List resourcesToUpdate = new ArrayList();
- for (Iterator it = resources.iterator(); it.hasNext();) {
- IResource element = (IResource) it.next();
- resourcesToUpdate.add(element);
- }
- postLabelEvent(new LabelProviderChangedEvent(this, resourcesToUpdate.toArray()));
- }
- }
-
- private void clearCache() {
- cache.clear();
- }
-
- public void refresh(IProject project) {
- final List resources = new ArrayList();
- try {
- project.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) {
- resources.add(resource);
- return true;
- }
- });
- resourceStateChanged((IResource[]) resources.toArray(new IResource[resources.size()]));
- } catch (CoreException e) {
- }
- }
-
- private List computeParents(IResource resource) {
- IResource current = resource;
- List resources = new ArrayList();
- if(CVSUIPlugin.getPlugin().getPreferenceStore().getBoolean(ICVSUIConstants.PREF_CALCULATE_DIRTY)) {
- while (current.getType() != IResource.ROOT) {
- resources.add(current);
- current = current.getParent();
- }
- } else {
- resources.add(current);
- }
- return resources;
- }
-
- private synchronized void addResourcesToBeDecorated(IResource[] resources) {
- if (resources.length > 0) {
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if(!decoratorNeedsUpdating.contains(resource)) {
- decoratorNeedsUpdating.add(resource);
- }
- }
- notify();
- }
- }
-
- /**
- * Returns the resource for the given input object, or
- * null if there is no resource associated with it.
- *
- * @param object the object to find the resource for
- * @return the resource for the given object, or null
- */
- private IResource getResource(Object object) {
- if (object instanceof IResource) {
- return (IResource)object;
- }
- if (object instanceof IAdaptable) {
- return (IResource)((IAdaptable)object).getAdapter(IResource.class);
- }
- return null;
- }
-
- /**
- * Post the label event to the UI thread
- *
- * @param events the events to post
- */
- private void postLabelEvent(final LabelProviderChangedEvent event) {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- fireLabelProviderChanged(event);
- }
- });
- }
-
-
- private void shutdown() {
- shutdown = true;
- // Wake the thread up if it is asleep.
- synchronized (this) {
- notifyAll();
- }
- try {
- // Wait for the decorator thread to finish before returning.
- decoratorUpdateThread.join();
- } catch (InterruptedException e) {
- }
- }
-
- /*
- * @see IBaseLabelProvider#dispose()
- */
- public void dispose() {
- super.dispose();
-
- // terminate decoration thread
- shutdown();
-
- // unregister change listeners
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
- CVSProviderPlugin.removeResourceStateChangeListener(this);
-
- // dispose of images created as overlays
- decoratorNeedsUpdating.clear();
- clearCache();
- iconCache.disposeAll();
- }
- /**
- * @see IResourceStateChangeListener#projectConfigured(IProject)
- */
- public void projectConfigured(IProject project) {
- refresh(project);
- }
-
- /**
- * @see IResourceStateChangeListener#projectDeconfigured(IProject)
- */
- public void projectDeconfigured(IProject project) {
- // Unfortunately, the nature is still associated with the project at this point.
- // Therefore, we will remember that the project has been deconfigured and we will
- // refresh the decorators in the resource delta listener
- deconfiguredProjects.add(project);
- }
-
- public static boolean isDirty(ICVSFile cvsFile) {
- try {
- // file is dirty or file has been merged by an update
- if(!cvsFile.isIgnored()) {
- return cvsFile.isModified();
- } else {
- return false;
- }
- } catch (CVSException e) {
- //if we get an error report it to the log but assume dirty
- CVSUIPlugin.log(e.getStatus());
- return true;
- }
- }
-
- public static boolean isDirty(IFile file) {
- return isDirty(CVSWorkspaceRoot.getCVSFileFor(file));
- }
-
- public static boolean isDirty(IResource resource) {
-
- // No need to decorate non-existant resources
- if (!resource.exists()) return false;
-
- if(resource.getType() == IResource.FILE) {
- return isDirty((IFile) resource);
- }
-
- final CVSException DECORATOR_EXCEPTION = new CVSException(new Status(IStatus.OK, "id", 1, "", null)); //$NON-NLS-1$ //$NON-NLS-2$
- try {
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- cvsResource.accept(new ICVSResourceVisitor() {
- public void visitFile(ICVSFile file) throws CVSException {
- if(isDirty(file)) {
- throw DECORATOR_EXCEPTION;
- }
- }
- public void visitFolder(ICVSFolder folder) throws CVSException {
- if(!folder.exists()) {
- if (folder.isCVSFolder()) {
- // The folder contains outgoing file deletions
- throw DECORATOR_EXCEPTION;
- }
- return;
- }
- if (!folder.isCVSFolder() && !folder.isIgnored()) {
- // new resource, show as dirty
- throw DECORATOR_EXCEPTION;
- }
- folder.acceptChildren(this);
- }
- });
- } catch (CVSException e) {
- //if our exception was caught, we know there's a dirty child
- return e == DECORATOR_EXCEPTION;
- }
- return false;
- }
- /**
- * This method is used to indicate whether a particular resource is a member of
- * a project that is in the process of being deconfigured. Such resources should not
- * be decorated.
- */
- /* package */ boolean isMemberDeconfiguredProject(IResource resource) {
- if (deconfiguredProjects.isEmpty()) return false;
- return deconfiguredProjects.contains(resource.getProject());
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorConfiguration.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorConfiguration.java
deleted file mode 100644
index 53027e294..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorConfiguration.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.Map;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-
-public class CVSDecoratorConfiguration {
-
- // bindings for
- public static final String RESOURCE_NAME = "name"; //$NON-NLS-1$
- public static final String RESOURCE_TAG = "tag"; //$NON-NLS-1$
- public static final String FILE_REVISION = "revision"; //$NON-NLS-1$
- public static final String FILE_KEYWORD = "keyword"; //$NON-NLS-1$
-
- // bindings for repository location
- public static final String REMOTELOCATION_METHOD = "method"; //$NON-NLS-1$
- public static final String REMOTELOCATION_USER = "user"; //$NON-NLS-1$
- public static final String REMOTELOCATION_HOST = "host"; //$NON-NLS-1$
- public static final String REMOTELOCATION_ROOT = "root"; //$NON-NLS-1$
- public static final String REMOTELOCATION_REPOSITORY = "repository"; //$NON-NLS-1$
-
- // bindings for resource states
- public static final String DIRTY_FLAG = "dirty_flag"; //$NON-NLS-1$
- public static final String ADDED_FLAG = "added_flag"; //$NON-NLS-1$
- public static final String DEFAULT_DIRTY_FLAG = ">"; //$NON-NLS-1$
- public static final String DEFAULT_ADDED_FLAG = "*"; //$NON-NLS-1$
-
- // default text decoration formats
- public static final String DEFAULT_FILETEXTFORMAT = "{dirty_flag}{name} {revision} {tag} ({keyword})"; //$NON-NLS-1$
- public static final String DEFAULT_FOLDERTEXTFORMAT = "{dirty_flag}{name} {tag}"; //$NON-NLS-1$
- public static final String DEFAULT_PROJECTTEXTFORMAT = "{dirty_flag}{name} {tag} [{host}]"; //$NON-NLS-1$
-
- // prefix characters that can be removed if the following binding is not found
- private static final char KEYWORD_SEPSPACE = ' ';
- private static final char KEYWORD_SEPCOLON = ':';
- private static final char KEYWORD_SEPAT = '@';
-
- public static String bind(String format, Map bindings) {
- StringBuffer output = new StringBuffer(80);
- int length = format.length();
- int start = -1;
- int end = length;
- while (true) {
- if ((end = format.indexOf('{', start)) > -1) {
- output.append(format.substring(start + 1, end));
- if ((start = format.indexOf('}', end)) > -1) {
- String s = (String)bindings.get(format.substring(end + 1, start));
- if(s!=null) {
- output.append(s);
- } else {
- // support for removing prefix character if binding is null
- int curLength = output.length();
- if(curLength>0) {
- char c = output.charAt(curLength - 1);
- if(c == KEYWORD_SEPCOLON || c == KEYWORD_SEPAT) {
- output.deleteCharAt(curLength - 1);
- }
- }
- }
- } else {
- output.append(format.substring(end, length));
- break;
- }
- } else {
- output.append(format.substring(start + 1, length));
- break;
- }
- }
- return output.toString();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorPreferencesPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorPreferencesPage.java
deleted file mode 100644
index 9ab33137b..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorPreferencesPage.java
+++ /dev/null
@@ -1,403 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-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.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.dialogs.ListSelectionDialog;
-
-public class CVSDecoratorPreferencesPage extends PreferencePage implements IWorkbenchPreferencePage {
-
- private Button imageShowDirty;
- private Button imageShowHasRemote;
- private Button imageShowAdded;
- private Button imageShowNewResource;
-
- private Text fileTextFormat;
- private Text fileTextFormatExample;
-
- private Text folderTextFormat;
- private Text folderTextFormatExample;
-
- private Text projectTextFormat;
- private Text projectTextFormatExample;
-
- private Text dirtyFlag;
- private Text addedFlag;
-
- private Button showDirty;
-
- class StringPair {
- String s1;
- String s2;
- }
-
- class TextPair {
- TextPair(Text t1, Text t2) {
- this.t1 = t1;
- this.t2 = t2;
- }
- Text t1;
- Text t2;
- }
-
- protected TextPair createFormatEditorControl(Composite composite, String title, String buttonText, final Map supportedBindings) {
- createLabel(composite, title, 1);
- Text format = new Text(composite, SWT.BORDER);
- format.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- format.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- updateExamples();
- }
- });
- Button b = new Button(composite, SWT.NONE);
- b.setText(buttonText);
- 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, b.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- b.setLayoutData(data);
- final Text formatToInsert = format;
- b.addListener(SWT.Selection, new Listener() {
- public void handleEvent (Event event) {
- addVariables(formatToInsert, supportedBindings);
- }
- });
-
- createLabel(composite, Policy.bind("Example__1"), 1); //$NON-NLS-1$
- Text example = new Text(composite, SWT.BORDER);
- example.setEditable(false);
- example.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- createLabel(composite, "", 1); // spacer //$NON-NLS-1$
- return new TextPair(format, example);
- }
-
- protected void updateExamples() {
- String example = ""; //$NON-NLS-1$
- Map bindings = new HashMap();
- try {
- ICVSRepositoryLocation location = CVSRepositoryLocation.fromString(":pserver:username@host.acme.org:/home/cvsroot"); //$NON-NLS-1$
- bindings.put(CVSDecoratorConfiguration.RESOURCE_TAG, "v2_0"); //$NON-NLS-1$
- bindings.put(CVSDecoratorConfiguration.FILE_KEYWORD,
- Command.KSUBST_TEXT.getShortDisplayText()); //$NON-NLS-1$
- bindings.put(CVSDecoratorConfiguration.FILE_REVISION, "1.34"); //$NON-NLS-1$
- bindings.put(CVSDecoratorConfiguration.DIRTY_FLAG, dirtyFlag.getText());
- bindings.put(CVSDecoratorConfiguration.ADDED_FLAG, addedFlag.getText());
- bindings.put(CVSDecoratorConfiguration.REMOTELOCATION_HOST, location.getHost());
- bindings.put(CVSDecoratorConfiguration.REMOTELOCATION_METHOD, location.getMethod().getName());
- bindings.put(CVSDecoratorConfiguration.REMOTELOCATION_USER, location.getUsername());
- bindings.put(CVSDecoratorConfiguration.REMOTELOCATION_ROOT, location.getRootDirectory());
- bindings.put(CVSDecoratorConfiguration.REMOTELOCATION_REPOSITORY, "org.eclipse.project1"); //$NON-NLS-1$
- } catch(CVSException e) {
- example = e.getMessage();
- }
- bindings.put(CVSDecoratorConfiguration.RESOURCE_NAME, "file.txt"); //$NON-NLS-1$
- setTextFormatExample(bindings);
- bindings.remove(CVSDecoratorConfiguration.RESOURCE_NAME);
- bindings.put(CVSDecoratorConfiguration.RESOURCE_NAME, "folder"); //$NON-NLS-1$
- setFolderFormatExample(bindings);
- bindings.remove(CVSDecoratorConfiguration.RESOURCE_NAME);
- bindings.put(CVSDecoratorConfiguration.RESOURCE_NAME, "Project"); //$NON-NLS-1$
- setProjectFormatExample(bindings);
- }
-
- /**
- * @see PreferencePage#createContents(Composite)
- */
- protected Control createContents(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout= new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData());
-
- // file text decoration options
-
- Group fileTextGroup = new Group(composite, SWT.NULL);
- layout = new GridLayout();
- layout.numColumns = 3;
- fileTextGroup.setLayout(layout);
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- fileTextGroup.setLayoutData(data);
- fileTextGroup.setText(Policy.bind("Text_Labels_12")); //$NON-NLS-1$
- createLabel(fileTextGroup, Policy.bind("Select_the_format_for_file,_folders,_and_project_text_labels__13"), 3); //$NON-NLS-1$
-
- TextPair format = createFormatEditorControl(fileTextGroup, Policy.bind("&File_Format__14"), Policy.bind("Add_&Variables_15"), getFileBindingDescriptions()); //$NON-NLS-1$ //$NON-NLS-2$
- fileTextFormat = format.t1;
- fileTextFormatExample = format.t2;
- format = createFormatEditorControl(fileTextGroup, Policy.bind("F&older_Format__16"), Policy.bind("Add_Varia&bles_17"), getFolderBindingDescriptions()); //$NON-NLS-1$ //$NON-NLS-2$
- folderTextFormat = format.t1;
- folderTextFormatExample = format.t2;
- format = createFormatEditorControl(fileTextGroup, Policy.bind("&Project_Format__18"), Policy.bind("Add_Variable&s_19"), getFolderBindingDescriptions()); //$NON-NLS-1$ //$NON-NLS-2$
- projectTextFormat = format.t1;
- projectTextFormatExample = format.t2;
-
- createLabel(fileTextGroup, Policy.bind("&Label_decoration_for_outgoing__20"), 1); //$NON-NLS-1$
- dirtyFlag = new Text(fileTextGroup, SWT.BORDER);
- dirtyFlag.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- dirtyFlag.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- updateExamples();
- }
- });
- createLabel(fileTextGroup, "", 1); // spacer //$NON-NLS-1$
-
- createLabel(fileTextGroup, Policy.bind("Label_decorat&ion_for_added__22"), 1); //$NON-NLS-1$
- addedFlag = new Text(fileTextGroup, SWT.BORDER);
- addedFlag.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- addedFlag.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- updateExamples();
- }
- });
-
- createLabel(fileTextGroup, "", 1); // spacer //$NON-NLS-1$
-
- // image decoration options
-
- Group imageGroup = new Group(composite, SWT.NULL);
- layout = new GridLayout();
- imageGroup.setLayout(layout);
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- imageGroup.setLayoutData(data);
- imageGroup.setText(Policy.bind("Icon_Overlays_24")); //$NON-NLS-1$
- imageShowDirty = createCheckBox(imageGroup, Policy.bind("Sho&w_outgoing_25")); //$NON-NLS-1$
- imageShowHasRemote = createCheckBox(imageGroup, Policy.bind("Show_has_&remote_26")); //$NON-NLS-1$
- imageShowAdded = createCheckBox(imageGroup, Policy.bind("S&how_is_added_27")); //$NON-NLS-1$
- imageShowNewResource = createCheckBox(imageGroup, Policy.bind("CVSDecoratorPreferencesPage.newResources")); //$NON-NLS-1$
-
- showDirty = createCheckBox(composite, Policy.bind("&Compute_deep_outgoing_state_for_folders_(disabling_this_will_improve_decorator_performance)_28")); //$NON-NLS-1$
-
- initializeValues();
- return composite;
- }
-
- private Label createLabel(Composite parent, String text, int span) {
- Label label = new Label(parent, SWT.LEFT);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = span;
- data.horizontalAlignment = GridData.FILL;
- label.setLayoutData(data);
- return label;
- }
-
- private Button createCheckBox(Composite group, String label) {
- Button button = new Button(group, SWT.CHECK);
- button.setText(label);
- return button;
- }
-
- protected void setTextFormatExample(Map bindings) {
- String example = CVSDecoratorConfiguration.bind(fileTextFormat.getText(), bindings);
- fileTextFormatExample.setText(example);
- }
-
- protected void setFolderFormatExample(Map bindings) {
- String example = CVSDecoratorConfiguration.bind(folderTextFormat.getText(), bindings);
- folderTextFormatExample.setText(example);
- }
-
- protected void setProjectFormatExample(Map bindings) {
- String example = CVSDecoratorConfiguration.bind(projectTextFormat.getText(), bindings);
- projectTextFormatExample.setText(example);
- }
-
- /**
- * Initializes states of the controls from the preference store.
- */
- private void initializeValues() {
- IPreferenceStore store = getPreferenceStore();
-
- fileTextFormat.setText(store.getString(ICVSUIConstants.PREF_FILETEXT_DECORATION));
- folderTextFormat.setText(store.getString(ICVSUIConstants.PREF_FOLDERTEXT_DECORATION));
- projectTextFormat.setText(store.getString(ICVSUIConstants.PREF_PROJECTTEXT_DECORATION));
-
- addedFlag.setText(store.getString(ICVSUIConstants.PREF_ADDED_FLAG));
- dirtyFlag.setText(store.getString(ICVSUIConstants.PREF_DIRTY_FLAG));
-
- imageShowDirty.setSelection(store.getBoolean(ICVSUIConstants.PREF_SHOW_DIRTY_DECORATION));
- imageShowAdded.setSelection(store.getBoolean(ICVSUIConstants.PREF_SHOW_ADDED_DECORATION));
- imageShowHasRemote.setSelection(store.getBoolean(ICVSUIConstants.PREF_SHOW_HASREMOTE_DECORATION));
- imageShowNewResource.setSelection(store.getBoolean(ICVSUIConstants.PREF_SHOW_NEWRESOURCE_DECORATION));
-
- showDirty.setSelection(store.getBoolean(ICVSUIConstants.PREF_CALCULATE_DIRTY));
-
- setValid(true);
- }
-
- /**
- * @see IWorkbenchPreferencePage#init(IWorkbench)
- */
- public void init(IWorkbench workbench) {
- }
-
- /**
- * 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(ICVSUIConstants.PREF_FILETEXT_DECORATION, fileTextFormat.getText());
- store.setValue(ICVSUIConstants.PREF_FOLDERTEXT_DECORATION, folderTextFormat.getText());
- store.setValue(ICVSUIConstants.PREF_PROJECTTEXT_DECORATION, projectTextFormat.getText());
-
- store.setValue(ICVSUIConstants.PREF_ADDED_FLAG, addedFlag.getText());
- store.setValue(ICVSUIConstants.PREF_DIRTY_FLAG, dirtyFlag.getText());
-
- store.setValue(ICVSUIConstants.PREF_SHOW_DIRTY_DECORATION, imageShowDirty.getSelection());
- store.setValue(ICVSUIConstants.PREF_SHOW_ADDED_DECORATION, imageShowAdded.getSelection());
- store.setValue(ICVSUIConstants.PREF_SHOW_HASREMOTE_DECORATION, imageShowHasRemote.getSelection());
- store.setValue(ICVSUIConstants.PREF_SHOW_NEWRESOURCE_DECORATION, imageShowNewResource.getSelection());
-
- store.setValue(ICVSUIConstants.PREF_CALCULATE_DIRTY, showDirty.getSelection());
-
- CVSDecorator.refresh();
-
- CVSUIPlugin.getPlugin().savePluginPreferences();
- return true;
- }
-
- /**
- * Defaults was clicked. Restore the CVS preferences to
- * their default values
- */
- protected void performDefaults() {
- super.performDefaults();
- IPreferenceStore store = getPreferenceStore();
-
- fileTextFormat.setText(store.getDefaultString(ICVSUIConstants.PREF_FILETEXT_DECORATION));
- folderTextFormat.setText(store.getDefaultString(ICVSUIConstants.PREF_FOLDERTEXT_DECORATION));
- projectTextFormat.setText(store.getDefaultString(ICVSUIConstants.PREF_PROJECTTEXT_DECORATION));
-
- addedFlag.setText(store.getDefaultString(ICVSUIConstants.PREF_ADDED_FLAG));
- dirtyFlag.setText(store.getDefaultString(ICVSUIConstants.PREF_DIRTY_FLAG));
-
- imageShowDirty.setSelection(store.getDefaultBoolean(ICVSUIConstants.PREF_SHOW_DIRTY_DECORATION));
- imageShowAdded.setSelection(store.getDefaultBoolean(ICVSUIConstants.PREF_SHOW_ADDED_DECORATION));
- imageShowHasRemote.setSelection(store.getDefaultBoolean(ICVSUIConstants.PREF_SHOW_HASREMOTE_DECORATION));
- imageShowNewResource.setSelection(store.getDefaultBoolean(ICVSUIConstants.PREF_SHOW_NEWRESOURCE_DECORATION));
-
- showDirty.setSelection(store.getDefaultBoolean(ICVSUIConstants.PREF_CALCULATE_DIRTY));
- }
-
- /**
- * 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 CVSUIPlugin.getPlugin().getPreferenceStore();
- }
-
- /**
- * Add another project to the list at the end.
- */
- private void addVariables(Text target, Map bindings) {
-
- final List variables = new ArrayList(bindings.size());
-
- ILabelProvider labelProvider = new LabelProvider() {
- public String getText(Object element) {
- return ((StringPair)element).s1 + " - " + ((StringPair)element).s2; //$NON-NLS-1$
- }
- };
-
- IStructuredContentProvider contentsProvider = new IStructuredContentProvider() {
- public Object[] getElements(Object inputElement) {
- return (Object[]) variables.toArray(new StringPair[variables.size()]);
- }
- public void dispose() {}
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
- };
-
- for (Iterator it = bindings.keySet().iterator(); it.hasNext();) {
- StringPair variable = new StringPair();
- variable.s1 = (String) it.next(); // variable
- variable.s2 = (String) bindings.get(variable.s1); // description
- variables.add(variable);
- }
-
- ListSelectionDialog dialog =
- new ListSelectionDialog(
- this.getShell(),
- this,
- contentsProvider,
- labelProvider,
- Policy.bind("Select_the_&variables_to_add_to_the_decoration_format__30")); //$NON-NLS-1$
- dialog.setTitle(Policy.bind("Add_Variables_31")); //$NON-NLS-1$
- if (dialog.open() != dialog.OK)
- return;
-
- Object[] result = dialog.getResult();
-
- for (int i = 0; i < result.length; i++) {
- target.insert("{"+((StringPair)result[i]).s1 +"}"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- private Map getFolderBindingDescriptions() {
- Map bindings = new HashMap();
- bindings.put(CVSDecoratorConfiguration.RESOURCE_NAME, Policy.bind("name_of_the_resource_being_decorated_34")); //$NON-NLS-1$
- bindings.put(CVSDecoratorConfiguration.RESOURCE_TAG, Policy.bind("the_tag_applied_to_the_resource_(version,_branch,_or_date)_35")); //$NON-NLS-1$
- bindings.put(CVSDecoratorConfiguration.REMOTELOCATION_HOST, Policy.bind("the_repository_location__s_hostname_36")); //$NON-NLS-1$
- bindings.put(CVSDecoratorConfiguration.REMOTELOCATION_METHOD, Policy.bind("the_connection_method_(e.g._pserver,_ssh)_37")); //$NON-NLS-1$
- bindings.put(CVSDecoratorConfiguration.REMOTELOCATION_USER, Policy.bind("user_name_for_the_connection_38")); //$NON-NLS-1$
- bindings.put(CVSDecoratorConfiguration.REMOTELOCATION_ROOT, Policy.bind("repository_home_directory_on_server_39")); //$NON-NLS-1$
- bindings.put(CVSDecoratorConfiguration.REMOTELOCATION_REPOSITORY, Policy.bind("root_relative_directory_40")); //$NON-NLS-1$
- bindings.put(CVSDecoratorConfiguration.DIRTY_FLAG, Policy.bind("flag_indicating_that_the_folder_has_a_child_resource_with_outgoing_changes_41")); //$NON-NLS-1$
- return bindings;
- }
-
- private Map getFileBindingDescriptions() {
- Map bindings = new HashMap();
- bindings.put(CVSDecoratorConfiguration.RESOURCE_NAME, Policy.bind("name_of_the_resource_being_decorated_42")); //$NON-NLS-1$
- bindings.put(CVSDecoratorConfiguration.RESOURCE_TAG, Policy.bind("the_tag_applied_to_the_resource_43")); //$NON-NLS-1$
- bindings.put(CVSDecoratorConfiguration.FILE_KEYWORD, Policy.bind("keyword_subsitution_rule_for_the_resource_44")); //$NON-NLS-1$
- bindings.put(CVSDecoratorConfiguration.FILE_REVISION, Policy.bind("last_revision_loaded_into_workspace_45")); //$NON-NLS-1$
- bindings.put(CVSDecoratorConfiguration.DIRTY_FLAG, Policy.bind("flag_indicating_that_the_file_has_outgoing_changes_46")); //$NON-NLS-1$
- bindings.put(CVSDecoratorConfiguration.ADDED_FLAG, Policy.bind("flag_indicating_that_the_file_has_been_added_to_the_server_47")); //$NON-NLS-1$
- return bindings;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSFilePropertiesPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSFilePropertiesPage.java
deleted file mode 100644
index 5c0d0257e..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSFilePropertiesPage.java
+++ /dev/null
@@ -1,141 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.text.DateFormat;
-import java.util.Date;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IAdaptable;
-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.swt.widgets.Label;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.CVSDateFormatter;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-public class CVSFilePropertiesPage extends PropertyPage {
- IFile file;
-
- /*
- * @see PreferencesPage#createContents
- */
- protected Control createContents(Composite parent) {
- initialize();
- noDefaultAndApplyButton();
- Composite composite = new Composite(parent, SWT.NULL);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
-
- try {
- ICVSFile cvsResource = CVSWorkspaceRoot.getCVSFileFor(file);
- if (!cvsResource.isManaged()) {
- if (cvsResource.isIgnored()) {
- createLabel(composite, Policy.bind("CVSFilePropertiesPage.ignored")); //$NON-NLS-1$
- } else {
- createLabel(composite, Policy.bind("CVSFilePropertiesPage.notManaged")); //$NON-NLS-1$
- }
- createLabel(composite, ""); //$NON-NLS-1$
- return composite;
- }
- ResourceSyncInfo syncInfo = cvsResource.getSyncInfo();
-
-
-
- if (syncInfo.isAdded()) {
- createLabel(composite, Policy.bind("CVSFilePropertiesPage.isAdded"), 2); //$NON-NLS-1$
- } else {
- // Base
- createLabel(composite, Policy.bind("CVSFilePropertiesPage.baseRevision")); //$NON-NLS-1$
- createLabel(composite, syncInfo.getRevision());
- Date baseTime = syncInfo.getTimeStamp();
- if (baseTime != null) {
- createLabel(composite, Policy.bind("CVSFilePropertiesPage.baseTimestamp")); //$NON-NLS-1$
- createLabel(composite, DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL).format(syncInfo.getTimeStamp()));
- }
-
- // Modified
- createLabel(composite, Policy.bind("CVSFilePropertiesPage.modified")); //$NON-NLS-1$
- createLabel(composite, cvsResource.isModified() ? Policy.bind("yes") : Policy.bind("no")); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- // Keyword Mode
- createLabel(composite, Policy.bind("CVSFilePropertiesPage.keywordMode")); //$NON-NLS-1$
- createLabel(composite, syncInfo.getKeywordMode().getLongDisplayText());
-
- // Tag
- createLabel(composite, Policy.bind("CVSFilePropertiesPage.tag")); //$NON-NLS-1$
- CVSTag tag = syncInfo.getTag();
- if (tag == null) {
- createLabel(composite, Policy.bind("CVSFilePropertiesPage.none")); //$NON-NLS-1$
- } else {
- // In an entry file we can't differentiate branch and version tags. They both appear
- // as T<tagName>. Instead just display the tag name to the user.
- createLabel(composite, tag.getName());
- }
-
- // Permissions
- createLabel(composite, Policy.bind("CVSFilePropertiesPage.permissions")); //$NON-NLS-1$
- String permissions = syncInfo.getPermissions();
- if (permissions == null) {
- createLabel(composite, Policy.bind("CVSFilePropertiesPage.notAvailable")); //$NON-NLS-1$
- } else {
- createLabel(composite, syncInfo.getPermissions());
- }
- } catch (TeamException e) {
- // Display error text
- createLabel(composite, Policy.bind("CVSFilePropertiesPage.error")); //$NON-NLS-1$
- createLabel(composite, ""); //$NON-NLS-1$
- }
- 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, int span) {
- Label label = new Label(parent, SWT.LEFT);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = span;
- data.horizontalAlignment = GridData.FILL;
- label.setLayoutData(data);
- return label;
- }
- protected Label createLabel(Composite parent, String text) {
- return createLabel(parent, text, 1);
- }
- /**
- * Initializes the page
- */
- private void initialize() {
- // Get the file that is the source of this property page
- file = null;
- IAdaptable element = getElement();
- if (element instanceof IFile) {
- file = (IFile)element;
- } else {
- Object adapter = element.getAdapter(IFile.class);
- if (adapter instanceof IFile) {
- file = (IFile)adapter;
- }
- }
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSFolderPropertiesPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSFolderPropertiesPage.java
deleted file mode 100644
index 525812488..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSFolderPropertiesPage.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.runtime.IAdaptable;
-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.swt.widgets.Label;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-public class CVSFolderPropertiesPage extends PropertyPage {
-
- IFolder folder;
-
- /**
- * @see PreferencePage#createContents(Composite)
- */
- protected Control createContents(Composite parent) {
- initialize();
- noDefaultAndApplyButton();
- Composite composite = new Composite(parent, SWT.NULL);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
-
- try {
- ICVSFolder cvsResource = CVSWorkspaceRoot.getCVSFolderFor(folder);
- if (!cvsResource.isManaged()) {
- if (cvsResource.isIgnored()) {
- createLabel(composite, Policy.bind("CVSFolderPropertiesPage.ignored"), 2); //$NON-NLS-1$
- } else {
- createLabel(composite, Policy.bind("CVSFolderPropertiesPage.notManaged"), 2); //$NON-NLS-1$
- }
- } else {
- FolderSyncInfo syncInfo = cvsResource.getFolderSyncInfo();
- createLabel(composite, Policy.bind("CVSFolderPropertiesPage.root")); //$NON-NLS-1$
- createLabel(composite, syncInfo.getRoot());
- createLabel(composite, Policy.bind("CVSFolderPropertiesPage.repository")); //$NON-NLS-1$
- createLabel(composite, syncInfo.getRepository());
-
- // Tag
- createLabel(composite, Policy.bind("CVSFilePropertiesPage.tag")); //$NON-NLS-1$
- CVSTag tag = syncInfo.getTag();
- if (tag == null) {
- createLabel(composite, Policy.bind("CVSFilePropertiesPage.none")); //$NON-NLS-1$
- } else {
- switch (tag.getType()) {
- case CVSTag.HEAD:
- createLabel(composite, tag.getName());
- break;
- case CVSTag.VERSION:
- createLabel(composite, Policy.bind("CVSFilePropertiesPage.version", tag.getName())); //$NON-NLS-1$
- break;
- case CVSTag.BRANCH:
- createLabel(composite, Policy.bind("CVSFilePropertiesPage.branch", tag.getName())); //$NON-NLS-1$
- break;
- case CVSTag.DATE:
- createLabel(composite, Policy.bind("CVSFilePropertiesPage.date", tag.getName())); //$NON-NLS-1$
- break;
- }
- }
-
- // Static-ness
- if (syncInfo.getIsStatic()) {
- createLabel(composite, Policy.bind("CVSFolderPropertiesPage.static")); //$NON-NLS-1$
- createLabel(composite, syncInfo.getIsStatic() ? Policy.bind("yes") : Policy.bind("no")); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- }
- } catch (TeamException e) {
- // Display error text
- createLabel(composite, Policy.bind("CVSFilePropertiesPage.error"), 2); //$NON-NLS-1$
- }
- 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, int span) {
- Label label = new Label(parent, SWT.LEFT);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = span;
- data.horizontalAlignment = GridData.FILL;
- label.setLayoutData(data);
- return label;
- }
-
- protected Label createLabel(Composite parent, String text) {
- return createLabel(parent, text, 1);
- }
- /**
- * Initializes the page
- */
- private void initialize() {
- // Get the file that is the source of this property page
- folder = null;
- IAdaptable element = getElement();
- if (element instanceof IFolder) {
- folder = (IFolder)element;
- } else {
- Object adapter = element.getAdapter(IFolder.class);
- if (adapter instanceof IFolder) {
- folder = (IFolder)adapter;
- }
- }
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLocalCompareEditorInput.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLocalCompareEditorInput.java
deleted file mode 100644
index f38b90806..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLocalCompareEditorInput.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteResource;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.resources.CVSRemoteSyncElement;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.util.Assert;
-import org.eclipse.team.internal.ccvs.ui.sync.CVSSyncCompareInput;
-import org.eclipse.team.internal.ui.sync.SyncView;
-
-public class CVSLocalCompareEditorInput extends CVSSyncCompareInput {
- CVSTag[] tags;
-
- public CVSLocalCompareEditorInput(IResource[] resources, CVSTag[] tags) {
- super(resources);
- Assert.isTrue(resources.length == tags.length);
- this.tags = tags;
- }
-
- public CVSLocalCompareEditorInput(IResource[] resources, CVSTag tag) {
- super(resources);
- Assert.isTrue(tag != null);
- this.tags = new CVSTag[] {tag};
- }
-
- public Viewer createDiffViewer(Composite parent) {
- Viewer viewer = super.createDiffViewer(parent);
- getViewer().syncModeChanged(SyncView.SYNC_COMPARE);
- return viewer;
- }
-
- protected IRemoteSyncElement[] createSyncElements(IProgressMonitor monitor) throws TeamException {
- IResource[] resources = getResources();
- IRemoteSyncElement[] trees = new IRemoteSyncElement[resources.length];
- int work = 100 * resources.length;
- monitor.beginTask(null, work);
- try {
- for (int i = 0; i < trees.length; i++) {
- IResource resource = resources[i];
- CVSTag tag;
- if(tags.length != resources.length) {
- tag = tags[0];
- } else {
- tag = tags[i];
- }
- IRemoteResource remote = CVSWorkspaceRoot.getRemoteTree(resource, tag, Policy.subMonitorFor(monitor, 50));
- trees[i] = new CVSRemoteSyncElement(false /* two-way */, resource, null, remote);
- }
- } finally {
- monitor.done();
- }
- //getViewer().resetFilters();
- return trees;
- }
-
- public String getTitle() {
- return Policy.bind("CVSLocalCompareEditorInput.title", tags[0].getName()); //$NON-NLS-1$
- }
-
- public boolean isSaveNeeded() {
- return false;
- }
-
- protected void contentsChanged(ICompareInput source) {
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPerspective.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPerspective.java
deleted file mode 100644
index 8710d22f2..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPerspective.java
+++ /dev/null
@@ -1 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui; /* * (c) Copyright IBM Corp. 2000, 2002. * All Rights Reserved. */ import org.eclipse.ui.*; public class CVSPerspective implements IPerspectiveFactory { /* (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(IPageLayout.ID_RES_NAV); layout.addShowViewShortcut(IPageLayout.ID_OUTLINE); layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST); layout.addShowViewShortcut(HistoryView.VIEW_ID); layout.addShowViewShortcut(RepositoriesView.VIEW_ID); } /** * Defines the initial layout for a page. */ public void defineLayout(IPageLayout layout) { String editorArea = layout.getEditorArea(); IFolderLayout top = layout.createFolder("top", IPageLayout.LEFT, 0.40f, editorArea); //$NON-NLS-1$ top.addView(RepositoriesView.VIEW_ID); layout.addView(HistoryView.VIEW_ID, IPageLayout.BOTTOM, 0.70f, editorArea); layout.setEditorAreaVisible(true); } } \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPreferencesPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPreferencesPage.java
deleted file mode 100644
index f2bbf27c2..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPreferencesPage.java
+++ /dev/null
@@ -1,458 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.FontMetrics;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.QuietOption;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * CVS Preference Page
- *
- * Allows the configuration of CVS specific options.
- * The currently supported options are:
- * - Allow loading of CVS administration directory (CVSROOT)
- *
- * There are currently a couple of deficiencies:
- * 1. The Repository view is not refreshed when the show CVSROOT option is changed
- * 2. There is no help associated with the page
- */
-public class CVSPreferencesPage extends PreferencePage implements IWorkbenchPreferencePage {
-
- private Button pruneEmptyDirectoriesField;
- private Text timeoutValue;
- private Combo quietnessCombo;
- private Combo compressionLevelCombo;
- private Combo ksubstCombo;
- private List ksubstOptions;
- private Button considerContentsInCompare;
- private Button showMarkers;
- private Button replaceUnmanaged;
-
- private Button never;
- private Button prompt;
- private Button auto;
-
- public CVSPreferencesPage() {
- // sort the options by display text
- setDescription(Policy.bind("CVSPreferencePage.description")); //$NON-NLS-1$
- KSubstOption[] options = KSubstOption.getAllKSubstOptions();
- this.ksubstOptions = new ArrayList();
- for (int i = 0; i < options.length; i++) {
- KSubstOption option = options[i];
- if (! option.isBinary()) {
- ksubstOptions.add(option);
- }
- }
- Collections.sort(ksubstOptions, new Comparator() {
- public int compare(Object a, Object b) {
- String aKey = ((KSubstOption) a).getLongDisplayText();
- String bKey = ((KSubstOption) b).getLongDisplayText();
- return aKey.compareTo(bKey);
- }
- });
- }
-
- /**
- * Utility method that creates a combo box
- *
- * @param parent the parent for the new label
- * @return the new widget
- */
- protected Combo createCombo(Composite parent, int widthChars) {
- Combo combo = new Combo(parent, SWT.READ_ONLY);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- GC gc = new GC(combo);
- gc.setFont(combo.getFont());
- FontMetrics fontMetrics = gc.getFontMetrics();
- data.widthHint = Dialog.convertWidthInCharsToPixels(fontMetrics, widthChars);
- gc.dispose();
- combo.setLayoutData(data);
- return combo;
- }
-
- /**
- * Utility method that creates a combo box
- *
- * @param parent the parent for the new label
- * @return the new widget
- */
- protected Combo createCombo(Composite parent) {
- Combo combo = new Combo(parent, SWT.READ_ONLY);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
- combo.setLayoutData(data);
- return combo;
- }
-
- /**
- * 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
- */
- private Composite createComposite(Composite parent, int numColumns) {
- Composite composite = new Composite(parent, SWT.NULL);
-
- //GridLayout
- GridLayout layout = new GridLayout();
- layout.numColumns = numColumns;
- 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);
- 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 = 2;
- button.setLayoutData(data);
- return button;
- }
-
- /**
- * @see PreferencePage#createContents(Composite)
- */
- protected Control createContents(Composite parent) {
- Composite composite = createComposite(parent, 2);
-
- pruneEmptyDirectoriesField = createCheckBox(composite, Policy.bind("CVSPreferencePage.pruneEmptyDirectories")); //$NON-NLS-1$
- considerContentsInCompare = createCheckBox(composite, Policy.bind("CVSPreferencePage.considerContentsInCompare")); //$NON-NLS-1$
- showMarkers = createCheckBox(composite, Policy.bind("CVSPreferencePage.showAddRemoveMarkers")); //$NON-NLS-1$
- replaceUnmanaged = createCheckBox(composite, Policy.bind("CVSPreferencePage.replaceUnmanaged")); //$NON-NLS-1$
-
- createLabel(composite, ""); createLabel(composite, ""); //$NON-NLS-1$ //$NON-NLS-2$
-
- createLabel(composite, Policy.bind("CVSPreferencePage.timeoutValue")); //$NON-NLS-1$
- timeoutValue = createTextField(composite);
- timeoutValue.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- // Parse the timeout value
- try {
- int x = Integer.parseInt(timeoutValue.getText());
- if (x >= 0) {
- setErrorMessage(null);
- setValid(true);
- } else {
- setErrorMessage(Policy.bind("CVSPreferencesPage.Timeout_must_not_be_negative_1")); //$NON-NLS-1$
- setValid(false);
- }
- } catch (NumberFormatException ex) {
- setErrorMessage(Policy.bind("CVSPreferencesPage.Timeout_must_be_a_number_2")); //$NON-NLS-1$
- setValid(false);
- }
- }
- });
-
- createLabel(composite, Policy.bind("CVSPreferencePage.quietness")); //$NON-NLS-1$
- quietnessCombo = createCombo(composite);
-
- createLabel(composite, Policy.bind("CVSPreferencePage.compressionLevel")); //$NON-NLS-1$
- compressionLevelCombo = createCombo(composite);
-
- createLabel(composite, Policy.bind("CVSPreferencePage.defaultTextKSubst")); //$NON-NLS-1$
- int chars = 0;
- for (Iterator it = ksubstOptions.iterator(); it.hasNext();) {
- KSubstOption option = (KSubstOption) it.next();
- int c = option.getLongDisplayText().length();
- if(c > chars) {
- chars = c;
- }
- }
- ksubstCombo = createCombo(composite, chars);
-
- createLabel(composite, ""); createLabel(composite, ""); //$NON-NLS-1$ //$NON-NLS-2$
-
- createSaveCombo(composite);
-
- initializeValues();
-
- quietnessCombo.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- if (getQuietnessOptionFor(quietnessCombo.getSelectionIndex()).equals(Command.SILENT)) {
- MessageDialog.openWarning(getShell(), Policy.bind("CVSPreferencePage.silentWarningTitle"), Policy.bind("CVSPreferencePage.silentWarningMessage")); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- public void widgetDefaultSelected(SelectionEvent e) {
- widgetSelected(e);
- }
- });
-
- WorkbenchHelp.setHelp(pruneEmptyDirectoriesField, IHelpContextIds.PREF_PRUNE);
- WorkbenchHelp.setHelp(compressionLevelCombo, IHelpContextIds.PREF_COMPRESSION);
- WorkbenchHelp.setHelp(quietnessCombo, IHelpContextIds.PREF_QUIET);
- WorkbenchHelp.setHelp(ksubstCombo, IHelpContextIds.PREF_KEYWORDMODE);
- WorkbenchHelp.setHelp(timeoutValue, IHelpContextIds.PREF_COMMS_TIMEOUT);
- WorkbenchHelp.setHelp(considerContentsInCompare, IHelpContextIds.PREF_CONSIDER_CONTENT);
- WorkbenchHelp.setHelp(replaceUnmanaged, IHelpContextIds.PREF_REPLACE_DELETE_UNMANAGED);
- WorkbenchHelp.setHelp(showMarkers, IHelpContextIds.PREF_MARKERS_ENABLED);
-
- 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
- */
- private Label createLabel(Composite parent, String text) {
- Label label = new Label(parent, SWT.LEFT);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = 1;
- data.horizontalAlignment = GridData.FILL;
- label.setLayoutData(data);
- return label;
- }
- /**
- * Creates an new text widget and sets the default
- * layout data.
- *
- * @param group the composite in which to create the checkbox
- * @return the new text widget
- */
- private Text createTextField(Composite group) {
- Text text = new Text(group, SWT.BORDER);
- text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- return text;
- }
- /**
- * Initializes states of the controls from the preference store.
- */
- private void initializeValues() {
- IPreferenceStore store = getPreferenceStore();
- pruneEmptyDirectoriesField.setSelection(store.getBoolean(ICVSUIConstants.PREF_PRUNE_EMPTY_DIRECTORIES));
- timeoutValue.setText(new Integer(store.getInt(ICVSUIConstants.PREF_TIMEOUT)).toString());
- quietnessCombo.add(Policy.bind("CVSPreferencePage.notquiet")); //$NON-NLS-1$
- quietnessCombo.add(Policy.bind("CVSPreferencePage.somewhatquiet")); //$NON-NLS-1$
- quietnessCombo.add(Policy.bind("CVSPreferencePage.reallyquiet")); //$NON-NLS-1$
- quietnessCombo.select(store.getInt(ICVSUIConstants.PREF_QUIETNESS));
- for (int i = 0; i < 10; ++i) {
- compressionLevelCombo.add(Policy.bind("CVSPreferencePage.level" + i)); //$NON-NLS-1$
- }
- compressionLevelCombo.select(store.getInt(ICVSUIConstants.PREF_COMPRESSION_LEVEL));
- for (Iterator it = ksubstOptions.iterator(); it.hasNext();) {
- KSubstOption option = (KSubstOption) it.next();
- ksubstCombo.add(option.getLongDisplayText());
- }
- ksubstCombo.select(getKSubstComboIndexFor(store.getString(ICVSUIConstants.PREF_TEXT_KSUBST)));
- considerContentsInCompare.setSelection(store.getBoolean(ICVSUIConstants.PREF_CONSIDER_CONTENTS));
- showMarkers.setSelection(store.getBoolean(ICVSUIConstants.PREF_SHOW_MARKERS));
- replaceUnmanaged.setSelection(store.getBoolean(ICVSUIConstants.PREF_REPLACE_UNMANAGED));
-
- initializeSaveRadios(store.getInt(ICVSUIConstants.PREF_SAVE_DIRTY_EDITORS));
- }
-
- /**
- * @see IWorkbenchPreferencePage#init(IWorkbench)
- */
- public void init(IWorkbench workbench) {
- }
-
- /**
- * OK was clicked. Store the CVS preferences.
- *
- * @return whether it is okay to close the preference page
- */
- public boolean performOk() {
-
- // Parse the timeout value
- int timeout = Integer.parseInt(timeoutValue.getText());
-
- IPreferenceStore store = getPreferenceStore();
-
- // set the provider preferences first because the preference change
- // listeners invoked from the preference store change may need these
- // values
-
- CVSProviderPlugin.getPlugin().setShowTasksOnAddAndDelete(showMarkers.getSelection());
-
- store.setValue(ICVSUIConstants.PREF_PRUNE_EMPTY_DIRECTORIES, pruneEmptyDirectoriesField.getSelection());
- store.setValue(ICVSUIConstants.PREF_TIMEOUT, timeout);
- store.setValue(ICVSUIConstants.PREF_QUIETNESS, quietnessCombo.getSelectionIndex());
- store.setValue(ICVSUIConstants.PREF_COMPRESSION_LEVEL, compressionLevelCombo.getSelectionIndex());
- store.setValue(ICVSUIConstants.PREF_TEXT_KSUBST, ((KSubstOption) ksubstOptions.get(ksubstCombo.getSelectionIndex())).toMode());
- store.setValue(ICVSUIConstants.PREF_CONSIDER_CONTENTS, considerContentsInCompare.getSelection());
- store.setValue(ICVSUIConstants.PREF_SHOW_MARKERS, showMarkers.getSelection());
- store.setValue(ICVSUIConstants.PREF_REPLACE_UNMANAGED, replaceUnmanaged.getSelection());
- store.setValue(ICVSUIConstants.PREF_SAVE_DIRTY_EDITORS, getSaveRadio());
-
- CVSProviderPlugin.getPlugin().setReplaceUnmanaged(
- store.getBoolean(ICVSUIConstants.PREF_REPLACE_UNMANAGED));
- CVSProviderPlugin.getPlugin().setPruneEmptyDirectories(
- store.getBoolean(ICVSUIConstants.PREF_PRUNE_EMPTY_DIRECTORIES));
- CVSProviderPlugin.getPlugin().setTimeout(
- store.getInt(ICVSUIConstants.PREF_TIMEOUT));
- CVSProviderPlugin.getPlugin().setQuietness(
- getQuietnessOptionFor(store.getInt(ICVSUIConstants.PREF_QUIETNESS)));
- CVSProviderPlugin.getPlugin().setCompressionLevel(
- store.getInt(ICVSUIConstants.PREF_COMPRESSION_LEVEL));
- KSubstOption oldKSubst = CVSProviderPlugin.getPlugin().getDefaultTextKSubstOption();
- KSubstOption newKSubst = KSubstOption.fromMode(store.getString(ICVSUIConstants.PREF_TEXT_KSUBST));
- CVSProviderPlugin.getPlugin().setDefaultTextKSubstOption(newKSubst);
-
- // changing the default keyword substitution mode for text files may affect
- // information displayed in the decorators
- if (! oldKSubst.equals(newKSubst)) CVSDecorator.refresh();
-
- CVSUIPlugin.getPlugin().savePluginPreferences();
- return true;
- }
-
- /**
- * Defaults was clicked. Restore the CVS preferences to
- * their default values
- */
- protected void performDefaults() {
- super.performDefaults();
- IPreferenceStore store = getPreferenceStore();
- pruneEmptyDirectoriesField.setSelection(
- store.getDefaultBoolean(ICVSUIConstants.PREF_PRUNE_EMPTY_DIRECTORIES));
- timeoutValue.setText(new Integer(store.getDefaultInt(ICVSUIConstants.PREF_TIMEOUT)).toString());
- quietnessCombo.select(store.getDefaultInt(ICVSUIConstants.PREF_QUIETNESS));
- compressionLevelCombo.select(store.getDefaultInt(ICVSUIConstants.PREF_COMPRESSION_LEVEL));
- ksubstCombo.select(getKSubstComboIndexFor(store.getDefaultString(ICVSUIConstants.PREF_TEXT_KSUBST)));
- showMarkers.setSelection(store.getDefaultBoolean(ICVSUIConstants.PREF_SHOW_MARKERS));
- replaceUnmanaged.setSelection(store.getDefaultBoolean(ICVSUIConstants.PREF_REPLACE_UNMANAGED));
- initializeSaveRadios(store.getDefaultInt(ICVSUIConstants.PREF_SAVE_DIRTY_EDITORS));
- }
-
- private void createSaveCombo(Composite composite) {
- Group group = new Group(composite, SWT.NULL);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 2;
- group.setLayoutData(data);
- GridLayout layout = new GridLayout();
- group.setLayout(layout);
- group.setText(Policy.bind("CVSPreferencePage.Save_dirty_editors_before_CVS_operations_1")); //$NON-NLS-1$
-
- never = new Button(group, SWT.RADIO | SWT.LEFT);
- never.setLayoutData(new GridData());
- never.setText(Policy.bind("CVSPreferencePage.&Never_2")); //$NON-NLS-1$
-
- prompt = new Button(group, SWT.RADIO | SWT.LEFT);
- prompt.setLayoutData(new GridData());
- prompt.setText(Policy.bind("CVSPreferencePage.&Prompt_3")); //$NON-NLS-1$
-
- auto = new Button(group, SWT.RADIO | SWT.LEFT);
- auto.setLayoutData(new GridData());
- auto.setText(Policy.bind("CVSPreferencePage.Auto-&save_4")); //$NON-NLS-1$
- }
-
- /**
- * 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 CVSUIPlugin.getPlugin().getPreferenceStore();
- }
-
- protected static QuietOption getQuietnessOptionFor(int option) {
- switch (option) {
- case 0: return Command.VERBOSE;
- case 1: return Command.PARTLY_QUIET;
- case 2: return Command.SILENT;
- }
- return null;
- }
-
- protected int getKSubstComboIndexFor(String mode) {
- KSubstOption ksubst = KSubstOption.fromMode(mode);
- int i = 0;
- for (Iterator it = ksubstOptions.iterator(); it.hasNext();) {
- KSubstOption option = (KSubstOption) it.next();
- if (ksubst.equals(option)) return i;
- i++;
- }
- // unknown option, add it to the list
- ksubstOptions.add(ksubst);
- ksubstCombo.add(ksubst.getLongDisplayText());
- return i;
- }
-
- protected void initializeSaveRadios(int option) {
- auto.setSelection(false);
- never.setSelection(false);
- prompt.setSelection(false);
- switch(option) {
- case ICVSUIConstants.OPTION_AUTOMATIC:
- auto.setSelection(true); break;
- case ICVSUIConstants.OPTION_NEVER:
- never.setSelection(true); break;
- case ICVSUIConstants.OPTION_PROMPT:
- prompt.setSelection(true); break;
- }
- }
-
- protected int getSaveRadio() {
- if(auto.getSelection()) {
- return ICVSUIConstants.OPTION_AUTOMATIC;
- } else if(never.getSelection()) {
- return ICVSUIConstants.OPTION_NEVER;
- } else {
- return ICVSUIConstants.OPTION_PROMPT;
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectPropertiesPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectPropertiesPage.java
deleted file mode 100644
index 48662edd0..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectPropertiesPage.java
+++ /dev/null
@@ -1,369 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TableViewer;
-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.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.IUserInfo;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.ui.dialogs.PropertyPage;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-public class CVSProjectPropertiesPage extends PropertyPage {
- IProject project;
- ICVSRepositoryLocation oldLocation;
- ICVSRepositoryLocation newLocation = null;
-
- private static final int TABLE_HEIGHT_HINT = 150;
- private static final int TABLE_WIDTH_HINT = 300;
-
- // Widgets
- Label methodLabel;
- Label userLabel;
- Label hostLabel;
- Label pathLabel;
- Label moduleLabel;
- Label portLabel;
- Label tagLabel;
-
- IUserInfo info;
- CVSTeamProvider provider;
-
- private class RepositorySelectionDialog extends Dialog {
- ICVSRepositoryLocation[] locations;
- ICVSRepositoryLocation location;
-
- TableViewer viewer;
- Button okButton;
- public RepositorySelectionDialog(Shell shell) {
- super(shell);
- }
- protected void createButtonsForButtonBar(Composite parent) {
- // create OK and Cancel buttons by default
- okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- okButton.setEnabled(false);
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
- }
- protected Control createDialogArea(Composite parent) {
- parent.getShell().setText(Policy.bind("CVSProjectPropertiesPage.Select_a_Repository_1")); //$NON-NLS-1$
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout());
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- createLabel(composite, Policy.bind("CVSProjectPropertiesPage.Select_a_CVS_repository_location_to_share_the_project_with__2"), 1); //$NON-NLS-1$
- Table table = new Table(composite, SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- GridData data = new GridData();
- data.widthHint = TABLE_WIDTH_HINT;
- data.heightHint = TABLE_HEIGHT_HINT;
- table.setLayoutData(data);
- viewer = new TableViewer(table);
- viewer.setLabelProvider(new WorkbenchLabelProvider());
- viewer.setContentProvider(new WorkbenchContentProvider() {
- public Object[] getElements(Object inputElement) {
- return locations;
- }
- });
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection selection = (IStructuredSelection)event.getSelection();
- if (selection.isEmpty()) {
- location = null;
- okButton.setEnabled(false);
- } else {
- location = (ICVSRepositoryLocation)selection.getFirstElement();
- okButton.setEnabled(true);
- }
- }
- });
- viewer.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- okPressed();
- }
- });
- viewer.setInput(locations);
- return composite;
- }
- protected void cancelPressed() {
- location = null;
- super.cancelPressed();
- }
- public void setLocations(ICVSRepositoryLocation[] locations) {
- this.locations = locations;
- }
- public ICVSRepositoryLocation getLocation() {
- return location;
- }
- };
-
- /*
- * @see PreferencesPage#createContents
- */
- protected Control createContents(Composite parent) {
- initialize();
-
- Composite composite = new Composite(parent, SWT.NULL);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
-
- Label label = createLabel(composite, Policy.bind("CVSPropertiesPage.connectionType"), 1); //$NON-NLS-1$
- methodLabel = createLabel(composite, "", 1); //$NON-NLS-1$
-
- label = createLabel(composite, Policy.bind("CVSPropertiesPage.user"), 1); //$NON-NLS-1$
- userLabel = createLabel(composite, "", 1); //$NON-NLS-1$
-
- label = createLabel(composite, Policy.bind("CVSPropertiesPage.host"), 1); //$NON-NLS-1$
- hostLabel = createLabel(composite, "", 1); //$NON-NLS-1$
-
- label = createLabel(composite, Policy.bind("CVSPropertiesPage.port"), 1); //$NON-NLS-1$
- portLabel = createLabel(composite, "", 1); //$NON-NLS-1$
-
- label = createLabel(composite, Policy.bind("CVSPropertiesPage.path"), 1); //$NON-NLS-1$
- pathLabel = createLabel(composite, "", 1); //$NON-NLS-1$
-
- label = createLabel(composite, Policy.bind("CVSPropertiesPage.module"), 1); //$NON-NLS-1$
- moduleLabel = createLabel(composite, "", 1); //$NON-NLS-1$
-
- label = createLabel(composite, Policy.bind("CVSPropertiesPage.tag"), 1); //$NON-NLS-1$
- tagLabel = createLabel(composite, "", 1); //$NON-NLS-1$
-
- createLabel(composite, "", 1); //$NON-NLS-1$
- createLabel(composite, "", 1); //$NON-NLS-1$
- createLabel(composite, "", 1); //$NON-NLS-1$
- createLabel(composite, "", 1); //$NON-NLS-1$
-
- label = new Label(composite, SWT.WRAP);
- label.setText(Policy.bind("CVSProjectPropertiesPage.You_can_change_the_sharing_of_this_project_to_another_repository_location._However,_this_is_only_possible_if_the_new_location_is___compatible___(on_the_same_host_with_the_same_repository_path)._1")); //$NON-NLS-1$
- GridData data = new GridData();
- data.widthHint = 300;
- data.horizontalSpan = 2;
- label.setLayoutData(data);
-
- Button changeButton = new Button(composite, SWT.PUSH);
- changeButton.setText(Policy.bind("CVSProjectPropertiesPage.Change_Sharing_5")); //$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, changeButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- changeButton.setLayoutData(data);
- changeButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- // Find out which repo locations are appropriate
- ICVSRepositoryLocation[] locations = CVSUIPlugin.getPlugin().getRepositoryManager().getKnownRoots();
- List compatibleLocations = new ArrayList();
- for (int i = 0; i < locations.length; i++) {
- ICVSRepositoryLocation location = locations[i];
- // Only locations with the same host and root are eligible
- if (!location.getHost().equals(hostLabel.getText())) continue;
- if (!location.getRootDirectory().equals(pathLabel.getText())) continue;
- if (location.equals(oldLocation)) continue;
- compatibleLocations.add(location);
- }
- RepositorySelectionDialog dialog = new RepositorySelectionDialog(getShell());
- dialog.setLocations((ICVSRepositoryLocation[])compatibleLocations.toArray(new ICVSRepositoryLocation[compatibleLocations.size()]));
- dialog.open();
- ICVSRepositoryLocation location = dialog.getLocation();
- if (location == null) return;
- newLocation = location;
- initializeValues(newLocation);
- }
- });
-
- initializeValues(oldLocation);
- 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, int span) {
- Label label = new Label(parent, SWT.LEFT);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = span;
- data.horizontalAlignment = GridData.FILL;
- label.setLayoutData(data);
- return label;
- }
- /**
- * Initializes the page
- */
- private void initialize() {
- // Get the project that is the source of this property page
- project = null;
- IAdaptable element = getElement();
- if (element instanceof IProject) {
- project = (IProject)element;
- } else {
- Object adapter = element.getAdapter(IProject.class);
- if (adapter instanceof IProject) {
- project = (IProject)adapter;
- }
- }
- // Do some pre-checks to ensure we're in a good state
- provider = (CVSTeamProvider)RepositoryProvider.getProvider(project, CVSProviderPlugin.getTypeId());
- if (provider == null) return;
- CVSWorkspaceRoot cvsRoot = provider.getCVSWorkspaceRoot();
- try {
- oldLocation = cvsRoot.getRemoteLocation();
- } catch (TeamException e) {
- handle(e);
- }
- }
- /**
- * Set the initial values of the widgets
- */
- private void initializeValues(ICVSRepositoryLocation location) {
- if (provider == null) return;
- CVSWorkspaceRoot cvsRoot = provider.getCVSWorkspaceRoot();
- ICVSFolder folder = cvsRoot.getLocalRoot();
-
- try {
- if (!folder.isCVSFolder()) return;
- methodLabel.setText(location.getMethod().getName());
- info = location.getUserInfo(true);
- userLabel.setText(info.getUsername());
- hostLabel.setText(location.getHost());
- int port = location.getPort();
- if (port == ICVSRepositoryLocation.USE_DEFAULT_PORT) {
- portLabel.setText(Policy.bind("CVSPropertiesPage.defaultPort")); //$NON-NLS-1$
- } else {
- portLabel.setText("" + port); //$NON-NLS-1$
- }
- pathLabel.setText(location.getRootDirectory());
- FolderSyncInfo syncInfo = folder.getFolderSyncInfo();
- if (syncInfo == null) return;
- moduleLabel.setText(syncInfo.getRepository());
- } catch (TeamException e) {
- handle(e);
- }
-
- initializeTag();
- }
-
- private void initializeTag() {
- provider = (CVSTeamProvider)RepositoryProvider.getProvider(project, CVSProviderPlugin.getTypeId());
- if (provider == null) return;
- CVSWorkspaceRoot cvsRoot = provider.getCVSWorkspaceRoot();
- try {
- ICVSFolder local = cvsRoot.getCVSFolderFor(project);
- CVSTag tag = local.getFolderSyncInfo().getTag();
- String tagName;
- if (tag == null) {
- tagName = CVSTag.DEFAULT.getName();
- } else {
- tagName = tag.getName();
- }
- tagLabel.setText(tagName);
- } catch (TeamException e) {
- handle(e);
- }
- }
- /*
- * @see PreferencesPage#performOk
- */
- public boolean performOk() {
- if (newLocation == null) {
- return true;
- }
- try {
- new ProgressMonitorDialog(getShell()).run(true, false, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- provider.setRemoteRoot(newLocation, monitor);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InvocationTargetException e) {
- Throwable t = e.getTargetException();
- if (t instanceof TeamException) {
- handle((TeamException)t);
- } else if (t instanceof CoreException) {
- handle(((CoreException)t).getStatus());
- } else {
- IStatus status = new Status(IStatus.ERROR, CVSUIPlugin.ID, 1, Policy.bind("internal"), t); //$NON-NLS-1$
- handle(status);
- CVSUIPlugin.log(status);
- }
- } catch (InterruptedException e) {
- return false;
- }
-
- return true;
- }
- /**
- * Shows the given errors to the user.
- */
- protected void handle(TeamException e) {
- handle(e.getStatus());
- }
-
- protected void handle(IStatus status) {
- if (!status.isOK()) {
- IStatus toShow = status;
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- if (children.length == 1) {
- toShow = children[0];
- }
- }
- ErrorDialog.openError(getShell(), status.getMessage(), null, toShow);
- }
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectSetSerializer.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectSetSerializer.java
deleted file mode 100644
index 6b548799c..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectSetSerializer.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.IProjectSetSerializer;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSProvider;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-public class CVSProjectSetSerializer implements IProjectSetSerializer {
-
- /**
- * @see IProjectSetSerializer#asReference(IProject[])
- *
- * "1.0,repoLocation,module,projectName[,tag]"
- */
- public String[] asReference(IProject[] providerProjects, Object context, IProgressMonitor monitor) throws TeamException {
- String[] result = new String[providerProjects.length];
- for (int i = 0; i < providerProjects.length; i++) {
- StringBuffer buffer = new StringBuffer();
- buffer.append("1.0,"); //$NON-NLS-1$
-
- IProject project = providerProjects[i];
- CVSTeamProvider provider = (CVSTeamProvider)RepositoryProvider.getProvider(project);
- CVSWorkspaceRoot root = provider.getCVSWorkspaceRoot();
- CVSRepositoryLocation location = CVSRepositoryLocation.fromString(root.getRemoteLocation().getLocation());
- location.setUserMuteable(true);
- String repoLocation = location.getLocation();
- buffer.append(repoLocation);
- buffer.append(","); //$NON-NLS-1$
-
- ICVSFolder folder = root.getLocalRoot();
- FolderSyncInfo syncInfo = folder.getFolderSyncInfo();
- String module = syncInfo.getRepository();
- buffer.append(module);
- buffer.append(","); //$NON-NLS-1$
-
- String projectName = folder.getName();
- buffer.append(projectName);
- CVSTag tag = syncInfo.getTag();
- if (tag != null) {
- if (tag.getType() != CVSTag.DATE) {
- buffer.append(","); //$NON-NLS-1$
- String tagName = tag.getName();
- buffer.append(tagName);
- }
- }
- result[i] = buffer.toString();
- }
- return result;
- }
-
- /**
- * @see IProjectSetSerializer#addToWorkspace(String[])
- */
- public IProject[] addToWorkspace(String[] referenceStrings, String filename, Object context, IProgressMonitor monitor) throws TeamException {
- final int size = referenceStrings.length;
- final CVSProvider provider = CVSProvider.getInstance();
- final IProject[] projects = new IProject[size];
- final ICVSRepositoryLocation[] locations = new ICVSRepositoryLocation[size];
- final String[] modules = new String[size];
- final CVSTag[] tags = new CVSTag[size];
-
- for (int i = 0; i < size; i++) {
- StringTokenizer tokenizer = new StringTokenizer(referenceStrings[i], ","); //$NON-NLS-1$
- String version = tokenizer.nextToken();
- if (!version.equals("1.0")) { //$NON-NLS-1$
- // Bail out, this is a newer version
- return null;
- }
- String repo = tokenizer.nextToken();
- locations[i] = CVSRepositoryLocation.fromString(repo);
- modules[i] = tokenizer.nextToken();
- String projectName = tokenizer.nextToken();
- projects[i] = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- if (tokenizer.hasMoreTokens()) {
- String tagName = tokenizer.nextToken();
- tags[i] = new CVSTag(tagName, CVSTag.BRANCH);
- }
- }
- // Check if any projects will be overwritten, and warn the user.
- boolean yesToAll = false;
- int action;
- final int[] num = new int[] {size};
- for (int i = 0; i < size; i++) {
- Shell shell = null;
- IProject project = projects[i];
- if (project.exists()) {
- if (shell == null) {
- if (context instanceof Shell) {
- shell = (Shell)context;
- } else {
- return null;
- }
- }
- action = confirmOverwrite(project, yesToAll, shell);
- yesToAll = action == 2;
-
- // message dialog
- switch (action) {
- // no
- case 1:
- // Remove it from the set
- locations[i] = null;
- num[0]--;
- break;
- // yes to all
- case 2:
- // yes
- case 0:
- break;
- // cancel
- case 3:
- default:
- return null;
- }
- }
- }
- WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- monitor.beginTask("", 1000 * num[0]); //$NON-NLS-1$
- try {
- for (int i = 0; i < size; i++) {
- if (locations[i] != null) {
- provider.checkout(locations[i], projects[i], modules[i], tags[i], new SubProgressMonitor(monitor, 1000));
- }
- }
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- };
- try {
- op.run(monitor);
- } catch (InterruptedException e) {
- } catch (InvocationTargetException e) {
- Throwable t = e.getTargetException();
- if (t instanceof TeamException) {
- throw (TeamException)t;
- }
- }
- List result = new ArrayList();
- for (int i = 0; i < projects.length; i++) {
- if (projects[i] != null) result.add(projects[i]);
- }
- return (IProject[])result.toArray(new IProject[result.size()]);
- }
- private int confirmOverwrite(IProject project, boolean yesToAll, Shell shell) {
- if (yesToAll) return 2;
- if (!project.exists()) return 0;
- final MessageDialog dialog =
- new MessageDialog(shell, Policy.bind("CVSProjectSetSerializer.Confirm_Overwrite_Project_8"), null, Policy.bind("CVSProjectSetSerializer.The_project_{0}_already_exists._Do_you_wish_to_overwrite_it__9", project.getName()), MessageDialog.QUESTION, //$NON-NLS-1$ //$NON-NLS-2$
- new String[] {
- IDialogConstants.YES_LABEL,
- IDialogConstants.NO_LABEL,
- IDialogConstants.YES_TO_ALL_LABEL,
- IDialogConstants.CANCEL_LABEL},
- 0);
- final int[] result = new int[1];
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- result[0] = dialog.open();
- }
- });
- return result[0];
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSRemoveResolutionGenerator.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSRemoveResolutionGenerator.java
deleted file mode 100644
index c38784003..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSRemoveResolutionGenerator.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Date;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFileState;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.MutableResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.AddDeleteMoveListener;
-import org.eclipse.ui.IMarkerResolution;
-
-/**
- * Generate marker resoultions for a cvs remove marker
- */
-public class CVSRemoveResolutionGenerator extends CVSAbstractResolutionGenerator {
- IMarkerResolution commitDeletion =new IMarkerResolution() {
- public String getLabel() {
- return Policy.bind("CVSRemoveResloutionGenerator.Commit_Deletion_to_CVS_1"); //$NON-NLS-1$
- }
- public void run(IMarker marker) {
- try {
- final IContainer parent = (IContainer)marker.getResource();
- final String childName = (String)marker.getAttribute(AddDeleteMoveListener.NAME_ATTRIBUTE);
- ICVSFile mFile = CVSWorkspaceRoot.getCVSFileFor(parent.getFile(new Path(childName)));
- final TeamException[] exception = new TeamException[] {null};
- CVSRemoveResolutionGenerator.this.run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)throws InvocationTargetException, InterruptedException {
- try {
- ((CVSTeamProvider)RepositoryProvider.getProvider(parent.getProject())).checkin(new IResource[] {parent.getFile(new Path(childName))}, IResource.DEPTH_ZERO, monitor);
- } catch (TeamException e) {
- exception[0] = e;
- }
- }
- });
- if (exception[0] != null) {
- throw exception[0];
- }
- marker.delete();
- } catch (TeamException e) {
- handle(e, null, null);
- } catch (CoreException e) {
- handle(e, null, null);
- } catch (InvocationTargetException e) {
- handle(e, null, null);
- } catch (InterruptedException e) {
- // do nothing
- }
- }
- };
-
- IMarkerResolution undoDeletionLocal = new IMarkerResolution() {
- public String getLabel() {
- return Policy.bind("CVSRemoveResloutionGenerator.Undo_Deletion_from_Local_History_2"); //$NON-NLS-1$
- }
- public void run(IMarker marker) {
- try {
- final IContainer parent = (IContainer)marker.getResource();
- final String childName = (String)marker.getAttribute(AddDeleteMoveListener.NAME_ATTRIBUTE);
- final IFile file = parent.getFile(new Path(childName));
- final ICVSFile mFile = CVSWorkspaceRoot.getCVSFileFor(parent.getFile(new Path(childName)));
-
- boolean recreated = false;
- IFileState[] history = file.getHistory(null);
- for (int i = 0; i < history.length; i++) {
- IFileState state = history[i];
- if (state.exists()) {
- file.create(state.getContents(), false, null);
- mFile.setTimeStamp(new Date(state.getModificationTime()));
- recreated = true;
- break;
- }
- }
-
- if (recreated) {
- if (mFile.isManaged()) {
- ResourceSyncInfo info = mFile.getSyncInfo();
- if (info.isDeleted()) {
- MutableResourceSyncInfo deletedInfo = info.cloneMutable();
- deletedInfo.setDeleted(false);
- mFile.setSyncInfo(deletedInfo);
- }
- }
- marker.delete();
- } else {
- throw new CVSException(Policy.bind("CVSRemoveResloutionGenerator.No_local_history_available._Try_undoing_from_the_server_3")); //$NON-NLS-1$
- }
- } catch (TeamException e) {
- handle(e, null, null);
- } catch (CoreException e) {
- handle(e, null, null);
- }
- }
- };
-
- IMarkerResolution undoDeletion = new IMarkerResolution() {
- public String getLabel() {
- return Policy.bind("CVSRemoveResloutionGenerator.Undo_Deletion_from_CVS_Server_4"); //$NON-NLS-1$
- }
- public void run(IMarker marker) {
- try {
- final IContainer parent = (IContainer)marker.getResource();
- final String childName = (String)marker.getAttribute(AddDeleteMoveListener.NAME_ATTRIBUTE);
- final IFile file = parent.getFile(new Path(childName));
- final ICVSFile mFile = CVSWorkspaceRoot.getCVSFileFor(parent.getFile(new Path(childName)));
-
- if (mFile.isManaged()) {
- ResourceSyncInfo info = mFile.getSyncInfo();
- if (info.isDeleted()) {
- MutableResourceSyncInfo deletedInfo = info.cloneMutable();
- deletedInfo.setDeleted(false);
- mFile.setSyncInfo(deletedInfo);
- }
- }
-
- final TeamException[] exception = new TeamException[] {null};
- CVSRemoveResolutionGenerator.this.run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)throws InvocationTargetException, InterruptedException {
- try {
- CVSTeamProvider provider = (CVSTeamProvider)RepositoryProvider.getProvider(parent.getProject());
- provider.update(new IResource[] { parent.getFile(new Path(childName)) },
- Command.NO_LOCAL_OPTIONS, null, true /*createBackups*/, monitor);
- } catch (TeamException e) {
- exception[0] = e;
- }
- }
- });
- if (exception[0] != null) {
- throw exception[0];
- }
- marker.delete();
- } catch (TeamException e) {
- handle(e, null, null);
- } catch (CoreException e) {
- handle(e, null, null);
- } catch (InvocationTargetException e) {
- handle(e, null, null);
- } catch (InterruptedException e) {
- // do nothing
- }
- }
- };
-
- /*
- * @see IMarkerResolutionGenerator#getResolutions(IMarker)
- */
- public IMarkerResolution[] getResolutions(IMarker marker) {
- return new IMarkerResolution[] {
- commitDeletion, undoDeletionLocal, undoDeletion
- };
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSRepositoryPropertiesPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSRepositoryPropertiesPage.java
deleted file mode 100644
index 798ee732f..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSRepositoryPropertiesPage.java
+++ /dev/null
@@ -1,325 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.IUserInfo;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ui.DetailsDialogWithProjects;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-public class CVSRepositoryPropertiesPage extends PropertyPage {
- ICVSRepositoryLocation location;
-
- // Widgets
- Text userText;
- Text passwordText;
- Combo methodType;
- Label hostLabel;
- Label pathLabel;
- Label portLabel;
-
- boolean passwordChanged;
- boolean connectionInfoChanged;
-
- IUserInfo info;
-
- /*
- * @see PreferencesPage#createContents
- */
- protected Control createContents(Composite parent) {
- initialize();
-
- Composite composite = new Composite(parent, SWT.NULL);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- composite.setLayout(layout);
-
- Label label = createLabel(composite, Policy.bind("CVSPropertiesPage.connectionType"), 1); //$NON-NLS-1$
- methodType = createCombo(composite);
-
- label = createLabel(composite, Policy.bind("CVSPropertiesPage.user"), 1); //$NON-NLS-1$
- userText = createTextField(composite);
-
- label = createLabel(composite, Policy.bind("CVSPropertiesPage.password"), 1); //$NON-NLS-1$
- passwordText = createTextField(composite);
- passwordText.setEchoChar('*');
-
- label = createLabel(composite, Policy.bind("CVSPropertiesPage.host"), 1); //$NON-NLS-1$
- hostLabel = createLabel(composite, "", 2); //$NON-NLS-1$
-
- label = createLabel(composite, Policy.bind("CVSPropertiesPage.port"), 1); //$NON-NLS-1$
- portLabel = createLabel(composite, "", 2); //$NON-NLS-1$
-
- label = createLabel(composite, Policy.bind("CVSPropertiesPage.path"), 1); //$NON-NLS-1$
- pathLabel = createLabel(composite, "", 2); //$NON-NLS-1$
-
- initializeValues();
- passwordText.addListener(SWT.Modify, new Listener() {
- public void handleEvent(Event event) {
- passwordChanged = true;
- }
- });
- userText.addListener(SWT.Modify, new Listener() {
- public void handleEvent(Event event) {
- connectionInfoChanged = true;
- }
- });
- methodType.addListener(SWT.Modify, new Listener() {
- public void handleEvent(Event event) {
- connectionInfoChanged = true;
- }
- });
- return composite;
- }
- /**
- * Utility method that creates a combo box
- *
- * @param parent the parent for the new label
- * @return the new widget
- */
- protected Combo createCombo(Composite parent) {
- Combo combo = new Combo(parent, SWT.READ_ONLY);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
- data.horizontalSpan = 2;
- combo.setLayoutData(data);
- return combo;
- }
- /**
- * 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, int span) {
- Label label = new Label(parent, SWT.LEFT);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = span;
- data.horizontalAlignment = GridData.FILL;
- 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;
- data.horizontalSpan = 2;
- text.setLayoutData(data);
- return text;
- }
- /**
- * Initializes the page
- */
- private void initialize() {
- location = null;
- IAdaptable element = getElement();
- if (element instanceof ICVSRepositoryLocation) {
- location = (ICVSRepositoryLocation)element;
- } else {
- Object adapter = element.getAdapter(ICVSRepositoryLocation.class);
- if (adapter instanceof ICVSRepositoryLocation) {
- location = (ICVSRepositoryLocation)adapter;
- }
- }
- }
- /**
- * Set the initial values of the widgets
- */
- private void initializeValues() {
- passwordChanged = false;
-
- String[] methods = CVSProviderPlugin.getProvider().getSupportedConnectionMethods();
- for (int i = 0; i < methods.length; i++) {
- methodType.add(methods[i]);
- }
- String method = location.getMethod().getName();
- methodType.select(methodType.indexOf(method));
- info = location.getUserInfo(true);
- userText.setText(info.getUsername());
- passwordText.setText("*********"); //$NON-NLS-1$
- hostLabel.setText(location.getHost());
- int port = location.getPort();
- if (port == ICVSRepositoryLocation.USE_DEFAULT_PORT) {
- portLabel.setText(Policy.bind("CVSPropertiesPage.defaultPort")); //$NON-NLS-1$
- } else {
- portLabel.setText("" + port); //$NON-NLS-1$
- }
- pathLabel.setText(location.getRootDirectory());
- }
-
- /*
- * @see PreferencesPage#performOk
- */
- public boolean performOk() {
- if (!connectionInfoChanged && !passwordChanged) {
- return true;
- }
- info.setUsername(userText.getText());
- if (passwordChanged) {
- info.setPassword(passwordText.getText());
- }
- final String type = methodType.getText();
- final String password = passwordText.getText();
- final boolean[] result = new boolean[] { false };
- try {
- new ProgressMonitorDialog(getShell()).run(false, false, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- // Check if the password was the only thing to change.
- if (passwordChanged && !connectionInfoChanged) {
- CVSRepositoryLocation oldLocation = (CVSRepositoryLocation)location;
- oldLocation.setPassword(password);
- oldLocation.updateCache();
- passwordChanged = false;
- result[0] = true;
- return;
- }
-
- // Create a new repository location with the new information
- CVSRepositoryLocation newLocation = CVSRepositoryLocation.fromString(location.getLocation());
- newLocation.setMethod(type);
- newLocation.setUserInfo(info);
-
- // For each project shared with the old location, set connection info to the new one
- List projects = new ArrayList();
- IProject[] allProjects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- for (int i = 0; i < allProjects.length; i++) {
- RepositoryProvider teamProvider = RepositoryProvider.getProvider(allProjects[i], CVSProviderPlugin.getTypeId());
- if (teamProvider != null) {
- CVSTeamProvider cvsProvider = (CVSTeamProvider)teamProvider;
- if (cvsProvider.getCVSWorkspaceRoot().getRemoteLocation().equals(location)) {
- projects.add(allProjects[i]);
- }
- }
- }
- if (projects.size() > 0) {
- // To do: warn the user
- DetailsDialogWithProjects dialog = new DetailsDialogWithProjects(
- getShell(),
- Policy.bind("CVSRepositoryPropertiesPage.Confirm_Project_Sharing_Changes_1"), //$NON-NLS-1$
- Policy.bind("CVSRepositoryPropertiesPage.There_are_projects_in_the_workspace_shared_with_this_repository_2"), //$NON-NLS-1$
- Policy.bind("CVSRepositoryPropertiesPage.sharedProject", location.toString()), //$NON-NLS-1$
- (IProject[]) projects.toArray(new IProject[projects.size()]),
- true,
- DetailsDialogWithProjects.DLG_IMG_WARNING);
- int r = dialog.open();
- if (r != dialog.OK) {
- result[0] = false;
- return;
- }
- monitor.beginTask(null, 1000 * projects.size());
- try {
- Iterator it = projects.iterator();
- while (it.hasNext()) {
- IProject project = (IProject)it.next();
- RepositoryProvider teamProvider = RepositoryProvider.getProvider(project, CVSProviderPlugin.getTypeId());
- CVSTeamProvider cvsProvider = (CVSTeamProvider)teamProvider;
- cvsProvider.setRemoteRoot(newLocation, Policy.subMonitorFor(monitor, 1000));
- }
- } finally {
- monitor.done();
- }
- }
-
- // Dispose the old repository location
- CVSProviderPlugin.getProvider().disposeRepository(location);
-
- // Set the location of the page to the new location in case Apply was chosen
- location = newLocation;
- connectionInfoChanged = false;
- passwordChanged = false;
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- result[0] = true;
- }
- });
- } catch (InvocationTargetException e) {
- Throwable t = e.getTargetException();
- if (t instanceof TeamException) {
- handle((TeamException)t);
- } else if (t instanceof CoreException) {
- handle(((CoreException)t).getStatus());
- } else {
- IStatus status = new Status(IStatus.ERROR, CVSUIPlugin.ID, 1, Policy.bind("internal"), t); //$NON-NLS-1$
- handle(status);
- CVSUIPlugin.log(status);
- }
- } catch (InterruptedException e) {
- }
-
- return result[0];
- }
- /**
- * Shows the given errors to the user.
- */
- protected void handle(TeamException e) {
- handle(e.getStatus());
- }
-
- protected void handle(IStatus status) {
- if (!status.isOK()) {
- IStatus toShow = status;
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- if (children.length == 1) {
- toShow = children[0];
- }
- }
- ErrorDialog.openError(getShell(), status.getMessage(), null, toShow);
- }
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java
deleted file mode 100644
index 22366687e..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java
+++ /dev/null
@@ -1,423 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.util.Hashtable;
-import java.lang.reflect.InvocationTargetException;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPluginDescriptor;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.util.AddDeleteMoveListener;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.ui.model.CVSAdapterFactory;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.texteditor.WorkbenchChainedTextFontFieldEditor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-/**
- * UI Plugin for CVS provider-specific workbench functionality.
- */
-public class CVSUIPlugin extends AbstractUIPlugin implements IPropertyChangeListener {
- /**
- * The id of the CVS plug-in
- */
- public static final String ID = "org.eclipse.team.cvs.ui"; //$NON-NLS-1$
- public static final String DECORATOR_ID = "org.eclipse.team.cvs.ui.decorator"; //$NON-NLS-1$
-
- private Hashtable imageDescriptors = new Hashtable(20);
-
- // timeout in milliseconds before displaying a progress monitor dialog
- // (used for normally short-running interactive operations)
- private static final int TIMEOUT = 2000;
-
- /**
- * The singleton plug-in instance
- */
- private static CVSUIPlugin plugin;
-
- /**
- * The repository manager
- */
- private RepositoryManager repositoryManager;
-
- // Property change listener
- IPropertyChangeListener listener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(TeamUI.GLOBAL_IGNORES_CHANGED)) {
- CVSDecorator.refresh();
- }
- }
- };
-
- /**
- * CVSUIPlugin constructor
- *
- * @param descriptor the plugin descriptor
- */
- public CVSUIPlugin(IPluginDescriptor descriptor) {
- super(descriptor);
- plugin = this;
- getPreferenceStore().addPropertyChangeListener(this);
- }
-
- /**
- * Creates an image and places it in the image registry.
- */
- protected void createImageDescriptor(String id, URL baseURL) {
- URL url = null;
- try {
- url = new URL(baseURL, ICVSUIConstants.ICON_PATH + id);
- } catch (MalformedURLException e) {
- }
- ImageDescriptor desc = ImageDescriptor.createFromURL(url);
- imageDescriptors.put(id, desc);
- }
-
- /**
- * Returns the active workbench page.
- *
- * @return the active workbench page
- */
- public static IWorkbenchPage getActivePage() {
- IWorkbenchWindow window = getPlugin().getWorkbench().getActiveWorkbenchWindow();
- if (window == null) return null;
- return window.getActivePage();
- }
-
- /**
- * Extract or convert to a TeamException
- */
- public static TeamException asTeamException(InvocationTargetException e) {
- Throwable exception = e.getTargetException();
- if (exception instanceof TeamException) {
- return (TeamException)exception;
- } else if (exception instanceof CoreException) {
- return new TeamException(((CoreException)exception).getStatus());
- } else {
- return new TeamException(new Status(IStatus.ERROR, CVSUIPlugin.ID, 0, Policy.bind("internal"), exception)); //$NON-NLS-1$
- }
- }
-
- /**
- * Run an operation involving the given resource. If an exception is thrown
- * and the code on the status is IResourceStatus.OUT_OF_SYNC_LOCAL then
- * the user will be prompted to refresh and try again. If they agree, then the
- * supplied operation will be run again.
- */
- public static void runWithRefresh(Shell parent, IResource[] resources,
- IRunnableWithProgress runnable, IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- boolean firstTime = true;
- while(true) {
- try {
- runnable.run(monitor);
- return;
- } catch (InvocationTargetException e) {
- if (! firstTime) throw e;
- IStatus status = null;
- if (e.getTargetException() instanceof CoreException) {
- status = ((CoreException)e.getTargetException()).getStatus();
- } else if (e.getTargetException() instanceof TeamException) {
- status = ((TeamException)e.getTargetException()).getStatus();
- } else {
- throw e;
- }
- if (status.getCode() == IResourceStatus.OUT_OF_SYNC_LOCAL) {
- if (promptToRefresh(parent, resources, status)) {
- try {
- for (int i = 0; i < resources.length; i++) {
- resources[i].refreshLocal(IResource.DEPTH_INFINITE, null);
- }
- } catch (CoreException coreEx) {
- // Throw the original exception to the caller
- log(coreEx.getStatus());
- throw e;
- }
- firstTime = false;
- // Fall through and the operation will be tried again
- } else {
- // User chose not to continue. Treat it as a cancel.
- throw new InterruptedException();
- }
- } else {
- throw e;
- }
- }
- }
- }
-
- private static boolean promptToRefresh(final Shell shell, final IResource[] resources, final IStatus status) {
- final boolean[] result = new boolean[] { false};
- Runnable runnable = new Runnable() {
- public void run() {
- Shell shellToUse = shell;
- if (shell == null) {
- shellToUse = new Shell(Display.getCurrent());
- }
- String question;
- if (resources.length == 1) {
- question = Policy.bind("CVSUIPlugin.refreshQuestion", status.getMessage(), resources[0].getFullPath().toString()); //$NON-NLS-1$
- } else {
- question = Policy.bind("CVSUIPlugin.refreshMultipleQuestion", status.getMessage()); //$NON-NLS-1$
- }
- result[0] = MessageDialog.openQuestion(shellToUse, Policy.bind("CVSUIPlugin.refreshTitle"), question); //$NON-NLS-1$
- }
- };
- Display.getDefault().syncExec(runnable);
- return result[0];
- }
-
- /**
- * Creates a busy cursor and runs the specified runnable.
- * May be called from a non-UI thread.
- *
- * @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 runWithProgress(Shell parent, boolean cancelable,
- final IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException {
- TeamUIPlugin.runWithProgress(parent, cancelable, runnable);
- }
-
- /**
- * 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);
- }
-
- /**
- * Returns the image descriptor for the given image ID.
- * Returns null if there is no such image.
- */
- public ImageDescriptor getImageDescriptor(String id) {
- return (ImageDescriptor)imageDescriptors.get(id);
- }
-
- /**
- * Returns the singleton plug-in instance.
- *
- * @return the plugin instance
- */
- public static CVSUIPlugin getPlugin() {
- return plugin;
- }
-
- /**
- * Returns the repository manager
- *
- * @return the repository manager
- */
- public RepositoryManager getRepositoryManager() {
- return repositoryManager;
- }
-
- /**
- * Initializes the table of images used in this plugin.
- */
- private void initializeImages() {
- URL baseURL = getDescriptor().getInstallURL();
-
- // objects
- createImageDescriptor(ICVSUIConstants.IMG_REPOSITORY, baseURL);
- createImageDescriptor(ICVSUIConstants.IMG_REFRESH, baseURL);
- createImageDescriptor(ICVSUIConstants.IMG_NEWLOCATION, baseURL);
- createImageDescriptor(ICVSUIConstants.IMG_TAG, baseURL);
- createImageDescriptor(ICVSUIConstants.IMG_CLEAR, baseURL);
- createImageDescriptor(ICVSUIConstants.IMG_BRANCHES_CATEGORY, baseURL);
- createImageDescriptor(ICVSUIConstants.IMG_VERSIONS_CATEGORY, baseURL);
- createImageDescriptor(ICVSUIConstants.IMG_PROJECT_VERSION, baseURL);
- createImageDescriptor(ICVSUIConstants.IMG_WIZBAN_BRANCH, baseURL);
- createImageDescriptor(ICVSUIConstants.IMG_WIZBAN_MERGE, baseURL);
- createImageDescriptor(ICVSUIConstants.IMG_WIZBAN_SHARE, baseURL);
- createImageDescriptor(ICVSUIConstants.IMG_WIZBAN_DIFF, baseURL);
- createImageDescriptor(ICVSUIConstants.IMG_WIZBAN_KEYWORD, baseURL);
- createImageDescriptor(ICVSUIConstants.IMG_WIZBAN_NEW_LOCATION, baseURL);
- createImageDescriptor(ICVSUIConstants.IMG_MERGEABLE_CONFLICT, baseURL);
- createImageDescriptor(ICVSUIConstants.IMG_QUESTIONABLE, baseURL);
- createImageDescriptor(ICVSUIConstants.IMG_MERGED, baseURL);
-
- // special
- createImageDescriptor("glyphs/glyph1.gif", baseURL); //$NON-NLS-1$
- createImageDescriptor("glyphs/glyph2.gif", baseURL); //$NON-NLS-1$
- createImageDescriptor("glyphs/glyph3.gif", baseURL); //$NON-NLS-1$
- createImageDescriptor("glyphs/glyph4.gif", baseURL); //$NON-NLS-1$
- createImageDescriptor("glyphs/glyph5.gif", baseURL); //$NON-NLS-1$
- createImageDescriptor("glyphs/glyph6.gif", baseURL); //$NON-NLS-1$
- createImageDescriptor("glyphs/glyph7.gif", baseURL); //$NON-NLS-1$
- createImageDescriptor("glyphs/glyph8.gif", baseURL); //$NON-NLS-1$
- }
- /**
- * 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);
- }
-
- /**
- * Initializes the preferences for this plugin if necessary.
- */
- protected void initializePreferences() {
- IPreferenceStore store = getPreferenceStore();
- store.setDefault(ICVSUIConstants.PREF_SHOW_COMMENTS, true);
- store.setDefault(ICVSUIConstants.PREF_SHOW_TAGS, true);
- store.setDefault(ICVSUIConstants.PREF_PRUNE_EMPTY_DIRECTORIES, CVSProviderPlugin.DEFAULT_PRUNE);
- store.setDefault(ICVSUIConstants.PREF_TIMEOUT, CVSProviderPlugin.DEFAULT_TIMEOUT);
- store.setDefault(ICVSUIConstants.PREF_SHOW_MODULES, false);
- store.setDefault(ICVSUIConstants.PREF_CONSIDER_CONTENTS, false);
- store.setDefault(ICVSUIConstants.PREF_SHOW_MARKERS, true);
- store.setDefault(ICVSUIConstants.PREF_COMPRESSION_LEVEL, CVSProviderPlugin.DEFAULT_COMPRESSION_LEVEL);
- store.setDefault(ICVSUIConstants.PREF_TEXT_KSUBST, CVSProviderPlugin.DEFAULT_TEXT_KSUBST_OPTION.toMode());
- store.setDefault(ICVSUIConstants.PREF_REPLACE_UNMANAGED, true);
- store.setDefault(ICVSUIConstants.PREF_CVS_RSH, CVSProviderPlugin.DEFAULT_CVS_RSH);
- store.setDefault(ICVSUIConstants.PREF_CVS_SERVER, CVSProviderPlugin.DEFAULT_CVS_SERVER);
- store.setDefault(ICVSUIConstants.PREF_PROMPT_ON_CHANGE_GRANULARITY, true);
-
- PreferenceConverter.setDefault(store, ICVSUIConstants.PREF_CONSOLE_COMMAND_COLOR, new RGB(0, 0, 0));
- PreferenceConverter.setDefault(store, ICVSUIConstants.PREF_CONSOLE_MESSAGE_COLOR, new RGB(0, 0, 255));
- PreferenceConverter.setDefault(store, ICVSUIConstants.PREF_CONSOLE_ERROR_COLOR, new RGB(255, 0, 0));
- WorkbenchChainedTextFontFieldEditor.startPropagate(store, ICVSUIConstants.PREF_CONSOLE_FONT);
- store.setDefault(ICVSUIConstants.PREF_CONSOLE_AUTO_OPEN, false);
-
- store.setDefault(ICVSUIConstants.PREF_FILETEXT_DECORATION, CVSDecoratorConfiguration.DEFAULT_FILETEXTFORMAT);
- store.setDefault(ICVSUIConstants.PREF_FOLDERTEXT_DECORATION, CVSDecoratorConfiguration.DEFAULT_FOLDERTEXTFORMAT);
- store.setDefault(ICVSUIConstants.PREF_PROJECTTEXT_DECORATION, CVSDecoratorConfiguration.DEFAULT_PROJECTTEXTFORMAT);
-
- store.setDefault(ICVSUIConstants.PREF_ADDED_FLAG, CVSDecoratorConfiguration.DEFAULT_ADDED_FLAG);
- store.setDefault(ICVSUIConstants.PREF_DIRTY_FLAG, CVSDecoratorConfiguration.DEFAULT_DIRTY_FLAG);
-
- store.setDefault(ICVSUIConstants.PREF_SHOW_ADDED_DECORATION, true);
- store.setDefault(ICVSUIConstants.PREF_SHOW_HASREMOTE_DECORATION, true);
- store.setDefault(ICVSUIConstants.PREF_SHOW_DIRTY_DECORATION, false);
- store.setDefault(ICVSUIConstants.PREF_ADDED_FLAG, CVSDecoratorConfiguration.DEFAULT_ADDED_FLAG);
- store.setDefault(ICVSUIConstants.PREF_DIRTY_FLAG, CVSDecoratorConfiguration.DEFAULT_DIRTY_FLAG);
- store.setDefault(ICVSUIConstants.PREF_CALCULATE_DIRTY, true);
- store.setDefault(ICVSUIConstants.PREF_PROMPT_ON_MIXED_TAGS, true);
- store.setDefault(ICVSUIConstants.PREF_PROMPT_ON_SAVING_IN_SYNC, true);
- store.setDefault(ICVSUIConstants.PREF_SAVE_DIRTY_EDITORS, ICVSUIConstants.OPTION_PROMPT);
-
- // Forward the values to the CVS plugin
- CVSProviderPlugin.getPlugin().setPruneEmptyDirectories(store.getBoolean(ICVSUIConstants.PREF_PRUNE_EMPTY_DIRECTORIES));
- CVSProviderPlugin.getPlugin().setTimeout(store.getInt(ICVSUIConstants.PREF_TIMEOUT));
- CVSProviderPlugin.getPlugin().setCvsRshCommand(store.getString(ICVSUIConstants.PREF_CVS_RSH));
- CVSProviderPlugin.getPlugin().setCvsServer(store.getString(ICVSUIConstants.PREF_CVS_SERVER));
- CVSProviderPlugin.getPlugin().setQuietness(CVSPreferencesPage.getQuietnessOptionFor(store.getInt(ICVSUIConstants.PREF_QUIETNESS)));
- CVSProviderPlugin.getPlugin().setShowTasksOnAddAndDelete(store.getBoolean(ICVSUIConstants.PREF_SHOW_MARKERS));
- CVSProviderPlugin.getPlugin().setCompressionLevel(store.getInt(ICVSUIConstants.PREF_COMPRESSION_LEVEL));
- CVSProviderPlugin.getPlugin().setReplaceUnmanaged(store.getBoolean(ICVSUIConstants.PREF_REPLACE_UNMANAGED));
- CVSProviderPlugin.getPlugin().setDefaultTextKSubstOption(KSubstOption.fromMode(store.getString(ICVSUIConstants.PREF_TEXT_KSUBST)));
- }
-
- /**
- * @see Plugin#startup()
- */
- public void startup() throws CoreException {
- super.startup();
- Policy.localize("org.eclipse.team.internal.ccvs.ui.messages"); //$NON-NLS-1$
-
- CVSAdapterFactory factory = new CVSAdapterFactory();
- Platform.getAdapterManager().registerAdapters(factory, ICVSRemoteFile.class);
- Platform.getAdapterManager().registerAdapters(factory, ICVSRemoteFolder.class);
- Platform.getAdapterManager().registerAdapters(factory, ICVSRepositoryLocation.class);
-
- initializeImages();
- initializePreferences();
- repositoryManager = new RepositoryManager();
-
- // if the global ignores list is changed then update decorators.
- TeamUI.addPropertyChangeListener(listener);
-
- try {
- repositoryManager.startup();
- } catch (TeamException e) {
- throw new CoreException(e.getStatus());
- }
-
- Console.startup();
- }
-
- /**
- * @see Plugin#shutdown()
- */
- public void shutdown() throws CoreException {
- super.shutdown();
- TeamUI.removePropertyChangeListener(listener);
- try {
- repositoryManager.shutdown();
- } catch (TeamException e) {
- throw new CoreException(e.getStatus());
- }
-
- Console.shutdown();
- }
-
- /**
- * @see IPropertyChangeListener#propertyChange(PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- try {
- String property = event.getProperty();
- if (property.equals(ICVSUIConstants.PREF_SHOW_MARKERS)) {
- boolean b = getPreferenceStore().getBoolean(ICVSUIConstants.PREF_SHOW_MARKERS);
- if (b) {
- AddDeleteMoveListener.refreshAllMarkers();
- } else {
- AddDeleteMoveListener.clearAllCVSMarkers();
- }
- }
- } catch (CoreException e) {
- log(e.getStatus());
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/Console.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/Console.java
deleted file mode 100644
index 15909764d..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/Console.java
+++ /dev/null
@@ -1,429 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.jface.text.DocumentEvent;
-import org.eclipse.jface.text.IDocumentListener;
-import org.eclipse.jface.text.ITextOperationTarget;
-import org.eclipse.jface.text.TextViewer;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.custom.LineStyleEvent;
-import org.eclipse.swt.custom.LineStyleListener;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.client.listeners.IConsoleListener;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.ui.part.ViewPart;
-import org.eclipse.ui.texteditor.ITextEditorActionConstants;
-
-/**
- * Console is a view that displays the communication with the CVS server
- */
-public class Console extends ViewPart {
- public static final String CONSOLE_ID = "org.eclipse.team.ccvs.ui.console"; //$NON-NLS-1$
- private static final DateFormat TIME_FORMAT = new SimpleDateFormat(Policy.bind("Console.resultTimeFormat")); //$NON-NLS-1$
- private static ConsoleDocument document;
- private static List /* of Console */ instances;
-
- private TextViewer viewer;
- private Color commandColor;
- private Color messageColor;
- private Color errorColor;
- private Font consoleFont;
-
- private IDocumentListener documentListener;
- private IPropertyChangeListener propertyChangeListener;
- private TextViewerAction copyAction;
- private TextViewerAction selectAllAction;
- private Action clearOutputAction;
-
- /*
- * Called on UI plugin startup.
- */
- public static void startup() {
- document = new ConsoleDocument();
- instances = new ArrayList();
- CVSProviderPlugin.getPlugin().setConsoleListener(new ConsoleListener());
- }
-
- /*
- * Called on UI plugin shutdown.
- */
- public static void shutdown() {
- document = null;
- instances = null;
- CVSProviderPlugin.getPlugin().setConsoleListener(null);
- }
-
- public Console() {
- }
-
- /*
- * @see WorkbenchPart#dispose
- */
- public void dispose() {
- // remove listeners
- if (documentListener != null) {
- document.removeDocumentListener(documentListener);
- documentListener = null;
- }
- if (propertyChangeListener != null) {
- getPreferenceStore().removePropertyChangeListener(propertyChangeListener);
- propertyChangeListener = null;
- }
- instances.remove(this);
- //if (instances.isEmpty()) document.clear();
-
- // dispose of allocated colors and fonts
- super.dispose();
- if (commandColor != null) {
- commandColor.dispose();
- commandColor = null;
- }
- if (messageColor != null) {
- messageColor.dispose();
- messageColor = null;
- }
- if (errorColor != null) {
- errorColor.dispose();
- errorColor = null;
- }
- if (consoleFont != null) {
- consoleFont.dispose();
- consoleFont = null;
- }
- }
-
- /*
- * @see WorkbenchPart#setFocus()
- */
- public void setFocus() {
- viewer.getTextWidget().setFocus();
- }
-
- /*
- * @see WorkbenchPart#createPartControl(Composite)
- */
- public void createPartControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));
-
- updatePreferences(null);
-
- // F1 Help
- WorkbenchHelp.setHelp(composite, IHelpContextIds.CONSOLE_VIEW);
-
- // create the viewer
- viewer = new TextViewer(composite, SWT.V_SCROLL | SWT.H_SCROLL);
- GridData data = new GridData(GridData.FILL_BOTH);
- viewer.getControl().setLayoutData(data);
- viewer.setEditable(false);
- viewer.setDocument(document);
- viewer.getTextWidget().setFont(consoleFont);
-
- // add a selection listener to control enablement of the copy action
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- copyAction.update();
- }
- });
-
- // add a line styler for colouring lines according to their type
- viewer.getTextWidget().addLineStyleListener(new LineStyleListener() {
- public void lineGetStyle(LineStyleEvent event) {
- StyleRange style = new StyleRange(event.lineOffset, event.lineText.length(),
- getConsoleLineColor(event.lineOffset), null);
- event.styles = new StyleRange[] { style };
- }
- });
-
- // create the viewer actions
- createActions();
-
- // add a property change listener to update when preferences change
- propertyChangeListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- updatePreferences(event.getProperty());
- }
- };
- getPreferenceStore().addPropertyChangeListener(propertyChangeListener);
-
- // add a document listener for auto-scrolling
- documentListener = new IDocumentListener() {
- public void documentAboutToBeChanged(DocumentEvent event) {
- }
- public void documentChanged(DocumentEvent event) {
- if (viewer == null) return;
- // always focus on the last line without changing the horizontal scrolling index
- // we can get away with doing it this way because the viewer is read only
- StyledText styledText = viewer.getTextWidget();
- if (styledText.isDisposed()) return;
- styledText.setTopIndex(styledText.getLineCount());
- }
- };
- document.addDocumentListener(documentListener);
-
- // we're open -- remember us
- instances.add(this);
- }
-
- /**
- * Create contributed actions
- */
- private void createActions() {
- clearOutputAction = new Action(Policy.bind("Console.clearOutput"), CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_CLEAR)) { //$NON-NLS-1$
- public void run() {
- document.clear();
- }
- };
- clearOutputAction.setToolTipText(Policy.bind("Console.clearOutput")); //$NON-NLS-1$
-
- MenuManager mgr = new MenuManager();
- mgr.setRemoveAllWhenShown(true);
- mgr.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager mgr) {
- fillContextMenu(mgr);
- }
- });
- Menu menu = mgr.createContextMenu(viewer.getControl());
- viewer.getControl().setMenu(menu);
-
- // Create the local tool bar
- IToolBarManager tbm = getViewSite().getActionBars().getToolBarManager();
- tbm.add(clearOutputAction);
- tbm.update(false);
-
-
- // Create actions for the text editor
- IActionBars actionBars = getViewSite().getActionBars();
-
- copyAction = new TextViewerAction(viewer, ITextOperationTarget.COPY);
- copyAction.setText(Policy.bind("Console.copy")); //$NON-NLS-1$
- actionBars.setGlobalActionHandler(ITextEditorActionConstants.COPY, copyAction);
-
- selectAllAction = new TextViewerAction(viewer, ITextOperationTarget.SELECT_ALL);
- selectAllAction.setText(Policy.bind("Console.selectAll")); //$NON-NLS-1$
- actionBars.setGlobalActionHandler(ITextEditorActionConstants.SELECT_ALL, selectAllAction);
-
- actionBars.updateActionBars();
- }
-
- /**
- * Add the actions to the context menu
- *
- * @param manager the manager of the context menu
- */
- private void fillContextMenu(IMenuManager manager) {
- manager.add(copyAction);
- manager.add(selectAllAction);
- manager.add(new Separator());
- manager.add(clearOutputAction);
- }
-
- /**
- * Returns the color for the line containing the specified offset.
- */
- private Color getConsoleLineColor(int offset) {
- switch (document.getLineType(offset)) {
- case ConsoleDocument.COMMAND:
- case ConsoleDocument.STATUS:
- case ConsoleDocument.DELIMITER:
- return commandColor;
- case ConsoleDocument.MESSAGE:
- return messageColor;
- case ConsoleDocument.ERROR:
- return errorColor;
- default:
- throw new IllegalStateException();
- }
- }
-
- /**
- * Updates the console's font and colors.
- */
- private void updatePreferences(String property) {
- Display display = getViewSite().getShell().getDisplay();
- // update the console colors
- if (property == null ||
- property.equals(ICVSUIConstants.PREF_CONSOLE_COMMAND_COLOR) ||
- property.equals(ICVSUIConstants.PREF_CONSOLE_MESSAGE_COLOR) ||
- property.equals(ICVSUIConstants.PREF_CONSOLE_ERROR_COLOR)) {
- Color oldCommandColor = commandColor;
- Color oldMessageColor = messageColor;
- Color oldErrorColor = errorColor;
- commandColor = createColor(display, ICVSUIConstants.PREF_CONSOLE_COMMAND_COLOR);
- messageColor = createColor(display, ICVSUIConstants.PREF_CONSOLE_MESSAGE_COLOR);
- errorColor = createColor(display, ICVSUIConstants.PREF_CONSOLE_ERROR_COLOR);
- if (oldCommandColor != null) {
- if (viewer != null && ! viewer.getControl().isDisposed()) {
- viewer.refresh();
- }
- oldCommandColor.dispose();
- oldMessageColor.dispose();
- oldErrorColor.dispose();
- }
- }
- // update the console font
- if (property == null ||
- property.equals(ICVSUIConstants.PREF_CONSOLE_FONT)) {
- Font oldConsoleFont = consoleFont;
- consoleFont = createFont(display, ICVSUIConstants.PREF_CONSOLE_FONT);
- if (oldConsoleFont != null) {
- if (viewer != null && ! viewer.getControl().isDisposed()) {
- viewer.getTextWidget().setFont(consoleFont);
- }
- oldConsoleFont.dispose();
- }
- }
- }
-
- /**
- * Returns a color instance based on data from a preference field.
- */
- private Color createColor(Display display, String preference) {
- RGB rgb = PreferenceConverter.getColor(getPreferenceStore(), preference);
- return new Color(display, rgb);
- }
-
- /**
- * Returns a font instance based on data from a preference field.
- */
- private Font createFont(Display display, String preference) {
- FontData fontData = PreferenceConverter.getFontData(getPreferenceStore(), preference);
- return new Font(display, fontData);
- }
-
- /**
- * Appends a line to the console if any views are open.
- */
- private static void appendConsoleLine(final int type, final String line) {
- Display display = Display.getCurrent();
- if (display == null) {
- display = Display.getDefault();
- }
- display.asyncExec(new Runnable() {
- public void run() {
- if (getPreferenceStore().getBoolean(ICVSUIConstants.PREF_CONSOLE_AUTO_OPEN)) {
- findInActivePerspective();
- }
- if (document == null) return;
- document.appendConsoleLine(type, line, instances.isEmpty());
- }
- });
- }
-
- /**
- * Makes the CVS Console view visible in the active perspective. If there
- * isn't a CVS Console view registered <code>null</code> is returned.
- * Otherwise the opened view part is returned.
- *
- * Must be called from the UI thread.
- */
- private static Console findInActivePerspective() {
- try {
- IWorkbenchPage page = CVSUIPlugin.getActivePage();
- IViewPart consolePart = page.findView(CONSOLE_ID);
- if (consolePart == null) {
- IWorkbenchPart activePart = page.getActivePart();
- consolePart = page.showView(CONSOLE_ID);
- //restore focus stolen by the creation of the console
- if (activePart != null) page.activate(activePart);
- } else {
- page.bringToTop(consolePart);
- }
- return (Console) consolePart;
- } catch (PartInitException pe) {
- return null;
- }
- }
-
- /**
- * Returns the console preference store.
- */
- private static IPreferenceStore getPreferenceStore() {
- return CVSUIPlugin.getPlugin().getPreferenceStore();
- }
-
- private static class ConsoleListener implements IConsoleListener {
- private long commandStarted = 0;
-
- public void commandInvoked(String line) {
- commandStarted = System.currentTimeMillis();
- appendConsoleLine(ConsoleDocument.DELIMITER, Policy.bind("Console.preExecutionDelimiter")); //$NON-NLS-1$
- appendConsoleLine(ConsoleDocument.COMMAND, line);
- }
- public void messageLineReceived(String line) {
- appendConsoleLine(ConsoleDocument.MESSAGE, " " + line); //$NON-NLS-1$
- }
- public void errorLineReceived(String line) {
- appendConsoleLine(ConsoleDocument.ERROR, " " + line); //$NON-NLS-1$
- }
- public void commandCompleted(IStatus status, Exception exception) {
- long commandRuntime = System.currentTimeMillis() - commandStarted;
- String time = TIME_FORMAT.format(new Date(commandRuntime));
- String statusText;
- if (status != null && status.getCode() == CVSStatus.SERVER_ERROR) {
- statusText = Policy.bind("Console.resultServerError", status.getMessage(), time); //$NON-NLS-1$
- } else if (exception != null) {
- if (exception instanceof OperationCanceledException) {
- statusText = Policy.bind("Console.resultAborted", time); //$NON-NLS-1$
- } else {
- statusText = Policy.bind("Console.resultException", time); //$NON-NLS-1$
- }
- } else {
- statusText = Policy.bind("Console.resultOk", time); //$NON-NLS-1$
- }
- appendConsoleLine(ConsoleDocument.STATUS, statusText);
- appendConsoleLine(ConsoleDocument.DELIMITER, Policy.bind("Console.postExecutionDelimiter")); //$NON-NLS-1$
- appendConsoleLine(ConsoleDocument.DELIMITER, ""); //$NON-NLS-1$
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ConsoleDocument.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ConsoleDocument.java
deleted file mode 100644
index 48c40882a..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ConsoleDocument.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.text.AbstractDocument;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.DefaultLineTracker;
-import org.eclipse.jface.text.GapTextStore;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-
-public class ConsoleDocument extends AbstractDocument {
- public static final int COMMAND = 0; // command text
- public static final int MESSAGE = 1; // message received
- public static final int ERROR = 2; // error received
- public static final int STATUS = 3; // status text
- public static final int DELIMITER = 4; // delimiter text between runs
-
- private int[] lineTypes = null;
- private int currentLine = 0;
-
- /**
- * Creates an empty console document.
- */
- public ConsoleDocument() {
- setTextStore(new GapTextStore(512, 1024));
- setLineTracker(new DefaultLineTracker());
- completeInitialization();
- }
-
- /**
- * Clears the console document.
- */
- public void clear() {
- lineTypes = null;
- currentLine = 0;
- set(""); //$NON-NLS-1$
- }
-
- /**
- * Gets the line type for the line containing the specified offset.
- */
- public int getLineType(int offset) {
- try {
- int line = getLineOfOffset(offset);
- if (line < currentLine) return lineTypes[line];
- } catch (BadLocationException e) {
- CVSProviderPlugin.log(CVSException.wrapException(e));
- }
- return 0;
- }
-
- /**
- * Appends a line of the specified type to the end of the console.
- */
- public void appendConsoleLine(int type, String line, boolean purgeExcess) {
- if (lineTypes == null) {
- lineTypes = new int[16];
- } else if (currentLine >= lineTypes.length) {
- int[] oldLineTypes = lineTypes;
- lineTypes = new int[oldLineTypes.length * 2];
- System.arraycopy(oldLineTypes, 0, lineTypes, 0, oldLineTypes.length);
- }
- lineTypes[currentLine++] = type;
- try {
- replace(getLength(), 0, line + "\n"); //$NON-NLS-1$
- if (purgeExcess && type == COMMAND) {
- keepPreviousCommands(2);
- }
- } catch (BadLocationException e) {
- CVSProviderPlugin.log(CVSException.wrapException(e));
- }
- }
-
- /**
- * Return the indicies of the lines that contain command strings
- */
- private int[] getCommandLines() {
- List commandLineList = new ArrayList();
- for (int i = 0; i < currentLine; i++) {
- if (lineTypes[i] == COMMAND) {
- commandLineList.add(new Integer(i));
- }
- }
- int[] commandLines = new int[commandLineList.size()];
- int i = 0;
- for (Iterator iter = commandLineList.iterator(); iter.hasNext(); ) {
- commandLines[i++] = ((Integer) iter.next()).intValue();
- }
- return commandLines;
- }
-
- /**
- * Purge all but the output of the last N commands from the document
- */
- private void keepPreviousCommands(int number) throws BadLocationException{
- // Get the index of the line and character to keep
- int[] commandLines = getCommandLines();
- if (commandLines.length <= number) return;
- int lineIndex = commandLines[commandLines.length - number];
- int characterIndex = getLineOffset(lineIndex);
-
- // Keep everything from the character to the end
- set(get(characterIndex, getLength() - characterIndex));
-
- // Adjust the line types
- int[] oldLineTypes = lineTypes;
- lineTypes = new int[oldLineTypes.length];
- System.arraycopy(oldLineTypes, lineIndex, lineTypes, 0, oldLineTypes.length - lineIndex);
- currentLine -= lineIndex;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ConsolePreferencesPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ConsolePreferencesPage.java
deleted file mode 100644
index c7933a8ac..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ConsolePreferencesPage.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import org.eclipse.jface.preference.ColorFieldEditor;
-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.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.texteditor.WorkbenchChainedTextFontFieldEditor;
-
-public class ConsolePreferencesPage extends PreferencePage implements IWorkbenchPreferencePage {
-
- private ColorFieldEditor commandColorEditor;
- private ColorFieldEditor messageColorEditor;
- private ColorFieldEditor errorColorEditor;
- private WorkbenchChainedTextFontFieldEditor fontEditor;
- private Button autoOpenCheckBox;
-
- /**
- * 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
- */
- private Composite createComposite(Composite parent, int numColumns) {
- Composite composite = new Composite(parent, SWT.NULL);
-
- //GridLayout
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginHeight = 0;
- layout.numColumns = numColumns;
- composite.setLayout(layout);
-
- //GridData
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- composite.setLayoutData(data);
- return composite;
- }
-
- /**
- * @see PreferencePage#createContents(Composite)
- */
- protected Control createContents(Composite parent) {
- Composite composite = createComposite(parent, 2);
- createLabel(composite, Policy.bind("ConsolePreferencePage.consoleColorSettings")); //$NON-NLS-1$
-
- commandColorEditor = createColorFieldEditor(ICVSUIConstants.PREF_CONSOLE_COMMAND_COLOR,
- Policy.bind("ConsolePreferencePage.commandColor"), composite); //$NON-NLS-1$
- messageColorEditor = createColorFieldEditor(ICVSUIConstants.PREF_CONSOLE_MESSAGE_COLOR,
- Policy.bind("ConsolePreferencePage.messageColor"), composite); //$NON-NLS-1$
- errorColorEditor = createColorFieldEditor(ICVSUIConstants.PREF_CONSOLE_ERROR_COLOR,
- Policy.bind("ConsolePreferencePage.errorColor"), composite); //$NON-NLS-1$
-
- fontEditor = new WorkbenchChainedTextFontFieldEditor(ICVSUIConstants.PREF_CONSOLE_FONT,
- Policy.bind("ConsolePreferencePage.font"), composite); //$NON-NLS-1$
- fontEditor.setPreferencePage(this);
- fontEditor.setPreferenceStore(getPreferenceStore());
-
- autoOpenCheckBox = createCheckBox(composite, Policy.bind("ConsolePreferencePage.autoOpen")); //$NON-NLS-1$
-
- initializeValues();
- 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 = 3;
- button.setLayoutData(data);
- return button;
- }
- /**
- * 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
- */
- private Label createLabel(Composite parent, String text) {
- Label label = new Label(parent, SWT.LEFT);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = 3;
- data.horizontalAlignment = GridData.FILL;
- label.setLayoutData(data);
- return label;
- }
- /**
- * Creates a new color field editor.
- */
- private ColorFieldEditor createColorFieldEditor(String preferenceName, String label, Composite parent) {
- ColorFieldEditor editor = new ColorFieldEditor(preferenceName, label, parent);
- editor.setPreferencePage(this);
- editor.setPreferenceStore(getPreferenceStore());
- new Label(parent, SWT.NONE); // fill in 3rd column
- return editor;
- }
-
- /**
- * Initializes states of the controls from the preference store.
- */
- private void initializeValues() {
- IPreferenceStore store = getPreferenceStore();
- commandColorEditor.load();
- messageColorEditor.load();
- errorColorEditor.load();
- fontEditor.load();
- autoOpenCheckBox.setSelection(store.getBoolean(ICVSUIConstants.PREF_CONSOLE_AUTO_OPEN));
- }
-
- /**
- * @see IWorkbenchPreferencePage#init(IWorkbench)
- */
- public void init(IWorkbench workbench) {
- }
-
- /**
- * OK was clicked. Store the CVS preferences.
- *
- * @return whether it is okay to close the preference page
- */
- public boolean performOk() {
- IPreferenceStore store = getPreferenceStore();
- commandColorEditor.store();
- messageColorEditor.store();
- errorColorEditor.store();
- fontEditor.store();
- store.setValue(ICVSUIConstants.PREF_CONSOLE_AUTO_OPEN, autoOpenCheckBox.getSelection());
- return true;
- }
-
- /**
- * Defaults was clicked. Restore the CVS preferences to
- * their default values
- */
- protected void performDefaults() {
- super.performDefaults();
- IPreferenceStore store = getPreferenceStore();
- commandColorEditor.loadDefault();
- messageColorEditor.loadDefault();
- errorColorEditor.loadDefault();
- fontEditor.loadDefault();
- autoOpenCheckBox.setSelection(store.getDefaultBoolean(ICVSUIConstants.PREF_CONSOLE_AUTO_OPEN));
- }
-
- /**
- * 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 CVSUIPlugin.getPlugin().getPreferenceStore();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ExtMethodPreferencePage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ExtMethodPreferencePage.java
deleted file mode 100644
index acda8d5c8..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ExtMethodPreferencePage.java
+++ /dev/null
@@ -1,151 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.resource.JFaceResources;
-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.Control;
-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.ccvs.core.CVSProviderPlugin;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-public class ExtMethodPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
-
- Text cvsRsh;
- Text cvsServer;
-
- /*
- * @see PreferencePage#createContents(Composite)
- */
- protected Control createContents(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- layout.numColumns = 3;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData());
-
- Label intro = new Label(composite, SWT.LEFT);
- intro.setText(Policy.bind("ExtMethodPreferencePage_message")); //$NON-NLS-1$
- GridData data = new GridData();
- data.horizontalSpan = 3;
- data.horizontalAlignment = GridData.FILL;
- intro.setLayoutData(data);
-
- new Label(composite, SWT.NULL); new Label(composite, SWT.NULL); new Label(composite, SWT.NULL); // spacer
-
- new Label(composite, SWT.LEFT).setText(Policy.bind("ExtMethodPreferencePage_CVS_RSH")); //$NON-NLS-1$
- cvsRsh = new Text(composite, SWT.BORDER);
- cvsRsh.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- final Button b = new Button(composite, SWT.NONE);
- b.setText(Policy.bind("ExtMethodPreferencePage_Browse")); //$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, b.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- b.setLayoutData(data);
- b.addListener(SWT.MouseDown, new Listener() {
- public void handleEvent (Event event) {
- FileDialog d = new FileDialog(getShell());
- d.setText(Policy.bind("ExtMethodPreferencePage_Details")); //$NON-NLS-1$
- String file = d.open();
- if(file!=null) {
- setCvsRshText(file);
- }
- }
- });
-
-
- Label l = new Label(composite, SWT.LEFT | SWT.BOLD);
- l.setText(Policy.bind("ExtMethodPreferencePage_Note__5")); //$NON-NLS-1$
- l.setFont(JFaceResources.getBannerFont());
-
- l = new Label(composite, SWT.LEFT);
- l.setText(Policy.bind("ExtMethodPreferencePage_note_CVS_RSH")); //$NON-NLS-1$
- data = new GridData();
- data.horizontalSpan = 2;
- data.horizontalAlignment = GridData.FILL;
- l.setLayoutData(data);
-
- new Label(composite, SWT.NULL); new Label(composite, SWT.NULL); new Label(composite, SWT.NULL); // spacer
-
- new Label(composite, SWT.LEFT).setText(Policy.bind("ExtMethodPreferencePage_CVS_SERVER__7")); //$NON-NLS-1$
- cvsServer = new Text(composite, SWT.BORDER);
- data = new GridData();
- data.horizontalSpan = 2;
- data.horizontalAlignment = GridData.FILL;
- cvsServer.setLayoutData(data);
-
- l = new Label(composite, SWT.LEFT | SWT.BOLD);
- l.setText(Policy.bind("ExtMethodPreferencePage_Note__8")); //$NON-NLS-1$
- l.setFont(JFaceResources.getBannerFont());
-
- l = new Label(composite, SWT.LEFT);
- l.setText(Policy.bind("ExtMethodPreferencePage_NoteForCVS_SERVER")); //$NON-NLS-1$
- data = new GridData();
- data.horizontalSpan = 2;
- data.horizontalAlignment = GridData.FILL;
- l.setLayoutData(data);
-
-
- initializeDefaults();
-
- return composite;
- }
-
- protected void initializeDefaults() {
- IPreferenceStore store = getPreferenceStore();
- cvsRsh.setText(store.getString(ICVSUIConstants.PREF_CVS_RSH));
- cvsServer.setText(store.getString(ICVSUIConstants.PREF_CVS_SERVER));
- }
-
- /*
- * Set CVS_RSH program
- */
- protected void setCvsRshText(String s) {
- cvsRsh.setText(s);
- }
-
- /*
- * @see IWorkbenchPreferencePage#init(IWorkbench)
- */
- public void init(IWorkbench workbench) {
- }
-
- /*
- * @see IPreferencePage#performOk()
- */
- public boolean performOk() {
- IPreferenceStore store = getPreferenceStore();
- store.setValue(ICVSUIConstants.PREF_CVS_RSH, cvsRsh.getText());
- store.setValue(ICVSUIConstants.PREF_CVS_SERVER, cvsServer.getText());
- CVSProviderPlugin.getPlugin().setCvsRshCommand(cvsRsh.getText());
- CVSProviderPlugin.getPlugin().setCvsServer(cvsServer.getText());
- CVSUIPlugin.getPlugin().savePluginPreferences();
- return super.performOk();
- }
- /*
- * @see PreferencePage#doGetPreferenceStore()
- */
- protected IPreferenceStore doGetPreferenceStore() {
- return CVSUIPlugin.getPlugin().getPreferenceStore();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryDropAdapter.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryDropAdapter.java
deleted file mode 100644
index 498571788..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryDropAdapter.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.ViewerDropAdapter;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.DropTargetEvent;
-import org.eclipse.swt.dnd.TransferData;
-import org.eclipse.ui.part.ResourceTransfer;
-
-public class HistoryDropAdapter extends ViewerDropAdapter {
- HistoryView view;
-
- public HistoryDropAdapter(StructuredViewer viewer, HistoryView view) {
- super(viewer);
- this.view = view;
- }
- /*
- * Override dragOver to slam the detail to DROP_LINK, as we do not
- * want to really execute a DROP_MOVE, although we want to respond
- * to it.
- */
- public void dragOver(DropTargetEvent event) {
- if ((event.operations & DND.DROP_LINK) == DND.DROP_LINK) {
- event.detail = DND.DROP_LINK;
- }
- super.dragOver(event);
- }
- /*
- * Override drop to slam the detail to DROP_LINK, as we do not
- * want to really execute a DROP_MOVE, although we want to respond
- * to it.
- */
- public void drop(DropTargetEvent event) {
- super.drop(event);
- event.detail = DND.DROP_LINK;
- }
- public boolean performDrop(Object data) {
- if (data == null) return false;
- IResource[] sources = (IResource[])data;
- if (sources.length == 0) return false;
- IResource resource = sources[0];
- if (!(resource instanceof IFile)) return false;
- view.showHistory(resource);
- return true;
- }
- public boolean validateDrop(Object target, int operation, TransferData transferType) {
- if (transferType != null && ResourceTransfer.getInstance().isSupportedType(transferType)) {
- return true;
- }
- return false;
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryFilter.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryFilter.java
deleted file mode 100644
index 64209cca4..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryFilter.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.util.Date;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.team.internal.ccvs.core.ILogEntry;
-
-public class HistoryFilter extends ViewerFilter {
- private HistoryView view;
- public String author;
- public Date fromDate;
- public Date toDate;
- public String comment;
- public boolean isOr;
-
- public HistoryFilter(HistoryView hView, String author, String comment, Date fromDate, Date toDate, boolean isOr) {
- this.view = hView;
- this.author = author;
- this.comment = comment;
- this.fromDate = fromDate;
- this.toDate = toDate;
- this.isOr = isOr;
- }
- /**
- * @see ViewerFilter#select(Viewer, Object, Object)
- */
- public boolean select(Viewer aviewer, Object parentElement, Object element) {
- if (element instanceof ILogEntry) {
- ILogEntry entry = (ILogEntry)element;
- if (isOr) {
- //empty fields should be considered a non-match
- return (hasAuthor() && authorMatch(entry) )
- || (hasDate() && dateMatch(entry))
- || (hasComment() && commentMatch(entry));
- } else {
- //"and" search
- //empty fields should be considered a match
- return (!hasAuthor() || authorMatch(entry))
- && (!hasDate() || dateMatch(entry))
- && (!hasComment() || commentMatch(entry));
- }
- }
- return false;
- }
- protected boolean authorMatch(ILogEntry entry) {
- return entry.getAuthor().equals(author);
- }
- protected boolean commentMatch(ILogEntry entry) {
- return !(entry.getComment().toLowerCase().indexOf(comment.toLowerCase()) == -1);
- }
- protected boolean dateMatch(ILogEntry entry) {
- return (fromDate.before(entry.getDate()))
- && (toDate.after(entry.getDate()));
- }
- protected boolean hasAuthor() {
- return !author.equals(""); //$NON-NLS-1$
- }
- protected boolean hasComment() {
- return !comment.equals(""); //$NON-NLS-1$
- }
- protected boolean hasDate() {
- return fromDate != null && toDate != null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryFilterAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryFilterAction.java
deleted file mode 100644
index 7f0c167de..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryFilterAction.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-
-public class HistoryFilterAction implements IViewActionDelegate {
- private HistoryView view;
- private HistoryFilter filter;
-
- /**
- * @see IViewActionDelegate#init(IViewPart)
- */
- public void init(IViewPart view) {
- this.view = (HistoryView)view;
- }
- /**
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- HistoryFilterDialog historyDialog = new HistoryFilterDialog(view);
- if (filter != null) {
- historyDialog.setFilter(filter);
- }
- if (historyDialog.open() == Window.CANCEL) {
- return;
- }
- if (filter != null) {
- view.getViewer().removeFilter(filter);
- }
- filter = historyDialog.getFilter();
- //don't add the filter if it is blank
- if (!(filter.hasAuthor() || filter.hasDate() || filter.hasComment())) {
- return;
- }
- view.getViewer().addFilter(filter);
- }
- /**
- * @see IActionDelegate#selectionChanged(IAction, ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryFilterDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryFilterDialog.java
deleted file mode 100644
index 304f7dbb0..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryFilterDialog.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Date;
-
-import org.eclipse.jface.dialogs.Dialog;
-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.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-public class HistoryFilterDialog extends Dialog {
-
- private boolean dateEntered;
- private HistoryView historyView;
- private HistoryFilter historyFilter;
-
- //widgets
- private Button orRadio;
- private Button andRadio;
- private Combo fromDayCombo;
- private Combo toDayCombo;
- private Combo fromMonthCombo;
- private Combo toMonthCombo;
- private Combo fromYearCombo;
- private Combo toYearCombo;
- private Text author;
- private Text comment;
-
- public HistoryFilterDialog(HistoryView view) {
- super(view.getViewSite().getShell());
- this.historyView = view;
- }
-
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(Policy.bind("HistoryFilterDialog.title")); //$NON-NLS-1$
- }
-
- protected Control createDialogArea(Composite parent) {
- Composite topLevel = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- topLevel.setLayout(layout);
-
- //"and" and "or" search radio buttons
- Label label = new Label(topLevel, SWT.NONE);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- label.setLayoutData(data);
- label.setText(Policy.bind("HistoryFilterDialog.showMatching")); //$NON-NLS-1$
-
- andRadio = new Button(topLevel, SWT.RADIO);
- andRadio.setText(Policy.bind("HistoryFilterDialog.matchingAll")); //$NON-NLS-1$
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- andRadio.setLayoutData(data);
- andRadio.setSelection(true);
-
- orRadio = new Button(topLevel, SWT.RADIO);
- orRadio.setText(Policy.bind("HistoryFilterDialog.matchingAny")); //$NON-NLS-1$
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- orRadio.setLayoutData(data);
-
- //author
- label = new Label(topLevel, SWT.NONE);
- label.setText(Policy.bind("HistoryFilterDialog.author")); //$NON-NLS-1$
- author = new Text(topLevel, SWT.BORDER);
- author.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- //comment
- label = new Label(topLevel, SWT.NONE);
- label.setText(Policy.bind("HistoryFilterDialog.comment")); //$NON-NLS-1$
- comment = new Text(topLevel, SWT.BORDER);
- comment.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- //"from" date
- label = new Label(topLevel, SWT.NONE);
- label.setText(Policy.bind("HistoryFilterDialog.fromDate")); //$NON-NLS-1$
- Composite fdComposite = new Composite(topLevel, SWT.NONE);
- GridLayout fdLayout = new GridLayout();
- fdLayout.numColumns = 3;
- fdComposite.setLayout(fdLayout);
- fromMonthCombo = new Combo(fdComposite, SWT.READ_ONLY);
- fromDayCombo = new Combo(fdComposite, SWT.READ_ONLY);
- fromYearCombo = new Combo(fdComposite, SWT.NONE);
- fromYearCombo.setTextLimit(4);
-
- //"to" date
- label = new Label(topLevel, SWT.NONE);
- label.setText(Policy.bind("HistoryFilterDialog.toDate")); //$NON-NLS-1$
- Composite tdComposite = new Composite(topLevel, SWT.NONE);
- GridLayout tdLayout = new GridLayout();
- tdLayout.numColumns = 3;
- tdComposite.setLayout(tdLayout);
- toMonthCombo = new Combo(tdComposite, SWT.READ_ONLY);
- toDayCombo = new Combo(tdComposite, SWT.READ_ONLY);
- toYearCombo = new Combo(tdComposite, SWT.NONE);
- toYearCombo.setTextLimit(4);
-
- //set day, month and year combos with numbers
- //years allows a selection from the past 5 years
- //or any year written in
- String days[] = new String[32];
- days[0] = "---"; //$NON-NLS-1$
- for (int i = 1; i < 32; i++) {
- days[i] = String.valueOf(i);
- }
-
- String months[] = new String[13];
- months[0] = "---"; //$NON-NLS-1$
- SimpleDateFormat format = new SimpleDateFormat("MMMM"); //$NON-NLS-1$
- Calendar calendar = Calendar.getInstance();
- for (int i = 1; i < 13; i++) {
- calendar.set(Calendar.MONTH, i - 1);
- months[i] = format.format(calendar.getTime());
- }
-
- String years[] = new String[5];
- Calendar calender = Calendar.getInstance();
- for (int i = 0; i < 5; i++) {
- years[i] = String.valueOf(calender.get(1) - i);
- }
- fromDayCombo.setItems(days);
- fromDayCombo.select(0);
- toDayCombo.setItems(days);
- toDayCombo.select(0);
- fromMonthCombo.setItems(months);
- fromMonthCombo.select(0);
- toMonthCombo.setItems(months);
- toMonthCombo.select(0);
- fromYearCombo.setItems(years);
- toYearCombo.setItems(years);
- fromYearCombo.select(0);
- toYearCombo.select(0);
-
- initializeValues();
- return topLevel;
- }
- void initializeValues() {
- if (historyFilter == null) return;
- if (historyFilter.author != null) {
- author.setText(historyFilter.author);
- }
- if (historyFilter.comment != null) {
- comment.setText(historyFilter.comment);
- }
- orRadio.setSelection(historyFilter.isOr);
- andRadio.setSelection(!historyFilter.isOr);
- Calendar calendar = Calendar.getInstance();
- if (historyFilter.fromDate != null) {
- calendar.setTime(historyFilter.fromDate);
- fromDayCombo.select(calendar.get(Calendar.DATE));
- fromMonthCombo.select(calendar.get(Calendar.MONTH) + 1);
- String yearValue = String.valueOf(calendar.get(Calendar.YEAR));
- int index = fromYearCombo.indexOf(yearValue);
- if (index == -1) {
- fromYearCombo.add(yearValue);
- index = fromYearCombo.indexOf(yearValue);
- }
- fromYearCombo.select(index);
- }
- if (historyFilter.toDate != null) {
- calendar.setTime(historyFilter.toDate);
- toDayCombo.select(calendar.get(Calendar.DATE));
- toMonthCombo.select(calendar.get(Calendar.MONTH) + 1);
- String yearValue = String.valueOf(calendar.get(Calendar.YEAR));
- int index = toYearCombo.indexOf(yearValue);
- if (index == -1) {
- toYearCombo.add(yearValue);
- index = toYearCombo.indexOf(yearValue);
- }
- toYearCombo.select(index);
- }
- }
- /**
- * A button has been pressed. Process the dialog contents.
- */
- protected void buttonPressed(int buttonId) {
- if (IDialogConstants.CANCEL_ID == buttonId) {
- super.buttonPressed(buttonId);
- return;
- }
- Date fromDate = null, toDate = null;
-
- if ((fromMonthCombo.getSelectionIndex() > 0)
- && (toMonthCombo.getSelectionIndex() > 0)
- && (fromDayCombo.getSelectionIndex() > 0)
- && (toDayCombo.getSelectionIndex() > 0)
- && (fromYearCombo.getText().length() > 0)
- && (toYearCombo.getText().length() > 0)) {
-
- //set the calendar with the user input
- //set the hours, minutes and seconds to 00
- //so as to cover the whole day
- Calendar calendar = Calendar.getInstance();
- calendar.set(
- Integer.parseInt(String.valueOf(fromYearCombo.getText())),
- fromMonthCombo.getSelectionIndex() - 1,
- Integer.parseInt(String.valueOf(fromDayCombo.getText())),
- 00, 00, 00);
- fromDate = calendar.getTime();
-
- //set the calendar with the user input
- //set the hours, minutes and seconds to 23, 59, 59
- //so as to cover the whole day
- calendar.set(
- Integer.parseInt(String.valueOf(toYearCombo.getText())),
- toMonthCombo.getSelectionIndex() - 1,
- Integer.parseInt(String.valueOf(toDayCombo.getText())),
- 23, 59, 59);
- toDate = calendar.getTime();
- }
-
- //create the filter
- historyFilter = new HistoryFilter(
- historyView,
- author.getText(),
- comment.getText(),
- fromDate,
- toDate,
- orRadio.getSelection());
-
- super.buttonPressed(buttonId);
- }
-
- /**
- * Returns the filter that was created from the provided
- * user input.
- */
- public HistoryFilter getFilter() {
- return historyFilter;
- }
- /**
- * Set the intial value of the dialog to the given filter.
- */
- public void setFilter(HistoryFilter filter) {
- this.historyFilter = filter;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistorySorter.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistorySorter.java
deleted file mode 100644
index 57c31f1b2..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistorySorter.java
+++ /dev/null
@@ -1,105 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.Date;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ILogEntry;
-
-/**
- * This sorter is used by the HistoryView
- */
-class HistorySorter extends ViewerSorter {
- private boolean reversed = false;
- private int columnNumber;
-
- private VersionCollator versionCollator = new VersionCollator();
-
- // column headings: "Revision" "Tags" "Date" "Author" "Comment"
- private int[][] SORT_ORDERS_BY_COLUMN = {
- {0, 2, 3, 4, 1}, /* revision */
- {1, 0, 2, 3, 4}, /* tags */
- {2, 0, 3, 4, 1}, /* date */
- {3, 0, 2, 4, 1}, /* author */
- {4, 0, 2, 3, 1} /* comment */
- };
-
- /**
- * The constructor.
- */
- public HistorySorter(int columnNumber) {
- this.columnNumber = columnNumber;
- }
- /**
- * Compares two log entries, sorting first by the main column of this sorter,
- * then by subsequent columns, depending on the column sort order.
- */
- public int compare(Viewer viewer, Object o1, Object o2) {
- ILogEntry e1 = (ILogEntry)o1;
- ILogEntry e2 = (ILogEntry)o2;
- int[] columnSortOrder = SORT_ORDERS_BY_COLUMN[columnNumber];
- int result = 0;
- for (int i = 0; i < columnSortOrder.length; ++i) {
- result = compareColumnValue(columnSortOrder[i], e1, e2);
- if (result != 0)
- break;
- }
- if (reversed)
- result = -result;
- return result;
- }
- /**
- * Compares two markers, based only on the value of the specified column.
- */
- int compareColumnValue(int columnNumber, ILogEntry e1, ILogEntry e2) {
- switch (columnNumber) {
- case 0: /* revision */
- return versionCollator.compare(e1.getRevision(), e2.getRevision());
- case 1: /* tags */
- CVSTag[] tags1 = e1.getTags();
- CVSTag[] tags2 = e2.getTags();
- if (tags2.length == 0) {
- return -1;
- }
- if (tags1.length == 0) {
- return 1;
- }
- return getCollator().compare(tags1[0].getName(), tags2[0].getName());
- case 2: /* date */
- Date date1 = e1.getDate();
- Date date2 = e2.getDate();
- return date1.compareTo(date2);
- case 3: /* author */
- return getCollator().compare(e1.getAuthor(), e2.getAuthor());
- case 4: /* comment */
- return getCollator().compare(e1.getComment(), e2.getComment());
- default:
- return 0;
- }
- }
- /**
- * Returns the number of the column by which this is sorting.
- */
- public int getColumnNumber() {
- return columnNumber;
- }
- /**
- * Returns true for descending, or false
- * for ascending sorting order.
- */
- public boolean isReversed() {
- return reversed;
- }
- /**
- * Sets the sorting order.
- */
- public void setReversed(boolean newReversed) {
- reversed = newReversed;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryView.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryView.java
deleted file mode 100644
index 040fa5326..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryView.java
+++ /dev/null
@@ -1,735 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.io.InputStream;
-import java.text.DateFormat;
-import java.util.Date;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.ITextOperationTarget;
-import org.eclipse.jface.text.TextViewer;
-import org.eclipse.jface.viewers.ColumnWeightData;
-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.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ILogEntry;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.ui.actions.CVSAction;
-import org.eclipse.team.internal.ccvs.ui.actions.OpenLogEntryAction;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-import org.eclipse.ui.part.ResourceTransfer;
-import org.eclipse.ui.part.ViewPart;
-import org.eclipse.ui.texteditor.ITextEditorActionConstants;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * The history view allows browsing of an array of resource revisions
- */
-public class HistoryView extends ViewPart {
- private IFile file;
- // cached for efficiency
- private ILogEntry[] entries;
- private CVSTeamProvider provider;
-
- private TableViewer tableViewer;
- private TextViewer textViewer;
- private TableViewer tagViewer;
-
- private OpenLogEntryAction openAction;
- private IAction toggleTextAction;
- private IAction toggleListAction;
- private TextViewerAction copyAction;
- private TextViewerAction selectAllAction;
- private Action getContentsAction;
- private Action getRevisionAction;
- private Action refreshAction;
-
- private SashForm sashForm;
- private SashForm innerSashForm;
-
- //column constants
- private static final int COL_REVISION = 0;
- private static final int COL_TAGS = 1;
- private static final int COL_DATE = 2;
- private static final int COL_AUTHOR = 3;
- private static final int COL_COMMENT = 4;
-
- private Image branchImage;
- private Image versionImage;
-
- private ILogEntry currentSelection;
- private String currentRevision;
-
- class HistoryLabelProvider extends LabelProvider implements ITableLabelProvider {
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
- public String getColumnText(Object element, int columnIndex) {
- ILogEntry entry = (ILogEntry)element;
- switch (columnIndex) {
- case COL_REVISION:
- String revision = entry.getRevision();
- if (currentRevision != null && currentRevision.equals(revision)) {
- revision = Policy.bind("currentRevision", revision); //$NON-NLS-1$
- }
- return revision;
- case COL_TAGS:
- CVSTag[] tags = entry.getTags();
- StringBuffer result = new StringBuffer();
- for (int i = 0; i < tags.length; i++) {
- result.append(tags[i].getName());
- if (i < tags.length - 1) {
- result.append(", "); //$NON-NLS-1$
- }
- }
- return result.toString();
- case COL_DATE:
- Date date = entry.getDate();
- if (date == null) return Policy.bind("notAvailable"); //$NON-NLS-1$
- return DateFormat.getInstance().format(date);
- case COL_AUTHOR:
- return entry.getAuthor();
- case COL_COMMENT:
- String comment = entry.getComment();
- int index = comment.indexOf("\n"); //$NON-NLS-1$
- switch (index) {
- case -1:
- return comment;
- case 0:
- return Policy.bind("HistoryView.[...]_4"); //$NON-NLS-1$
- default:
- return Policy.bind("CVSCompareRevisionsInput.truncate", comment.substring(0, index)); //$NON-NLS-1$
- }
- }
- return ""; //$NON-NLS-1$
- }
- }
-
- public static final String VIEW_ID = "org.eclipse.team.ccvs.ui.HistoryView"; //$NON-NLS-1$
-
- /**
- * Adds the action contributions for this view.
- */
- protected void contributeActions() {
- // Refresh (toolbar)
- refreshAction = new Action(Policy.bind("HistoryView.refreshLabel"), CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_REFRESH)) { //$NON-NLS-1$
- public void run() {
- BusyIndicator.showWhile(tableViewer.getTable().getDisplay(), new Runnable() {
- public void run() {
- tableViewer.refresh();
- }
- });
- }
- };
- refreshAction.setToolTipText(Policy.bind("HistoryView.refresh")); //$NON-NLS-1$
-
- // Double click open action
- openAction = new OpenLogEntryAction();
- tableViewer.getTable().addListener(SWT.DefaultSelection, new Listener() {
- public void handleEvent(Event e) {
- openAction.selectionChanged(null, tableViewer.getSelection());
- openAction.run(null);
- }
- });
-
- getContentsAction = getContextMenuAction(Policy.bind("HistoryView.getContentsAction"), new IWorkspaceRunnable() { //$NON-NLS-1$
- public void run(IProgressMonitor monitor) throws CoreException {
- ICVSRemoteFile remoteFile = currentSelection.getRemoteFile();
- monitor.beginTask(null, 100);
- try {
- if(confirmOverwrite()) {
- InputStream in = remoteFile.getContents(new SubProgressMonitor(monitor, 50));
- file.setContents(in, false, true, new SubProgressMonitor(monitor, 50));
- }
- } catch (TeamException e) {
- throw new CoreException(e.getStatus());
- } finally {
- monitor.done();
- }
- }
- });
-
-
- getRevisionAction = getContextMenuAction(Policy.bind("HistoryView.getRevisionAction"), new IWorkspaceRunnable() { //$NON-NLS-1$
- public void run(IProgressMonitor monitor) throws CoreException {
- ICVSRemoteFile remoteFile = currentSelection.getRemoteFile();
- try {
- if(confirmOverwrite()) {
- CVSTeamProvider provider = (CVSTeamProvider)RepositoryProvider.getProvider(file.getProject());
- CVSTag revisionTag = new CVSTag(remoteFile.getRevision(), CVSTag.VERSION);
-
- if(CVSAction.checkForMixingTags(getSite().getShell(), new IResource[] {file}, revisionTag)) {
- provider.update(new IResource[] {file}, new Command.LocalOption[] {Command.UPDATE.IGNORE_LOCAL_CHANGES},
- revisionTag, true /*create backups*/, monitor);
- currentRevision = revisionTag.getName();
- tableViewer.refresh();
- }
- }
- } catch (TeamException e) {
- throw new CoreException(e.getStatus());
- }
- }
- });
-
- // Toggle text visible action
- final IPreferenceStore store = CVSUIPlugin.getPlugin().getPreferenceStore();
- toggleTextAction = new Action(Policy.bind("HistoryView.showComment")) { //$NON-NLS-1$
- public void run() {
- setViewerVisibility();
- store.setValue(ICVSUIConstants.PREF_SHOW_COMMENTS, toggleTextAction.isChecked());
- }
- };
- toggleTextAction.setChecked(store.getBoolean(ICVSUIConstants.PREF_SHOW_COMMENTS));
- // Toggle list visible action
- toggleListAction = new Action(Policy.bind("HistoryView.showTags")) { //$NON-NLS-1$
- public void run() {
- setViewerVisibility();
- store.setValue(ICVSUIConstants.PREF_SHOW_TAGS, toggleListAction.isChecked());
- }
- };
- toggleListAction.setChecked(store.getBoolean(ICVSUIConstants.PREF_SHOW_TAGS));
-
- // Contribute actions to popup menu
- MenuManager menuMgr = new MenuManager();
- Menu menu = menuMgr.createContextMenu(tableViewer.getTable());
- menuMgr.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager menuMgr) {
- fillTableMenu(menuMgr);
- }
- });
- menuMgr.setRemoveAllWhenShown(true);
- tableViewer.getTable().setMenu(menu);
- getSite().registerContextMenu(menuMgr, tableViewer);
-
- // Contribute toggle text visible to the toolbar drop-down
- IActionBars actionBars = getViewSite().getActionBars();
- IMenuManager actionBarsMenu = actionBars.getMenuManager();
- actionBarsMenu.add(toggleTextAction);
- actionBarsMenu.add(toggleListAction);
-
- // Create the local tool bar
- IToolBarManager tbm = getViewSite().getActionBars().getToolBarManager();
- tbm.add(refreshAction);
- tbm.update(false);
-
- // Create actions for the text editor
- copyAction = new TextViewerAction(textViewer, ITextOperationTarget.COPY);
- copyAction.setText(Policy.bind("HistoryView.copy")); //$NON-NLS-1$
- actionBars.setGlobalActionHandler(ITextEditorActionConstants.COPY, copyAction);
-
- selectAllAction = new TextViewerAction(textViewer, ITextOperationTarget.SELECT_ALL);
- selectAllAction.setText(Policy.bind("HistoryView.selectAll")); //$NON-NLS-1$
- actionBars.setGlobalActionHandler(ITextEditorActionConstants.SELECT_ALL, selectAllAction);
-
- actionBars.updateActionBars();
-
- menuMgr = new MenuManager();
- menuMgr.setRemoveAllWhenShown(true);
- menuMgr.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager menuMgr) {
- fillTextMenu(menuMgr);
- }
- });
- StyledText text = textViewer.getTextWidget();
- menu = menuMgr.createContextMenu(text);
- text.setMenu(menu);
- }
- private void setViewerVisibility() {
- boolean showText = toggleTextAction.isChecked();
- boolean showList = toggleListAction.isChecked();
- if (showText && showList) {
- sashForm.setMaximizedControl(null);
- innerSashForm.setMaximizedControl(null);
- } else if (showText) {
- sashForm.setMaximizedControl(null);
- innerSashForm.setMaximizedControl(textViewer.getTextWidget());
- } else if (showList) {
- sashForm.setMaximizedControl(null);
- innerSashForm.setMaximizedControl(tagViewer.getTable());
- } else {
- sashForm.setMaximizedControl(tableViewer.getControl());
- }
- }
- /**
- * Creates the columns for the history table.
- */
- private void createColumns(Table table, TableLayout layout) {
- SelectionListener headerListener = getColumnListener();
- // revision
- TableColumn col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- col.setText(Policy.bind("HistoryView.revision")); //$NON-NLS-1$
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(20, true));
-
- // tags
- col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- col.setText(Policy.bind("HistoryView.tags")); //$NON-NLS-1$
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(20, true));
-
- // creation date
- col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- col.setText(Policy.bind("HistoryView.date")); //$NON-NLS-1$
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(20, true));
-
- // author
- col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- col.setText(Policy.bind("HistoryView.author")); //$NON-NLS-1$
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(20, true));
-
- //comment
- col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- col.setText(Policy.bind("HistoryView.comment")); //$NON-NLS-1$
- col.addSelectionListener(headerListener);
- layout.addColumnData(new ColumnWeightData(50, true));
- }
- /*
- * Method declared on IWorkbenchPart
- */
- public void createPartControl(Composite parent) {
- initializeImages();
- sashForm = new SashForm(parent, SWT.VERTICAL);
- sashForm.setLayoutData(new GridData(GridData.FILL_BOTH));
- tableViewer = createTable(sashForm);
- innerSashForm = new SashForm(sashForm, SWT.HORIZONTAL);
- tagViewer = createTagTable(innerSashForm);
- textViewer = createText(innerSashForm);
- sashForm.setWeights(new int[] { 70, 30 });
- innerSashForm.setWeights(new int[] { 50, 50 });
- contributeActions();
- setViewerVisibility();
- // set F1 help
- WorkbenchHelp.setHelp(tableViewer.getControl(), IHelpContextIds.RESOURCE_HISTORY_VIEW);
- initDragAndDrop();
- }
- private void initializeImages() {
- CVSUIPlugin plugin = CVSUIPlugin.getPlugin();
- versionImage = plugin.getImageDescriptor(ICVSUIConstants.IMG_PROJECT_VERSION).createImage();
- branchImage = plugin.getImageDescriptor(ICVSUIConstants.IMG_TAG).createImage();
- }
- /**
- * Creates the group that displays lists of the available repositories
- * and team streams.
- *
- * @param the parent composite to contain the group
- * @return the group control
- */
- protected TableViewer createTable(Composite parent) {
- Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION);
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- GridData data = new GridData(GridData.FILL_BOTH);
- table.setLayoutData(data);
-
- TableLayout layout = new TableLayout();
- table.setLayout(layout);
-
- createColumns(table, layout);
-
- TableViewer viewer = new TableViewer(table);
- viewer.setContentProvider(new IStructuredContentProvider() {
- public Object[] getElements(Object inputElement) {
- // Short-circuit to optimize
- if (entries != null) return entries;
-
- if (!(inputElement instanceof ICVSRemoteFile)) return null;
- final ICVSRemoteFile remoteFile = (ICVSRemoteFile)inputElement;
- final Object[][] result = new Object[1][];
- try {
- new ProgressMonitorDialog(getViewer().getTable().getShell()).run(true, false, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- entries = remoteFile.getLogEntries(monitor);
- result[0] = entries;
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InterruptedException e) { // ignore cancellation
- result[0] = new Object[0];
- } catch (InvocationTargetException e) {
- Throwable t = e.getTargetException();
- if (t instanceof TeamException) {
- ErrorDialog.openError(getViewSite().getShell(), null, null, ((TeamException) t).getStatus());
- }
- result[0] = new Object[0];
- }
- return result[0];
- }
- public void dispose() {
- }
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- entries = null;
- }
- });
- viewer.setLabelProvider(new HistoryLabelProvider());
-
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- ISelection selection = event.getSelection();
- if (selection == null || !(selection instanceof IStructuredSelection)) {
- textViewer.setDocument(new Document("")); //$NON-NLS-1$
- tagViewer.setInput(null);
- return;
- }
- IStructuredSelection ss = (IStructuredSelection)selection;
- if (ss.size() != 1) {
- textViewer.setDocument(new Document("")); //$NON-NLS-1$
- tagViewer.setInput(null);
- return;
- }
- ILogEntry entry = (ILogEntry)ss.getFirstElement();
- textViewer.setDocument(new Document(entry.getComment()));
- tagViewer.setInput(entry.getTags());
- }
- });
-
- // By default, reverse sort by revision.
- HistorySorter sorter = new HistorySorter(COL_REVISION);
- sorter.setReversed(true);
- viewer.setSorter(sorter);
-
- return viewer;
- }
- private TableViewer createTagTable(Composite parent) {
- Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.BORDER);
- TableViewer result = new TableViewer(table);
- TableLayout layout = new TableLayout();
- layout.addColumnData(new ColumnWeightData(100));
- table.setLayout(layout);
- result.setContentProvider(new SimpleContentProvider() {
- public Object[] getElements(Object inputElement) {
- if (inputElement == null) return new Object[0];
- CVSTag[] tags = (CVSTag[])inputElement;
- return tags;
- }
- });
- result.setLabelProvider(new LabelProvider() {
- public Image getImage(Object element) {
- if (element == null) return null;
- CVSTag tag = (CVSTag)element;
- switch (tag.getType()) {
- case CVSTag.BRANCH:
- case CVSTag.HEAD:
- return branchImage;
- case CVSTag.VERSION:
- return versionImage;
- }
- return null;
- }
- public String getText(Object element) {
- return ((CVSTag)element).getName();
- }
- });
- result.setSorter(new ViewerSorter() {
- public int compare(Viewer viewer, Object e1, Object e2) {
- if (!(e1 instanceof CVSTag) || !(e2 instanceof CVSTag)) return super.compare(viewer, e1, e2);
- CVSTag tag1 = (CVSTag)e1;
- CVSTag tag2 = (CVSTag)e2;
- int type1 = tag1.getType();
- int type2 = tag2.getType();
- if (type1 != type2) {
- return type2 - type1;
- }
- return super.compare(viewer, tag1, tag2);
- }
- });
- return result;
- }
- protected TextViewer createText(Composite parent) {
- TextViewer result = new TextViewer(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.READ_ONLY);
- result.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- copyAction.update();
- }
- });
- return result;
- }
- public void dispose() {
- if (branchImage != null) {
- branchImage.dispose();
- branchImage = null;
- }
- if (versionImage != null) {
- versionImage.dispose();
- versionImage = null;
- }
- }
- /**
- * Adds the listener that sets the sorter.
- */
- private SelectionListener getColumnListener() {
- /**
- * This class handles selections of the column headers.
- * Selection of the column header will cause resorting
- * of the shown tasks using that column's sorter.
- * Repeated selection of the header will toggle
- * sorting order (ascending versus descending).
- */
- return new SelectionAdapter() {
- /**
- * Handles the case of user selecting the
- * header area.
- * <p>If the column has not been selected previously,
- * it will set the sorter of that column to be
- * the current tasklist sorter. Repeated
- * presses on the same column header will
- * toggle sorting order (ascending/descending).
- */
- public void widgetSelected(SelectionEvent e) {
- // column selected - need to sort
- int column = tableViewer.getTable().indexOf((TableColumn) e.widget);
- HistorySorter oldSorter = (HistorySorter)tableViewer.getSorter();
- if (oldSorter != null && column == oldSorter.getColumnNumber()) {
- oldSorter.setReversed(!oldSorter.isReversed());
- tableViewer.refresh();
- } else {
- tableViewer.setSorter(new HistorySorter(column));
- }
- }
- };
- }
- /**
- * Returns the table viewer contained in this view.
- */
- protected TableViewer getViewer() {
- return tableViewer;
- }
- /**
- * Adds drag and drop support to the history view.
- */
- void initDragAndDrop() {
- int ops = DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK;
- Transfer[] transfers = new Transfer[] {ResourceTransfer.getInstance()};
- tableViewer.addDropSupport(ops, transfers, new HistoryDropAdapter(tableViewer, this));
- }
- private void fillTableMenu(IMenuManager manager) {
- // file actions go first (view file)
- manager.add(new Separator(IWorkbenchActionConstants.GROUP_FILE));
- if (file != null) {
- // Add the "Add to Workspace" action if 1 revision is selected.
- ISelection sel = tableViewer.getSelection();
- if (!sel.isEmpty()) {
- if (sel instanceof IStructuredSelection) {
- if (((IStructuredSelection)sel).size() == 1) {
- manager.add(getContentsAction);
- manager.add(getRevisionAction);
- }
- }
- }
- }
- manager.add(new Separator("additions")); //$NON-NLS-1$
- manager.add(refreshAction);
- manager.add(new Separator("additions-end")); //$NON-NLS-1$
- }
- private void fillTextMenu(IMenuManager manager) {
- manager.add(copyAction);
- manager.add(selectAllAction);
- }
- /**
- * Makes the history view visible in the active perspective. If there
- * isn't a history view registered <code>null</code> is returned.
- * Otherwise the opened view part is returned.
- */
- public static HistoryView openInActivePerspective() {
- try {
- return (HistoryView)CVSUIPlugin.getActivePage().showView(VIEW_ID);
- } catch (PartInitException pe) {
- return null;
- }
- }
- /** (Non-javadoc)
- * Method declared on IWorkbenchPart
- */
- public void setFocus() {
- if (tableViewer != null) {
- Table control = tableViewer.getTable();
- if (control != null && !control.isDisposed()) {
- control.setFocus();
- }
- }
- }
-
- /**
- * Shows the history for the given IResource in the view.
- *
- * Only files are supported for now.
- */
- public void showHistory(IResource resource) {
- if (resource instanceof IFile) {
- IFile file = (IFile)resource;
- this.file = file;
- RepositoryProvider teamProvider = RepositoryProvider.getProvider(file.getProject(), CVSProviderPlugin.getTypeId());
- if (teamProvider != null) {
- this.provider = (CVSTeamProvider)teamProvider;
- try {
- ICVSRemoteFile remoteFile = (ICVSRemoteFile)CVSWorkspaceRoot.getRemoteResourceFor(file);
- currentRevision = remoteFile.getRevision();
- tableViewer.setInput(remoteFile);
- setTitle(Policy.bind("HistoryView.titleWithArgument", remoteFile.getName())); //$NON-NLS-1$
- } catch (TeamException e) {
- ErrorDialog.openError(getViewSite().getShell(), null, null, e.getStatus());
- }
- }
- return;
- }
- this.file = null;
- tableViewer.setInput(null);
- setTitle(Policy.bind("HistoryView.title")); //$NON-NLS-1$
- }
-
- /**
- * Shows the history for the given ICVSRemoteFile in the view.
- */
- public void showHistory(ICVSRemoteFile file, String currentRevision) {
- if (file == null) {
- tableViewer.setInput(null);
- setTitle(Policy.bind("HistoryView.title")); //$NON-NLS-1$
- return;
- }
- this.currentRevision = currentRevision;
- this.file = null;
- tableViewer.setInput(file);
- setTitle(Policy.bind("HistoryView.titleWithArgument", file.getName())); //$NON-NLS-1$
- }
-
- private Action getContextMenuAction(String title, final IWorkspaceRunnable action) {
- return new Action(title) {
- public void run() {
- try {
- if (file == null) return;
- ISelection selection = tableViewer.getSelection();
- if (!(selection instanceof IStructuredSelection)) return;
- IStructuredSelection ss = (IStructuredSelection)selection;
- Object o = ss.getFirstElement();
- currentSelection = (ILogEntry)o;
- new ProgressMonitorDialog(getViewSite().getShell()).run(false, true, new WorkspaceModifyOperation() {
- protected void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- action.run(monitor);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InvocationTargetException e) {
- Throwable t = e.getTargetException();
- if (t instanceof TeamException) {
- ErrorDialog.openError(getViewSite().getShell(), null, null, ((TeamException)t).getStatus());
- } else if (t instanceof CoreException) {
- IStatus status = ((CoreException)t).getStatus();
- ErrorDialog.openError(getViewSite().getShell(), null, null, status);
- CVSUIPlugin.log(status);
- } else {
- // To do
- }
- } catch (InterruptedException e) {
- // Do nothing
- }
- }
-
- public boolean isEnabled() {
- ISelection selection = tableViewer.getSelection();
- if (!(selection instanceof IStructuredSelection)) return false;
- IStructuredSelection ss = (IStructuredSelection)selection;
- if(ss.size() != 1) return false;
- return true;
- }
- };
- }
-
- private boolean confirmOverwrite() {
- if (file!=null && file.exists()) {
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor(file);
- try {
- if(cvsFile.isModified()) {
- String title = Policy.bind("HistoryView.overwriteTitle"); //$NON-NLS-1$
- String msg = Policy.bind("HistoryView.overwriteMsg"); //$NON-NLS-1$
- final MessageDialog dialog = new MessageDialog(getViewSite().getShell(), title, null, msg, MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.CANCEL_LABEL }, 0);
- final int[] result = new int[1];
- getViewSite().getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- result[0] = dialog.open();
- }});
- if (result[0] != 0) {
- // cancel
- return false;
- }
- }
- } catch(CVSException e) {
- CVSUIPlugin.log(e.getStatus());
- }
- }
- return true;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java
deleted file mode 100644
index 797ca5f90..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.team.internal.ccvs.ui;
-
-public interface ICVSUIConstants {
- // image path
- public final String ICON_PATH = "icons/full/"; //$NON-NLS-1$
-
- // images
-
- // overlays
- public final String IMG_MERGEABLE_CONFLICT = "ovr16/confauto_ov.gif"; //$NON-NLS-1$
- public final String IMG_QUESTIONABLE = "ovr16/question_ov.gif"; //$NON-NLS-1$
- public final String IMG_MERGED = "ovr16/merged_ov.gif"; //$NON-NLS-1$
-
- // objects
- public final String IMG_REPOSITORY = "obj16/repository_rep.gif"; //$NON-NLS-1$
- public final String IMG_TAG = "obj16/tag.gif"; //$NON-NLS-1$
- public final String IMG_BRANCHES_CATEGORY = "obj16/branches_rep.gif"; //$NON-NLS-1$
- public final String IMG_VERSIONS_CATEGORY = "obj16/versions_rep.gif"; //$NON-NLS-1$
- public final String IMG_PROJECT_VERSION = "obj16/prjversions_rep.gif"; //$NON-NLS-1$
-
- // toolbar
- public final String IMG_REFRESH = "clcl16/refresh.gif"; //$NON-NLS-1$
- public final String IMG_CLEAR = "clcl16/clear_co.gif"; //$NON-NLS-1$
-
- // wizards
- public final String IMG_NEWLOCATION = "wizards/newlocation_wiz.gif"; //$NON-NLS-1$
-
- // preferences
- public final String PREF_SHOW_COMMENTS = "pref_show_comments"; //$NON-NLS-1$
- public final String PREF_SHOW_TAGS = "pref_show_tags"; //$NON-NLS-1$
- public final String PREF_PRUNE_EMPTY_DIRECTORIES = "pref_prune_empty_directories"; //$NON-NLS-1$
- public final String PREF_TIMEOUT = "pref_timeout"; //$NON-NLS-1$
- public final String PREF_QUIETNESS = "pref_quietness"; //$NON-NLS-1$
- public final String PREF_SHOW_MODULES = "pref_show_modules"; //$NON-NLS-1$
- public final String PREF_CVS_RSH = "pref_cvs_rsh"; //$NON-NLS-1$
- public final String PREF_CVS_SERVER = "pref_cvs_server"; //$NON-NLS-1$
- public final String PREF_CONSIDER_CONTENTS = "pref_consider_contents"; //$NON-NLS-1$
- public final String PREF_SHOW_MARKERS = "pref_show_markers"; //$NON-NLS-1$
- public final String PREF_REPLACE_UNMANAGED = "pref_replace_unmanaged"; //$NON-NLS-1$
- public final String PREF_COMPRESSION_LEVEL = "pref_compression_level"; //$NON-NLS-1$
- public final String PREF_TEXT_KSUBST = "pref_text_ksubst"; //$NON-NLS-1$
- public final String PREF_PROMPT_ON_MIXED_TAGS = "pref_prompt_on_mixed_tags"; //$NON-NLS-1$
- public final String PREF_PROMPT_ON_SAVING_IN_SYNC = "pref_prompt_on_saving_in_sync"; //$NON-NLS-1$
- public final String PREF_SAVE_DIRTY_EDITORS = "pref_save_dirty_editors"; //$NON-NLS-1$
- public final String PREF_PROMPT_ON_CHANGE_GRANULARITY = "pref_prompt_on_change_granularity"; //$NON-NLS-1$
-
- // console preferences
- public final String PREF_CONSOLE_COMMAND_COLOR = "pref_console_command_color"; //$NON-NLS-1$
- public final String PREF_CONSOLE_MESSAGE_COLOR = "pref_console_message_color"; //$NON-NLS-1$
- public final String PREF_CONSOLE_ERROR_COLOR = "pref_console_error_color"; //$NON-NLS-1$
- public final String PREF_CONSOLE_FONT = "pref_console_font"; //$NON-NLS-1$
- public final String PREF_CONSOLE_AUTO_OPEN = "pref_console_auto_open"; //$NON-NLS-1$
-
- // decorator preferences
- public final String PREF_FILETEXT_DECORATION = "pref_filetext_decoration"; //$NON-NLS-1$
- public final String PREF_FOLDERTEXT_DECORATION = "pref_foldertext_decoration"; //$NON-NLS-1$
- public final String PREF_PROJECTTEXT_DECORATION = "pref_projecttext_decoration"; //$NON-NLS-1$
-
- public final String PREF_SHOW_DIRTY_DECORATION = "pref_show_overlaydirty"; //$NON-NLS-1$
- public final String PREF_SHOW_ADDED_DECORATION = "pref_show_added"; //$NON-NLS-1$
- public final String PREF_SHOW_HASREMOTE_DECORATION = "pref_show_hasremote"; //$NON-NLS-1$
-
- public final String PREF_DIRTY_FLAG = "pref_dirty_flag"; //$NON-NLS-1$
- public final String PREF_ADDED_FLAG = "pref_added_flag"; //$NON-NLS-1$
-
- public final String PREF_CALCULATE_DIRTY = "pref_calculate_dirty"; //$NON-NLS-1$
-
- // Wizard banners
- public final String IMG_WIZBAN_SHARE = "wizban/newconnect_wizban.gif"; //$NON-NLS-1$
- public final String IMG_WIZBAN_BRANCH = "wizban/newstream_wizban.gif"; //$NON-NLS-1$
- public final String IMG_WIZBAN_MERGE = "wizban/mergestream_wizban.gif"; //$NON-NLS-1$
- public final String IMG_WIZBAN_DIFF = "wizban/createpatch_wizban.gif"; //$NON-NLS-1$
- public final String IMG_WIZBAN_KEYWORD = "wizban/keywordsub_wizban.gif"; //$NON-NLS-1$
- public final String IMG_WIZBAN_NEW_LOCATION = "wizban/newlocation_wizban.gif"; //$NON-NLS-1$
-
- // Properties
- public final String PROP_NAME = "cvs.name"; //$NON-NLS-1$
- public final String PROP_REVISION = "cvs.revision"; //$NON-NLS-1$
- public final String PROP_AUTHOR = "cvs.author"; //$NON-NLS-1$
- public final String PROP_COMMENT = "cvs.comment"; //$NON-NLS-1$
- public final String PROP_DATE = "cvs.date"; //$NON-NLS-1$
- public final String PROP_DIRTY = "cvs.dirty"; //$NON-NLS-1$
- public final String PROP_MODIFIED = "cvs.modified"; //$NON-NLS-1$
- public final String PROP_KEYWORD = "cvs.date"; //$NON-NLS-1$
- public final String PROP_TAG = "cvs.tag"; //$NON-NLS-1$
- public final String PROP_PERMISSIONS = "cvs.permissions"; //$NON-NLS-1$
- public final String PROP_HOST = "cvs.host"; //$NON-NLS-1$
- public final String PROP_USER = "cvs.user"; //$NON-NLS-1$
- public final String PROP_METHOD = "cvs.method"; //$NON-NLS-1$
- public final String PROP_PORT = "cvs.port"; //$NON-NLS-1$
- public final String PROP_ROOT = "cvs.root"; //$NON-NLS-1$
-
- // preference options
- public final int OPTION_NEVER = 1; //$NON-NLS-1$
- public final int OPTION_PROMPT = 2; //$NON-NLS-1$
- public final int OPTION_AUTOMATIC = 3; //$NON-NLS-1$
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IDecorationNotifier.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IDecorationNotifier.java
deleted file mode 100644
index d465f5893..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IDecorationNotifier.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IResource;
-
-public interface IDecorationNotifier {
-
- /**
- * Answers the next resource that needs decorating.
- */
- public IResource next();
-
- /**
- * Called to associate a decoration to a resource.
- */
- public void decorated(IResource[] resource, CVSDecoration[] decoration);
-
- /**
- * Number of resources remaining to be decorated
- */
- public int remaining();
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IHelpContextIds.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IHelpContextIds.java
deleted file mode 100644
index b14475b70..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IHelpContextIds.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-public interface IHelpContextIds {
- public static final String PREFIX = CVSUIPlugin.ID + "."; //$NON-NLS-1$
-
- // Dialogs
- public static final String TAG_CONFIGURATION_OVERVIEW = PREFIX + "tag_configuration_overview"; //$NON-NLS-1$
- public static final String TAG_CONFIGURATION_REFRESHLIST = PREFIX + "tag_configuration_refreshlist"; //$NON-NLS-1$
- public static final String TAG_CONFIGURATION_REFRESHACTION = PREFIX + "tag_configuration_refreshaction"; //$NON-NLS-1$
- public static final String USER_VALIDATION_DIALOG = PREFIX + "user_validation_dialog_context"; //$NON-NLS-1$
- public static final String RELEASE_COMMENT_DIALOG = PREFIX + "release_comment_dialog_context"; //$NON-NLS-1$
- public static final String BRANCH_DIALOG = PREFIX + "branch_dialog_context"; //$NON-NLS-1$
-
- // Different uses of the TagSelectionDialog (not done in xml)
- public static final String REPLACE_TAG_SELECTION_DIALOG = PREFIX + "replace_tag_selection_dialog_context"; //$NON-NLS-1$
- public static final String COMPARE_TAG_SELECTION_DIALOG = PREFIX + "compare_tag_selection_dialog_context"; //$NON-NLS-1$
- public static final String TAG_REMOTE_WITH_EXISTING_DIALOG = PREFIX + "tag_remote_with_existing_dialog_context"; //$NON-NLS-1$
- public static final String SHARE_WITH_EXISTING_TAG_SELETION_DIALOG = PREFIX + "share_with_existing_tag_selection_dialog_context"; //$NON-NLS-1$
-
- // Different uses of the TagAsVersionDialog (not done in xml)
- public static final String TAG_AS_VERSION_DIALOG = PREFIX + "tag_as_version_dialog_context"; //$NON-NLS-1$
-
- // Different uses of InputDialog from actions (not done)
- public static final String DEFINE_BRANCH_DIALOG = PREFIX + "define_branch_dialog_context"; //$NON-NLS-1$
- public static final String DEFINE_VERSION_DIALOG = PREFIX + "define_version_dialog_context"; //$NON-NLS-1$
-
- // Wizards (no one seems to add wizard help, only wizard page help)
- // (not done)
- public static final String SHARING_WIZARD = PREFIX + "sharing_wizard_context"; //$NON-NLS-1$
- public static final String KEYWORD_SUBSTITUTION_WIZARD = PREFIX + "keyword_substituton_wizard_context"; //$NON-NLS-1$
- public static final String NEW_LOCATION_WIZARD = PREFIX + "new_location_wizard_context"; //$NON-NLS-1$
- public static final String PATCH_WIZARD = PREFIX + "patch_wizard_context"; //$NON-NLS-1$
-
- // Wizard Pages (not done in xml)
- public static final String SHARING_AUTOCONNECT_PAGE = PREFIX + "sharing_autoconnect_page_context"; //$NON-NLS-1$
- public static final String SHARING_SELECT_REPOSITORY_PAGE = PREFIX + "sharing_select_repository_page_context"; //$NON-NLS-1$
- public static final String SHARING_NEW_REPOSITORY_PAGE = PREFIX + "sharing_new_repository_page_context"; //$NON-NLS-1$
- public static final String SHARING_MODULE_PAGE = PREFIX + "sharing_module_page_context"; //$NON-NLS-1$
- public static final String SHARING_FINISH_PAGE = PREFIX + "sharing_finish_page_context"; //$NON-NLS-1$
- public static final String PATCH_SELECTION_PAGE = PREFIX + "patch_selection_page_context"; //$NON-NLS-1$
- public static final String PATCH_OPTIONS_PAGE = PREFIX + "patch_options_page_context"; //$NON-NLS-1$
- public static final String KEYWORD_SUBSTITUTION_SELECTION_PAGE = PREFIX + "keyword_substituton_selection_page_context"; //$NON-NLS-1$
- public static final String KEYWORD_SUBSTITUTION_SUMMARY_PAGE = PREFIX + "keyword_substituton_summary_page_context"; //$NON-NLS-1$
- public static final String KEYWORD_SUBSTITUTION_SHARED_PAGE = PREFIX + "keyword_substituton_shared_page_context"; //$NON-NLS-1$
- public static final String KEYWORD_SUBSTITUTION_CHANGED_PAGE = PREFIX + "keyword_substituton_changed_page_context"; //$NON-NLS-1$
-
- // Preference Pages
- public static final String PREF_PRUNE = PREFIX + "prune_empty_directories_pref"; //$NON-NLS-1$
- public static final String PREF_QUIET = PREFIX + "quietness_level_pref"; //$NON-NLS-1$
- public static final String PREF_COMPRESSION = PREFIX + "compression_level_pref"; //$NON-NLS-1$
- public static final String PREF_KEYWORDMODE = PREFIX + "default_keywordmode_pref"; //$NON-NLS-1$
- public static final String PREF_COMMS_TIMEOUT = PREFIX + "comms_timeout_pref"; //$NON-NLS-1$
- public static final String PREF_CONSIDER_CONTENT = PREFIX + "consider_content_pref"; //$NON-NLS-1$
- public static final String PREF_MARKERS_ENABLED = PREFIX + "markers_enabled_pref"; //$NON-NLS-1$
- public static final String PREF_REPLACE_DELETE_UNMANAGED = PREFIX + "replace_deletion_of_unmanaged_pref"; //$NON-NLS-1$
-
- // Views
- public static final String CONSOLE_VIEW = PREFIX + "console_view_context"; //$NON-NLS-1$
- public static final String REPOSITORIES_VIEW = PREFIX + "repositories_view_context"; //$NON-NLS-1$
- public static final String RESOURCE_HISTORY_VIEW = PREFIX + "resource_history_view_context"; //$NON-NLS-1$
- public static final String COMPARE_REVISIONS_VIEW = PREFIX + "compare_revision_view_context"; //$NON-NLS-1$
-
- // Viewers
- public static final String CATCHUP_RELEASE_VIEWER = PREFIX + "catchup_release_viewer_context"; //$NON-NLS-1$
-
- // Add to .cvsignor dialog
- public static final String ADD_TO_CVSIGNORE = PREFIX + "add_to_cvsignore_context"; //$NON-NLS-1$
-
- // Actions
- public static final String GET_FILE_REVISION_ACTION = PREFIX + "get_file_revision_action_context"; //$NON-NLS-1$
- public static final String GET_FILE_CONTENTS_ACTION = PREFIX + "get_file_contents_action_context"; //$NON-NLS-1$
-
- // Team menu actions (not done: I think these are pure xml)
- public static final String TEAM_SYNCHRONIZE_ACTION = PREFIX + "team_synchronize_action_context"; //$NON-NLS-1$
- public static final String TEAM_SYNCHRONIZE_OUTGOING_ACTION = PREFIX + "team_synchronize_outgoing_action_context"; //$NON-NLS-1$
- public static final String TEAM_COMMIT_ACTION = PREFIX + "team_commit_action_context"; //$NON-NLS-1$
- public static final String TEAM_UPDATE_ACTION = PREFIX + "team_update_action_context"; //$NON-NLS-1$
- public static final String TEAM_CREATE_PATCH_ACTION = PREFIX + "team_create_patch_action_context"; //$NON-NLS-1$
- public static final String TEAM_TAG_AS_VERSION_ACTION = PREFIX + "team_tag_as_version_action_context"; //$NON-NLS-1$
- public static final String TEAM_BRANCH_ACTION = PREFIX + "team_branch_action_context"; //$NON-NLS-1$
- public static final String TEAM_MERGE_ACTION = PREFIX + "team_merge_action_context"; //$NON-NLS-1$
- public static final String TEAM_SET_KEYWORD_MODE_ACTION = PREFIX + "team_set_keyword_mode_action_context"; //$NON-NLS-1$
- public static final String TEAM_DISCONNECT_ACTION = PREFIX + "team_disconnect_action_context"; //$NON-NLS-1$
- public static final String TEAM_ADD_ACTION = PREFIX + "team_add_action_context"; //$NON-NLS-1$
- public static final String TEAM_IGNORE_ACTION = PREFIX + "team_ignore_action_context"; //$NON-NLS-1$
-
- // Sync view menu actions (not done)
- public static final String SYNC_COMMIT_ACTION = PREFIX + "sync_commit_action_context"; //$NON-NLS-1$
- public static final String SYNC_FORCED_COMMIT_ACTION = PREFIX + "sync_forced_commit_action_context"; //$NON-NLS-1$
- public static final String SYNC_UPDATE_ACTION = PREFIX + "sync_update_action_context"; //$NON-NLS-1$
- public static final String SYNC_FORCED_UPDATE_ACTION = PREFIX + "sync_forced_update_action_context"; //$NON-NLS-1$
- public static final String SYNC_ADD_ACTION = PREFIX + "sync_add_action_context"; //$NON-NLS-1$
- public static final String SYNC_IGNORE_ACTION = PREFIX + "sync_ignore_action_context"; //$NON-NLS-1$
- public static final String MERGE_UPDATE_ACTION = PREFIX + "merge_update_action_context"; //$NON-NLS-1$
- public static final String MERGE_FORCED_UPDATE_ACTION = PREFIX + "merge_forced update_action_context"; //$NON-NLS-1$
- public static final String MERGE_UPDATE_WITH_JOIN_ACTION = PREFIX + "merge_update_with_joinaction_context"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IRepositoryListener.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IRepositoryListener.java
deleted file mode 100644
index c3e72d3bb..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IRepositoryListener.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.model.BranchTag;
-
-public interface IRepositoryListener {
- public void repositoryAdded(ICVSRepositoryLocation root);
- public void repositoryRemoved(ICVSRepositoryLocation root);
- public void branchTagsAdded(CVSTag[] tags, ICVSRepositoryLocation root);
- public void branchTagsRemoved(CVSTag[] tags, ICVSRepositoryLocation root);
- public void versionTagsAdded(CVSTag[] tags, ICVSRepositoryLocation root);
- public void versionTagsRemoved(CVSTag[] tags, ICVSRepositoryLocation root);
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IgnoreResourcesDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IgnoreResourcesDialog.java
deleted file mode 100644
index 2fe7a7f75..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IgnoreResourcesDialog.java
+++ /dev/null
@@ -1,258 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.resource.JFaceColors;
-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.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.team.internal.ccvs.core.util.FileNameMatcher;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-public class IgnoreResourcesDialog extends Dialog {
- // resources that should be ignored
- private IResource[] resources;
-
- // preference keys
- private final String ACTION_KEY = "Action"; //$NON-NLS-1$
- private static final int ADD_NAME_ENTRY = 0;
- private static final int ADD_EXTENSION_ENTRY = 1;
- private static final int ADD_CUSTOM_ENTRY = 2;
-
- // dialogs settings that are persistent between workbench sessions
- private IDialogSettings settings;
-
- // buttons
- private Button addNameEntryButton;
- private Button addExtensionEntryButton;
- private Button addCustomEntryButton;
- private Text customEntryText;
- private Label statusMessageLabel;
-
- private int selectedAction;
- private String customPattern;
-
- // layout controls
- private static final int LABEL_WIDTH_HINT = 400;
- private static final int LABEL_INDENT_WIDTH = 32;
-
- /**
- * Creates a new dialog for ignoring resources.
- * @param shell the parent shell
- * @param resources the array of resources to be ignored
- */
- public IgnoreResourcesDialog(Shell shell, IResource[] resources) {
- super(shell);
- this.resources = resources;
-
- IDialogSettings workbenchSettings = CVSUIPlugin.getPlugin().getDialogSettings();
- this.settings = workbenchSettings.getSection("IgnoreResourcesDialog");//$NON-NLS-1$
- if (settings == null) {
- this.settings = workbenchSettings.addNewSection("IgnoreResourcesDialog");//$NON-NLS-1$
- }
-
- try {
- selectedAction = settings.getInt(ACTION_KEY);
- } catch (NumberFormatException e) {
- selectedAction = ADD_NAME_ENTRY;
- }
- }
-
- /**
- * Determines the ignore pattern to use for a resource given the selected action.
- *
- * @param resource the resource
- * @return the ignore pattern for the specified resource
- */
- public String getIgnorePatternFor(IResource resource) {
- switch (selectedAction) {
- case ADD_NAME_ENTRY:
- return resource.getName();
- case ADD_EXTENSION_ENTRY: {
- String extension = resource.getFileExtension();
- return (extension == null) ? resource.getName() : "*." + extension; //$NON-NLS-1$
- }
- case ADD_CUSTOM_ENTRY:
- return customPattern;
- }
- throw new IllegalStateException();
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected void createButtonsForButtonBar(Composite parent) {
- createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- if (resources.length == 1) {
- newShell.setText(Policy.bind("IgnoreResourcesDialog.titleSingle", resources[0].getName())); //$NON-NLS-1$
- } else {
- newShell.setText(Policy.bind("IgnoreResourcesDialog.titleMany", Integer.toString(resources.length))); //$NON-NLS-1$
- }
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected Control createContents(Composite parent) {
- Control control = super.createContents(parent);
- updateEnablements();
- return control;
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected Control createDialogArea(Composite parent) {
- Composite top = new Composite(parent, SWT.NONE);
- top.setLayout(new GridLayout());
-
- WorkbenchHelp.setHelp(top, IHelpContextIds.ADD_TO_CVSIGNORE);
-
- createIndentedLabel(top, Policy.bind("IgnoreResourcesDialog.prompt"), 0); //$NON-NLS-1$
-
- Listener selectionListener = new Listener() {
- public void handleEvent(Event event) {
- updateEnablements();
- }
- };
- Listener modifyListener = new Listener() {
- public void handleEvent(Event event) {
- validate();
- }
- };
-
- addNameEntryButton = createRadioButton(top, Policy.bind("IgnoreResourcesDialog.addNameEntryButton")); //$NON-NLS-1$
- addNameEntryButton.addListener(SWT.Selection, selectionListener);
- addNameEntryButton.setSelection(selectedAction == ADD_NAME_ENTRY);
- createIndentedLabel(top, Policy.bind("IgnoreResourcesDialog.addNameEntryExample"), LABEL_INDENT_WIDTH); //$NON-NLS-1$
-
- addExtensionEntryButton = createRadioButton(top, Policy.bind("IgnoreResourcesDialog.addExtensionEntryButton")); //$NON-NLS-1$
- addExtensionEntryButton.addListener(SWT.Selection, selectionListener);
- addExtensionEntryButton.setSelection(selectedAction == ADD_EXTENSION_ENTRY);
- createIndentedLabel(top, Policy.bind("IgnoreResourcesDialog.addExtensionEntryExample"), LABEL_INDENT_WIDTH); //$NON-NLS-1$
-
- addCustomEntryButton = createRadioButton(top, Policy.bind("IgnoreResourcesDialog.addCustomEntryButton")); //$NON-NLS-1$
- addCustomEntryButton.addListener(SWT.Selection, selectionListener);
- addCustomEntryButton.setSelection(selectedAction == ADD_CUSTOM_ENTRY);
- createIndentedLabel(top, Policy.bind("IgnoreResourcesDialog.addCustomEntryExample"), LABEL_INDENT_WIDTH); //$NON-NLS-1$
-
- customEntryText = createIndentedText(top, resources[0].getName(), LABEL_INDENT_WIDTH);
- customEntryText.addListener(SWT.Modify, modifyListener);
-
- statusMessageLabel = createIndentedLabel(top, "", 0); //$NON-NLS-1$
- statusMessageLabel.setFont(parent.getFont());
- return top;
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected void okPressed() {
- settings.put(ACTION_KEY, selectedAction);
- super.okPressed();
- }
-
- private Label createIndentedLabel(Composite parent, String text, int indent) {
- Label label = new Label(parent, SWT.LEFT);
- label.setText(text);
- GridData data = new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.FILL_HORIZONTAL);
- data.horizontalIndent = indent;
- label.setLayoutData(data);
- return label;
- }
-
- private Text createIndentedText(Composite parent, String text, int indent) {
- Text textbox = new Text(parent, SWT.BORDER);
- textbox.setText(text);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- data.horizontalIndent = indent;
- textbox.setLayoutData(data);
- return textbox;
- }
-
- private Label createWrappingLabel(Composite parent, String text) {
- Label label = new Label(parent, SWT.WRAP);
- label.setText(text);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.widthHint = LABEL_WIDTH_HINT;
- label.setLayoutData(data);
- return label;
- }
-
- private Button createRadioButton(Composite parent, String text) {
- Button button = new Button(parent, SWT.RADIO);
- button.setText(text);
- button.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.FILL_HORIZONTAL));
- return button;
- }
-
- private void updateEnablements() {
- if (addNameEntryButton.getSelection()) {
- selectedAction = ADD_NAME_ENTRY;
- } else if (addExtensionEntryButton.getSelection()) {
- selectedAction = ADD_EXTENSION_ENTRY;
- } else if (addCustomEntryButton.getSelection()) {
- selectedAction = ADD_CUSTOM_ENTRY;
- }
- customEntryText.setEnabled(selectedAction == ADD_CUSTOM_ENTRY);
- validate();
- }
-
- private void validate() {
- if (selectedAction == ADD_CUSTOM_ENTRY) {
- customPattern = customEntryText.getText();
- if (customPattern.length() == 0) {
- setError(Policy.bind("IgnoreResourcesDialog.patternMustNotBeEmpty")); //$NON-NLS-1$
- return;
- }
- FileNameMatcher matcher = new FileNameMatcher(new String[] { customPattern });
- for (int i = 0; i < resources.length; i++) {
- String name = resources[i].getName();
- if (! matcher.match(name)) {
- setError(Policy.bind("IgnoreResourcesDialog.patternDoesNotMatchFile", name)); //$NON-NLS-1$
- return;
- }
- }
- }
- setError(null);
- }
-
- private void setError(String text) {
- if (text == null) {
- statusMessageLabel.setText(""); //$NON-NLS-1$
- getButton(IDialogConstants.OK_ID).setEnabled(true);
- } else {
- statusMessageLabel.setText(text);
- statusMessageLabel.setForeground(JFaceColors.getErrorText(getShell().getDisplay()));
- getButton(IDialogConstants.OK_ID).setEnabled(false);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/OverlayIcon.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/OverlayIcon.java
deleted file mode 100644
index bf059938d..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/OverlayIcon.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.util.Arrays;
-
-import org.eclipse.jface.resource.CompositeImageDescriptor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-
-/**
- * An OverlayIcon consists of a main icon and several adornments.
- */
-public abstract class OverlayIcon extends CompositeImageDescriptor {
- // the base image
- private Image base;
- // 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;
-
- /**
- * 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.overlays = overlays;
- this.locations = locations;
- this.size = size;
- }
- /**
- * Superclasses override to draw the overlays.
- */
- protected abstract void drawOverlays(ImageDescriptor[] overlays, int[] locations);
-
- 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) {
- drawImage(base.getImageData(), 0, 0);
- drawOverlays(overlays, locations);
- }
-
- protected Point getSize() {
- return size;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/OverlayIconCache.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/OverlayIconCache.java
deleted file mode 100644
index 6b465cdcb..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/OverlayIconCache.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Maintains a cache of OverlayIcons.
- */
-public class OverlayIconCache {
- private Map /*from OverlayIcon to Image*/ cache = new HashMap();
-
- /**
- * Returns and caches an image corresponding to the specified icon.
- * @param icon the icon
- * @return the image
- */
- public Image getImageFor(OverlayIcon icon) {
- Image image = (Image) cache.get(icon);
- if (image == null) {
- image = icon.createImage();
- cache.put(icon, image);
- }
- return image;
- }
-
- /**
- * Disposes of all images in the cache.
- */
- public void disposeAll() {
- for (Iterator it = cache.values().iterator(); it.hasNext();) {
- Image image = (Image) it.next();
- image.dispose();
- }
- cache.clear();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/Policy.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/Policy.java
deleted file mode 100644
index 05883a96a..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/Policy.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.text.MessageFormat;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.SubProgressMonitor;
-
-public class Policy {
- protected static ResourceBundle bundle = null;
-
- /**
- * Creates a NLS catalog for the given locale.
- */
- 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.
- */
- 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.
- */
- public static String bind(String id, String binding1, String binding2) {
- return bind(id, new String[] { binding1, binding2 });
- }
-
- /**
- * Gets a string from the resource bundle. We don't want to crash because of a missing String.
- * Returns the key if not found.
- */
- 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.
- */
- 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$
- }
- }
-
- /**
- * Progress monitor helpers
- */
- public static void checkCanceled(IProgressMonitor monitor) {
- if (monitor.isCanceled())
- throw new OperationCanceledException();
- }
- 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 subMonitorFor(IProgressMonitor monitor, int ticks, int style) {
- if (monitor == null)
- return new NullProgressMonitor();
- if (monitor instanceof NullProgressMonitor)
- return monitor;
- return new SubProgressMonitor(monitor, ticks, style);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ReleaseCommentDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ReleaseCommentDialog.java
deleted file mode 100644
index d5df7b4b0..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ReleaseCommentDialog.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.events.TraverseEvent;
-import org.eclipse.swt.events.TraverseListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * Prompts the user for a multi-line comment for releasing to CVS.
- */
-public class ReleaseCommentDialog extends Dialog {
- private static final int WIDTH_HINT = 350;
- private static final int HEIGHT_HINT = 50;
-
- private String comment = ""; //$NON-NLS-1$
-
- private Text text;
-
- /**
- * ReleaseCommentDialog constructor.
- *
- * @param parentShell the parent of this dialog
- */
- public ReleaseCommentDialog(Shell parentShell) {
- super(parentShell);
- }
- /*
- * @see Dialog#createDialogArea(Composite)
- */
- protected Control createDialogArea(Composite parent) {
- getShell().setText(Policy.bind("ReleaseCommentDialog.title")); //$NON-NLS-1$
- Composite composite = new Composite(parent, SWT.NULL);
- composite.setLayout(new GridLayout());
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Label label = new Label(composite, SWT.NULL);
- label.setLayoutData(new GridData());
- label.setText(Policy.bind("ReleaseCommentDialog.enterComment")); //$NON-NLS-1$
-
- text = new Text(composite, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.widthHint = WIDTH_HINT;
- data.heightHint = HEIGHT_HINT;
- text.setLayoutData(data);
- text.setText(comment);
- text.selectAll();
- text.addTraverseListener(new TraverseListener() {
- public void keyTraversed(TraverseEvent e) {
- if (e.detail == SWT.TRAVERSE_RETURN && (e.stateMask & SWT.CTRL) != 0) {
- e.doit = false;
- okPressed();
- }
- }
- });
-
- // set F1 help
- WorkbenchHelp.setHelp(composite, IHelpContextIds.RELEASE_COMMENT_DIALOG);
-
- return composite;
- }
- /**
- * Return the entered comment
- *
- * @return the comment
- */
- public String getComment() {
- return comment;
- }
- /**
- * Set the initial comment
- *
- * @param comment the initial comment
- */
- public void setComment(String comment) {
- this.comment = comment;
- }
- /*
- * @see Dialog#okPressed
- */
- protected void okPressed() {
- comment = text.getText();
- super.okPressed();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteFileEditorInput.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteFileEditorInput.java
deleted file mode 100644
index d1a93b04d..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteFileEditorInput.java
+++ /dev/null
@@ -1,178 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.ui.IPersistableElement;
-import org.eclipse.ui.IStorageEditorInput;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-/**
- * An editor input for a file in a repository.
- */
-public class RemoteFileEditorInput implements IWorkbenchAdapter, IStorageEditorInput {
- private ICVSRemoteFile file;
- private IStorage storage;
-
- /**
- * Creates FileEditionEditorInput on the given file.
- */
- public RemoteFileEditorInput(ICVSRemoteFile file) {
- this.file = file;
- }
- /**
- * Returns whether the editor input exists.
- * <p>
- * This method is primarily used to determine if an editor input should
- * appear in the "File Most Recently Used" menu. An editor input will appear
- * in the list until the return value of <code>exists</code> becomes
- * <code>false</code> or it drops off the bottom of the list.
- *
- * @return <code>true</code> if the editor input exists; <code>false</code>
- * otherwise
- */
- public boolean exists() {
- return true;
- }
- public boolean equals(Object o) {
- if (!(o instanceof RemoteFileEditorInput)) return false;
- RemoteFileEditorInput input = (RemoteFileEditorInput)o;
- return file.equals(input.file);
- }
- /**
- * Returns an object which is an instance of the given class
- * associated with this object. Returns <code>null</code> if
- * no such object can be found.
- *
- * @param adapter the adapter class to look up
- * @return a object castable to the given class,
- * or <code>null</code> if this object does not
- * have an adapter for the given class
- */
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) {
- return this;
- }
- return null;
- }
- /**
- * Returns the children of this object. When this object
- * is displayed in a tree, the returned objects will be this
- * element's children. Returns an empty array if this
- * object has no children.
- *
- * @param object The object to get the children for.
- */
- public Object[] getChildren(Object o) {
- return new Object[0];
- }
- /**
- * Returns the content type of the input. For instance, if the input
- * wraps an <code>IFile</code> the content type would be derived from
- * the extension or mime type. If the input wraps another object it
- * may just be the object type. The content type is used for
- * editor mapping.
- */
- public String getContentType() {
- String name = file.getName();
- return name.substring(name.lastIndexOf('.')+1);
- }
- /**
- * Returns the fully qualified path name of the input.
- */
- public String getFullPath() {
- //use path to make sure slashes are correct
- // to do. For now, just return the name
- //return new Path(file.getProjectName()).append(file.getProjectRelativePath()).toString();
- return getName();
- }
- /**
- * Returns the image descriptor for this input.
- *
- * @return the image descriptor for this input
- */
- public ImageDescriptor getImageDescriptor() {
- IWorkbenchAdapter fileAdapter = (IWorkbenchAdapter)file.getAdapter(IWorkbenchAdapter.class);
- return fileAdapter == null ? null : fileAdapter.getImageDescriptor(file);
- }
- /**
- * @see IWorkbenchAdapter#getImageDescriptor
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- IWorkbenchAdapter fileAdapter = (IWorkbenchAdapter)file.getAdapter(IWorkbenchAdapter.class);
- return fileAdapter == null ? null : fileAdapter.getImageDescriptor(file);
- }
- /**
- * @see IWorkbenchAdapter#getLabel
- */
- public String getLabel(Object o) {
- return file.getName();
- }
- /**
- * Returns the input name for display purposes. For instance, if
- * the fully qualified input name is "a\b\MyFile.gif" the return value for
- * <code>getName</code> is "MyFile.gif".
- */
- public String getName() {
- String name = file.getName();
- try {
- return Policy.bind("nameAndRevision", name, file.getRevision()); //$NON-NLS-1$
- } catch (TeamException e) {
- return name;
- }
- }
- /**
- * Returns the logical parent of the given object in its tree.
- * Returns <code>null</code> if there is no parent, or if this object doesn't
- * belong to a tree.
- *
- * @param object The object to get the parent for.
- */
- public Object getParent(Object o) {
- return null;
- }
- /*
- * Returns an interface used to persist the object. If the editor input
- * cannot be persisted this method returns <code>null</code>.
- */
- public IPersistableElement getPersistable() {
- //not persistable
- return null;
- }
- /**
- * Returns the underlying IStorage object.
- *
- * @return an IStorage object.
- * @exception CoreException if this method fails
- */
- public IStorage getStorage() throws CoreException {
- if (storage == null) {
- storage = new RemoteFileStorage(file);
- }
- return storage;
- }
- /**
- * Returns the tool tip text for this editor input. This text
- * is used to differentiate between two input with the same name.
- * For instance, MyClass.java in folder X and MyClass.java in folder Y.
- * <p>
- * The format of the path will vary with each input type. For instance,
- * if the editor input is of type <code>IFileEditorInput</code> this method
- * should return the fully qualified resource path. For editor input of
- * other types it may be different.
- * </p>
- * @return the tool tip text
- */
- public String getToolTipText() {
- //use path to make sure slashes are correct
- return getName();
- //return new Path(file.getProjectName()).append(file.getProjectRelativePath()).toString();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteFileStorage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteFileStorage.java
deleted file mode 100644
index a3f7a3860..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteFileStorage.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-
-public class RemoteFileStorage extends PlatformObject implements IStorage {
- ICVSRemoteFile file;
- public RemoteFileStorage(ICVSRemoteFile file) {
- this.file = file;
- }
-
- /**
- * Returns an open input stream on the contents of this file.
- * The client is responsible for closing the stream when finished.
- *
- * @return an input stream containing the contents of the file
- * @exception CoreException if this method fails.
- */
- public InputStream getContents() throws CoreException {
- try {
- final InputStream[] holder = new InputStream[1];
- CVSUIPlugin.runWithProgress(null, true /*cancelable*/, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- holder[0] = file.getContents(monitor);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- return holder[0];
- } catch (InterruptedException e) {
- // operation canceled
- } catch (InvocationTargetException e) {
- Throwable t = e.getTargetException();
- if (t instanceof TeamException) {
- throw new CoreException(((TeamException) t).getStatus());
- }
- // should not get here
- }
- return new ByteArrayInputStream(new byte[0]);
- }
- public IPath getFullPath() {
- return new Path(file.getName());
- }
- public String getName() {
- return file.getName();
- }
- public boolean isReadOnly() {
- return true;
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RepositoriesView.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RepositoriesView.java
deleted file mode 100644
index 5c36b6af6..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RepositoriesView.java
+++ /dev/null
@@ -1,317 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.Properties;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.GroupMarker;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProvider;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.wizards.NewLocationWizard;
-import org.eclipse.team.internal.ccvs.ui.actions.OpenRemoteFileAction;
-import org.eclipse.team.internal.ccvs.ui.model.AllRootsElement;
-import org.eclipse.team.internal.ccvs.ui.model.RemoteContentProvider;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.dialogs.PropertyDialogAction;
-import org.eclipse.ui.part.DrillDownAdapter;
-import org.eclipse.ui.part.ViewPart;
-
-/**
- * RepositoriesView is a view on a set of known CVS repositories
- * which allows navigation of the structure of the repository and
- * the performing of CVS-specific operations on the repository contents.
- */
-public class RepositoriesView extends ViewPart {
- public static final String VIEW_ID = "org.eclipse.team.ccvs.ui.RepositoriesView"; //$NON-NLS-1$
-
- // The tree viewer
- private TreeViewer viewer;
-
- // The root
- private AllRootsElement root;
-
- // Drill down adapter
- private DrillDownAdapter drillPart;
-
- // Actions
- private Action showFoldersAction;
- private Action showModulesAction;
- private OpenRemoteFileAction openAction;
- private Action refreshAction;
- private PropertyDialogAction propertiesAction;
-
- IRepositoryListener listener = new IRepositoryListener() {
- public void repositoryAdded(final ICVSRepositoryLocation root) {
- viewer.getControl().getDisplay().syncExec(new Runnable() {
- public void run() {
- viewer.refresh();
- viewer.setSelection(new StructuredSelection(root));
- }
- });
- }
- public void repositoryRemoved(ICVSRepositoryLocation root) {
- refresh();
- }
- public void branchTagsAdded(CVSTag[] tags, final ICVSRepositoryLocation root) {
- refresh();
- }
- public void branchTagsRemoved(CVSTag[] tags, final ICVSRepositoryLocation root) {
- refresh();
- }
- public void versionTagsAdded(CVSTag[] tags, final ICVSRepositoryLocation root) {
- refresh();
- }
- public void versionTagsRemoved(CVSTag[] tags, final ICVSRepositoryLocation root) {
- refresh();
- }
- private void refresh() {
- Display display = viewer.getControl().getDisplay();
- display.syncExec(new Runnable() {
- public void run() {
- viewer.refresh();
- }
- });
- }
- };
-
- /**
- * Contribute actions to the view
- */
- private void contributeActions() {
- final Shell shell = viewer.getTree().getShell();
- // Create actions
-
- // Refresh (toolbar)
- refreshAction = new Action(Policy.bind("RepositoriesView.refresh"), CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_REFRESH)) { //$NON-NLS-1$
- public void run() {
- viewer.refresh();
- }
- };
- refreshAction.setToolTipText(Policy.bind("RepositoriesView.refreshTooltip")); //$NON-NLS-1$
-
- // New Repository (popup)
- final Action newAction = new Action(Policy.bind("RepositoriesView.new"), CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_NEWLOCATION)) { //$NON-NLS-1$
- public void run() {
- NewLocationWizard wizard = new NewLocationWizard();
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.open();
- }
- };
-
- final Action newAnonAction = new Action(Policy.bind("RepositoriesView.newAnonCVS"), CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_NEWLOCATION)) { //$NON-NLS-1$
- public void run() {
- Properties p = new Properties();
- p.setProperty("connection", "pserver"); //$NON-NLS-1$ //$NON-NLS-2$
- p.setProperty("user", "anonymous"); //$NON-NLS-1$ //$NON-NLS-2$
- p.setProperty("host", "dev.eclipse.org"); //$NON-NLS-1$ //$NON-NLS-2$
- p.setProperty("root", "/home/eclipse"); //$NON-NLS-1$ //$NON-NLS-2$
- NewLocationWizard wizard = new NewLocationWizard(p);
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.open();
- }
- };
-
- // Properties
- propertiesAction = new PropertyDialogAction(shell, viewer);
- getViewSite().getActionBars().setGlobalActionHandler(IWorkbenchActionConstants.PROPERTIES, propertiesAction);
- IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
- if (selection.size() == 1 && selection.getFirstElement() instanceof ICVSRepositoryLocation) {
- propertiesAction.setEnabled(true);
- } else {
- propertiesAction.setEnabled(false);
- }
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection ss = (IStructuredSelection)event.getSelection();
- boolean enabled = ss.size() == 1 && ss.getFirstElement() instanceof ICVSRepositoryLocation;
- propertiesAction.setEnabled(enabled);
- }
- });
-
- // Create the popup menu
- MenuManager menuMgr = new MenuManager();
- Tree tree = viewer.getTree();
- Menu menu = menuMgr.createContextMenu(tree);
- menuMgr.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- // File actions go first (view file)
- manager.add(new Separator(IWorkbenchActionConstants.GROUP_FILE));
-
- // New actions go next
- MenuManager sub = new MenuManager(Policy.bind("RepositoriesView.newSubmenu"), IWorkbenchActionConstants.GROUP_ADD); //$NON-NLS-1$
- sub.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- manager.add(sub);
-
- // Misc additions
- manager.add(new Separator("checkoutGroup")); //$NON-NLS-1$
- manager.add(new Separator("tagGroup")); //$NON-NLS-1$
- manager.add(new Separator("miscGroup")); //$NON-NLS-1$
- manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
-
- manager.add(refreshAction);
-
- IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
- if (selection.size() == 1 && selection.getFirstElement() instanceof ICVSRepositoryLocation) {
- manager.add(propertiesAction);
- }
- sub.add(newAction);
- sub.add(newAnonAction);
- }
- });
- menuMgr.setRemoveAllWhenShown(true);
- tree.setMenu(menu);
- getSite().registerContextMenu(menuMgr, viewer);
-
- // Create the local tool bar
- IActionBars bars = getViewSite().getActionBars();
- IToolBarManager tbm = bars.getToolBarManager();
- drillPart.addNavigationActions(tbm);
- tbm.add(refreshAction);
- tbm.update(false);
-
- // Create the open action for double clicks
- openAction = new OpenRemoteFileAction();
- viewer.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent e) {
- handleDoubleClick(e);
- }
- });
-
- // Add module toggling to the local pull-down menu
- IMenuManager mgr = bars.getMenuManager();
- showFoldersAction = new Action(Policy.bind("RepositoriesView.Show_Folders_6")) { //$NON-NLS-1$
- public void run() {
- CVSUIPlugin.getPlugin().getPreferenceStore().setValue(ICVSUIConstants.PREF_SHOW_MODULES, false);
- showModulesAction.setChecked(false);
- viewer.refresh();
- }
- };
- showModulesAction = new Action(Policy.bind("RepositoriesView.Show_Modules_7")) { //$NON-NLS-1$
- public void run() {
- CVSUIPlugin.getPlugin().getPreferenceStore().setValue(ICVSUIConstants.PREF_SHOW_MODULES, true);
- showFoldersAction.setChecked(false);
- viewer.refresh();
- }
- };
- boolean showModules = CVSUIPlugin.getPlugin().getPreferenceStore().getBoolean(ICVSUIConstants.PREF_SHOW_MODULES);
- showFoldersAction.setChecked(!showModules);
- showModulesAction.setChecked(showModules);
- mgr.add(showFoldersAction);
- mgr.add(showModulesAction);
- bars.updateActionBars();
- }
-
- /*
- * @see WorkbenchPart#createPartControl
- */
- public void createPartControl(Composite parent) {
- initialize();
- viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
- viewer.setContentProvider(new RemoteContentProvider());
- viewer.setLabelProvider(new WorkbenchLabelProvider());
- getSite().setSelectionProvider(viewer);
- viewer.setInput(root);
- viewer.setSorter(new RepositorySorter());
- viewer.getControl().addKeyListener(new KeyAdapter() {
- public void keyPressed(KeyEvent event) {
- if (event.keyCode == SWT.F5) {
- if (WorkbenchUserAuthenticator.USE_ALTERNATE_PROMPTER) {
- try {
- ICVSRepositoryLocation[] locations = CVSProvider.getInstance().getKnownRepositories();
- for (int i = 0; i < locations.length; i++) {
- locations[i].flushUserInfo();
- }
- } catch (CVSException e) {
- // Do nothing
- }
- } else {
- refreshAction.run();
- }
- } else if (event.keyCode == SWT.F9 && WorkbenchUserAuthenticator.USE_ALTERNATE_PROMPTER) {
- refreshAction.run();
- }
- }
- });
- drillPart = new DrillDownAdapter(viewer);
- contributeActions();
- CVSUIPlugin.getPlugin().getRepositoryManager().addRepositoryListener(listener);
-
- // F1 Help
- WorkbenchHelp.setHelp(viewer.getControl(), IHelpContextIds.REPOSITORIES_VIEW);
- }
-
- /*
- * @see WorkbenchPart#dispose
- */
- public void dispose() {
- CVSUIPlugin.getPlugin().getRepositoryManager().removeRepositoryListener(listener);
- }
-
- /**
- * The mouse has been double-clicked in the tree, perform appropriate
- * behaviour.
- */
- private void handleDoubleClick(DoubleClickEvent e) {
- // Only act on single selection
- ISelection selection = e.getSelection();
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection structured = (IStructuredSelection)selection;
- if (structured.size() == 1) {
- Object first = structured.getFirstElement();
- if (first instanceof ICVSRemoteFile) {
- // It's a file, open it.
- openAction.selectionChanged(null, selection);
- openAction.run(null);
- } else {
- // Try to expand/contract
- viewer.setExpandedState(first, !viewer.getExpandedState(first));
- }
- }
- }
- }
-
- /**
- * Initialize the repositories and actions
- */
- private void initialize() {
- root = new AllRootsElement();
- }
- /*
- * @see WorkbenchPart#setFocus
- */
- public void setFocus() {
- viewer.getControl().setFocus();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RepositoryManager.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RepositoryManager.java
deleted file mode 100644
index b570102b3..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RepositoryManager.java
+++ /dev/null
@@ -1,769 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.EOFException;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProvider;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSListener;
-import org.eclipse.team.internal.ccvs.core.ICVSProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.ILogEntry;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-
-/**
- * This class is repsible for maintaining the UI's list of known repositories,
- * and a list of known tags within each of those repositories.
- *
- * It also provides a number of useful methods for assisting in repository operations.
- */
-public class RepositoryManager {
- private static final String STATE_FILE = ".repositoryManagerState"; //$NON-NLS-1$
- private static final int STATE_FILE_VERSION_1 = -1;
-
- // Map ICVSRepositoryLocation -> List of CVSTag
- Hashtable branchTags = new Hashtable();
- // Map ICVSRepositoryLocation -> Hashtable of (Project name -> Set of CVSTag)
- Hashtable versionTags = new Hashtable();
- // Map ICVSRepositoryLocation -> Hashtable of (Project name -> Set of file paths that are project relative)
- Hashtable autoRefreshFiles = new Hashtable();
-
- List listeners = new ArrayList();
-
- // The previously remembered comment
- private static String previousComment = ""; //$NON-NLS-1$
-
- public static boolean notifyRepoView = true;
-
- /**
- * Answer an array of all known remote roots.
- */
- public ICVSRepositoryLocation[] getKnownRoots() {
- return getCVSProvider().getKnownRepositories();
- }
-
- /**
- * Get the list of known branch tags for a given remote root.
- */
- public CVSTag[] getKnownBranchTags(ICVSFolder project) {
- ICVSRepositoryLocation location = getRepositoryLocationFor(project);
- return getKnownBranchTags(location);
- }
-
- public CVSTag[] getKnownBranchTags(ICVSRepositoryLocation location) {
- Set set = (Set)branchTags.get(location);
- if (set == null) return new CVSTag[0];
- return (CVSTag[])set.toArray(new CVSTag[0]);
- }
-
- /**
- * Get the list of known version tags for a given project.
- */
- public CVSTag[] getKnownVersionTags(ICVSFolder project) {
- try {
- ICVSRepositoryLocation location = getRepositoryLocationFor(project);
- String name = new Path(project.getFolderSyncInfo().getRepository()).segment(0);
- Set result = new HashSet();
- Hashtable table = (Hashtable)versionTags.get(location);
- if (table == null) {
- return (CVSTag[])result.toArray(new CVSTag[result.size()]);
- }
- Set set = (Set)table.get(name);
- if (set == null) {
- return (CVSTag[])result.toArray(new CVSTag[result.size()]);
- }
- result.addAll(set);
- return (CVSTag[])result.toArray(new CVSTag[0]);
- } catch(CVSException e) {
- CVSUIPlugin.log(e.getStatus());
- return new CVSTag[0];
- }
- }
-
- public Map getKnownProjectsAndVersions(ICVSRepositoryLocation location) {
- return (Hashtable)versionTags.get(location);
- }
-
- /*
- * Fetches tags from .project and .vcm_meta if they exist. Then fetches tags from the user defined auto-refresh file
- * list. The fetched tags are cached in the CVS ui plugin's tag cache.
- */
- public void refreshDefinedTags(ICVSFolder project, boolean notify, IProgressMonitor monitor) throws TeamException {
- List filesToRefresh = new ArrayList(Arrays.asList(getAutoRefreshFiles(project)));
- monitor.beginTask(Policy.bind("RepositoryManager.refreshDefinedTags"), filesToRefresh.size() * 10); //$NON-NLS-1$
- try {
- ICVSRepositoryLocation location = CVSProvider.getInstance().getRepository(project.getFolderSyncInfo().getRoot());
- List tags = new ArrayList();
- for (Iterator it = filesToRefresh.iterator(); it.hasNext();) {
- String relativePath = (String)it.next();
- ICVSFile file = null;
- if (project instanceof ICVSRemoteFolder) {
- // There should be a better way of doing this.
- ICVSRemoteFolder parentFolder = location.getRemoteFolder(new Path(project.getName()).append(relativePath).removeLastSegments(1).toString(), CVSTag.DEFAULT);
- ICVSResource[] resources = parentFolder.fetchChildren(Policy.subMonitorFor(monitor, 5));
- for (int i = 0; i < resources.length; i++) {
- if (resources[i] instanceof ICVSRemoteFile && resources[i].getName().equals(new Path(relativePath).lastSegment())) {
- file = (ICVSFile)resources[i];
- }
- }
- } else {
- file = project.getFile(relativePath);
- }
- if (file != null) {
- tags.addAll(Arrays.asList(fetchDefinedTagsFor(file, project, location,
- Policy.subMonitorFor(monitor, 5))));
- } else {
- monitor.worked(5);
- }
- }
- // add all tags in one pass so that the listeners only get one notification for
- // versions and another for branches
- List branches = new ArrayList();
- List versions = new ArrayList();
- for (Iterator it = tags.iterator(); it.hasNext();) {
- CVSTag element = (CVSTag) it.next();
- if (element.getType() == CVSTag.BRANCH) {
- branches.add(element);
- } else {
- versions.add(element);
- }
- }
-
- // Hack for optimizing refreshing of repo view
- notifyRepoView = false;
- addBranchTags(project, (CVSTag[]) branches.toArray(new CVSTag[branches.size()]));
- if (notify) {
- notifyRepoView = true;
- }
- addVersionTags(project, (CVSTag[]) versions.toArray(new CVSTag[versions.size()]));
- notifyRepoView = true;
- } catch (CVSException e) {
- throw new TeamException(e.getStatus());
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Accept branch tags for any CVS resource. However, for the time being,
- * the given branch tags are added to the list of known tags for the resource's
- * remote root.
- */
- public void addBranchTags(ICVSResource resource, CVSTag[] tags) {
- ICVSRepositoryLocation location = getRepositoryLocationFor(resource);
- addBranchTags(location, tags);
- }
-
- public void addBranchTags(ICVSRepositoryLocation location, CVSTag[] tags) {
- Set set = (Set)branchTags.get(location);
- if (set == null) {
- set = new HashSet();
- branchTags.put(location, set);
- }
- for (int i = 0; i < tags.length; i++) {
- set.add(tags[i]);
- }
- Iterator it = listeners.iterator();
- while (it.hasNext() && notifyRepoView) {
- IRepositoryListener listener = (IRepositoryListener)it.next();
- listener.branchTagsAdded(tags, location);
- }
- }
-
- /**
- * A repository root has been added. Notify any listeners.
- */
- public void rootAdded(ICVSRepositoryLocation root) {
- Iterator it = listeners.iterator();
- while (it.hasNext()) {
- IRepositoryListener listener = (IRepositoryListener)it.next();
- listener.repositoryAdded(root);
- }
- }
-
- /**
- * A repository root has been removed.
- * Remove the tags defined for this root and notify any listeners
- */
- public void rootRemoved(ICVSRepositoryLocation root) {
- CVSTag[] branchTags = getKnownBranchTags(root);
- Hashtable vTags = (Hashtable)this.versionTags.get(root);
- this.branchTags.remove(root);
- this.versionTags.remove(root);
- this.autoRefreshFiles.remove(root);
- Iterator it = listeners.iterator();
- while (it.hasNext()) {
- IRepositoryListener listener = (IRepositoryListener)it.next();
- listener.branchTagsRemoved(branchTags, root);
- if (vTags != null) {
- Iterator keyIt = vTags.keySet().iterator();
- while (keyIt.hasNext()) {
- String projectName = (String)keyIt.next();
- Set tagSet = (Set)vTags.get(projectName);
- CVSTag[] versionTags = (CVSTag[])tagSet.toArray(new CVSTag[0]);
- listener.versionTagsRemoved(versionTags, root);
- }
- }
- listener.repositoryRemoved(root);
- }
- }
-
- /**
- * Accept version tags for any CVS resource. However, for the time being,
- * the given version tags are added to the list of known tags for the
- * remote ancestor of the resource that is a direct child of the remote root
- */
- public void addVersionTags(ICVSResource resource, CVSTag[] tags) {
- try {
- // Make sure there is a version tag table for the location
- ICVSRepositoryLocation location = getRepositoryLocationFor(resource);
- Hashtable table = (Hashtable)versionTags.get(location);
- if (table == null) {
- table = new Hashtable();
- versionTags.put(location, table);
- }
-
- // Get the name to cache the version tags with
- ICVSFolder parent;
- if (resource.isFolder()) {
- parent = (ICVSFolder)resource;
- } else {
- parent = resource.getParent();
- }
- if (!parent.isCVSFolder()) return;
- String name = new Path(parent.getFolderSyncInfo().getRepository()).segment(0);
-
- // Make sure there is a table for the ancestor that holds the tags
- Set set = (Set)table.get(name);
- if (set == null) {
- set = new HashSet();
- table.put(name, set);
- }
-
- // Store the tag with the appropriate ancestor
- for (int i = 0; i < tags.length; i++) {
- set.add(tags[i]);
- }
-
- // Notify any listeners
- Iterator it = listeners.iterator();
- while (it.hasNext() && notifyRepoView) {
- IRepositoryListener listener = (IRepositoryListener)it.next();
- listener.versionTagsAdded(tags, location);
- }
- } catch (CVSException e) {
- CVSUIPlugin.log(e.getStatus());
- }
- }
-
- public void addAutoRefreshFiles(ICVSFolder project, String[] relativeFilePaths) {
- ICVSRepositoryLocation location = getRepositoryLocationFor(project);
- initDefaultAutoRefreshFiles(project);
- Hashtable table = (Hashtable)autoRefreshFiles.get(location);
- Set set = (Set)table.get(project.getName());
- for (int i = 0; i < relativeFilePaths.length; i++) {
- set.add(relativeFilePaths[i]);
- }
- }
-
- public void removeAutoRefreshFiles(ICVSFolder project, String[] relativeFilePaths) {
- ICVSRepositoryLocation location = getRepositoryLocationFor(project);
- initDefaultAutoRefreshFiles(project);
- Hashtable table = (Hashtable)autoRefreshFiles.get(location);
- if (table == null) return;
- Set set = (Set)table.get(project.getName());
- if (set == null) return;
- for (int i = 0; i < relativeFilePaths.length; i++) {
- set.remove(relativeFilePaths[i]);
- }
- }
-
- public String[] getAutoRefreshFiles(ICVSFolder project) {
- ICVSRepositoryLocation location = getRepositoryLocationFor(project);
- initDefaultAutoRefreshFiles(project);
- Hashtable table = (Hashtable)autoRefreshFiles.get(location);
- Set set = (Set)table.get(project.getName());
- return (String[])set.toArray(new String[0]);
- }
-
- private void initDefaultAutoRefreshFiles(ICVSFolder project) {
- ICVSRepositoryLocation location = getRepositoryLocationFor(project);
- Hashtable table = (Hashtable)autoRefreshFiles.get(location);
- if (table == null) {
- table = new Hashtable();
- autoRefreshFiles.put(location, table);
- }
- Set set = (Set)table.get(project.getName());
- if (set == null) {
- String projectName = project.getName();
- set = new HashSet();
- table.put(projectName, set);
- set.add(".project"); //$NON-NLS-1$
- set.add(".vcm_meta"); //$NON-NLS-1$
- }
- }
-
- /**
- * Remove the given branch tag from the list of known tags for the
- * given remote root.
- */
- public void removeBranchTag(ICVSFolder project, CVSTag[] tags) {
- ICVSRepositoryLocation location = getRepositoryLocationFor(project);
- removeBranchTag(location, tags);
- }
-
- public void removeBranchTag(ICVSRepositoryLocation location, CVSTag[] tags) {
- Set set = (Set)branchTags.get(location);
- if (set == null) return;
- for (int i = 0; i < tags.length; i++) {
- set.remove(tags[i]);
- }
- Iterator it = listeners.iterator();
- while (it.hasNext() && notifyRepoView) {
- IRepositoryListener listener = (IRepositoryListener)it.next();
- listener.branchTagsRemoved(tags, location);
- }
- }
-
- /**
- * Remove the given tags from the list of known tags for the
- * given remote root.
- */
- public void removeVersionTags(ICVSFolder project, CVSTag[] tags) {
- ICVSRepositoryLocation location = getRepositoryLocationFor(project);
- Hashtable table = (Hashtable)versionTags.get(location);
- if (table == null) return;
- Set set = (Set)table.get(project.getName());
- if (set == null) return;
- for (int i = 0; i < tags.length; i++) {
- set.remove(tags[i]);
- }
- Iterator it = listeners.iterator();
- while (it.hasNext() && notifyRepoView) {
- IRepositoryListener listener = (IRepositoryListener)it.next();
- listener.versionTagsRemoved(tags, location);
- }
- }
-
- public void startup() throws TeamException {
- loadState();
- CVSProviderPlugin.getProvider().addRepositoryListener(new ICVSListener() {
- public void repositoryAdded(ICVSRepositoryLocation root) {
- rootAdded(root);
- }
- public void repositoryRemoved(ICVSRepositoryLocation root) {
- rootRemoved(root);
- }
- });
- }
-
- public void shutdown() throws TeamException {
- saveState();
- }
-
- private void loadState() throws TeamException {
- IPath pluginStateLocation = CVSUIPlugin.getPlugin().getStateLocation().append(STATE_FILE);
- File file = pluginStateLocation.toFile();
- if (file.exists()) {
- try {
- DataInputStream dis = new DataInputStream(new FileInputStream(file));
- try {
- readState(dis);
- } finally {
- dis.close();
- }
- } catch (IOException e) {
- CVSUIPlugin.log(new Status(Status.ERROR, CVSUIPlugin.ID, TeamException.UNABLE, Policy.bind("RepositoryManager.ioException"), e)); //$NON-NLS-1$
- } catch (TeamException e) {
- CVSUIPlugin.log(e.getStatus());
- }
- }
- }
-
- private void saveState() throws TeamException {
- IPath pluginStateLocation = CVSUIPlugin.getPlugin().getStateLocation();
- File tempFile = pluginStateLocation.append(STATE_FILE + ".tmp").toFile(); //$NON-NLS-1$
- File stateFile = pluginStateLocation.append(STATE_FILE).toFile();
- try {
- DataOutputStream dos = new DataOutputStream(new FileOutputStream(tempFile));
- try {
- writeState(dos);
- } finally {
- dos.close();
- }
- if (stateFile.exists()) {
- stateFile.delete();
- }
- boolean renamed = tempFile.renameTo(stateFile);
- if (!renamed) {
- throw new TeamException(new Status(Status.ERROR, CVSUIPlugin.ID, TeamException.UNABLE, Policy.bind("RepositoryManager.rename", tempFile.getAbsolutePath()), null)); //$NON-NLS-1$
- }
- } catch (IOException e) {
- throw new TeamException(new Status(Status.ERROR, CVSUIPlugin.ID, TeamException.UNABLE, Policy.bind("RepositoryManager.save",stateFile.getAbsolutePath()), e)); //$NON-NLS-1$
- }
- }
- private void writeState(DataOutputStream dos) throws IOException {
- // Write the repositories
- Collection repos = Arrays.asList(getKnownRoots());
- // Write out version number for file.
- // We write it as an int so we can read either the repoSize or the version in the readState
- // XXX We should come up with a more long term solution.
- dos.writeInt(STATE_FILE_VERSION_1);
- dos.writeInt(repos.size());
- Iterator it = repos.iterator();
- while (it.hasNext()) {
- ICVSRepositoryLocation root = (ICVSRepositoryLocation)it.next();
- dos.writeUTF(root.getLocation());
- CVSTag[] branchTags = getKnownBranchTags(root);
- dos.writeInt(branchTags.length);
- for (int i = 0; i < branchTags.length; i++) {
- dos.writeUTF(branchTags[i].getName());
- dos.writeInt(branchTags[i].getType());
- }
- // write number of projects for which there are tags in this root
- Hashtable table = (Hashtable)versionTags.get(root);
- if (table == null) {
- dos.writeInt(0);
- } else {
- dos.writeInt(table.size());
- // for each project, write the name of the project, number of tags, and each tag.
- Iterator projIt = table.keySet().iterator();
- while (projIt.hasNext()) {
- String name = (String)projIt.next();
- dos.writeUTF(name);
- Set tagSet = (Set)table.get(name);
- dos.writeInt(tagSet.size());
- Iterator tagIt = tagSet.iterator();
- while (tagIt.hasNext()) {
- CVSTag tag = (CVSTag)tagIt.next();
- dos.writeUTF(tag.getName());
- }
- }
- }
- // write number of projects for which there were customized auto refresh files
- table = (Hashtable)autoRefreshFiles.get(root);
- if (table == null) {
- dos.writeInt(0);
- } else {
- dos.writeInt(table.size());
- // for each project, write the name of the project, number of filename then each file name
- Iterator projIt = table.keySet().iterator();
- while (projIt.hasNext()) {
- String name = (String)projIt.next();
- dos.writeUTF(name);
- Set tagSet = (Set)table.get(name);
- dos.writeInt(tagSet.size());
- Iterator filenameIt = tagSet.iterator();
- while (filenameIt.hasNext()) {
- String filename = (String)filenameIt.next();
- dos.writeUTF(filename);
- }
- }
- }
- }
- }
- private void readState(DataInputStream dis) throws IOException, TeamException {
- int repoSize = dis.readInt();
- boolean version1 = false;
- if (repoSize == STATE_FILE_VERSION_1) {
- version1 = true;
- repoSize = dis.readInt();
- }
- for (int i = 0; i < repoSize; i++) {
- ICVSRepositoryLocation root = CVSProviderPlugin.getProvider().getRepository(dis.readUTF());
-
- // read branch tags associated with this root
- int tagsSize = dis.readInt();
- CVSTag[] branchTags = new CVSTag[tagsSize];
- for (int j = 0; j < tagsSize; j++) {
- String tagName = dis.readUTF();
- int tagType = dis.readInt();
- branchTags[j] = new CVSTag(tagName, tagType);
- }
- addBranchTags(root, branchTags);
-
- // read the number of projects for this root that have version tags
- int projSize = dis.readInt();
- if (projSize > 0) {
- Hashtable projTable = new Hashtable();
- versionTags.put(root, projTable);
- for (int j = 0; j < projSize; j++) {
- String name = dis.readUTF();
- Set tagSet = new HashSet();
- projTable.put(name, tagSet);
- int numTags = dis.readInt();
- for (int k = 0; k < numTags; k++) {
- tagSet.add(new CVSTag(dis.readUTF(), CVSTag.VERSION));
- }
- Iterator it = listeners.iterator();
- while (it.hasNext()) {
- IRepositoryListener listener = (IRepositoryListener)it.next();
- listener.versionTagsAdded((CVSTag[])tagSet.toArray(new CVSTag[0]), root);
- }
- }
- }
- // read the auto refresh filenames for this project
- if (version1) {
- try {
- projSize = dis.readInt();
- if (projSize > 0) {
- Hashtable autoRefreshTable = new Hashtable();
- autoRefreshFiles.put(root, autoRefreshTable);
- for (int j = 0; j < projSize; j++) {
- String name = dis.readUTF();
- Set filenames = new HashSet();
- autoRefreshTable.put(name, filenames);
- int numFilenames = dis.readInt();
- for (int k = 0; k < numFilenames; k++) {
- filenames.add(dis.readUTF());
- }
- }
- }
- } catch (EOFException e) {
- // auto refresh files are not persisted, continue and save them next time.
- }
- }
- }
- }
-
- public void addRepositoryListener(IRepositoryListener listener) {
- listeners.add(listener);
- }
-
- public void removeRepositoryListener(IRepositoryListener listener) {
- listeners.remove(listener);
- }
-
- /**
- * Add the given resources to their associated providers.
- * This schedules the resources for addition; they still need to be committed.
- */
- public void add(IResource[] resources, IProgressMonitor monitor) throws TeamException {
- Hashtable table = getProviderMapping(resources);
- Set keySet = table.keySet();
- monitor.beginTask("", keySet.size() * 1000); //$NON-NLS-1$
- monitor.setTaskName(Policy.bind("RepositoryManager.adding")); //$NON-NLS-1$
- Iterator iterator = keySet.iterator();
- while (iterator.hasNext()) {
- IProgressMonitor subMonitor = new SubProgressMonitor(monitor, 1000);
- CVSTeamProvider provider = (CVSTeamProvider)iterator.next();
- provider.setComment(previousComment);
- List list = (List)table.get(provider);
- IResource[] providerResources = (IResource[])list.toArray(new IResource[list.size()]);
- provider.add(providerResources, IResource.DEPTH_ZERO, subMonitor);
- }
- }
-
- /**
- * Delete the given resources from their associated providers.
- * This schedules the resources for deletion; they still need to be committed.
- */
- public void delete(IResource[] resources, IProgressMonitor monitor) throws TeamException {
- Hashtable table = getProviderMapping(resources);
- Set keySet = table.keySet();
- monitor.beginTask("", keySet.size() * 1000); //$NON-NLS-1$
- monitor.setTaskName(Policy.bind("RepositoryManager.deleting")); //$NON-NLS-1$
- Iterator iterator = keySet.iterator();
- while (iterator.hasNext()) {
- IProgressMonitor subMonitor = new SubProgressMonitor(monitor, 1000);
- CVSTeamProvider provider = (CVSTeamProvider)iterator.next();
- provider.setComment(previousComment);
- List list = (List)table.get(provider);
- IResource[] providerResources = (IResource[])list.toArray(new IResource[list.size()]);
- provider.delete(providerResources, subMonitor);
- }
- }
-
- public void update(IResource[] resources, Command.LocalOption[] options, boolean createBackups, IProgressMonitor monitor) throws TeamException {
- Hashtable table = getProviderMapping(resources);
- Set keySet = table.keySet();
- monitor.beginTask("", keySet.size() * 1000); //$NON-NLS-1$
- monitor.setTaskName(Policy.bind("RepositoryManager.updating")); //$NON-NLS-1$
- Iterator iterator = keySet.iterator();
- while (iterator.hasNext()) {
- IProgressMonitor subMonitor = new SubProgressMonitor(monitor, 1000);
- CVSTeamProvider provider = (CVSTeamProvider)iterator.next();
- List list = (List)table.get(provider);
- IResource[] providerResources = (IResource[])list.toArray(new IResource[list.size()]);
- provider.update(providerResources, options, null, createBackups, subMonitor);
- }
- }
-
- /**
- * Mark the files as merged.
- */
- public void merged(IRemoteSyncElement[] elements) throws TeamException {
- Hashtable table = getProviderMapping(elements);
- Set keySet = table.keySet();
- Iterator iterator = keySet.iterator();
- while (iterator.hasNext()) {
- CVSTeamProvider provider = (CVSTeamProvider)iterator.next();
- provider.setComment(previousComment);
- List list = (List)table.get(provider);
- IRemoteSyncElement[] providerElements = (IRemoteSyncElement[])list.toArray(new IRemoteSyncElement[list.size()]);
- provider.merged(providerElements);
- }
- }
-
- /**
- * Return the entered comment or null.
- * Persist the entered release comment for the next caller.
- */
- public String promptForComment(final Shell shell) {
- final int[] result = new int[1];
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- ReleaseCommentDialog dialog = new ReleaseCommentDialog(shell);
- dialog.setComment(previousComment);
- result[0] = dialog.open();
- if (result[0] != ReleaseCommentDialog.OK) return;
- previousComment = dialog.getComment();
- }
- });
- if (result[0] != ReleaseCommentDialog.OK) return null;
- return previousComment;
- }
-
- /**
- * Commit the given resources to their associated providers.
- *
- * @param resources the resources to commit
- * @param monitor the progress monitor
- */
- public void commit(IResource[] resources, String comment, IProgressMonitor monitor) throws TeamException {
- Hashtable table = getProviderMapping(resources);
- Set keySet = table.keySet();
- monitor.beginTask("", keySet.size() * 1000); //$NON-NLS-1$
- monitor.setTaskName(Policy.bind("RepositoryManager.committing")); //$NON-NLS-1$
- Iterator iterator = keySet.iterator();
- while (iterator.hasNext()) {
- IProgressMonitor subMonitor = new SubProgressMonitor(monitor, 1000);
- CVSTeamProvider provider = (CVSTeamProvider)iterator.next();
- provider.setComment(comment);
- List list = (List)table.get(provider);
- IResource[] providerResources = (IResource[])list.toArray(new IResource[list.size()]);
- provider.checkin(providerResources, IResource.DEPTH_INFINITE, subMonitor);
- }
- }
-
- /**
- * Helper method. Return a hashtable mapping provider to a list of resources
- * shared with that provider.
- */
- private Hashtable getProviderMapping(IResource[] resources) {
- Hashtable result = new Hashtable();
- for (int i = 0; i < resources.length; i++) {
- RepositoryProvider provider = RepositoryProvider.getProvider(resources[i].getProject(), CVSProviderPlugin.getTypeId());
- List list = (List)result.get(provider);
- if (list == null) {
- list = new ArrayList();
- result.put(provider, list);
- }
- list.add(resources[i]);
- }
- return result;
- }
- /**
- * Helper method. Return a hashtable mapping provider to a list of IRemoteSyncElements
- * shared with that provider.
- */
- private Hashtable getProviderMapping(IRemoteSyncElement[] elements) {
- Hashtable result = new Hashtable();
- for (int i = 0; i < elements.length; i++) {
- RepositoryProvider provider = RepositoryProvider.getProvider(elements[i].getLocal().getProject(), CVSProviderPlugin.getTypeId());
- List list = (List)result.get(provider);
- if (list == null) {
- list = new ArrayList();
- result.put(provider, list);
- }
- list.add(elements[i]);
- }
- return result;
- }
-
- /**
- * Returns Branch and Version tags for the given files
- */
- public CVSTag[] getTags(ICVSFile file, IProgressMonitor monitor) throws TeamException {
- Set tagSet = new HashSet();
- ILogEntry[] entries = file.getLogEntries(monitor);
- for (int j = 0; j < entries.length; j++) {
- CVSTag[] tags = entries[j].getTags();
- for (int k = 0; k < tags.length; k++) {
- tagSet.add(tags[k]);
- }
- }
- return (CVSTag[])tagSet.toArray(new CVSTag[0]);
- }
-
- public ICVSRepositoryLocation getRepositoryLocationFor(ICVSResource resource) {
- try {
- ICVSFolder folder;
- if (resource.isFolder()) {
- folder = (ICVSFolder)resource;
- } else {
- folder = resource.getParent();
- }
- if (folder.isCVSFolder()) {
- ICVSRepositoryLocation location = CVSProvider.getInstance().getRepository(folder.getFolderSyncInfo().getRoot());
- return location;
- }
- return null;
- } catch (CVSException e) {
- CVSUIPlugin.log(e.getStatus());
- return null;
- }
- }
-
- /*
- * Fetches and caches the tags found on the provided remote file.
- */
- private CVSTag[] fetchDefinedTagsFor(ICVSFile file, ICVSFolder project,
- ICVSRepositoryLocation location, IProgressMonitor monitor) throws TeamException {
- if (file != null && file.exists()) {
- return getTags(file, monitor);
- }
- return new CVSTag[0];
- }
-
- private ICVSProvider getCVSProvider() {
- return CVSProviderPlugin.getProvider();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RepositorySorter.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RepositorySorter.java
deleted file mode 100644
index 936419430..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RepositorySorter.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.team.core.sync.IRemoteResource;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.model.BranchTag;
-
-public class RepositorySorter extends ViewerSorter {
- public int category(Object element) {
- if (element instanceof ICVSRemoteFolder) {
- return 1;
- }
- if (element instanceof ICVSRemoteFile) {
- return 2;
- }
- return 0;
- }
-
- public int compare(Viewer viewer, Object o1, Object o2) {
- int cat1 = category(o1);
- int cat2 = category(o2);
- if (cat1 != cat2) return cat1 - cat2;
-
- if (o1 instanceof BranchTag && o2 instanceof BranchTag) {
- CVSTag tag1 = ((BranchTag)o1).getTag();
- CVSTag tag2 = ((BranchTag)o2).getTag();
- return tag1.compareTo(tag2);
- }
- if (o1 instanceof ICVSRepositoryLocation && o2 instanceof ICVSRepositoryLocation) {
- return ((ICVSRepositoryLocation)o1).getLocation().compareTo(((ICVSRepositoryLocation)o2).getLocation());
- }
- return super.compare(viewer, o1, o2);
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResizableWizardDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResizableWizardDialog.java
deleted file mode 100644
index 1c614dd66..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResizableWizardDialog.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
-
-public class ResizableWizardDialog extends WizardDialog {
- /**
- * Creates a new resizable wizard dialog.
- */
- public ResizableWizardDialog(Shell parent, IWizard wizard) {
- super(parent, wizard);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResourceEditionNode.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResourceEditionNode.java
deleted file mode 100644
index 5dcc2e5fb..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResourceEditionNode.java
+++ /dev/null
@@ -1,152 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.CompareUI;
-import org.eclipse.compare.IStreamContentAccessor;
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.compare.structuremergeviewer.IStructureComparator;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-
-/**
- * A class for comparing ICVSRemoteResource objects
- */
-public class ResourceEditionNode implements IStructureComparator, ITypedElement, IStreamContentAccessor {
- private ICVSRemoteResource resource;
- private ResourceEditionNode[] children;
-
- /**
- * Creates a new ResourceEditionNode on the given resource edition.
- */
- public ResourceEditionNode(ICVSRemoteResource resourceEdition) {
- this.resource = resourceEdition;
- }
-
- /**
- * Returns true if both resources names are identical.
- * The content is not considered.
- * @see IComparator#equals
- */
- public boolean equals(Object other) {
- if (other instanceof ITypedElement) {
- String otherName = ((ITypedElement)other).getName();
- return getName().equals(otherName);
- }
- return super.equals(other);
- }
-
- /**
- * Enumerate children of this node (if any).
- */
- public Object[] getChildren() {
- if (children == null) {
- children = new ResourceEditionNode[0];
- if (resource != null) {
- try {
- CVSUIPlugin.runWithProgress(null, true /*cancelable*/, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- IRemoteResource[] members = resource.members(monitor);
- children = new ResourceEditionNode[members.length];
- for (int i = 0; i < members.length; i++) {
- children[i] = new ResourceEditionNode((ICVSRemoteResource)members[i]);
- }
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InterruptedException e) {
- // operation canceled
- } catch (InvocationTargetException e) {
- Throwable t = e.getTargetException();
- if (t instanceof TeamException) {
- CVSUIPlugin.log(((TeamException) t).getStatus());
- }
- }
- }
- }
- return children;
- }
-
- /**
- * @see IStreamContentAccessor#getContents()
- */
- public InputStream getContents() throws CoreException {
- if (resource == null) {
- return null;
- }
- try {
- final InputStream[] holder = new InputStream[1];
- CVSUIPlugin.runWithProgress(null, true /*cancelable*/, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- holder[0] = resource.getContents(monitor);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- return holder[0];
- } catch (InterruptedException e) {
- // operation canceled
- } catch (InvocationTargetException e) {
- Throwable t = e.getTargetException();
- if (t instanceof TeamException) {
- throw new CoreException(((TeamException) t).getStatus());
- }
- // should not get here
- }
- return new ByteArrayInputStream(new byte[0]);
- }
-
- public Image getImage() {
- return CompareUI.getImage(resource);
- }
-
- /**
- * Returns the name of this node.
- */
- public String getName() {
- return resource == null ? "" : resource.getName(); //$NON-NLS-1$
- }
-
- public ICVSRemoteResource getRemoteResource() {
- return resource;
- }
-
- /**
- * Returns the comparison type for this node.
- */
- public String getType() {
- if (resource == null) {
- return UNKNOWN_TYPE;
- }
- if (resource.isContainer()) {
- return FOLDER_TYPE;
- }
- String name = resource.getName();
- name = name.substring(name.lastIndexOf('.') + 1);
- return name.length() == 0 ? UNKNOWN_TYPE : name;
- }
-
- /**
- * @see IComparator#equals
- */
- public int hashCode() {
- return getName().hashCode();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResourcePropertiesPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResourcePropertiesPage.java
deleted file mode 100644
index cdfff20fe..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResourcePropertiesPage.java
+++ /dev/null
@@ -1,103 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-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.swt.widgets.Label;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-/**
- * A property page which displays the CVS-specific properties for the
- * selected resource.
- */
-public class ResourcePropertiesPage extends PropertyPage {
- // The resource to show properties for
- IResource resource;
-
- /*
- * @see PreferencePage#createContents(Composite)
- */
- protected Control createContents(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = layout.marginWidth = 0;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- try {
- IResource resource = getSelectedElement();
- if (resource != null) {
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- if (!cvsResource.isManaged()) {
- createPair(composite, Policy.bind("ResourcePropertiesPage.status"), Policy.bind("ResourcePropertiesPage.notManaged")); //$NON-NLS-1$ //$NON-NLS-2$
- } else {
- boolean hasRemote = false;
- if(cvsResource.isFolder()) {
- hasRemote = ((ICVSFolder)cvsResource).isCVSFolder();
- } else {
- ResourceSyncInfo info = cvsResource.getSyncInfo();
- if(info!=null && !info.isAdded()) {
- hasRemote = true;
- }
- }
- createPair(composite, Policy.bind("ResourcePropertiesPage.status"), hasRemote ? Policy.bind("ResourcePropertiesPage.versioned") : Policy.bind("ResourcePropertiesPage.notVersioned")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
- } catch (TeamException e) {
- createPair(composite, Policy.bind("ResourcePropertiesPage.error"), e.getMessage()); //$NON-NLS-1$
- }
- return composite;
- }
-
- /**
- * Creates a key-value property pair in the given parent.
- *
- * @param parent the parent for the labels
- * @param left the string for the left label
- * @param right the string for the right label
- */
- protected void createPair(Composite parent, String left, String right) {
- Label label = new Label(parent, SWT.NONE);
- label.setText(left);
-
- label = new Label(parent, SWT.NONE);
- label.setText(right);
- label.setToolTipText(right);
- label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- }
-
- /**
- * Returns the element selected when the properties was run
- *
- * @return the selected element
- */
- protected IResource getSelectedElement() {
- // get the resource that is the source of this property page
- IResource resource = null;
- IAdaptable element = getElement();
- if (element instanceof IResource) {
- resource = (IResource)element;
- } else {
- Object adapter = element.getAdapter(IResource.class);
- if (adapter instanceof IResource) {
- resource = (IResource)adapter;
- }
- }
- return resource;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/SimpleContentProvider.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/SimpleContentProvider.java
deleted file mode 100644
index 4c503a395..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/SimpleContentProvider.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.viewers.*;
-
-/**
- * A default content provider to prevent subclasses from
- * having to implement methods they don't need.
- */
-public class SimpleContentProvider implements IStructuredContentProvider {
-
- /**
- * SimpleContentProvider constructor.
- */
- public SimpleContentProvider() {
- super();
- }
-
- /*
- * @see SimpleContentProvider#dispose()
- */
- public void dispose() {
- }
-
- /*
- * @see SimpleContentProvider#getElements()
- */
- public Object[] getElements(Object element) {
- return new Object[0];
- }
-
- /*
- * @see SimpleContentProvider#inputChanged()
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagAsVersionDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagAsVersionDialog.java
deleted file mode 100644
index 980419e5b..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagAsVersionDialog.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-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.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.ui.merge.TagElement;
-import org.eclipse.team.internal.ccvs.ui.merge.TagRootElement;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-public class TagAsVersionDialog extends DetailsDialog {
-
- private ICVSFolder folder;
-
- private Text tagText;
-
- private String tagName = ""; //$NON-NLS-1$
-
- private static final int TABLE_HEIGHT_HINT = 150;
-
- private TableViewer existingVersionTable;
-
- public TagAsVersionDialog(Shell parentShell, String title, ICVSFolder folder) {
- super(parentShell, title);
- this.folder = folder;
- }
-
- /**
- * @see DetailsDialog#createMainDialogArea(Composite)
- */
- protected void createMainDialogArea(Composite parent) {
- // create message
- Label label = new Label(parent, SWT.WRAP);
- label.setText(Policy.bind("TagAction.enterTag")); //$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);
- label.setFont(parent.getFont());
-
- tagText = new Text(parent, SWT.SINGLE | SWT.BORDER);
- tagText.setLayoutData(new GridData(
- GridData.GRAB_HORIZONTAL |
- GridData.HORIZONTAL_ALIGN_FILL));
- tagText.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- tagName = tagText.getText();
- updateEnablements();
- }
- }
- );
- // Add F1 help
- WorkbenchHelp.setHelp(parent, IHelpContextIds.TAG_AS_VERSION_DIALOG);
- }
-
- protected TableViewer createTable(Composite parent) {
- Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.heightHint = TABLE_HEIGHT_HINT;
- table.setLayoutData(data);
- TableLayout layout = new TableLayout();
- layout.addColumnData(new ColumnWeightData(100, true));
- table.setLayout(layout);
- TableColumn col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- return new TableViewer(table);
- }
-
- /**
- * @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));
- composite.setFont(parent.getFont());
-
- Label label = new Label(composite, SWT.WRAP);
- label.setText(Policy.bind("TagAction.existingVersions")); //$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);
- label.setFont(composite.getFont());
-
- existingVersionTable = createTable(composite);
- existingVersionTable.setContentProvider(new WorkbenchContentProvider());
- existingVersionTable.setLabelProvider(new WorkbenchLabelProvider());
- existingVersionTable.setSorter(new ViewerSorter() {
- public int compare(Viewer v, Object o1, Object o2) {
- int result = super.compare(v, o1, o2);
- if (o1 instanceof TagElement && o2 instanceof TagElement) {
- return -result;
- }
- return result;
- }
- });
- existingVersionTable.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection selection = (IStructuredSelection)existingVersionTable.getSelection();
- if(!selection.isEmpty()) {
- TagElement element = (TagElement)((IStructuredSelection)existingVersionTable.getSelection()).getFirstElement();
- if(element!=null) {
- tagText.setText(element.getTag().getName());
- }
- }
- }
- });
-
- Runnable afterRefresh = new Runnable() {
- public void run() {
- getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- existingVersionTable.refresh();
- }
- });
- }
- };
-
- Runnable afterConfigure = new Runnable() {
- public void run() {
- getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- existingVersionTable.setInput(new TagRootElement(folder, CVSTag.VERSION));
- }
- });
- }
- };
-
- TagConfigurationDialog.createTagDefinitionButtons(getShell(), composite, new ICVSFolder[] {folder},
- convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT),
- convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH),
- afterRefresh, afterConfigure);
-
- existingVersionTable.setInput(new TagRootElement(folder, CVSTag.VERSION));
-
- return composite;
- }
-
- /**
- * Validates tag name
- */
- protected void updateEnablements() {
- String message = null;
- boolean exists = false;
- if(tagName.length() == 0) {
- message = ""; //$NON-NLS-1$
- } else {
- IStatus status = CVSTag.validateTagName(tagName);
- if (!status.isOK()) {
- message = status.getMessage();
- }
- }
- setPageComplete(message == null);
- setErrorMessage(message);
- }
-
- /**
- * Answers if the given tag name already exists
- */
- protected boolean doesTagNameExists(String name) {
- CVSTag[] tags = CVSUIPlugin.getPlugin().getRepositoryManager().getKnownVersionTags(folder);
- for (int i = 0; i < tags.length; i++) {
- if(tags[i].getName().equals(name)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Returns the tag name entered into this dialog
- */
- public String getTagName() {
- return tagName;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagConfigurationDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagConfigurationDialog.java
deleted file mode 100644
index 44e5698d2..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagConfigurationDialog.java
+++ /dev/null
@@ -1,742 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-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.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ILogEntry;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.merge.ProjectElement;
-import org.eclipse.team.internal.ccvs.ui.merge.TagElement;
-import org.eclipse.team.internal.ccvs.ui.merge.ProjectElement.ProjectElementSorter;
-import org.eclipse.team.internal.ccvs.ui.model.CVSFileElement;
-import org.eclipse.team.internal.ccvs.ui.model.CVSFolderElement;
-import org.eclipse.team.internal.ccvs.ui.model.CVSRootFolderElement;
-import org.eclipse.team.internal.ccvs.ui.model.RemoteContentProvider;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-/**
- * Allows configuration of the CVS tags that are shown within the workbench.
- */
-public class TagConfigurationDialog extends Dialog {
-
- // show the resource contained within the roots
- private TreeViewer cvsResourceTree;
-
- // shows the tags found on the selected resources
- private CheckboxTableViewer cvsTagTree;
-
- // shows the defined tags for the given root
- private TreeViewer cvsDefinedTagsTree;
-
- // remember the root element in the defined tags tree
- private ProjectElement cvsDefinedTagsRootElement;
-
- // list of auto-refresh files
- private org.eclipse.swt.widgets.List autoRefreshFileList;
-
- // folders from which their children files can be examined for tags
- private ICVSFolder[] roots;
- private ICVSFolder root;
-
- // enable selecting auto-refresh files
- private boolean allowSettingAutoRefreshFiles = true;
-
- // sizing default hints
- private final int ALLOWREFRESH_WIDTH = 500;
- private final int ALLOWREFRESH_HEIGHT = 625;
- private final int NOREFRESH_WIDTH = 500;
- private final int NOREFRESH_HEIGHT = 550;
-
- // preference keys
- private final String ALLOWREFRESH_WIDTH_KEY = "AllowRefreshWidth"; //$NON-NLS-1$
- private final String ALLOWREFRESH_HEIGHT_KEY = "AllowRefreshHeight"; //$NON-NLS-1$
- private final String NOREFRESH_WIDTH_KEY = "NoRefreshWidth"; //$NON-NLS-1$
- private final String NOREFRESH_HEIGHT_KEY = "NoRefreshHeight"; //$NON-NLS-1$
-
- // buttons
- private Button addSelectedTagsButton;
- private Button addSelectedFilesButton;
- private Button removeFileButton;
- private Button removeTagButton;
-
- // dialogs settings that are persistent between workbench sessions
- private IDialogSettings settings;
-
- class FileSorter extends ViewerSorter {
- public int compare(Viewer viewer, Object e1, Object e2) {
- boolean oneIsFile = e1 instanceof CVSFileElement;
- boolean twoIsFile = e2 instanceof CVSFileElement;
- if (oneIsFile != twoIsFile) {
- return oneIsFile ? 1 : -1;
- }
- return super.compare(viewer, e1, e2);
- }
- }
-
- public TagConfigurationDialog(Shell shell, ICVSFolder[] roots) {
- super(shell);
- setShellStyle(SWT.CLOSE|SWT.RESIZE);
- this.roots = roots;
- this.root = roots[0];
- if(roots.length>1) {
- allowSettingAutoRefreshFiles = false;
- }
-
- IDialogSettings workbenchSettings = CVSUIPlugin.getPlugin().getDialogSettings();
- this.settings = workbenchSettings.getSection("TagConfigurationDialog");//$NON-NLS-1$
- if (settings == null) {
- this.settings = workbenchSettings.addNewSection("TagConfigurationDialog");//$NON-NLS-1$
- }
- }
-
- /**
- * @see Window#configureShell(Shell)
- */
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- if(roots.length==1) {
- newShell.setText(Policy.bind("TagConfigurationDialog.1", roots[0].getName())); //$NON-NLS-1$
- } else {
- newShell.setText(Policy.bind("TagConfigurationDialog.2", Integer.toString(roots.length))); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * @see Dialog#createDialogArea(Composite)
- */
- protected Control createDialogArea(Composite parent) {
- Composite shell = new Composite(parent, SWT.NONE);
- GridData data = new GridData (GridData.FILL_BOTH);
- shell.setLayoutData(data);
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 2;
- gridLayout.makeColumnsEqualWidth = true;
- shell.setLayout (gridLayout);
-
- Label description = new Label(shell,SWT.WRAP);
- description.setText(Policy.bind("TagConfigurationDialog.4")); //$NON-NLS-1$
- data = new GridData (GridData.FILL_BOTH);
- data.widthHint = 300;
- data.horizontalSpan = 2;
- description.setLayoutData(data);
-
- Label cvsResourceTreeLabel = new Label (shell, SWT.NONE);
- cvsResourceTreeLabel.setText (Policy.bind("TagConfigurationDialog.5")); //$NON-NLS-1$
- data = new GridData ();
- data.horizontalSpan = 1;
- cvsResourceTreeLabel.setLayoutData (data);
-
- Label cvsTagTreeLabel = new Label (shell, SWT.NONE);
- cvsTagTreeLabel.setText (Policy.bind("TagConfigurationDialog.6")); //$NON-NLS-1$
- data = new GridData ();
- data.horizontalSpan = 1;
- cvsTagTreeLabel.setLayoutData (data);
-
- Tree tree = new Tree(shell, SWT.BORDER | SWT.MULTI);
- cvsResourceTree = new TreeViewer (tree);
- cvsResourceTree.setContentProvider(new RemoteContentProvider());
- cvsResourceTree.setLabelProvider(new WorkbenchLabelProvider());
- data = new GridData (GridData.FILL_BOTH);
- data.heightHint = 150;
- data.horizontalSpan = 1;
- cvsResourceTree.getTree().setLayoutData(data);
- if(roots.length==1) {
- cvsResourceTree.setInput(new CVSFolderElement(roots[0], false /*don't include unmanaged resources*/));
- } else {
- cvsResourceTree.setInput(new CVSRootFolderElement(roots));
- }
- cvsResourceTree.setSorter(new FileSorter());
- cvsResourceTree.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- updateShownTags();
- updateEnablements();
- }
- });
-
- Table table = new Table(shell, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION | SWT.CHECK);
- data = new GridData(GridData.FILL_BOTH);
- data.heightHint = 150;
- data.horizontalSpan = 1;
- table.setLayoutData(data);
- TableLayout layout = new TableLayout();
- layout.addColumnData(new ColumnWeightData(60, true));
- table.setLayout(layout);
- TableColumn col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
- cvsTagTree = new CheckboxTableViewer(table);
- cvsTagTree.setContentProvider(new WorkbenchContentProvider());
- cvsTagTree.setLabelProvider(new WorkbenchLabelProvider());
- cvsTagTree.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- updateEnablements();
- }
- });
-
- cvsTagTree.setSorter(new ViewerSorter() {
- public int compare(Viewer viewer, Object e1, Object e2) {
- if (!(e1 instanceof TagElement) || !(e2 instanceof TagElement)) return super.compare(viewer, e1, e2);
- CVSTag tag1 = ((TagElement)e1).getTag();
- CVSTag tag2 = ((TagElement)e2).getTag();
- int type1 = tag1.getType();
- int type2 = tag2.getType();
- if (type1 != type2) {
- return type1 - type2;
- }
- // Sort in reverse order so larger numbered versions are at the top
- return -tag1.compareTo(tag2);
- }
- });
-
- Composite rememberedTags = new Composite(shell, SWT.NONE);
- data = new GridData (GridData.FILL_BOTH);
- data.horizontalSpan = 2;
- rememberedTags.setLayoutData(data);
- gridLayout = new GridLayout();
- gridLayout.numColumns = 2;
- gridLayout.marginHeight = 0;
- gridLayout.marginWidth = 0;
- rememberedTags.setLayout (gridLayout);
-
- Label rememberedTagsLabel = new Label (rememberedTags, SWT.NONE);
- rememberedTagsLabel.setText (Policy.bind("TagConfigurationDialog.7")); //$NON-NLS-1$
- data = new GridData ();
- data.horizontalSpan = 2;
- rememberedTagsLabel.setLayoutData (data);
-
- tree = new Tree(rememberedTags, SWT.BORDER | SWT.MULTI);
- cvsDefinedTagsTree = new TreeViewer (tree);
- cvsDefinedTagsTree.setContentProvider(new WorkbenchContentProvider());
- cvsDefinedTagsTree.setLabelProvider(new WorkbenchLabelProvider());
- data = new GridData (GridData.FILL_BOTH);
- data.heightHint = 100;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- cvsDefinedTagsTree.getTree().setLayoutData(data);
- cvsDefinedTagsRootElement = new ProjectElement(roots[0], ProjectElement.INCLUDE_BRANCHES | ProjectElement.INCLUDE_VERSIONS);
- cvsDefinedTagsRootElement.getBranches().add(CVSUIPlugin.getPlugin().getRepositoryManager().getKnownBranchTags(root));
- cvsDefinedTagsRootElement.getVersions().add(CVSUIPlugin.getPlugin().getRepositoryManager().getKnownVersionTags(root));
- cvsDefinedTagsTree.setInput(cvsDefinedTagsRootElement);
- cvsDefinedTagsTree.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- updateEnablements();
- }
- });
- cvsDefinedTagsTree.setSorter(new ProjectElementSorter());
-
- Composite buttonComposite = new Composite(rememberedTags, SWT.NONE);
- data = new GridData ();
- data.verticalAlignment = GridData.BEGINNING;
- buttonComposite.setLayoutData(data);
- gridLayout = new GridLayout();
- gridLayout.marginHeight = 0;
- gridLayout.marginWidth = 0;
- buttonComposite.setLayout (gridLayout);
-
- addSelectedTagsButton = new Button (buttonComposite, SWT.PUSH);
- addSelectedTagsButton.setText (Policy.bind("TagConfigurationDialog.8")); //$NON-NLS-1$
- data = getStandardButtonData(addSelectedTagsButton);
- data.horizontalAlignment = GridData.FILL;
- addSelectedTagsButton.setLayoutData(data);
- addSelectedTagsButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- rememberCheckedTags();
- }
- });
-
- removeTagButton = new Button (buttonComposite, SWT.PUSH);
- removeTagButton.setText (Policy.bind("TagConfigurationDialog.9")); //$NON-NLS-1$
- data = getStandardButtonData(removeTagButton);
- data.horizontalAlignment = GridData.FILL;
- removeTagButton.setLayoutData(data);
- removeTagButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- deleteSelected();
- }
- });
-
- Button removeAllTags = new Button (buttonComposite, SWT.PUSH);
- removeAllTags.setText (Policy.bind("TagConfigurationDialog.10")); //$NON-NLS-1$
- data = getStandardButtonData(removeAllTags);
- data.horizontalAlignment = GridData.FILL;
- removeAllTags.setLayoutData(data);
- removeAllTags.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- removeAllKnownTags();
- }
- });
-
- if(allowSettingAutoRefreshFiles) {
- Label explanation = new Label(rememberedTags, SWT.WRAP);
- explanation.setText(Policy.bind("TagConfigurationDialog.11")); //$NON-NLS-1$
- data = new GridData ();
- data.horizontalSpan = 2;
- data.widthHint = 300;
- explanation.setLayoutData(data);
-
- autoRefreshFileList = new org.eclipse.swt.widgets.List(rememberedTags, SWT.BORDER | SWT.MULTI);
- data = new GridData ();
- data.heightHint = 45;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- autoRefreshFileList.setLayoutData(data);
- autoRefreshFileList.setItems(CVSUIPlugin.getPlugin().getRepositoryManager().getAutoRefreshFiles(roots[0]));
- autoRefreshFileList.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- updateEnablements();
- }
- public void widgetDefaultSelected(SelectionEvent e) {
- updateEnablements();
- }
- });
-
- Composite buttonComposite2 = new Composite(rememberedTags, SWT.NONE);
- data = new GridData ();
- data.verticalAlignment = GridData.BEGINNING;
- buttonComposite2.setLayoutData(data);
- gridLayout = new GridLayout();
- gridLayout.marginHeight = 0;
- gridLayout.marginWidth = 0;
- buttonComposite2.setLayout (gridLayout);
-
- addSelectedFilesButton = new Button (buttonComposite2, SWT.PUSH);
- addSelectedFilesButton.setText (Policy.bind("TagConfigurationDialog.12")); //$NON-NLS-1$
- data = getStandardButtonData(addSelectedFilesButton);
- data.horizontalAlignment = GridData.FILL;
- addSelectedFilesButton.setLayoutData(data);
- addSelectedFilesButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- addSelectionToAutoRefreshList();
- }
- });
-
- removeFileButton = new Button (buttonComposite2, SWT.PUSH);
- removeFileButton.setText (Policy.bind("TagConfigurationDialog.13")); //$NON-NLS-1$
- data = getStandardButtonData(removeFileButton);
- data.horizontalAlignment = GridData.FILL;
- removeFileButton.setLayoutData(data);
- removeFileButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- String[] selected = autoRefreshFileList.getSelection();
- for (int i = 0; i < selected.length; i++) {
- autoRefreshFileList.remove(selected[i]);
- autoRefreshFileList.setFocus();
- }
- }
- });
- WorkbenchHelp.setHelp(autoRefreshFileList, IHelpContextIds.TAG_CONFIGURATION_REFRESHLIST);
- }
-
- Label seperator = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
- data = new GridData (GridData.FILL_BOTH);
- data.horizontalSpan = 2;
- seperator.setLayoutData(data);
-
- WorkbenchHelp.setHelp(shell, IHelpContextIds.TAG_CONFIGURATION_OVERVIEW);
-
- updateEnablements();
- return shell;
- }
-
- private void updateShownTags() {
- final CVSFileElement[] filesSelection = getSelectedFiles();
- final Set tags = new HashSet();
- if(filesSelection.length!=0) {
- try {
- CVSUIPlugin.runWithProgress(getShell(), true /*cancelable*/, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- monitor.beginTask(Policy.bind("TagConfigurationDialog.22"), filesSelection.length); //$NON-NLS-1$
- try {
- for (int i = 0; i < filesSelection.length; i++) {
- ICVSFile file = filesSelection[i].getCVSFile();
- tags.addAll(Arrays.asList(getTagsFor(file, Policy.subMonitorFor(monitor, 1))));
- }
- } catch (TeamException e) {
- // ignore the exception
- } finally {
- monitor.done();
- }
- }
- });
- } catch (InterruptedException e) {
- // operation cancelled
- } catch (InvocationTargetException e) {
- // can't happen since we're ignoring all possible exceptions
- }
- cvsTagTree.getTable().removeAll();
- for (Iterator it = tags.iterator(); it.hasNext();) {
- CVSTag tag = (CVSTag) it.next();
- List knownTags = new ArrayList();
- knownTags.addAll(Arrays.asList(cvsDefinedTagsRootElement.getBranches().getTags()));
- knownTags.addAll(Arrays.asList(cvsDefinedTagsRootElement.getVersions().getTags()));
- if(!knownTags.contains(tag)) {
- TagElement tagElem = new TagElement(tag);
- cvsTagTree.add(tagElem);
- cvsTagTree.setChecked(tagElem, true);
- }
- }
- }
- }
-
- private CVSFileElement[] getSelectedFiles() {
- IStructuredSelection selection = (IStructuredSelection)cvsResourceTree.getSelection();
- if (!selection.isEmpty()) {
- final List filesSelection = new ArrayList();
- Iterator it = selection.iterator();
- while(it.hasNext()) {
- Object o = it.next();
- if(o instanceof CVSFileElement) {
- filesSelection.add(o);
- }
- }
- return (CVSFileElement[]) filesSelection.toArray(new CVSFileElement[filesSelection.size()]);
- }
- return new CVSFileElement[0];
- }
-
- private void addSelectionToAutoRefreshList() {
- IStructuredSelection selection = (IStructuredSelection)cvsResourceTree.getSelection();
- if (!selection.isEmpty()) {
- final List filesSelection = new ArrayList();
- Iterator it = selection.iterator();
- while(it.hasNext()) {
- Object o = it.next();
- if(o instanceof CVSFileElement) {
- filesSelection.add(o);
- }
- }
- if(!filesSelection.isEmpty()) {
- for (it = filesSelection.iterator(); it.hasNext();) {
- try {
- String relativePath = ((CVSFileElement)it.next()).getCVSFile().getRelativePath(root);
- if(autoRefreshFileList.indexOf(relativePath)==-1) {
- autoRefreshFileList.add(relativePath);
- }
- } catch(CVSException e) {
- }
- }
- }
- }
- }
-
- private CVSTag[] getTagsFor(ICVSFile file, IProgressMonitor monitor) throws TeamException {
- Set tagSet = new HashSet();
- ILogEntry[] entries = file.getLogEntries(monitor);
- for (int j = 0; j < entries.length; j++) {
- CVSTag[] tags = entries[j].getTags();
- for (int k = 0; k < tags.length; k++) {
- tagSet.add(tags[k]);
- }
- }
- return (CVSTag[])tagSet.toArray(new CVSTag[tagSet.size()]);
- }
-
- private void rememberCheckedTags() {
- Object[] checked = cvsTagTree.getCheckedElements();
- for (int i = 0; i < checked.length; i++) {
- CVSTag tag = ((TagElement)checked[i]).getTag();
- if(tag.getType() == CVSTag.BRANCH) {
- cvsDefinedTagsRootElement.getBranches().add(new CVSTag[] {tag});
- } else {
- cvsDefinedTagsRootElement.getVersions().add(new CVSTag[] {tag});
- }
- }
- cvsDefinedTagsTree.refresh();
- }
-
- private void deleteSelected() {
- IStructuredSelection selection = (IStructuredSelection)cvsDefinedTagsTree.getSelection();
- if (!selection.isEmpty()) {
- Iterator it = selection.iterator();
- while(it.hasNext()) {
- Object o = it.next();
- if(o instanceof TagElement) {
- CVSTag tag = ((TagElement)o).getTag();
- if(tag.getType() == CVSTag.BRANCH) {
- cvsDefinedTagsRootElement.getBranches().remove(tag);
- } else if(tag.getType()==CVSTag.VERSION) {
- cvsDefinedTagsRootElement.getVersions().remove(tag);
- }
- }
- }
- }
- cvsDefinedTagsTree.refresh();
- cvsDefinedTagsTree.getTree().setFocus();
- }
-
- private boolean isTagSelectedInKnownTagTree() {
- IStructuredSelection selection = (IStructuredSelection)cvsDefinedTagsTree.getSelection();
- if (!selection.isEmpty()) {
- final List versions = new ArrayList();
- final List branches = new ArrayList();
- Iterator it = selection.iterator();
- while(it.hasNext()) {
- Object o = it.next();
- if(o instanceof TagElement) {
- return true;
- }
- }
- }
- return false;
- }
-
- private void removeAllKnownTags() {
- cvsDefinedTagsRootElement.getBranches().removeAll();
- cvsDefinedTagsRootElement.getVersions().removeAll();
- cvsDefinedTagsTree.refresh();
- }
-
- private void updateEnablements() {
- // add checked tags
- Object[] checked = cvsTagTree.getCheckedElements();
- addSelectedTagsButton.setEnabled(checked.length!=0?true:false);
-
- // Remove known tags
- removeTagButton.setEnabled(isTagSelectedInKnownTagTree()?true:false);
-
- if(allowSettingAutoRefreshFiles) {
- // add selected files
- addSelectedFilesButton.setEnabled(getSelectedFiles().length!=0?true:false);
-
- // remove auto refresh files
- removeFileButton.setEnabled(autoRefreshFileList.getSelection().length!=0?true:false);
- }
- }
-
- /**
- * @see Dialog#okPressed()
- */
- protected void okPressed() {
- // save auto refresh file names
- if(allowSettingAutoRefreshFiles) {
- RepositoryManager manager = CVSUIPlugin.getPlugin().getRepositoryManager();
- String[] oldFileNames = manager.getAutoRefreshFiles(root);
- manager.removeAutoRefreshFiles(root, oldFileNames);
- String[] newFileNames = autoRefreshFileList.getItems();
- if(newFileNames.length!=0) {
- manager.addAutoRefreshFiles(root, autoRefreshFileList.getItems());
- }
- }
-
- // save defined tags
- CVSTag[] branches = cvsDefinedTagsRootElement.getBranches().getTags();
- CVSTag[] versions = cvsDefinedTagsRootElement.getVersions().getTags();
-
- // update all project with the same version tags
- RepositoryManager manager = CVSUIPlugin.getPlugin().getRepositoryManager();
- manager.notifyRepoView = false;
- CVSTag[] oldTags = manager.getKnownBranchTags(root);
- manager.removeBranchTag(root, oldTags);
- for(int i = 0; i < roots.length; i++) {
- if(branches.length>0) {
- manager.addBranchTags(root, branches);
- }
- oldTags = manager.getKnownVersionTags(roots[i]);
- manager.removeVersionTags(roots[i], oldTags);
- if(versions.length>0) {
- manager.addVersionTags(roots[i], versions);
- }
- }
- // XXX hack to force repo view to refresh only once
- manager.notifyRepoView = true;
- manager.addVersionTags(root, new CVSTag[0]);
- // end hack
-
- super.okPressed();
- }
-
- /*
- * Returns a button that implements the standard refresh tags operation. The runnable is run immediatly after
- * the tags are fetched from the server. A client should refresh their widgets that show tags because they
- * may of changed.
- */
- private static Button createTagRefreshButton(final Shell shell, Composite composite, String title, final ICVSFolder folder, final Runnable runnable) {
- Button refreshButton = new Button(composite, SWT.PUSH);
- refreshButton.setText (title);
- refreshButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- try {
- CVSUIPlugin.runWithProgress(shell, true /*cancelable*/, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- CVSUIPlugin.getPlugin().getRepositoryManager().refreshDefinedTags(folder, true, monitor);
- runnable.run();
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InterruptedException e) {
- // operation cancelled
- } catch (InvocationTargetException e) {
- Throwable t = e.getTargetException();
- if (t instanceof TeamException) {
- ErrorDialog.openError(shell, Policy.bind("TagConfigurationDialog.14"), t.getMessage(), ((TeamException) t).getStatus()); //$NON-NLS-1$
- }
- }
- }
- });
- updateEnablementOnRefreshButton(refreshButton, folder);
- return refreshButton;
- }
-
- public static void createTagDefinitionButtons(final Shell shell, Composite composite, final ICVSFolder[] folders, int hHint, int wHint, final Runnable afterRefresh, final Runnable afterConfigure) {
- Composite buttonComp = new Composite(composite, SWT.NONE);
- GridData data = new GridData ();
- data.horizontalAlignment = GridData.END;
- buttonComp.setLayoutData(data);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- buttonComp.setLayout (layout);
-
- final Button refreshButton = TagConfigurationDialog.createTagRefreshButton(shell, buttonComp, Policy.bind("TagConfigurationDialog.20"), folders[0], afterRefresh); //$NON-NLS-1$
- data = new GridData();
- if(hHint!=0 && wHint!=0) {
- data.heightHint = hHint;
- int widthHint = wHint;
- data.widthHint = Math.max(widthHint, refreshButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- }
- data.horizontalAlignment = GridData.END;
- data.horizontalSpan = 1;
- refreshButton.setLayoutData (data);
-
- Button addButton = new Button(buttonComp, SWT.PUSH);
- addButton.setText (Policy.bind("TagConfigurationDialog.21")); //$NON-NLS-1$
- data = new GridData ();
- if(hHint!=0 && wHint!=0) {
- data.heightHint = hHint;
- int widthHint = wHint;
- data.widthHint = Math.max(widthHint, addButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- }
- data.horizontalAlignment = GridData.END;
- data.horizontalSpan = 1;
- addButton.setLayoutData (data);
- addButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- TagConfigurationDialog d = new TagConfigurationDialog(shell, folders);
- d.open();
- updateEnablementOnRefreshButton(refreshButton, folders[0]);
- afterConfigure.run();
- }
- });
-
- WorkbenchHelp.setHelp(refreshButton, IHelpContextIds.TAG_CONFIGURATION_REFRESHACTION);
- WorkbenchHelp.setHelp(addButton, IHelpContextIds.TAG_CONFIGURATION_OVERVIEW);
- }
-
- private static void updateEnablementOnRefreshButton(Button refreshButton, ICVSFolder project) {
- String[] files = CVSUIPlugin.getPlugin().getRepositoryManager().getAutoRefreshFiles(project);
- refreshButton.setEnabled(files.length != 0);
- }
-
- /**
- * @see Window#getInitialSize()
- */
- protected Point getInitialSize() {
- int width, height;
- if(allowSettingAutoRefreshFiles) {
- try {
- height = settings.getInt(ALLOWREFRESH_HEIGHT_KEY);
- width = settings.getInt(ALLOWREFRESH_WIDTH_KEY);
- } catch(NumberFormatException e) {
- height = ALLOWREFRESH_HEIGHT;
- width = ALLOWREFRESH_WIDTH;
- }
- } else {
- try {
- height = settings.getInt(NOREFRESH_HEIGHT_KEY);
- width = settings.getInt(NOREFRESH_WIDTH_KEY);
- } catch(NumberFormatException e) {
- height = NOREFRESH_HEIGHT;
- width = NOREFRESH_WIDTH;
- }
- }
- return new Point(width, height);
- }
-
- /**
- * @see Dialog#cancelPressed()
- */
- protected void cancelPressed() {
- super.cancelPressed();
- }
-
- private GridData getStandardButtonData(Button button) {
- GridData data = new GridData();
- data.heightHint = convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT);
- int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- return data;
- }
-
- /**
- * @see Window#close()
- */
- public boolean close() {
- Rectangle bounds = getShell().getBounds();
- if(allowSettingAutoRefreshFiles) {
- settings.put(ALLOWREFRESH_HEIGHT_KEY, bounds.height);
- settings.put(ALLOWREFRESH_WIDTH_KEY, bounds.width);
- } else {
- settings.put(NOREFRESH_HEIGHT_KEY, bounds.height);
- settings.put(NOREFRESH_WIDTH_KEY, bounds.width);
- }
- return super.close();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagSelectionDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagSelectionDialog.java
deleted file mode 100644
index c640fb2e3..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagSelectionDialog.java
+++ /dev/null
@@ -1,299 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-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.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.merge.ProjectElement;
-import org.eclipse.team.internal.ccvs.ui.merge.TagElement;
-import org.eclipse.team.internal.ccvs.ui.merge.ProjectElement.ProjectElementSorter;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-/**
- * Dialog to prompt the user to choose a tag for a selected resource
- */
-public class TagSelectionDialog extends Dialog {
- private ICVSFolder[] folders;
- private int includeFlags;
- private CVSTag result;
- private String helpContext;
-
- public static final int INCLUDE_HEAD_TAG = ProjectElement.INCLUDE_HEAD_TAG;
- public static final int INCLUDE_BASE_TAG = ProjectElement.INCLUDE_BASE_TAG;
- public static final int INCLUDE_BRANCHES = ProjectElement.INCLUDE_BRANCHES;
- public static final int INCLUDE_VERSIONS = ProjectElement.INCLUDE_VERSIONS;
- public static final int INCLUDE_ALL_TAGS = ProjectElement.INCLUDE_ALL_TAGS;
-
- // widgets;
- private TreeViewer tagTree;
- private Button okButton;
-
- // dialog title, should indicate the action in which the tag selection
- // dialog is being shown
- private String title;
- private String message;
-
- private boolean recurse = true;
- private boolean showRecurse;
-
- // constants
- private static final int SIZING_DIALOG_WIDTH = 400;
- private static final int SIZING_DIALOG_HEIGHT = 250;
-
- /**
- * Creates a new TagSelectionDialog.
- * @param resource The resource to select a version for.
- */
- public TagSelectionDialog(Shell parentShell, IProject[] projects, String title, String message, int includeFlags, boolean showRecurse, String helpContext) {
- this(parentShell, getCVSFoldersFor(projects), title, message, includeFlags, showRecurse, helpContext); //$NON-NLS-1$
- }
-
- private static ICVSFolder[] getCVSFoldersFor(IProject[] projects) {
- ICVSFolder[] folders = new ICVSFolder[projects.length];
- for (int i = 0; i < projects.length; i++) {
- folders[i] = CVSWorkspaceRoot.getCVSFolderFor(projects[i]);
- }
- return folders;
- }
-
- /**
- * Creates a new TagSelectionDialog.
- * @param resource The resource to select a version for.
- */
- public TagSelectionDialog(Shell parentShell, ICVSFolder[] folders, String title, String message, int includeFlags, boolean showRecurse, String helpContext) {
- super(parentShell);
- this.folders = folders;
- this.title = title;
- this.message = message;
- this.includeFlags = includeFlags;
- this.showRecurse = showRecurse;
- this.helpContext = helpContext;
- setShellStyle(getShellStyle() | SWT.RESIZE);
- }
-
- /* (non-Javadoc)
- * Method declared on Window.
- */
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(title);
- }
-
- /**
- * Creates this window's widgetry.
- * <p>
- * The default implementation of this framework method
- * creates this window's shell (by calling <code>createShell</code>),
- * its control (by calling <code>createContents</code>),
- * and initializes this window's shell bounds
- * (by calling <code>initializeBounds</code>).
- * This framework method may be overridden; however,
- * <code>super.create</code> must be called.
- * </p>
- */
- public void create() {
- super.create();
- initialize();
- }
-
- /**
- * Add buttons to the dialog's button bar.
- *
- * @param parent the button bar composite
- */
- protected void createButtonsForButtonBar(Composite parent) {
- // create OK and Cancel buttons by default
- okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- okButton.setEnabled(false);
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
- }
-
- /**
- * Creates and returns the contents of the upper part
- * of this dialog (above the button bar).
- * <p>
- * The default implementation of this framework method
- * creates and returns a new <code>Composite</code> with
- * standard margins and spacing.
- * Subclasses should override.
- * </p>
- *
- * @param the parent composite to contain the dialog area
- * @return the dialog area control
- */
- protected Control createDialogArea(Composite parent) {
- Composite top = (Composite)super.createDialogArea(parent);
- // Add F1 help
- if (helpContext != null) {
- WorkbenchHelp.setHelp(top, helpContext);
- }
- Composite inner = new Composite(top, SWT.NULL);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.widthHint = SIZING_DIALOG_WIDTH;
- data.heightHint = SIZING_DIALOG_HEIGHT;
- inner.setLayoutData(data);
- GridLayout layout = new GridLayout();
- inner.setLayout(layout);
-
- Label l = new Label (inner, SWT.NONE);
- l.setText(message); //$NON-NLS-1$
-
- tagTree = createTree(inner);
- tagTree.setInput(new ProjectElement(folders[0], includeFlags));
- tagTree.setSorter(new ProjectElementSorter());
- Runnable refresh = new Runnable() {
- public void run() {
- getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- tagTree.refresh();
- }
- });
- }
- };
-
- if(showRecurse) {
- final Button recurseCheck = new Button(top, SWT.CHECK);
- recurseCheck.setText(Policy.bind("TagSelectionDialog.recurseOption")); //$NON-NLS-1$
- recurseCheck.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- recurse = recurseCheck.getSelection();
- }
- });
- recurseCheck.setSelection(true);
- }
-
-
- TagConfigurationDialog.createTagDefinitionButtons(getShell(), top, folders,
- convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT),
- convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH),
- refresh, refresh);
-
- Label seperator = new Label(top, SWT.SEPARATOR | SWT.HORIZONTAL);
- data = new GridData (GridData.FILL_BOTH);
- data.horizontalSpan = 2;
- seperator.setLayoutData(data);
-
- updateEnablement();
-
- return top;
- }
-
-
- /**
- * 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) {
- Label label = new Label(parent, SWT.LEFT);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = 1;
- data.horizontalAlignment = GridData.FILL;
- label.setLayoutData(data);
- return label;
- }
-
- protected TreeViewer createTree(Composite parent) {
- Tree tree = new Tree(parent, SWT.SINGLE | SWT.BORDER);
- tree.setLayoutData(new GridData(GridData.FILL_BOTH));
- TreeViewer result = new TreeViewer(tree);
- result.setContentProvider(new WorkbenchContentProvider());
- result.setLabelProvider(new WorkbenchLabelProvider());
- result.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- updateEnablement();
- }
- });
- // select and close on double click
- // To do: use defaultselection instead of double click
- result.getTree().addMouseListener(new MouseAdapter() {
- public void mouseDoubleClick(MouseEvent e) {
- IStructuredSelection selection = (IStructuredSelection)tagTree.getSelection();
- if (!selection.isEmpty() && (selection.getFirstElement() instanceof TagElement)) {
- okPressed();
- }
- }
- });
- result.setSorter(new RepositorySorter());
- return result;
- }
-
- /**
- * Returns the selected tag.
- */
- public CVSTag getResult() {
- return result;
- }
-
- public boolean getRecursive() {
- return recurse;
- }
-
- /**
- * Initializes the dialog contents.
- */
- protected void initialize() {
- okButton.setEnabled(false);
- }
-
- /**
- * Notifies that the ok button of this dialog has been pressed.
- * <p>
- * The default implementation of this framework method sets
- * this dialog's return code to <code>Window.OK</code>
- * and closes the dialog. Subclasses may override.
- * </p>
- */
- protected void okPressed() {
- IStructuredSelection selection = (IStructuredSelection)tagTree.getSelection();
- Object o = selection.getFirstElement();
- TagElement element = (TagElement)o;
- result = element.getTag();
- super.okPressed();
- }
-
-
- /**
- * Updates the dialog enablement.
- */
- protected void updateEnablement() {
- if(okButton!=null) {
- IStructuredSelection selection = (IStructuredSelection)tagTree.getSelection();
- if (selection.isEmpty() || !(selection.getFirstElement() instanceof TagElement)) {
- okButton.setEnabled(false);
- } else {
- okButton.setEnabled(true);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TextViewerAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TextViewerAction.java
deleted file mode 100644
index bc31608e5..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TextViewerAction.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.text.ITextOperationTarget;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.ui.texteditor.IUpdate;
-
-public class TextViewerAction extends Action implements IUpdate {
- private int operationCode = -1;
- private ITextOperationTarget operationTarget;
-
- public TextViewerAction(ITextViewer viewer, int operationCode) {
- this.operationCode = operationCode;
- operationTarget = viewer.getTextOperationTarget();
- update();
- }
- public void update() {
- boolean wasEnabled = isEnabled();
- boolean isEnabled = (operationTarget != null && operationTarget.canDoOperation(operationCode));
- setEnabled(isEnabled);
- if (wasEnabled != isEnabled) {
- firePropertyChange(ENABLED, wasEnabled ? Boolean.TRUE : Boolean.FALSE, isEnabled ? Boolean.TRUE : Boolean.FALSE);
- }
- }
- public void run() {
- if (operationCode != -1 && operationTarget != null) {
- operationTarget.doOperation(operationCode);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TimeoutProgressMonitorDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TimeoutProgressMonitorDialog.java
deleted file mode 100644
index 99a5cbf90..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TimeoutProgressMonitorDialog.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.operation.ModalContext;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-public class TimeoutProgressMonitorDialog extends ProgressMonitorDialog {
- // the timeout
- private int timeout;
- // the number of currently running runnables.
- private int runningRunnables = 0;
-
- /**
- * Creates a progress monitor dialog under the given shell.
- * The dialog has a standard title and no image.
- * <code>open</code> is non-blocking.
- *
- * @param parent the parent shell
- * @param timeout the delay after which the dialog will be opened during a run()
- */
- public TimeoutProgressMonitorDialog(Shell parent, int timeout) {
- super(parent);
- this.timeout = timeout;
- }
-
- /* (non-Javadoc)
- * Method declared on IRunnableContext.
- * Runs the given <code>IRunnableWithProgress</code> with the progress monitor for this
- * progress dialog. The dialog is opened before it is run, and closed after it completes.
- */
- public void run(final boolean fork, boolean cancelable, final IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException {
- setCancelable(cancelable);
- create(); // create the Shell but don't open it yet
- try {
- runningRunnables++;
- final Display display = getShell().getDisplay();
- display.timerExec(timeout, new Runnable() {
- public void run() {
- Shell shell = getShell();
- if (shell != null && ! shell.isDisposed()) open();
- }
- });
-
- final Exception[] holder = new Exception[1];
- BusyIndicator.showWhile(display, new Runnable() {
- public void run() {
- try {
- ModalContext.run(runnable, fork, getProgressMonitor(), display);
- } catch (InvocationTargetException ite) {
- holder[0] = ite;
- } catch (InterruptedException ie) {
- holder[0] = ie;
- }
- }
- });
- if (holder[0] != null) {
- if (holder[0] instanceof InvocationTargetException) {
- throw (InvocationTargetException) holder[0];
- } else if (holder[0] instanceof InterruptedException) {
- throw (InterruptedException) holder[0];
- }
- }
- } finally {
- runningRunnables--;
- close();
- }
- }
-
- public boolean close() {
- if (runningRunnables <= 0) return super.close();
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/UserValidationDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/UserValidationDialog.java
deleted file mode 100644
index d81c52f08..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/UserValidationDialog.java
+++ /dev/null
@@ -1,186 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.dialogs.Dialog;
-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.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * A dialog for prompting for a username and password
- */
-public class UserValidationDialog extends Dialog {
- // widgets
- protected Text usernameField;
- protected Text passwordField;
-
- protected String domain;
- protected String defaultUsername;
- protected String password = null;
-
- // whether or not the username can be changed
- protected boolean isUsernameMutable = true;
- protected String username = null;
- protected String message = null;
-
- /**
- * Creates a new UserValidationDialog.
- *
- * @param parentShell the parent shell
- * @param location the location
- * @param defaultName the default user name
- * @param message a mesage to display to the user
- */
- public UserValidationDialog(Shell parentShell, String location, String defaultName, String message) {
- super(parentShell);
- this.defaultUsername = defaultName;
- this.domain = location;
- this.message = message;
- }
- /**
- * @see Window#configureShell
- */
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(Policy.bind("UserValidationDialog.required")); //$NON-NLS-1$
- // set F1 help
- WorkbenchHelp.setHelp(newShell, IHelpContextIds.USER_VALIDATION_DIALOG);
- }
- /**
- * @see Window#create
- */
- public void create() {
- super.create();
- // add some default values
- usernameField.setText(defaultUsername);
-
- if (isUsernameMutable) {
- // give focus to username field
- usernameField.selectAll();
- usernameField.setFocus();
- } else {
- usernameField.setEditable(false);
- passwordField.setFocus();
- }
- }
- /**
- * @see Dialog#createDialogArea
- */
- protected Control createDialogArea(Composite parent) {
- Composite main = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- main.setLayout(layout);
- main.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- if (message != null) {
- Label messageLabel = new Label(main, SWT.WRAP);
- messageLabel.setText(message);
- messageLabel.setForeground(messageLabel.getDisplay().getSystemColor(SWT.COLOR_RED));
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 3;
- messageLabel.setLayoutData(data);
- }
-
- Label label = new Label(main, SWT.WRAP);
- if (isUsernameMutable) {
- label.setText(Policy.bind("UserValidationDialog.labelUser", domain)); //$NON-NLS-1$
- } else {
- label.setText(Policy.bind("UserValidationDialog.labelPassword", new Object[] {defaultUsername, domain})); //$NON-NLS-1$
- }
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 3;
- label.setLayoutData(data);
-
- createUsernameFields(main);
- createPasswordFields(main);
-
- return main;
- }
- /**
- * Creates the three widgets that represent the password entry area.
- *
- * @param parent the parent of the widgets
- */
- protected void createPasswordFields(Composite parent) {
- new Label(parent, SWT.NONE).setText(Policy.bind("UserValidationDialog.password")); //$NON-NLS-1$
-
- passwordField = new Text(parent, SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
- passwordField.setLayoutData(data);
- passwordField.setEchoChar('*');
-
- // spacer
- new Label(parent, SWT.NONE);
- }
- /**
- * Creates the three widgets that represent the user name entry area.
- *
- * @param parent the parent of the widgets
- */
- protected void createUsernameFields(Composite parent) {
- new Label(parent, SWT.NONE).setText(Policy.bind("UserValidationDialog.user")); //$NON-NLS-1$
-
- usernameField = new Text(parent, SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
- usernameField.setLayoutData(data);
-
- // spacer
- new Label(parent, SWT.NONE);
- }
- /**
- * Returns the password entered by the user, or null
- * if the user canceled.
- *
- * @return the entered password
- */
- public String getPassword() {
- return password;
- }
- /**
- * Returns the username entered by the user, or null
- * if the user canceled.
- *
- * @return the entered username
- */
- public String getUsername() {
- return username;
- }
- /**
- * Notifies that the ok button of this dialog has been pressed.
- * <p>
- * The default implementation of this framework method sets
- * this dialog's return code to <code>Window.OK</code>
- * and closes the dialog. Subclasses may override.
- * </p>
- */
- protected void okPressed() {
- password = passwordField.getText();
- username = usernameField.getText();
-
- super.okPressed();
- }
- /**
- * Sets whether or not the username field should be mutable.
- * This method must be called before create(), otherwise it
- * will be ignored.
- *
- * @param value whether the username is mutable
- */
- public void setUsernameMutable(boolean value) {
- isUsernameMutable = value;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/VersionCollator.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/VersionCollator.java
deleted file mode 100644
index ff4e99585..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/VersionCollator.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.text.Collator;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-/**
- * Collator to compare two CVS revisions
- */
-public class VersionCollator {
- public int compare(String revision1, String revision2) {
- if (revision1 == null && revision2 == null) return 0;
- if (revision1 == null) return -1;
- if (revision2 == null) return 1;
- int[] revision1Segments = getIntSegments(revision1);
- int[] revision2Segments = getIntSegments(revision2);
- for (int i = 0; i < revision1Segments.length && i < revision2Segments.length; i++) {
- int i1 = revision1Segments[i];
- int i2 = revision2Segments[i];
- if (i1 != i2) {
- return i1 > i2 ? 1 : -1;
- }
- }
- if (revision1Segments.length != revision2Segments.length) {
- return revision1Segments.length > revision2Segments.length ? 1 : -1;
- }
- return 0;
- }
-
- int[] getIntSegments(String string) {
- int size = string.length();
- if (size == 0) return new int[0];
- StringBuffer buffer = new StringBuffer();
- List list = new ArrayList();
- for (int i = 0; i < size; i++) {
- char ch = string.charAt(i);
- if (ch == '.') {
- list.add(new Integer(buffer.toString()));
- buffer = new StringBuffer();
- } else {
- buffer.append(ch);
- }
- }
- list.add(new Integer(buffer.toString()));
- int[] result = new int[list.size()];
- Iterator it = list.iterator();
- for (int i = 0; i < result.length; i++) {
- result[i] = ((Integer)it.next()).intValue();
- }
- return result;
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkbenchUserAuthenticator.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkbenchUserAuthenticator.java
deleted file mode 100644
index f132d525f..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkbenchUserAuthenticator.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.IFileTypeInfo;
-import org.eclipse.team.core.IIgnoreInfo;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.IUserAuthenticator;
-import org.eclipse.team.internal.ccvs.core.IUserInfo;
-
-/**
- * An authenticator that prompts the user for authentication info,
- * and stores the results in the Platform's authentication keyring.
- */
-public class WorkbenchUserAuthenticator implements IUserAuthenticator {
- public static boolean USE_ALTERNATE_PROMPTER = false;
-
- /**
- * WorkbenchUserAuthenticator constructor.
- */
- public WorkbenchUserAuthenticator() {
- super();
- // Initialize USE_ALTERNATE_PROMPTER
- IIgnoreInfo[] ignores = Team.getAllIgnores();
- boolean found = false;
- for (int i = 0; i < ignores.length; i++) {
- if (ignores[i].getPattern().equals("*.notes")) { //$NON-NLS-1$
- found = true;
- }
- }
- if (!found) return;
- IFileTypeInfo[] types = Team.getAllTypes();
- for (int i = 0; i < types.length; i++) {
- if (types[i].getExtension().equals("notes")) { //$NON-NLS-1$
- USE_ALTERNATE_PROMPTER = true;
- return;
- }
- }
- USE_ALTERNATE_PROMPTER = false;
- }
- /**
- * @see IUserAuthenticator#authenticateUser
- */
- public void promptForUserInfo(final ICVSRepositoryLocation location, final IUserInfo userinfo, final String message) throws CVSException {
- if (!userinfo.isUsernameMutable() && USE_ALTERNATE_PROMPTER) {
- alternatePromptForUserInfo(userinfo);
- return;
- }
- // ask the user for a password
- final String[] result = new String[2];
- Display display = Display.getCurrent();
- if (display != null) {
- promptForPassword(location, userinfo.getUsername(), message, userinfo.isUsernameMutable(), result);
- } else {
- // sync exec in default thread
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- promptForPassword(location, userinfo.getUsername(), message, userinfo.isUsernameMutable(), result);
- }
- });
- }
-
- if (result[0] == null) {
- throw new OperationCanceledException(Policy.bind("WorkbenchUserAuthenticator.cancelled")); //$NON-NLS-1$
- }
-
- if (userinfo.isUsernameMutable())
- userinfo.setUsername(result[0]);
- userinfo.setPassword(result[1]);
- }
-
- /**
- * Asks the user to enter a password. Places the
- * results in the supplied string[]. result[0] must
- * contain the username, result[1] must contain the password.
- * If the user canceled, both values must be zero.
- *
- * @param location the location to obtain the password for
- * @param username the username
- * @param message a message to display to the user
- * @param userMutable whether the user can be changed in the dialog
- * @param result a String array of length two in which to put the result
- */
- private void promptForPassword(final ICVSRepositoryLocation location, final String username, final String message, final boolean userMutable, final String[] result) {
- Display display = Display.getCurrent();
- Shell shell = new Shell(display);
- UserValidationDialog dialog = new UserValidationDialog(shell, location.getLocation(), (username==null)?"":username, message);//$NON-NLS-1$
- dialog.setUsernameMutable(userMutable);
- dialog.open();
- shell.dispose();
-
- result[0] = dialog.getUsername();
- result[1] = dialog.getPassword();
- }
-
- /**
- * Special alternate prompting. Returns the password. Username must be fixed.
- */
- private String alternatePromptForPassword(final String username) {
- Display display = Display.getCurrent();
- Shell shell = new Shell(display);
- AlternateUserValidationDialog dialog = new AlternateUserValidationDialog(shell, (username == null) ? "" : username); //$NON-NLS-1$
- dialog.setUsername(username);
- int result = dialog.open();
- shell.dispose();
- if (result == Dialog.CANCEL) return null;
- return dialog.getPassword();
- }
- /**
- * Special alternate prompting.
- */
- public void alternatePromptForUserInfo(final IUserInfo userinfo) throws CVSException {
- // ask the user for a password
- final String[] result = new String[1];
- Display display = Display.getCurrent();
- if (display != null) {
- result[0] = alternatePromptForPassword(userinfo.getUsername());
- } else {
- // sync exec in default thread
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- result[0] = alternatePromptForPassword(userinfo.getUsername());
- }
- });
- }
-
- if (result[0] == null) {
- throw new OperationCanceledException(Policy.bind("WorkbenchUserAuthenticator.The_operation_was_canceled_by_the_user_1")); //$NON-NLS-1$
- }
-
- userinfo.setPassword(result[0]);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/AddAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/AddAction.java
deleted file mode 100644
index 56956f429..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/AddAction.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-/**
- * AddAction performs a 'cvs add' command on the selected resources. If a
- * container is selected, its children are recursively added.
- */
-public class AddAction extends CVSAction {
- /*
- * @see CVSAction#execute()
- */
- public void execute(IAction action) {
- run(new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- try {
- Hashtable table = getProviderMapping();
- Set keySet = table.keySet();
- monitor.beginTask("", keySet.size() * 1000); //$NON-NLS-1$
- monitor.setTaskName(Policy.bind("AddAction.adding")); //$NON-NLS-1$
- Iterator iterator = keySet.iterator();
- while (iterator.hasNext()) {
- IProgressMonitor subMonitor = new SubProgressMonitor(monitor, 1000);
- CVSTeamProvider provider = (CVSTeamProvider)iterator.next();
- List list = (List)table.get(provider);
- IResource[] providerResources = (IResource[])list.toArray(new IResource[list.size()]);
- provider.add(providerResources, IResource.DEPTH_INFINITE, subMonitor);
- }
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- }, Policy.bind("AddAction.add"), this.PROGRESS_DIALOG); //$NON-NLS-1$
-
- }
- /*
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- IResource[] resources = getSelectedResources();
- if (resources.length == 0) return false;
- for (int i = 0; i < resources.length; i++) {
- RepositoryProvider provider = RepositoryProvider.getProvider(resources[i].getProject(), CVSProviderPlugin.getTypeId());
- if(provider == null) return false;
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resources[i]);
- if(cvsResource.isFolder()) {
- if(((ICVSFolder)cvsResource).isCVSFolder()) return false;
- } else {
- if (cvsResource.isManaged()) return false;
- }
- }
- return true;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/AddToWorkspaceAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/AddToWorkspaceAction.java
deleted file mode 100644
index dc694e96a..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/AddToWorkspaceAction.java
+++ /dev/null
@@ -1,108 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.client.Checkout;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ui.PromptingDialog;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-/**
- * Add some remote resources to the workspace. Current implementation:
- * -Works only for remote folders
- * -Does not prompt for project name; uses folder name instead
- */
-public class AddToWorkspaceAction extends CheckoutAction {
- /**
- * Returns the selected remote folders.
- * Remove any module aliases as they may cause problems on checkout this way
- */
- protected ICVSRemoteFolder[] getSelectedRemoteFolders() {
- ICVSRemoteFolder[] allFolders = super.getSelectedRemoteFolders();
- if (allFolders.length == 0) return allFolders;
- ArrayList resources = new ArrayList();
- for (int i = 0; i < allFolders.length; i++) {
- ICVSRemoteFolder folder = allFolders[i];
- if (!Checkout.ALIAS.isElementOf(folder.getLocalOptions())) {
- resources.add(folder);
- }
- }
- return (ICVSRemoteFolder[])resources.toArray(new ICVSRemoteFolder[resources.size()]);
- }
-
- /*
- * @see CVSAction#execute()
- */
- public void execute(IAction action) {
- run(new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- try {
- ICVSRemoteFolder[] folders = getSelectedRemoteFolders();
-
- List targetProjects = new ArrayList();
- Map targetFolders = new HashMap();
- for (int i = 0; i < folders.length; i++) {
- String name = folders[i].getName();
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
- targetFolders.put(name, folders[i]);
- targetProjects.add(project);
- }
-
- IResource[] projects = (IResource[]) targetProjects.toArray(new IResource[targetProjects.size()]);
-
- PromptingDialog prompt = new PromptingDialog(getShell(), projects,
- getOverwriteLocalAndFileSystemPrompt(),
- Policy.bind("ReplaceWithAction.confirmOverwrite"));//$NON-NLS-1$
- projects = prompt.promptForMultiple();
-
- monitor.beginTask(null, 100);
- if (projects.length != 0) {
- IProject[] localFolders = new IProject[projects.length];
- ICVSRemoteFolder[] remoteFolders = new ICVSRemoteFolder[projects.length];
- for (int i = 0; i < projects.length; i++) {
- localFolders[i] = (IProject)projects[i];
- remoteFolders[i] = (ICVSRemoteFolder)targetFolders.get(projects[i].getName());
- }
-
- monitor.setTaskName(getTaskName(remoteFolders));
- CVSProviderPlugin.getProvider().checkout(remoteFolders, localFolders, Policy.subMonitorFor(monitor, 100));
- }
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- }, Policy.bind("AddToWorkspaceAction.checkoutFailed"), this.PROGRESS_DIALOG); //$NON-NLS-1$
- }
-
- /*
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- ICVSRemoteFolder[] resources = getSelectedRemoteFolders();
- if (resources.length == 0) return false;
- for (int i = 0; i < resources.length; i++) {
- if (resources[i] instanceof ICVSRepositoryLocation) return false;
- }
- return true;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/BranchAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/BranchAction.java
deleted file mode 100644
index 36cfbf898..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/BranchAction.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.BranchPromptDialog;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.RepositoryManager;
-
-/**
- * BranchAction tags the selected resources with a branch tag specified by the user,
- * and optionally updates the local resources to point to the new branch.
- */
-public class BranchAction extends CVSAction {
-
- /*
- * @see CVSAction#execute()
- */
- public void execute(IAction action) {
- final Shell shell = getShell();
- final IResource[] resources = getSelectedResources();
- boolean allSticky = areAllResourcesSticky(resources);
-
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor(resources[0].getProject());
- final BranchPromptDialog dialog = new BranchPromptDialog(getShell(),
- Policy.bind("BranchWizard.title"), //$NON-NLS-1$
- folder,
- allSticky,
- calculateInitialVersionName(resources,allSticky));
-
- if (dialog.open() != InputDialog.OK) return;
-
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- String tagString = dialog.getBranchTagName();
- boolean update = dialog.getUpdate();
- String versionString = dialog.getVersionTagName();
- CVSTag rootVersionTag = null;
- final CVSTag branchTag = new CVSTag(tagString, CVSTag.BRANCH);
- if (versionString != null) {
- rootVersionTag = new CVSTag(versionString, CVSTag.VERSION);
- }
-
- // For non-projects determine if the tag being loaded is the same as the resource's parent
- // If it's not, warn the user that they will have strange sync behavior
- if (update) {
- if(!CVSAction.checkForMixingTags(getShell(), resources, branchTag)) {
- return;
- }
- }
-
- RepositoryManager manager = CVSUIPlugin.getPlugin().getRepositoryManager();
- Hashtable table = getProviderMapping(resources);
- Set keySet = table.keySet();
- monitor.beginTask("", keySet.size() * 1000); //$NON-NLS-1$
- MultiStatus status = new MultiStatus(CVSUIPlugin.ID, IStatus.INFO, Policy.bind("BranchWizard.errorBranching"), null); //$NON-NLS-1$
- Iterator iterator = keySet.iterator();
- while (iterator.hasNext()) {
- IProgressMonitor subMonitor = new SubProgressMonitor(monitor, 1000);
- CVSTeamProvider provider = (CVSTeamProvider)iterator.next();
- List list = (List)table.get(provider);
- IResource[] providerResources = (IResource[])list.toArray(new IResource[list.size()]);
- ICVSRepositoryLocation root = provider.getCVSWorkspaceRoot().getRemoteLocation();
- try {
- if (!areAllResourcesSticky(resources)) {
- // version everything in workspace with the root version tag specified in dialog
- provider.makeBranch(providerResources, rootVersionTag, branchTag, update, true, subMonitor);
- } else {
- // all resources are versions, use that version as the root of the branch
- provider.makeBranch(providerResources, null, branchTag, update, true, subMonitor);
- }
- if (rootVersionTag != null || update) {
- for (int i = 0; i < providerResources.length; i++) {
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(providerResources[i]);
- if (rootVersionTag != null) {
- manager.addVersionTags(cvsResource, new CVSTag[] { rootVersionTag });
- }
- if (update) {
- manager.addBranchTags(cvsResource, new CVSTag[] { branchTag });
- }
- }
- }
- } catch (TeamException e) {
- status.merge(e.getStatus());
- }
- }
- if (!status.isOK()) {
- throw new InvocationTargetException(new CVSException(status));
- }
- } catch(CVSException e) {
- throw new InvocationTargetException(e);
- }
- }
- }, Policy.bind("BranchWizard.errorBranching"), this.PROGRESS_DIALOG); //$NON-NLS-1$
- }
-
- /*
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() {
- try {
- return isSelectionNonOverlapping();
- } catch(TeamException e) {
- CVSUIPlugin.log(e.getStatus());
- return false;
- }
- }
-
- /**
- * Answers <code>true</code> if all resources in the array have a sticky tag
- */
- private boolean areAllResourcesSticky(IResource[] resources) {
- for (int i = 0; i < resources.length; i++) {
- if(!hasStickyTag(resources[i])) return false;
- }
- return true;
- }
-
- /**
- * Answers <code>true</code> if the resource has a sticky tag
- */
- private boolean hasStickyTag(IResource resource) {
- try {
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- CVSTag tag;
- if(cvsResource.isFolder()) {
- FolderSyncInfo folderInfo = ((ICVSFolder)cvsResource).getFolderSyncInfo();
- tag = folderInfo.getTag();
- } else {
- ResourceSyncInfo info = cvsResource.getSyncInfo();
- tag = info.getTag();
- }
- if(tag!=null) {
- int tagType = tag.getType();
- if(tagType==tag.VERSION) {
- return true;
- }
- }
- } catch(CVSException e) {
- CVSUIPlugin.log(e.getStatus());
- return false;
- }
- return false;
- }
-
- private String calculateInitialVersionName(IResource[] resources, boolean allSticky) {
- String versionName = ""; //$NON-NLS-1$
- try {
- if(allSticky) {
- IResource stickyResource = resources[0];
- if(stickyResource.getType()==IResource.FILE) {
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor((IFile)stickyResource);
- versionName = cvsFile.getSyncInfo().getTag().getName();
- } else {
- ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor((IContainer)stickyResource);
- versionName = cvsFolder.getFolderSyncInfo().getTag().getName();
- }
- }
- } catch(CVSException e) {
- CVSUIPlugin.log(e.getStatus());
- versionName = ""; //$NON-NLS-1$
- }
- return versionName;
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CVSAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CVSAction.java
deleted file mode 100644
index c73e6e376..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CVSAction.java
+++ /dev/null
@@ -1,410 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.IStructuredSelection;
-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.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.AvoidableMessageDialog;
-import org.eclipse.team.internal.ccvs.ui.CVSDecorator;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ui.IPromptCondition;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Superclass for all CVS actions. It provides helper enablement
- * methods and common pre-run and post-run hadling.
- */
-abstract public class CVSAction extends TeamAction {
-
- private List accumulatedStatus = new ArrayList();
-
- /**
- * Common run method for all CVS actions.
- *
- * [Note: it would be nice to have common CVS error handling
- * placed here and have all CVS actions subclass. For example
- * error handling UI could provide a retry facility for actions
- * if they have failed.]
- */
- final public void run(IAction action) {
- accumulatedStatus.clear();
- if(needsToSaveDirtyEditors()) {
- if(!saveAllEditors()) {
- return;
- }
- }
- try {
- execute(action);
- if ( ! accumulatedStatus.isEmpty()) {
- handle(null);
- }
- } catch (InvocationTargetException e) {
- // Handle the exception and any accumulated errors
- handle(e);
- } catch (InterruptedException e) {
- // Show any problems that have occured so far
- handle(null);
- }
- }
-
- /**
- * Add a status to the list of accumulated status.
- * These will be provided to method handle(Exception, IStatus[])
- * when the action completes.
- */
- protected void addStatus(IStatus status) {
- accumulatedStatus.add(status);
- }
-
- /**
- * Return the list of status accumulated so far by the action. This
- * will include any OK status that were added using addStatus(IStatus)
- */
- protected IStatus[] getAccumulatedStatus() {
- return (IStatus[]) accumulatedStatus.toArray(new IStatus[accumulatedStatus.size()]);
- }
-
- /**
- * Return the title to be displayed on error dialogs.
- * Sunclasses should override to present a custon message.
- */
- protected String getErrorTitle() {
- return Policy.bind("CVSAction.errorTitle"); //$NON-NLS-1$
- }
-
- /**
- * Return the title to be displayed on error dialogs when warnigns occur.
- * Sunclasses should override to present a custon message.
- */
- protected String getWarningTitle() {
- return Policy.bind("CVSAction.warningTitle"); //$NON-NLS-1$
- }
-
- /**
- * Return the message to be used for the parent MultiStatus when
- * mulitple errors occur during an action.
- * Sunclasses should override to present a custon message.
- */
- protected String getMultiStatusMessage() {
- return Policy.bind("CVSAction.multipleProblemsMessage"); //$NON-NLS-1$
- }
-
- /**
- * Return the status to be displayed in an error dialog for the given list
- * of non-OK status.
- *
- * This method can be overridden bu subclasses. Returning an OK status will
- * prevent the error dialog from being shown.
- */
- protected IStatus getStatusToDisplay(IStatus[] problems) {
- if (problems.length == 1) {
- return problems[0];
- }
- MultiStatus combinedStatus = new MultiStatus(CVSUIPlugin.ID, 0, getMultiStatusMessage(), null); //$NON-NLS-1$
- for (int i = 0; i < problems.length; i++) {
- combinedStatus.merge(problems[i]);
- }
- return combinedStatus;
- }
-
- /**
- * Method that implements generic handling of an exception.
- *
- * Thsi method will also use any accumulated status when determining what
- * information (if any) to show the user.
- *
- * @param exception the exception that occured (or null if none occured)
- * @param status any status accumulated by the action before the end of
- * the action or the exception occured.
- */
- protected void handle(Exception exception) {
- // Get the non-OK statii
- List problems = new ArrayList();
- IStatus[] status = getAccumulatedStatus();
- if (status != null) {
- for (int i = 0; i < status.length; i++) {
- IStatus iStatus = status[i];
- if ( ! iStatus.isOK() || iStatus.getCode() == CVSStatus.SERVER_ERROR) {
- problems.add(iStatus);
- }
- }
- }
- // Handle the case where there are no problem statii
- if (problems.size() == 0) {
- if (exception == null) return;
- handle(exception, getErrorTitle(), null);
- return;
- }
-
- // For now, display both the exception and the problem status
- // Later, we can determine how to display both together
- if (exception != null) {
- handle(exception, getErrorTitle(), null);
- }
-
- String message = null;
- IStatus statusToDisplay = getStatusToDisplay((IStatus[]) problems.toArray(new IStatus[problems.size()]));
- if (statusToDisplay.isOK()) return;
- if (statusToDisplay.isMultiStatus() && statusToDisplay.getChildren().length == 1) {
- message = statusToDisplay.getMessage();
- statusToDisplay = statusToDisplay.getChildren()[0];
- }
- String title;
- if (statusToDisplay.getSeverity() == IStatus.ERROR) {
- title = getErrorTitle();
- } else {
- title = getWarningTitle();
- }
- ErrorDialog.openError(getShell(), title, message, statusToDisplay);
- }
-
- /**
- * Actions must override to do their work.
- */
- abstract protected void execute(IAction action) throws InvocationTargetException, InterruptedException;
-
- /**
- * Answers if the action would like dirty editors to saved
- * based on the CVS preference before running the action. By
- * default most CVS action modify the workspace and thus should
- * save dirty editors.
- */
- protected boolean needsToSaveDirtyEditors() {
- return true;
- }
-
- /**
- * Answers <code>true</code> if the current selection contains resource that don't
- * have overlapping paths and <code>false</code> otherwise.
- */
- protected boolean isSelectionNonOverlapping() throws TeamException {
- IResource[] resources = getSelectedResources();
- // allow operation for non-overlapping resource selections
- if(resources.length>0) {
- List validPaths = new ArrayList(2);
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
-
- // only allow cvs resources to be selected
- if(RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId()) == null) {
- return false;
- }
-
- // check if this resource overlaps other selections
- IPath resourceFullPath = resource.getFullPath();
- if(!validPaths.isEmpty()) {
- for (Iterator it = validPaths.iterator(); it.hasNext();) {
- IPath path = (IPath) it.next();
- if(path.isPrefixOf(resourceFullPath) ||
- resourceFullPath.isPrefixOf(path)) {
- return false;
- }
- }
- }
- validPaths.add(resourceFullPath);
-
- // ensure that resources are managed
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- if(cvsResource.isFolder()) {
- if( ! ((ICVSFolder)cvsResource).isCVSFolder()) return false;
- } else {
- if( ! cvsResource.isManaged()) return false;
- }
- }
- return true;
- }
- return false;
- }
-
- /**
- * Returns the selected CVS resources
- */
- protected ICVSResource[] getSelectedCVSResources() {
- ArrayList resources = null;
- if (!selection.isEmpty()) {
- resources = new ArrayList();
- Iterator elements = ((IStructuredSelection) selection).iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- if (next instanceof ICVSResource) {
- resources.add(next);
- continue;
- }
- if (next instanceof IAdaptable) {
- IAdaptable a = (IAdaptable) next;
- Object adapter = a.getAdapter(ICVSResource.class);
- if (adapter instanceof ICVSResource) {
- resources.add(adapter);
- continue;
- }
- }
- }
- }
- if (resources != null && !resources.isEmpty()) {
- return (ICVSResource[])resources.toArray(new ICVSResource[resources.size()]);
- }
- return new ICVSResource[0];
- }
-
- /**
- * Get selected CVS remote folders
- */
- protected ICVSRemoteFolder[] getSelectedRemoteFolders() {
- ArrayList resources = null;
- if (!selection.isEmpty()) {
- resources = new ArrayList();
- Iterator elements = ((IStructuredSelection) selection).iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- if (next instanceof ICVSRemoteFolder) {
- resources.add(next);
- continue;
- }
- if (next instanceof IAdaptable) {
- IAdaptable a = (IAdaptable) next;
- Object adapter = a.getAdapter(ICVSRemoteFolder.class);
- if (adapter instanceof ICVSRemoteFolder) {
- resources.add(adapter);
- continue;
- }
- }
- }
- }
- if (resources != null && !resources.isEmpty()) {
- return (ICVSRemoteFolder[])resources.toArray(new ICVSRemoteFolder[resources.size()]);
- }
- return new ICVSRemoteFolder[0];
- }
-
- /**
- * A helper prompt condition for prompting for CVS dirty state.
- */
- public static IPromptCondition getOverwriteLocalChangesPrompt() {
- return new IPromptCondition() {
- public boolean needsPrompt(IResource resource) {
- return CVSDecorator.isDirty(resource);
- }
- public String promptMessage(IResource resource) {
- return Policy.bind("ReplaceWithAction.localChanges", resource.getName());//$NON-NLS-1$
- }
- };
- }
-
- /**
- * Checks if a the resources' parent's tags are different then the given tag.
- * Prompts the user that they are adding mixed tags and returns <code>true</code> if
- * the user wants to continue or <code>false</code> otherwise.
- */
- public static boolean checkForMixingTags(final Shell shell, IResource[] resources, final CVSTag tag) throws CVSException {
- final IPreferenceStore store = CVSUIPlugin.getPlugin().getPreferenceStore();
- if(!store.getBoolean(ICVSUIConstants.PREF_PROMPT_ON_MIXED_TAGS)) {
- return true;
- };
-
- final boolean[] result = new boolean[] { true };
-
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (resource.getType() != IResource.PROJECT) {
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- CVSTag parentTag = cvsResource.getParent().getFolderSyncInfo().getTag();
- // prompt if the tags are not equal
- // consider BASE to be equal the parent tag since we don't make BASE sticky on replace
- if (!CVSTag.equalTags(tag, parentTag) && !CVSTag.equalTags(tag, CVSTag.BASE)) {
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- AvoidableMessageDialog dialog = new AvoidableMessageDialog(
- shell,
- Policy.bind("CVSAction.mixingTagsTitle"), //$NON-NLS-1$
- null, // accept the default window icon
- Policy.bind("CVSAction.mixingTags", tag.getName()), //$NON-NLS-1$
- MessageDialog.QUESTION,
- new String[] {IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL},
- 0);
-
- result[0] = dialog.open() == 0;
- if(result[0] && dialog.isDontShowAgain()) {
- store.setValue(ICVSUIConstants.PREF_PROMPT_ON_MIXED_TAGS, false);
- }
- }
- });
- // only prompt once
- break;
- }
- }
- }
- return result[0];
- }
-
- /**
- * Based on the CVS preference for saving dirty editors this method will either
- * ignore dirty editors, save them automatically, or prompt the user to save them.
- *
- * @return <code>true</code> if the command succeeded, and <code>false</code>
- * if at least one editor with unsaved changes was not saved
- */
- private boolean saveAllEditors() {
- final int option = CVSUIPlugin.getPlugin().getPreferenceStore().getInt(ICVSUIConstants.PREF_SAVE_DIRTY_EDITORS);
- final boolean[] okToContinue = new boolean[] {true};
- if (option != ICVSUIConstants.OPTION_NEVER) {
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- IWorkbenchPage oldPage = CVSUIPlugin.getActivePage();
- boolean confirm = option == ICVSUIConstants.OPTION_PROMPT;
- IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
- for (int i = 0; i < windows.length; i++) {
- IWorkbenchPage[] pages = windows[i].getPages();
- for (int j = 0; j < pages.length; j++) {
- okToContinue[0] = pages[j].saveAllEditors(confirm);
- if (!okToContinue[0]) break;
- }
- if (!okToContinue[0]) break;
- }
- if (oldPage != null) {
- oldPage.getWorkbenchWindow().getShell().setFocus();
- }
- }
- });
- }
- return okToContinue[0];
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutAction.java
deleted file mode 100644
index 7f56f1598..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutAction.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashSet;
-import java.util.Set;
-import java.io.File;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ui.IPromptCondition;
-import org.eclipse.team.internal.ui.PromptingDialog;
-
-/**
- * The purpose of the CheckoutAction is to allow the checkout of module aliases into the
- */
-public class CheckoutAction extends CVSAction {
-
- /**
- * @see CVSAction#execute(IAction)
- */
- protected void execute(IAction action) throws InvocationTargetException, InterruptedException {
-
- // Fetch the module expansions for the folder
- final ICVSRemoteFolder[] remoteFolders = getSelectedRemoteFolders();
- final String[][] expansions = new String[1][0];
- expansions[0] = null;
- CVSUIPlugin.runWithProgressDialog(getShell(), true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- expansions[0] = CVSProviderPlugin.getProvider().getExpansions(remoteFolders, monitor);
- } catch (CVSException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- if (expansions[0] == null) return;
-
- // If the folder exists, inform the user that it will be overridden
- Set targetProjects = new HashSet();
- for (int i = 0; i < expansions[0].length; i++) {
- String string = expansions[0][i];
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(new Path(string).segment(0));
- targetProjects.add(project);
- }
- IResource[] projects = (IResource[]) targetProjects.toArray(new IResource[targetProjects.size()]);
- PromptingDialog prompt = new PromptingDialog(getShell(), projects,
- getOverwriteLocalAndFileSystemPrompt(),
- Policy.bind("ReplaceWithAction.confirmOverwrite"));//$NON-NLS-1$
- if (prompt.promptForMultiple().length != projects.length) return;
-
- CVSUIPlugin.runWithProgressDialog(getShell(), true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- monitor.beginTask(getTaskName(remoteFolders), 100);
- monitor.setTaskName(getTaskName(remoteFolders));
- CVSProviderPlugin.getProvider().checkout(remoteFolders, null, Policy.subMonitorFor(monitor, 100));
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- });
- }
-
- /**
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- return getSelectedRemoteFolders().length == 1;
- }
-
- protected static String getTaskName(ICVSRemoteFolder[] remoteFolders) {
- if (remoteFolders.length == 1) {
- ICVSRemoteFolder folder = remoteFolders[0];
- return Policy.bind("AddToWorkspace.taskName1", folder.getRepositoryRelativePath()); //$NON-NLS-1$
- }
- else {
- return Policy.bind("AddToWorkspace.taskNameN", new Integer(remoteFolders.length).toString()); //$NON-NLS-1$
- }
- }
-
- protected IPromptCondition getOverwriteLocalAndFileSystemPrompt() {
- return new IPromptCondition() {
- // prompt if resource in workspace exists or exists in local file system
- public boolean needsPrompt(IResource resource) {
- File localLocation = getFileLocation(resource);
- if(resource.exists() || localLocation.exists()) {
- return true;
- }
- return false;
- }
- public String promptMessage(IResource resource) {
- File localLocation = getFileLocation(resource);
- if(resource.exists()) {
- return Policy.bind("AddToWorkspaceAction.thisResourceExists", resource.getName());//$NON-NLS-1$
- } else {
- return Policy.bind("AddToWorkspaceAction.thisExternalFileExists", resource.getName());//$NON-NLS-1$
- }
- }
- private File getFileLocation(IResource resource) {
- return new File(resource.getParent().getLocation().toFile(), resource.getName());
- }
- };
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutAsAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutAsAction.java
deleted file mode 100644
index af0db5ab0..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutAsAction.java
+++ /dev/null
@@ -1,201 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ui.PromptingDialog;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.NewProjectAction;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-import org.eclipse.ui.dialogs.ProjectLocationSelectionDialog;
-
-/**
- * Add a remote resource to the workspace. Current implementation:
- * -Works only for remote folders
- * -Does not prompt for project name; uses folder name instead
- */
-public class CheckoutAsAction extends AddToWorkspaceAction {
- /*
- * @see IActionDelegate#run(IAction)
- */
- public void execute(IAction action) {
-
- final ICVSRemoteFolder[] folders = getSelectedRemoteFolders();
- if (folders.length != 1) return;
- final String name = folders[0].getName();
-
- // Fetch the members of the folder to see if they contain a .project file.
- final boolean[] hasProjectMetaFile = new boolean[] { false };
- final boolean[] errorOccured = new boolean[] { false };
- run(new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- try {
- folders[0].members(monitor);
- } catch (TeamException e) {
- errorOccured[0] = true;
- throw new InvocationTargetException(e);
- }
- // Check for the existance of the .project file
- try {
- folders[0].getFile(".project"); //$NON-NLS-1$
- hasProjectMetaFile[0] = true;
- } catch (TeamException e) {
- // We couldn't retrieve the meta file so assume it doesn't exist
- hasProjectMetaFile[0] = false;
- }
- // If the above failed, look for the old .vcm_meta file
- if (! hasProjectMetaFile[0]) {
- try {
- folders[0].getFile(".vcm_meta"); //$NON-NLS-1$
- hasProjectMetaFile[0] = true;
- } catch (TeamException e) {
- // We couldn't retrieve the meta file so assume it doesn't exist
- hasProjectMetaFile[0] = false;
- }
- }
- }
- }, Policy.bind("CheckoutAsAction.checkoutFailed"), this.PROGRESS_DIALOG); //$NON-NLS-1$
- if (errorOccured[0]) return;
-
- // Prompt outside a workspace runnable so that the project creation delta can be heard
- IProject newProject = null;
- if ( ! hasProjectMetaFile[0]) {
- newProject = getNewProject(name);
- if (newProject == null) return;
- }
-
- final IProject createdProject = newProject;
- run(new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- try {
- IProject project;
- if (hasProjectMetaFile[0]) {
- // Prompt for name
- final Shell shell = getShell();
- final int[] result = new int[] { Dialog.OK };
- project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
- final ProjectLocationSelectionDialog dialog = new ProjectLocationSelectionDialog(shell, project);
- dialog.setTitle(Policy.bind("CheckoutAsAction.enterProjectTitle", name)); //$NON-NLS-1$
-
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- result[0] = dialog.open();
- }
- });
- if (result[0] != Dialog.OK) return;
-
- Object[] destinationPaths = dialog.getResult();
- if (destinationPaths == null) return;
- String newName = (String) destinationPaths[0];
- IPath newLocation = new Path((String) destinationPaths[1]);
-
- // prompt if the project exists locally
- project = ResourcesPlugin.getWorkspace().getRoot().getProject(newName);
- PromptingDialog prompt = new PromptingDialog(getShell(), new IResource[] { project },
- getOverwriteLocalAndFileSystemPrompt(), Policy.bind("ReplaceWithAction.confirmOverwrite"));//$NON-NLS-1$
- if (prompt.promptForMultiple().length == 0) return;
-
- monitor.beginTask(null, 100);
- monitor.setTaskName(Policy.bind("CheckoutAsAction.taskname", name, newName)); //$NON-NLS-1$
-
- // create the project
- try {
- if (newLocation.equals(Platform.getLocation())) {
- // create in default location
- project.create(Policy.subMonitorFor(monitor, 3));
- } else {
- // create in some other location
- IProjectDescription desc = ResourcesPlugin.getWorkspace().newProjectDescription(project.getName());
- desc.setLocation(newLocation);
- project.create(desc, Policy.subMonitorFor(monitor, 3));
- }
- project.open(Policy.subMonitorFor(monitor, 2));
- } catch (CoreException e) {
- throw CVSException.wrapException(e);
- }
- } else {
- project = createdProject;
- monitor.beginTask(null, 95);
- monitor.setTaskName(Policy.bind("CheckoutAsAction.taskname", name, createdProject.getName())); //$NON-NLS-1$
- }
-
- CVSProviderPlugin.getProvider().checkout(folders, new IProject[] { project }, Policy.subMonitorFor(monitor, 95));
-
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- }, Policy.bind("CheckoutAsAction.checkoutFailed"), this.PROGRESS_DIALOG); //$NON-NLS-1$
- }
-
- /*
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- return getSelectedRemoteFolders().length == 1;
- }
-
- /**
- * Get a new project.
- *
- * The suggestedName is not currently used but is a desired capability.
- */
- private IProject getNewProject(String suggestedName) {
- NewProjectListener listener = new NewProjectListener();
- ResourcesPlugin.getWorkspace().addResourceChangeListener(listener, IResourceChangeEvent.POST_CHANGE);
- (new NewProjectAction(PlatformUI.getWorkbench().getActiveWorkbenchWindow())).run();
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(listener);
- return listener.getNewProject();
- }
-
- class NewProjectListener implements IResourceChangeListener {
- private IProject newProject = null;
- /**
- * @see IResourceChangeListener#resourceChanged(IResourceChangeEvent)
- */
- public void resourceChanged(IResourceChangeEvent event) {
- IResourceDelta root = event.getDelta();
- IResourceDelta[] projectDeltas = root.getAffectedChildren();
- for (int i = 0; i < projectDeltas.length; i++) {
- IResourceDelta delta = projectDeltas[i];
- IResource resource = delta.getResource();
- if (delta.getKind() == IResourceDelta.ADDED) {
- newProject = (IProject)resource;
- }
- }
- }
- /**
- * Gets the newProject.
- * @return Returns a IProject
- */
- public IProject getNewProject() {
- return newProject;
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CommitAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CommitAction.java
deleted file mode 100644
index 18495b38b..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CommitAction.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.RepositoryManager;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-/**
- * Action for checking in files to a CVS provider.
- * Prompts the user for a release comment.
- */
-public class CommitAction extends CVSAction {
- /*
- * @see IActionDelegate#run(IAction)
- */
- public void execute(IAction action) {
- run(new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- try {
- RepositoryManager manager = CVSUIPlugin.getPlugin().getRepositoryManager();
- String comment = promptForComment(manager);
- if (comment != null) {
- manager.commit(getSelectedResources(), comment, monitor);
- }
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- }, Policy.bind("CommitAction.commitFailed"), PROGRESS_DIALOG); //$NON-NLS-1$
- }
-
- /*
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- IResource[] resources = getSelectedResources();
- if (resources.length == 0) return false;
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId());
- if (provider == null) return false;
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- if (resource.getType()!=IResource.PROJECT&&!cvsResource.isManaged()) return false;
- }
- return true;
- }
-
- /**
- * Prompts the user for a release comment.
- * @return the comment, or null to cancel
- */
- protected String promptForComment(RepositoryManager manager) {
- return manager.promptForComment(getShell());
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareRemoteResourcesAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareRemoteResourcesAction.java
deleted file mode 100644
index bffaca4bd..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareRemoteResourcesAction.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.compare.CompareUI;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ILogEntry;
-import org.eclipse.team.internal.ccvs.ui.CVSCompareEditorInput;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.ResourceEditionNode;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-
-/**
- * This action is used for comparing two arbitrary remote resources. This is
- * enabled in the repository explorer.
- */
-public class CompareRemoteResourcesAction extends CVSAction {
-
- public void execute(IAction action) {
- ICVSRemoteResource[] editions = getSelectedRemoteResources();
- if (editions == null || editions.length != 2) {
- MessageDialog.openError(getShell(), Policy.bind("CompareRemoteResourcesAction.unableToCompare"), Policy.bind("CompareRemoteResourcesAction.selectTwoResources")); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
- ResourceEditionNode left = new ResourceEditionNode(editions[0]);
- ResourceEditionNode right = new ResourceEditionNode(editions[1]);
- CompareUI.openCompareEditor(new CVSCompareEditorInput(left, right));
- }
-
- /**
- * Returns the selected remote resources
- */
- protected ICVSRemoteResource[] getSelectedRemoteResources() {
- ArrayList resources = null;
- if (!selection.isEmpty()) {
- resources = new ArrayList();
- Iterator elements = ((IStructuredSelection)selection).iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- if (next instanceof ICVSRemoteResource) {
- resources.add(next);
- continue;
- }
- if (next instanceof ILogEntry) {
- resources.add(((ILogEntry)next).getRemoteFile());
- continue;
- }
- if (next instanceof IAdaptable) {
- IAdaptable a = (IAdaptable) next;
- Object adapter = a.getAdapter(ICVSRemoteResource.class);
- if (adapter instanceof ICVSRemoteResource) {
- resources.add(adapter);
- continue;
- }
- }
- }
- }
- if (resources != null && !resources.isEmpty()) {
- ICVSRemoteResource[] result = new ICVSRemoteResource[resources.size()];
- resources.toArray(result);
- return result;
- }
- return new ICVSRemoteResource[0];
- }
- /*
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- ICVSRemoteResource[] resources = getSelectedRemoteResources();
- return resources.length == 2;
- }
- /*
- * @see CVSAction#needsToSaveDirtyEditors()
- */
- protected boolean needsToSaveDirtyEditors() {
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRemoteAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRemoteAction.java
deleted file mode 100644
index 7efcd0a61..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRemoteAction.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.compare.CompareUI;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.CVSLocalCompareEditorInput;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-
-public class CompareWithRemoteAction extends CompareWithTagAction {
-
- public void execute(IAction action) {
- IResource[] resources;
- resources = getSelectedResources();
- CVSTag[] tags = new CVSTag[resources.length];
- try {
- for (int i = 0; i < resources.length; i++) {
- tags[i] = getTag(resources[i]);
- }
- CompareUI.openCompareEditor(new CVSLocalCompareEditorInput(resources, tags));
- } catch(CVSException e) {
- ErrorDialog.openError(getShell(), Policy.bind("CompareWithRemoteAction.compare"), //$NON-NLS-1$
- Policy.bind("CompareWithRemoteAction.noRemoteLong"), e.getStatus()); //$NON-NLS-1$
- }
- }
-
- protected CVSTag getTag(IResource resource) throws CVSException {
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- CVSTag tag = null;
- if (cvsResource.isFolder()) {
- FolderSyncInfo folderInfo = ((ICVSFolder)cvsResource).getFolderSyncInfo();
- if (folderInfo!=null) {
- tag = folderInfo.getTag();
- if(tag == null) {
- tag = CVSTag.DEFAULT;
- }
- }
- } else {
- ResourceSyncInfo info = cvsResource.getSyncInfo();
- if (info != null) {
- tag = info.getTag();
- }
- }
- if (tag==null) {
- if (cvsResource.getParent().isCVSFolder()) {
- tag = cvsResource.getParent().getFolderSyncInfo().getTag();
- if(tag == null) {
- tag = CVSTag.DEFAULT;
- }
- }
- }
- return tag;
- }
-
- protected boolean isEnabled() {
- IResource[] resources = getSelectedResources();
- if(resources.length>0) {
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if(RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId()) == null) {
- return false;
- }
- try {
- if(getTag(resource) == null) {
- return false;
- }
- // Don't enable if there are sticky file revisions in the lineup
- if (resources[i].getType() == IResource.FILE) {
- ICVSFile file = CVSWorkspaceRoot.getCVSFileFor((IFile)resources[i]);
- ResourceSyncInfo info = file.getSyncInfo();
- if (info != null && info.getTag() != null) {
- String revision = info.getRevision();
- String tag = info.getTag().getName();
- if (revision.equals(tag)) return false;
- }
- }
- } catch(CVSException e) {
- return false;
- }
- }
- return true;
- }
- return false;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRevisionAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRevisionAction.java
deleted file mode 100644
index cffa5e774..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRevisionAction.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.CompareUI;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.ILogEntry;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.CVSCompareRevisionsInput;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-
-public class CompareWithRevisionAction extends CVSAction {
- /**
- * Returns the selected remote file
- */
- protected ICVSRemoteFile getSelectedRemoteFile() {
- IResource[] resources = getSelectedResources();
- if (resources.length != 1) return null;
- if (!(resources[0] instanceof IFile)) return null;
- IFile file = (IFile)resources[0];
- try {
- return (ICVSRemoteFile)CVSWorkspaceRoot.getRemoteResourceFor(file);
- } catch (TeamException e) {
- handle(e, null, null);
- return null;
- }
- }
-
- public void execute(IAction action) {
-
- // Setup holders
- final ICVSRemoteFile[] file = new ICVSRemoteFile[] { null };
- final ILogEntry[][] entries = new ILogEntry[][] { null };
-
- // Get the selected file
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- file[0] = getSelectedRemoteFile();
- }
- }, Policy.bind("CompareWithRevisionAction.compare"), this.PROGRESS_BUSYCURSOR); //$NON-NLS-1$
-
- if (file[0] == null) {
- // No revisions for selected file
- MessageDialog.openWarning(getShell(), Policy.bind("CompareWithRevisionAction.noRevisions"), Policy.bind("CompareWithRevisionAction.noRevisionsLong")); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
-
- // Fetch the log entries
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- try {
- monitor.beginTask(Policy.bind("CompareWithRevisionAction.fetching"), 100); //$NON-NLS-1$
- entries[0] = file[0].getLogEntries(Policy.subMonitorFor(monitor, 100));
- monitor.done();
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- }, Policy.bind("CompareWithRevisionAction.compare"), this.PROGRESS_DIALOG); //$NON-NLS-1$
-
- if (entries[0] == null) return;
-
- // Show the compare viewer
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- CompareUI.openCompareEditor(new CVSCompareRevisionsInput((IFile)getSelectedResources()[0], entries[0]));
- }
- }, Policy.bind("CompareWithRevisionAction.compare"), this.PROGRESS_BUSYCURSOR); //$NON-NLS-1$
- }
- /*
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- IResource[] resources = getSelectedResources();
- if (resources.length != 1) return false;
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resources[0]);
- return cvsResource.isManaged();
- }
-
- /*
- * @see CVSAction#needsToSaveDirtyEditors()
- */
- protected boolean needsToSaveDirtyEditors() {
- return false;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithTagAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithTagAction.java
deleted file mode 100644
index 4419c73af..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithTagAction.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.compare.CompareUI;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.ui.CVSLocalCompareEditorInput;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.TagSelectionDialog;
-
-public class CompareWithTagAction extends CVSAction {
-
- public void execute(IAction action) {
- final CVSTag tag;
- final ICVSRemoteResource[] remoteResource = new ICVSRemoteResource[] { null };
- final IResource[] resources = getSelectedResources();
-
- IProject[] projects = new IProject[resources.length];
- for (int i = 0; i < resources.length; i++) {
- projects[i] = resources[i].getProject();
- }
- TagSelectionDialog dialog = new TagSelectionDialog(getShell(), projects,
- Policy.bind("CompareWithTagAction.message"), //$NON-NLS-1$
- Policy.bind("TagSelectionDialog.Select_a_Tag_1"), //$NON-NLS-1$
- TagSelectionDialog.INCLUDE_ALL_TAGS,
- false, /* show recurse*/
- IHelpContextIds.COMPARE_TAG_SELECTION_DIALOG);
- dialog.setBlockOnOpen(true);
- int result = dialog.open();
- if (result == Dialog.CANCEL || dialog.getResult() == null) {
- return;
- }
- tag = dialog.getResult();
- if (tag == null) return;
- CompareUI.openCompareEditor(new CVSLocalCompareEditorInput(resources, tag));
- }
-
- protected boolean isEnabled() {
- try {
- return isSelectionNonOverlapping();
- } catch(TeamException e) {
- CVSUIPlugin.log(e.getStatus());
- return false;
- }
- }
-
- /*
- * @see CVSAction#needsToSaveDirtyEditors()
- */
- protected boolean needsToSaveDirtyEditors() {
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ConfigureTagsFromRepoView.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ConfigureTagsFromRepoView.java
deleted file mode 100644
index 59acd975e..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ConfigureTagsFromRepoView.java
+++ /dev/null
@@ -1,123 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.TagConfigurationDialog;
-import org.eclipse.team.internal.ccvs.ui.model.BranchCategory;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-
-/**
- * DefineTagAction remembers a tag by name
- */
-public class ConfigureTagsFromRepoView extends CVSAction {
- IInputValidator validator = new IInputValidator() {
- public String isValid(String newText) {
- IStatus status = CVSTag.validateTagName(newText);
- if (status.isOK()) return null;
- return status.getMessage();
- }
- };
-
- /**
- * Returns the selected remote roots
- */
- protected ICVSRepositoryLocation[] getSelectedRemoteRoots() {
- ArrayList resources = null;
- if (!selection.isEmpty()) {
- resources = new ArrayList();
- Iterator elements = ((IStructuredSelection) selection).iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- if (next instanceof ICVSRepositoryLocation) {
- resources.add(next);
- continue;
- }
- if (next instanceof BranchCategory) {
- resources.add(((BranchCategory)next).getRepository(next));
- continue;
- }
- if (next instanceof IAdaptable) {
- IAdaptable a = (IAdaptable) next;
- Object adapter = a.getAdapter(ICVSRepositoryLocation.class);
- if (adapter instanceof ICVSRepositoryLocation) {
- resources.add(adapter);
- continue;
- }
- }
- }
- }
- if (resources != null && !resources.isEmpty()) {
- ICVSRepositoryLocation[] result = new ICVSRepositoryLocation[resources.size()];
- resources.toArray(result);
- return result;
- }
- return new ICVSRepositoryLocation[0];
- }
-
- /*
- * @see IActionDelegate#run(IAction)
- */
- public void execute(IAction action) {
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- final ICVSRepositoryLocation[] roots = getSelectedRemoteRoots();
- if (roots.length != 1) return;
- final Shell shell = getShell();
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- try {
- ICVSRemoteResource[] folders = roots[0].members(CVSTag.DEFAULT, false, null);
- ICVSFolder[] cvsFolders = new ICVSFolder[folders.length];
- for (int i = 0; i < folders.length; i++) {
- cvsFolders[i] = (ICVSFolder)folders[i];
- }
- TagConfigurationDialog d = new TagConfigurationDialog(shell, cvsFolders);
- d.open();
- } catch(CVSException e) {
- ErrorDialog.openError(shell, Policy.bind("ConfigureTagsFromRepoViewConfigure_Tag_Error_1"), Policy.bind("ConfigureTagsFromRepoViewError_retreiving_root_folders_from_repository_2"), e.getStatus()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- });
- }
- }, Policy.bind("ConfigureTagsFromRepoViewConfiguring_branch_tags_3"), this.PROGRESS_BUSYCURSOR); //$NON-NLS-1$
- }
-
- /*
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- ICVSRepositoryLocation[] roots = getSelectedRemoteRoots();
- if (roots.length != 1) return false;
- return true;
- }
-
- /*
- * @see CVSAction#needsToSaveDirtyEditors()
- */
- protected boolean needsToSaveDirtyEditors() {
- return false;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ConfigureTagsFromRepoViewOnFolder.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ConfigureTagsFromRepoViewOnFolder.java
deleted file mode 100644
index 7cfe27ec8..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ConfigureTagsFromRepoViewOnFolder.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.TagConfigurationDialog;
-import org.eclipse.team.internal.ccvs.ui.model.RemoteModule;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-
-/**
- * DefineTagAction remembers a tag by name
- */
-public class ConfigureTagsFromRepoViewOnFolder extends TeamAction {
- /**
- * Returns the selected remote folders
- */
- protected ICVSRemoteFolder[] getSelectedRemoteFolders() {
- ArrayList resources = null;
- if (!selection.isEmpty()) {
- resources = new ArrayList();
- Iterator elements = ((IStructuredSelection) selection).iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- if (next instanceof ICVSRemoteFolder) {
- if(new Path(((ICVSRemoteFolder)next).getRepositoryRelativePath()).segmentCount()==1) {
- resources.add(next);
- }
- continue;
- }
- if(next instanceof RemoteModule) {
- resources.add((ICVSRemoteFolder)((RemoteModule)next).getCVSResource());
- }
- }
- }
- if (resources != null && !resources.isEmpty()) {
- return (ICVSRemoteFolder[])resources.toArray(new ICVSRemoteFolder[resources.size()]);
- }
- return new ICVSRemoteFolder[0];
- }
-
- /*
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- final ICVSRemoteFolder[] roots = getSelectedRemoteFolders();
- final Shell shell = getShell();
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- ICVSFolder[] cvsFolders = new ICVSFolder[roots.length];
- for (int i = 0; i < roots.length; i++) {
- cvsFolders[i] = (ICVSFolder)roots[i];
- }
- TagConfigurationDialog d = new TagConfigurationDialog(shell, cvsFolders);
- d.open();
- }
- });
- }
- }, Policy.bind("ConfigureTagsFromRepoViewOnFolderConfiguring_branch_tags_1"), this.PROGRESS_BUSYCURSOR); //$NON-NLS-1$
- }
-
- /*
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- ICVSRemoteFolder[] roots = getSelectedRemoteFolders();
- if (roots.length == 0) return false;
- return true;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ContentAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ContentAction.java
deleted file mode 100644
index 72ed4c85f..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ContentAction.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.sync.ILocalSyncElement;
-import org.eclipse.team.internal.ccvs.ui.AvoidableMessageDialog;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.sync.CVSSyncCompareInput;
-import org.eclipse.ui.IEditorActionDelegate;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.actions.ActionDelegate;
-
-public class ContentAction extends ActionDelegate implements IEditorActionDelegate {
-
- /**
- * Is <code>null</code> if the current active editor is not a compare editor
- * with a CVS editor input. Or else this input refer to the input in the active
- * CVS compare editor.
- */
- private CVSSyncCompareInput syncInput;
-
- /**
- * Should only be called if action is enabled and the current active editor is a
- * CVS compare editor.
- *
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- final IPreferenceStore store = CVSUIPlugin.getPlugin().getPreferenceStore();
- if (store.getBoolean(ICVSUIConstants.PREF_PROMPT_ON_CHANGE_GRANULARITY)) {
- Shell shell = syncInput.getViewer().getControl().getShell();
- AvoidableMessageDialog dialog = new AvoidableMessageDialog(
- shell,
- Policy.bind("ContentAction.Confirm_Long_Operation_1"), //$NON-NLS-1$
- null, // accept the default window icon
- Policy.bind("ContentAction.Changing_this_setting_will_involve_contacting_the_server_and_may_be_long-running_2"), //$NON-NLS-1$
- MessageDialog.QUESTION,
- new String[] {IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL},
- 0);
-
- boolean result = dialog.open() == 0;
- if (result && dialog.isDontShowAgain()) {
- store.setValue(ICVSUIConstants.PREF_PROMPT_ON_CHANGE_GRANULARITY, false);
- }
- if (!result) {
- action.setChecked(! action.isChecked());
- return;
- }
- }
- syncInput.setSyncGranularity(action.isChecked() ? ILocalSyncElement.GRANULARITY_CONTENTS : ILocalSyncElement.GRANULARITY_TIMESTAMP);
- }
-
- /**
- * Called when the active editor changes. Enablement of this action depends
- * on the editor type and editr input of the active editor.
- *
- * @see IEditorActionDelegate#setActiveEditor(IAction, IEditorPart)
- */
- public void setActiveEditor(IAction action, IEditorPart targetEditor) {
- if (targetEditor != null) {
- IEditorInput input = targetEditor.getEditorInput();
- if (input instanceof CVSSyncCompareInput) {
- this.syncInput = (CVSSyncCompareInput)input;
- action.setEnabled(true);
- action.setChecked(syncInput.getSyncGranularity() != ILocalSyncElement.GRANULARITY_TIMESTAMP);
- return;
- }
- }
- syncInput = null;
- action.setEnabled(false);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CopyRepositoryNameAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CopyRepositoryNameAction.java
deleted file mode 100644
index 436b907b6..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CopyRepositoryNameAction.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-
-public class CopyRepositoryNameAction extends TeamAction {
- protected boolean isEnabled() throws TeamException {
- return true;
- }
- public void run(IAction action) {
- ICVSRepositoryLocation[] locations = getSelectedRepositories();
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < locations.length; i++) {
- buffer.append(locations[i].getLocation());
- if (i < locations.length - 1) buffer.append("\n"); //$NON-NLS-1$
- }
- copyToClipbard(Display.getDefault(), buffer.toString());
- }
- protected ICVSRepositoryLocation[] getSelectedRepositories() {
- ArrayList repositories = null;
- if (!selection.isEmpty()) {
- repositories = new ArrayList();
- Iterator elements = ((IStructuredSelection)selection).iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- if (next instanceof ICVSRepositoryLocation) {
- repositories.add(next);
- continue;
- }
- }
- }
- if (repositories != null && !repositories.isEmpty()) {
- ICVSRepositoryLocation[] result = new ICVSRepositoryLocation[repositories.size()];
- repositories.toArray(result);
- return result;
- }
- return new ICVSRepositoryLocation[0];
- }
- private void copyToClipbard(Display display, String str) {
- Clipboard clipboard = new Clipboard(display);
- clipboard.setContents(new String[] { str }, new Transfer[] { TextTransfer.getInstance()});
- clipboard.dispose();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/DefineBranchAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/DefineBranchAction.java
deleted file mode 100644
index 6273c5408..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/DefineBranchAction.java
+++ /dev/null
@@ -1,108 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.model.BranchCategory;
-import org.eclipse.team.internal.ccvs.ui.model.BranchTag;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-
-/**
- * DefineTagAction remembers a tag by name
- */
-public class DefineBranchAction extends TeamAction {
- IInputValidator validator = new IInputValidator() {
- public String isValid(String newText) {
- IStatus status = CVSTag.validateTagName(newText);
- if (status.isOK()) return null;
- return status.getMessage();
- }
- };
-
- /**
- * Returns the selected remote roots
- */
- protected ICVSRepositoryLocation[] getSelectedRemoteRoots() {
- ArrayList resources = null;
- if (!selection.isEmpty()) {
- resources = new ArrayList();
- Iterator elements = ((IStructuredSelection) selection).iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- if (next instanceof ICVSRepositoryLocation) {
- resources.add(next);
- continue;
- }
- if (next instanceof BranchCategory) {
- resources.add(((BranchCategory)next).getRepository(next));
- continue;
- }
- if (next instanceof IAdaptable) {
- IAdaptable a = (IAdaptable) next;
- Object adapter = a.getAdapter(ICVSRepositoryLocation.class);
- if (adapter instanceof ICVSRepositoryLocation) {
- resources.add(adapter);
- continue;
- }
- }
- }
- }
- if (resources != null && !resources.isEmpty()) {
- ICVSRepositoryLocation[] result = new ICVSRepositoryLocation[resources.size()];
- resources.toArray(result);
- return result;
- }
- return new ICVSRepositoryLocation[0];
- }
- /*
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- final ICVSRepositoryLocation[] roots = getSelectedRemoteRoots();
- if (roots.length != 1) return;
- Shell shell = getShell();
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- InputDialog dialog = new InputDialog(getShell(), Policy.bind("DefineBranchAction.enterTag"), Policy.bind("DefineBranchAction.enterTagLong"), null, validator); //$NON-NLS-1$ //$NON-NLS-2$
- if (dialog.open() == InputDialog.OK) {
- CVSTag tag = new CVSTag(dialog.getValue(), CVSTag.BRANCH);
- CVSUIPlugin.getPlugin().getRepositoryManager().addBranchTags(roots[0], new CVSTag[] {tag});
- }
- }
- });
- }
- }, Policy.bind("DefineBranchAction.tag"), this.PROGRESS_BUSYCURSOR); //$NON-NLS-1$
-
- }
- /*
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- ICVSRepositoryLocation[] roots = getSelectedRemoteRoots();
- if (roots.length != 1) return false;
- return true;
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/DefineVersionAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/DefineVersionAction.java
deleted file mode 100644
index b5c152783..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/DefineVersionAction.java
+++ /dev/null
@@ -1,109 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.model.RemoteModule;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-
-/**
- * DefineTagAction remembers a tag by name.
- *
- * This action needs to be reworked in order to associate tags with individual
- * projects, rather than define them globally (for all projects).
- *
- * The selection object for this action is a RemoteModule.
- */
-public class DefineVersionAction extends TeamAction {
- IInputValidator validator = new IInputValidator() {
- public String isValid(String newText) {
- IStatus status = CVSTag.validateTagName(newText);
- if (status.isOK()) return null;
- return status.getMessage();
- }
- };
-
- /**
- * Returns the selected remote projects
- */
- protected RemoteModule[] getSelectedRemoteModules() {
- ArrayList resources = null;
- if (!selection.isEmpty()) {
- resources = new ArrayList();
- Iterator elements = ((IStructuredSelection)selection).iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- if (next instanceof RemoteModule) {
- resources.add(next);
- continue;
- }
- if (next instanceof IAdaptable) {
- IAdaptable a = (IAdaptable) next;
- Object adapter = a.getAdapter(RemoteModule.class);
- if (adapter instanceof RemoteModule) {
- resources.add(adapter);
- continue;
- }
- }
- }
- }
- if (resources != null && !resources.isEmpty()) {
- RemoteModule[] result = new RemoteModule[resources.size()];
- resources.toArray(result);
- return result;
- }
- return new RemoteModule[0];
- }
- /*
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- final RemoteModule[] projects = getSelectedRemoteModules();
- if (projects.length != 1) return;
- Shell shell = getShell();
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- InputDialog dialog = new InputDialog(getShell(), Policy.bind("DefineVersionAction.enterTag"), Policy.bind("DefineVersionAction.enterTagLong"), null, validator); //$NON-NLS-1$ //$NON-NLS-2$
- if (dialog.open() == InputDialog.OK) {
- ICVSRemoteResource resource = projects[0].getCVSResource();
- CVSTag tag = new CVSTag(dialog.getValue(), CVSTag.VERSION);
- CVSUIPlugin.getPlugin().getRepositoryManager().addVersionTags((ICVSFolder)resource, new CVSTag[] {tag});
- }
- }
- });
- }
- }, Policy.bind("DefineVersionAction.tag"), this.PROGRESS_DIALOG); //$NON-NLS-1$
- }
- /*
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- RemoteModule[] projects = getSelectedRemoteModules();
- if (projects.length != 1) return false;
- return true;
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/GenerateDiffFileAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/GenerateDiffFileAction.java
deleted file mode 100644
index f9e6b4dfe..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/GenerateDiffFileAction.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.wizards.GenerateDiffFileWizard;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-
-/**
- * Action to generate a patch file using the CVS diff command.
- *
- * NOTE: This is a temporary action and should eventually be replaced
- * by a create patch command in the compare viewer.
- */
-public class GenerateDiffFileAction extends CVSAction {
- /**
- * Makes sure that the projects of all selected resources are shared.
- * Returns true if all resources are shared, and false otherwise.
- */
- protected boolean checkSharing(IResource[] resources) {
- for (int i = 0; i < resources.length; i++) {
- CVSTeamProvider provider = (CVSTeamProvider)RepositoryProvider.getProvider(
- resources[i].getProject(),
- CVSProviderPlugin.getTypeId());
- if (provider==null) {
- return false;
- }
- }
- return true;
- }
-
- /** (Non-javadoc)
- * Method declared on IActionDelegate.
- */
- public void execute(IAction action) {
- final String title = Policy.bind("GenerateCVSDiff.title"); //$NON-NLS-1$
- final IResource[] resources = getSelectedResources();
- GenerateDiffFileWizard wizard = new GenerateDiffFileWizard(new StructuredSelection(resources), resources[0]);
- wizard.setWindowTitle(title);
- WizardDialog dialog = new WizardDialog(getShell(), wizard);
- dialog.setMinimumPageSize(350, 250);
- dialog.open();
- }
-
- /** (Non-javadoc)
- * Method declared on IActionDelegate.
- */
- protected boolean isEnabled() throws TeamException {
- IResource[] resources = getSelectedResources();
- if(resources.length != 1) {
- return false;
- }
- if (!resources[0].isAccessible() || !checkSharing(new IResource[] {resources[0]})) return false;
- return true;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/IgnoreAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/IgnoreAction.java
deleted file mode 100644
index 2c5ccf48c..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/IgnoreAction.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.IgnoreResourcesDialog;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-public class IgnoreAction extends TeamAction {
- protected boolean isEnabled() throws TeamException {
- IResource[] resources = getSelectedResources();
- if (resources.length == 0) return false;
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (resource.getType() == IResource.PROJECT) return false;
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- if (cvsResource.isManaged()) return false;
- if (cvsResource.isIgnored()) return false;
- }
- return true;
- }
- public void run(final IAction action) {
- run(new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- IResource[] resources = getSelectedResources();
- IgnoreResourcesDialog dialog = new IgnoreResourcesDialog(getShell(), resources);
- if (dialog.open() != IgnoreResourcesDialog.OK) return;
-
- try {
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- String pattern = dialog.getIgnorePatternFor(resource);
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- cvsResource.setIgnoredAs(pattern);
- }
- // fix the action enablement
- if (action != null) action.setEnabled(isEnabled());
- } catch (TeamException e) {
- ErrorDialog.openError(getShell(), null, null, e.getStatus());
- return;
- }
- }
- }, Policy.bind("IgnoreAction.ignore"), PROGRESS_BUSYCURSOR); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/MergeAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/MergeAction.java
deleted file mode 100644
index e1b49c206..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/MergeAction.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.ui.merge.MergeWizard;
-
-public class MergeAction extends CVSAction {
-
- /*
- * @see CVSAction#execute()
- */
- public void execute(IAction action) {
- final Shell shell = getShell();
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- MergeWizard wizard = new MergeWizard();
- wizard.setResources(getSelectedResources());
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.open();
- }
- });
- }
- /*
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- return isSelectionNonOverlapping();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/MoveRemoteTagAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/MoveRemoteTagAction.java
deleted file mode 100644
index 92329b7d5..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/MoveRemoteTagAction.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.RTag;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.TagSelectionDialog;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-
-public class MoveRemoteTagAction extends TagInRepositoryAction {
-
- private boolean recursive;
-
- /**
- * @see TagRemoteAction#getLocalOptions()
- */
- protected LocalOption[] getLocalOptions() {
- LocalOption[] options;
- if(recursive) {
- options = new LocalOption[] {RTag.FORCE_REASSIGNMENT, RTag.CLEAR_FROM_REMOVED};
- } else {
- options = new LocalOption[] {RTag.FORCE_REASSIGNMENT, RTag.CLEAR_FROM_REMOVED, Command.DO_NOT_RECURSE};
- }
- return options;
- }
-
- /**
- * @see TagRemoteAction#promptForTag(ICVSFolder[])
- */
- protected CVSTag promptForTag(ICVSFolder[] folders) {
- // Allow the user to select a tag
- TagSelectionDialog dialog = new TagSelectionDialog(getShell(), folders,
- Policy.bind("MoveTagAction.title"), //$NON-NLS-1$
- Policy.bind("MoveTagAction.message"), //$NON-NLS-1$
- TagSelectionDialog.INCLUDE_BRANCHES | TagSelectionDialog.INCLUDE_VERSIONS,
- true, /* show recurse */
- IHelpContextIds.TAG_REMOTE_WITH_EXISTING_DIALOG);
- dialog.setBlockOnOpen(true);
- if (dialog.open() == Dialog.CANCEL) {
- return null;
- }
- CVSTag tag = dialog.getResult();
- if (tag != null) {
- recursive = dialog.getRecursive();
- }
- return tag;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/NewCVSAnonEclipseConnection.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/NewCVSAnonEclipseConnection.java
deleted file mode 100644
index 8f0dc59e4..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/NewCVSAnonEclipseConnection.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.Properties;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.wizards.NewLocationWizard;
-import org.eclipse.ui.IWorkbenchWindow;
-
-/**
- * Called from Welcome page only.
- */
-public class NewCVSAnonEclipseConnection extends Action {
- public void run() {
- Shell shell;
- IWorkbenchWindow window = CVSUIPlugin.getPlugin().getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- shell = window.getShell();
- } else {
- Display display = Display.getCurrent();
- shell = new Shell(display);
- }
- Properties p = new Properties();
- p.setProperty("connection", "pserver"); //$NON-NLS-1$ //$NON-NLS-2$
- p.setProperty("user", "anonymous"); //$NON-NLS-1$ //$NON-NLS-2$
- p.setProperty("host", "dev.eclipse.org"); //$NON-NLS-1$ //$NON-NLS-2$
- p.setProperty("root", "/home/eclipse"); //$NON-NLS-1$ //$NON-NLS-2$
- NewLocationWizard wizard = new NewLocationWizard(p);
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.open();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/NewCVSRepositoryAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/NewCVSRepositoryAction.java
deleted file mode 100644
index 36a1c5917..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/NewCVSRepositoryAction.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.wizards.NewLocationWizard;
-import org.eclipse.ui.IWorkbenchWindow;
-
-/**
- * Called from Welcome page only.
- */
-public class NewCVSRepositoryAction extends Action {
- public void run() {
- Shell shell;
- IWorkbenchWindow window = CVSUIPlugin.getPlugin().getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- shell = window.getShell();
- } else {
- Display display = Display.getCurrent();
- shell = new Shell(display);
- }
- NewLocationWizard wizard = new NewLocationWizard();
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.open();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/NewRepositoryAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/NewRepositoryAction.java
deleted file mode 100644
index 08deba206..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/NewRepositoryAction.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.wizards.NewLocationWizard;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-
-public class NewRepositoryAction implements IWorkbenchWindowActionDelegate {
- Shell shell;
-
- /**
- * @see IWorkbenchWindowActionDelegate#dispose()
- */
- public void dispose() {
- }
-
- /**
- * @see IWorkbenchWindowActionDelegate#init(IWorkbenchWindow)
- */
- public void init(IWorkbenchWindow window) {
- this.shell = window.getShell();
- }
-
- /**
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- NewLocationWizard wizard = new NewLocationWizard();
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.open();
- }
-
- /**
- * @see IActionDelegate#selectionChanged(IAction, ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenLogEntryAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenLogEntryAction.java
deleted file mode 100644
index 97bfff122..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenLogEntryAction.java
+++ /dev/null
@@ -1,109 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ILogEntry;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.RemoteFileEditorInput;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-
-public class OpenLogEntryAction extends TeamAction {
- /**
- * Returns the selected remote files
- */
- protected ILogEntry[] getSelectedLogEntries() {
- ArrayList entries = null;
- if (!selection.isEmpty()) {
- entries = new ArrayList();
- Iterator elements = ((IStructuredSelection) selection).iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- if (next instanceof ILogEntry) {
- entries.add((ILogEntry)next);
- continue;
- }
- if (next instanceof IAdaptable) {
- IAdaptable a = (IAdaptable) next;
- Object adapter = a.getAdapter(ILogEntry.class);
- if (adapter instanceof ILogEntry) {
- entries.add(adapter);
- continue;
- }
- }
- }
- }
- if (entries != null && !entries.isEmpty()) {
- ILogEntry[] result = new ILogEntry[entries.size()];
- entries.toArray(result);
- return result;
- }
- return new ILogEntry[0];
- }
- /*
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- IWorkbenchPage page = CVSUIPlugin.getPlugin().getWorkbench().getActiveWorkbenchWindow().getActivePage();
- final ILogEntry[] entries = getSelectedLogEntries();
- for (int i = 0; i < entries.length; i++) {
- try {
- if (entries[i].isDeletion()) {
- MessageDialog.openError(getShell(), Policy.bind("OpenLogEntryAction.deletedTitle"), Policy.bind("OpenLogEntryAction.deleted")); //$NON-NLS-1$ //$NON-NLS-2$
- } else {
- page.openEditor(new RemoteFileEditorInput(entries[i].getRemoteFile()), "org.eclipse.ui.DefaultTextEditor"); //$NON-NLS-1$
- }
- } catch (PartInitException e) {
- throw new InvocationTargetException(e);
- }
- }
- }
- }, Policy.bind("OpenLogEntryAction.open"), PROGRESS_BUSYCURSOR); //$NON-NLS-1$
- }
- /*
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- ILogEntry[] entries = getSelectedLogEntries();
- if (entries.length == 0) return false;
- return true;
- }
- /** (Non-javadoc)
- * Method declared on IActionDelegate.
- */
- public void selectionChanged(IAction action, ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- this.selection = (IStructuredSelection) selection;
- //this action can be invoked by double-click, in which case
- //there is no target action
- if (action != null) {
- try {
- action.setEnabled(isEnabled());
- } catch (TeamException e) {
- action.setEnabled(false);
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenRemoteFileAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenRemoteFileAction.java
deleted file mode 100644
index 87ce63ce1..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenRemoteFileAction.java
+++ /dev/null
@@ -1,131 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ILogEntry;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.RemoteFileEditorInput;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-
-public class OpenRemoteFileAction extends TeamAction {
- /**
- * Returns the selected remote files
- */
- protected ICVSRemoteFile[] getSelectedRemoteFiles() {
- ArrayList resources = null;
- if (!selection.isEmpty()) {
- resources = new ArrayList();
- Iterator elements = ((IStructuredSelection) selection).iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- if (next instanceof ICVSRemoteFile) {
- resources.add(next);
- continue;
- }
- if (next instanceof ILogEntry) {
- resources.add(((ILogEntry)next).getRemoteFile());
- continue;
- }
- if (next instanceof IAdaptable) {
- IAdaptable a = (IAdaptable) next;
- Object adapter = a.getAdapter(ICVSRemoteFile.class);
- if (adapter instanceof ICVSRemoteFile) {
- resources.add(adapter);
- continue;
- }
- }
- }
- }
- if (resources != null && !resources.isEmpty()) {
- ICVSRemoteFile[] result = new ICVSRemoteFile[resources.size()];
- resources.toArray(result);
- return result;
- }
- return new ICVSRemoteFile[0];
- }
- /*
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
-/* IWorkbenchPage page = CVSUIPlugin.getPlugin().getWorkbench().getActiveWorkbenchWindow().getActivePage();
- ICVSRemoteFile[] files = getSelectedRemoteFiles();
- for (int i = 0; i < files.length; i++) {
- try {
- page.openEditor(new RemoteFileEditorInput(files[i]), "org.eclipse.ui.DefaultTextEditor"); //$NON-NLS-1$
- } catch (PartInitException e) {
- throw new InvocationTargetException(e);
- }
- }*/
-
- IWorkbench workbench = CVSUIPlugin.getPlugin().getWorkbench();
- IEditorRegistry registry = workbench.getEditorRegistry();
- IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage();
- ICVSRemoteFile[] files = getSelectedRemoteFiles();
- for (int i = 0; i < files.length; i++) {
- ICVSRemoteFile file = files[i];
- String filename = file.getName();
- IEditorDescriptor descriptor = registry.getDefaultEditor(filename);
- String id;
- if (descriptor == null) {
- id = "org.eclipse.ui.DefaultTextEditor"; //$NON-NLS-1$
- } else {
- id = descriptor.getId();
- }
- try {
- page.openEditor(new RemoteFileEditorInput(files[i]), id);
- } catch (PartInitException e) {
- throw new InvocationTargetException(e);
- }
- }
- }
- }, Policy.bind("OpenRemoteFileAction.open"), this.PROGRESS_BUSYCURSOR); //$NON-NLS-1$
- }
- /*
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- ICVSRemoteFile[] resources = getSelectedRemoteFiles();
- if (resources.length == 0) return false;
- return true;
- }
- /** (Non-javadoc)
- * Method declared on IActionDelegate.
- */
- public void selectionChanged(IAction action, ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- this.selection = (IStructuredSelection) selection;
- //this action can be invoked by double-click, in which case
- //there is no target action
- if (action != null) {
- try {
- action.setEnabled(isEnabled());
- } catch (TeamException e) {
- action.setEnabled(false);
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RemoveBranchTagAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RemoveBranchTagAction.java
deleted file mode 100644
index 5ac9ad0ed..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RemoveBranchTagAction.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.RepositoryManager;
-import org.eclipse.team.internal.ccvs.ui.model.BranchTag;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-
-/**
- * RemoveBranchTagAction removes a tag.
- */
-public class RemoveBranchTagAction extends TeamAction {
- /**
- * Returns the selected versions
- */
- protected BranchTag[] getSelectedBranchTags() {
- ArrayList tags = null;
- if (!selection.isEmpty()) {
- tags = new ArrayList();
- Iterator elements = ((IStructuredSelection)selection).iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- if (next instanceof BranchTag) {
- tags.add(next);
- continue;
- }
- }
- }
- if (tags != null && !tags.isEmpty()) {
- BranchTag[] result = new BranchTag[tags.size()];
- tags.toArray(result);
- return result;
- }
- return new BranchTag[0];
- }
- /*
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- BranchTag[] tags = getSelectedBranchTags();
- if (tags.length == 0) return;
- RepositoryManager manager = CVSUIPlugin.getPlugin().getRepositoryManager();
- for (int i = 0; i < tags.length; i++) {
- BranchTag tag = tags[i];
- manager.removeBranchTag(tag.getRoot(), new CVSTag[] {tag.getTag()});
- }
- }
- }, Policy.bind("RemoveBranchTagAction.removeTag"), this.PROGRESS_BUSYCURSOR); //$NON-NLS-1$
-
- }
- /*
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- BranchTag[] tags = getSelectedBranchTags();
- if (tags.length == 0) return false;
- for (int i = 0; i < tags.length; i++) {
- if (tags[i].getTag().getName().equals("HEAD")) return false; //$NON-NLS-1$
- }
- return true;
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RemoveRootAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RemoveRootAction.java
deleted file mode 100644
index 7077051f8..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RemoveRootAction.java
+++ /dev/null
@@ -1,129 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ui.DetailsDialogWithProjects;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-
-/**
- * RemoveRootAction removes a repository
- */
-public class RemoveRootAction extends TeamAction {
- /**
- * Returns the selected remote files
- */
- protected ICVSRepositoryLocation[] getSelectedRemoteRoots() {
- ArrayList resources = null;
- if (!selection.isEmpty()) {
- resources = new ArrayList();
- Iterator elements = ((IStructuredSelection) selection).iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- if (next instanceof ICVSRepositoryLocation) {
- resources.add(next);
- continue;
- }
- if (next instanceof IAdaptable) {
- IAdaptable a = (IAdaptable) next;
- Object adapter = a.getAdapter(ICVSRepositoryLocation.class);
- if (adapter instanceof ICVSRemoteFile) {
- resources.add(adapter);
- continue;
- }
- }
- }
- }
- if (resources != null && !resources.isEmpty()) {
- ICVSRepositoryLocation[] result = new ICVSRepositoryLocation[resources.size()];
- resources.toArray(result);
- return result;
- }
- return new ICVSRepositoryLocation[0];
- }
- /*
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- ICVSRepositoryLocation[] roots = getSelectedRemoteRoots();
- if (roots.length == 0) return;
- ICVSProvider provider = CVSProviderPlugin.getProvider();
- for (int i = 0; i < roots.length; i++) {
- try {
-
- // Check if any projects are shared with the repository
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- final ArrayList shared = new ArrayList();
- for (int j = 0; j < projects.length; j++) {
- RepositoryProvider teamProvider = RepositoryProvider.getProvider(projects[j], CVSProviderPlugin.getTypeId());
- if (teamProvider!=null) {
- CVSTeamProvider cvsProvider = (CVSTeamProvider)teamProvider;
- if (cvsProvider.getCVSWorkspaceRoot().getRemoteLocation().equals(roots[i])) {
- shared.add(projects[j]);
- }
- }
- }
-
- // This will notify the RepositoryManager of the removal
- if (!shared.isEmpty()) {
- Shell shell = getShell();
- final String location = roots[i].getLocation();
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- DetailsDialogWithProjects dialog = new DetailsDialogWithProjects(
- getShell(),
- Policy.bind("RemoteRootAction.Unable_to_Discard_Location_1"), //$NON-NLS-1$
- Policy.bind("RemoteRootAction.Projects_in_the_local_workspace_are_shared_with__2", location), //$NON-NLS-1$
- Policy.bind("RemoteRootAction.The_projects_that_are_shared_with_the_above_repository_are__4"), //$NON-NLS-1$
- (IProject[]) shared.toArray(new IProject[shared.size()]),
- false,
- DetailsDialogWithProjects.DLG_IMG_ERROR);
- dialog.open();
- }
- });
- } else {
- provider.disposeRepository(roots[i]);
- }
- } catch (CVSException e) {
- throw new InvocationTargetException(e);
- }
- }
- }
- }, Policy.bind(Policy.bind("RemoveRootAction.removeRoot_3")), this.PROGRESS_DIALOG); //$NON-NLS-1$
-
- }
- /*
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- ICVSRepositoryLocation[] roots = getSelectedRemoteRoots();
- return roots.length > 0;
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRemoteAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRemoteAction.java
deleted file mode 100644
index 46dea2c86..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRemoteAction.java
+++ /dev/null
@@ -1,91 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ui.IPromptCondition;
-import org.eclipse.team.internal.ui.PromptingDialog;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-public class ReplaceWithRemoteAction extends CVSAction {
- public void execute(IAction action) {
- run(new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- try {
- PromptingDialog dialog = new PromptingDialog(getShell(), getSelectedResources(),
- getPromptCondition(), Policy.bind("ReplaceWithAction.confirmOverwrite"));//$NON-NLS-1$
- IResource[] resources = dialog.promptForMultiple();
- if(resources.length == 0) {
- // nothing to do
- return;
- }
- // Do the replace
- Hashtable table = getProviderMapping(resources);
- Set keySet = table.keySet();
- monitor.beginTask("", keySet.size() * 1000); //$NON-NLS-1$
- monitor.setTaskName(Policy.bind("ReplaceWithRemoteAction.replacing")); //$NON-NLS-1$
- Iterator iterator = keySet.iterator();
- while (iterator.hasNext()) {
- IProgressMonitor subMonitor = new SubProgressMonitor(monitor, 1000);
- CVSTeamProvider provider = (CVSTeamProvider)iterator.next();
- List list = (List)table.get(provider);
- IResource[] providerResources = (IResource[])list.toArray(new IResource[list.size()]);
- provider.get(providerResources, IResource.DEPTH_INFINITE, subMonitor);
- }
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- }, Policy.bind("ReplaceWithRemoteAction.problemMessage"), PROGRESS_DIALOG); //$NON-NLS-1$
- }
- protected boolean isEnabled() throws TeamException {
- IResource[] resources = getSelectedResources();
- if (resources.length == 0) return false;
- for (int i = 0; i < resources.length; i++) {
- CVSTeamProvider provider = (CVSTeamProvider)RepositoryProvider.getProvider(resources[i].getProject(), CVSProviderPlugin.getTypeId());
- if (provider == null) return false;
- if (!provider.hasRemote(resources[i])) return false;
- // Don't enable if there are sticky file revisions in the lineup
- if (resources[i].getType() == IResource.FILE) {
- ICVSFile file = CVSWorkspaceRoot.getCVSFileFor((IFile)resources[i]);
- ResourceSyncInfo info = file.getSyncInfo();
- if (info != null && info.getTag() != null) {
- String revision = info.getRevision();
- String tag = info.getTag().getName();
- if (revision.equals(tag)) return false;
- }
- }
- }
- return true;
- }
- /**
- * Note: This method is designed to be overridden by test cases.
- */
- protected IPromptCondition getPromptCondition() {
- return getOverwriteLocalChangesPrompt();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithTagAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithTagAction.java
deleted file mode 100644
index 906d51bde..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithTagAction.java
+++ /dev/null
@@ -1,136 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.TagSelectionDialog;
-import org.eclipse.team.internal.ui.PromptingDialog;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-/**
- * Action for replace with tag.
- */
-public class ReplaceWithTagAction extends CVSAction {
- /*
- * Method declared on IActionDelegate.
- */
- public void execute(IAction action) {
-
- // Setup the holders
- final IResource[] resource = new IResource[] {null};
- final CVSTag[] tag = new CVSTag[] {null};
- final boolean[] recurse = new boolean[] {true};
-
- // Show a busy cursor while display the tag selection dialog
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- PromptingDialog prompt = new PromptingDialog(getShell(), getSelectedResources(),
- getOverwriteLocalChangesPrompt(),
- Policy.bind("ReplaceWithAction.confirmOverwrite"));//$NON-NLS-1$
- final IResource[] resources = prompt.promptForMultiple();
- if(resources.length == 0) {
- // nothing to do
- return;
- }
- // show the tags for the projects of the selected resources
- IProject[] projects = new IProject[resources.length];
- for (int i = 0; i < resources.length; i++) {
- projects[i] = resources[i].getProject();
- }
- TagSelectionDialog dialog = new TagSelectionDialog(getShell(), projects,
- Policy.bind("ReplaceWithTagAction.message"), //$NON-NLS-1$
- Policy.bind("TagSelectionDialog.Select_a_Tag_1"), //$NON-NLS-1$
- TagSelectionDialog.INCLUDE_ALL_TAGS,
- true, /*show recurse*/
- IHelpContextIds.REPLACE_TAG_SELECTION_DIALOG); //$NON-NLS-1$
- dialog.setBlockOnOpen(true);
- if (dialog.open() == Dialog.CANCEL) {
- return;
- }
- tag[0] = dialog.getResult();
- recurse[0] = dialog.getRecursive();
-
- // For non-projects determine if the tag being loaded is the same as the resource's parent
- // If it's not, warn the user that they will have strange sync behavior
- try {
- if(!CVSAction.checkForMixingTags(getShell(), resources, tag[0])) {
- tag[0] = null;
- return;
- }
- } catch (CVSException e) {
- throw new InvocationTargetException(e);
- }
- }
- }, Policy.bind("ReplaceWithTagAction.replace"), this.PROGRESS_BUSYCURSOR); //$NON-NLS-1$
-
- if (tag[0] == null) return;
-
- // Display a progress dialog while replacing
- run(new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- try {
- int depth = recurse[0] ? IResource.DEPTH_INFINITE : IResource.DEPTH_ONE;
- Hashtable table = getProviderMapping();
- Set keySet = table.keySet();
- monitor.beginTask("", keySet.size() * 1000); //$NON-NLS-1$
- monitor.setTaskName(Policy.bind("ReplaceWithTagAction.replacing", tag[0].getName())); //$NON-NLS-1$
- Iterator iterator = keySet.iterator();
- while (iterator.hasNext()) {
- IProgressMonitor subMonitor = new SubProgressMonitor(monitor, 1000);
- CVSTeamProvider provider = (CVSTeamProvider)iterator.next();
- List list = (List)table.get(provider);
- IResource[] providerResources = (IResource[])list.toArray(new IResource[list.size()]);
- provider.get(providerResources, depth, tag[0], Policy.subMonitorFor(monitor, 100));
- }
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- }, Policy.bind("ReplaceWithTagAction.replace"), this.PROGRESS_DIALOG); //$NON-NLS-1$
- }
-
- protected boolean isEnabled() {
- try {
- return isSelectionNonOverlapping();
- } catch(TeamException e) {
- CVSUIPlugin.log(e.getStatus());
- return false;
- }
- }
-
- protected boolean equalTags(CVSTag tag1, CVSTag tag2) {
- if (tag1 == null) tag1 = CVSTag.DEFAULT;
- if (tag2 == null) tag2 = CVSTag.DEFAULT;
- return tag1.equals(tag2);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SetKeywordSubstitutionAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SetKeywordSubstitutionAction.java
deleted file mode 100644
index d031b69f5..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SetKeywordSubstitutionAction.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.ResizableWizardDialog;
-import org.eclipse.team.internal.ccvs.ui.wizards.KSubstWizard;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-
-/**
- * TagAction tags the selected resources with a version tag specified by the user.
- */
-public class SetKeywordSubstitutionAction extends CVSAction {
- private KSubstOption previousOption = null; // automatic
-
- /*
- * @see IActionDelegate#run(IAction)
- */
- public void execute(IAction action) {
- final IResource[] resources = getSelectedResources();
- KSubstWizard wizard = new KSubstWizard(resources, IResource.DEPTH_INFINITE, previousOption);
- WizardDialog dialog = new ResizableWizardDialog(getShell(), wizard);
- dialog.setMinimumPageSize(350, 250);
- dialog.open();
- previousOption = wizard.getKSubstOption();
- }
-
- /*
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- IResource[] resources = getSelectedResources();
- if (resources.length == 0) return false;
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- // resource must be local
- if (! resource.isAccessible()) return false;
- // provider must be CVS
- RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId());
- if (provider == null) return false;
- // resource must either be a project, or it must be managed
- if (resource.getType() != IResource.PROJECT) {
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- if (! cvsResource.isManaged()) return false;
- }
- }
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowCVSPerspectiveAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowCVSPerspectiveAction.java
deleted file mode 100644
index 122114814..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowCVSPerspectiveAction.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.ui.IPerspectiveDescriptor;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-public class ShowCVSPerspectiveAction extends Action {
- public void run() {
- IWorkbench workbench = PlatformUI.getWorkbench();
- IWorkbenchWindow activeWindow = workbench.getActiveWorkbenchWindow();
- if (activeWindow == null) {
- return;
- }
- IWorkbenchPage activePage = activeWindow.getActivePage();
- if (activePage == null) {
- return;
- }
- IPerspectiveDescriptor cvsPerspective = workbench.getPerspectiveRegistry().findPerspectiveWithId("org.eclipse.team.cvs.ui.cvsPerspective"); //$NON-NLS-1$
- if(cvsPerspective!=null) {
- activePage.setPerspective(cvsPerspective);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowHistoryAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowHistoryAction.java
deleted file mode 100644
index 66fa15468..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowHistoryAction.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.HistoryView;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.core.TeamPlugin;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-
-public class ShowHistoryAction extends TeamAction {
- /**
- * Returns the selected remote files
- */
- protected ICVSRemoteFile[] getSelectedRemoteFiles() {
- ArrayList resources = null;
- if (!selection.isEmpty()) {
- resources = new ArrayList();
- Iterator elements = ((IStructuredSelection) selection).iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- if (next instanceof ICVSRemoteFile) {
- resources.add(next);
- continue;
- }
- if (next instanceof IAdaptable) {
- IAdaptable a = (IAdaptable)next;
- Object adapter = a.getAdapter(ICVSRemoteFile.class);
- if (adapter instanceof ICVSRemoteFile) {
- resources.add(adapter);
- continue;
- }
- }
- }
- }
- if (resources != null && !resources.isEmpty()) {
- ICVSRemoteFile[] result = new ICVSRemoteFile[resources.size()];
- resources.toArray(result);
- return result;
- }
- return new ICVSRemoteFile[0];
- }
- /*
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- ICVSRemoteFile[] files = getSelectedRemoteFiles();
- HistoryView view = HistoryView.openInActivePerspective();
- if (view != null) {
- view.showHistory(files[0], null /* no current revision */);
- }
- }
- }, Policy.bind("ShowHistoryAction.showHistory"), this.PROGRESS_BUSYCURSOR); //$NON-NLS-1$
- }
- /*
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- ICVSRemoteFile[] resources = getSelectedRemoteFiles();
- return resources.length == 1;
- }
- /** (Non-javadoc)
- * Method declared on IActionDelegate.
- */
- public void selectionChanged(IAction action, ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- this.selection = (IStructuredSelection) selection;
- //this action can be invoked by double-click, in which case
- //there is no target action
- if (action != null) {
- try {
- action.setEnabled(isEnabled());
- } catch (TeamException e) {
- action.setEnabled(false);
- handle(e, null, null);
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowResourceInHistoryAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowResourceInHistoryAction.java
deleted file mode 100644
index 002ad05c6..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowResourceInHistoryAction.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.HistoryView;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-
-public class ShowResourceInHistoryAction extends TeamAction {
- /*
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- IResource[] resources = getSelectedResources();
- if (resources.length != 1) return;
- HistoryView view = HistoryView.openInActivePerspective();
- if (view != null) {
- view.showHistory(resources[0]);
- }
- }
- }, Policy.bind("ShowHistoryAction.showHistory"), this.PROGRESS_BUSYCURSOR); //$NON-NLS-1$
- }
- /*
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- // Show Resource In History is enabled for resources which have been committed.
- IResource[] resources = getSelectedResources();
- if (resources.length != 1) return false;
- IResource resource = resources[0];
- if (!(resource instanceof IFile)) return false;
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- if (!cvsResource.isManaged()) return false;
- if (cvsResource.getSyncInfo().isAdded()) return false;
- return true;
- }
- /** (Non-javadoc)
- * Method declared on IActionDelegate.
- */
- public void selectionChanged(IAction action, ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- this.selection = (IStructuredSelection) selection;
- //this action can be invoked by double-click, in which case
- //there is no target action
- if (action != null) {
- try {
- action.setEnabled(isEnabled());
- } catch (TeamException e) {
- action.setEnabled(false);
- handle(e, null, null);
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SyncAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SyncAction.java
deleted file mode 100644
index 1799c7864..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SyncAction.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.sync.CVSSyncCompareInput;
-import org.eclipse.team.internal.ui.sync.SyncCompareInput;
-import org.eclipse.team.internal.ui.sync.SyncView;
-import org.eclipse.ui.PartInitException;
-
-/**
- * Action for catchup/release in popup menus.
- */
-public class SyncAction extends CVSAction {
- public void execute(IAction action) {
- IResource[] resources = getSelectedResources();
- SyncView view = (SyncView)CVSUIPlugin.getActivePage().findView(SyncView.VIEW_ID);
- if (view == null) {
- view = SyncView.findInActivePerspective();
- }
- if (view != null) {
- try {
- CVSUIPlugin.getActivePage().showView(SyncView.VIEW_ID);
- } catch (PartInitException e) {
- CVSUIPlugin.log(e.getStatus());
- }
- view.showSync(getCompareInput(resources));
- }
- }
- protected boolean isEnabled() throws TeamException {
- IResource[] resources = getSelectedResources();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (!resource.isAccessible()) return false;
- if (resource.getType() == IResource.PROJECT) continue;
- // If the resource is not managed and its parent is not managed, disable.
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- if (!cvsResource.isManaged()) {
- // The resource is not managed. See if its parent is managed.
- if (!cvsResource.getParent().isCVSFolder()) return false;
- }
- }
- return true;
- }
- protected SyncCompareInput getCompareInput(IResource[] resources) {
- return new CVSSyncCompareInput(resources);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SyncOutgoingAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SyncOutgoingAction.java
deleted file mode 100644
index 7e67071b0..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SyncOutgoingAction.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.internal.ccvs.ui.sync.CVSSyncCompareInput;
-import org.eclipse.team.internal.ui.sync.SyncCompareInput;
-
-/**
- * Action for catchup/release in popup menus.
- */
-public class SyncOutgoingAction extends SyncAction {
- protected SyncCompareInput getCompareInput(IResource[] resources) {
- return new CVSSyncCompareInput(resources, true);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/TagAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/TagAction.java
deleted file mode 100644
index dffbbf14d..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/TagAction.java
+++ /dev/null
@@ -1,181 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.CVSDecorator;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.TagAsVersionDialog;
-import org.eclipse.team.internal.ui.IPromptCondition;
-import org.eclipse.team.internal.ui.PromptingDialog;
-
-/**
- * TagAction tags the selected resources with a version tag specified by the user.
- */
-public class TagAction extends CVSAction {
- // The previously remembered tag
- private static String previousTag = ""; //$NON-NLS-1$
-
- /**
- * @see CVSAction#execute(IAction)
- */
- public void execute(IAction action) throws InvocationTargetException, InterruptedException {
-
- // Prompt for any uncommitted changes
- PromptingDialog prompt = new PromptingDialog(getShell(), getSelectedResources(),
- getPromptCondition(), Policy.bind("TagAction.uncommittedChangesTitle"));//$NON-NLS-1$
- final IResource[] resources;
- try {
- resources = prompt.promptForMultiple();
- } catch(InterruptedException e) {
- return;
- }
- if(resources.length == 0) {
- // nothing to do
- return;
- }
-
- // Prompt for the tag name
- final String[] result = new String[1];
- getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor(resources[0].getProject());
- result[0] = promptForTag(folder);
- }
- });
- if (result[0] == null) return;
-
- // Tag the local resources, divided by project/provider
- CVSUIPlugin.runWithProgressDialog(getShell(), true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- Hashtable table = getProviderMapping(resources);
- Set keySet = table.keySet();
- monitor.beginTask(null, keySet.size() * 1000);
- Iterator iterator = keySet.iterator();
-
- while (iterator.hasNext()) {
- IProgressMonitor subMonitor = new SubProgressMonitor(monitor, 1000);
- CVSTeamProvider provider = (CVSTeamProvider)iterator.next();
- List list = (List)table.get(provider);
- IResource[] providerResources = (IResource[])list.toArray(new IResource[list.size()]);
- CVSTag tag = new CVSTag(result[0], CVSTag.VERSION);
- try {
- addStatus(provider.tag(providerResources, IResource.DEPTH_INFINITE, tag, subMonitor));
- } catch (CVSException e) {
- throw new InvocationTargetException(e);
- }
- // Cache the new tag creation even if the tag may have had warnings.
- CVSUIPlugin.getPlugin().getRepositoryManager().addVersionTags(
- CVSWorkspaceRoot.getCVSFolderFor(provider.getProject()),
- new CVSTag[] {tag});
-
- }
- previousTag = result[0];
- }
- });
- }
-
- /**
- * Override to dislay the number of tag operations that succeeded
- */
- protected IStatus getStatusToDisplay(IStatus[] problems) {
- // We accumulated 1 status per resource above.
- IStatus[] status = getAccumulatedStatus();
- int resourceCount = status.length;
-
- MultiStatus combinedStatus;
- if(resourceCount == 1) {
- combinedStatus = new MultiStatus(CVSUIPlugin.ID, 0, Policy.bind("TagAction.tagProblemsMessage"), null); //$NON-NLS-1$
- } else {
- combinedStatus = new MultiStatus(CVSUIPlugin.ID, 0, Policy.bind("TagAction.tagProblemsMessageMultiple", //$NON-NLS-1$
- Integer.toString(resourceCount - problems.length), Integer.toString(problems.length)), null); //$NON-NLS-1$
- }
- for (int i = 0; i < problems.length; i++) {
- combinedStatus.merge(problems[i]);
- }
- return combinedStatus;
- }
-
- /*
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- IResource[] resources = getSelectedResources();
- if (resources.length == 0) return false;
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId());
- if (provider == null) return false;
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- if(cvsResource.isFolder()) {
- if (! ((ICVSFolder)cvsResource).isCVSFolder()) return false;
- } else {
- ResourceSyncInfo info = cvsResource.getSyncInfo();
- if(info==null || info.isAdded()) return false;
- }
- }
- return true;
- }
-
- /**
- * Prompts the user for a tag name.
- * Note: This method is designed to be overridden by test cases.
- * @return the tag, or null to cancel
- */
- protected String promptForTag(ICVSFolder folder) {
- TagAsVersionDialog dialog = new TagAsVersionDialog(getShell(),
- Policy.bind("TagAction.tagResources"), //$NON-NLS-1$
- folder);
- if (dialog.open() != InputDialog.OK) return null;
- return dialog.getTagName();
- }
- /**
- * Note: This method is designed to be overridden by test cases.
- */
- protected IPromptCondition getPromptCondition() {
- return new IPromptCondition() {
- public boolean needsPrompt(IResource resource) {
- return CVSDecorator.isDirty(resource);
- }
- public String promptMessage(IResource resource) {
- return Policy.bind("TagAction.uncommittedChanges", resource.getName());//$NON-NLS-1$
- }
- };
- }
-
- protected String getErrorTitle() {
- return Policy.bind("TagAction.tagErrorTitle"); //$NON-NLS-1$
- }
-
- protected String getWarningTitle() {
- return Policy.bind("TagAction.tagWarningTitle"); //$NON-NLS-1$
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/TagInRepositoryAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/TagInRepositoryAction.java
deleted file mode 100644
index ddcaee1e7..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/TagInRepositoryAction.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-
-public class TagInRepositoryAction extends TagAction {
-
- /**
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- ICVSResource[] resources = getSelectedCVSResources();
- if (resources.length == 0) return false;
- for (int i = 0; i < resources.length; i++) {
- if (resources[i] instanceof ICVSRepositoryLocation) return false;
- }
- return true;
- }
-
- /**
- * @see CVSAction#needsToSaveDirtyEditors()
- */
- protected boolean needsToSaveDirtyEditors() {
- return false;
- }
-
- /**
- * @see CVSAction#execute(IAction)
- */
- public void execute(IAction action) throws InvocationTargetException, InterruptedException {
-
- // Prompt for the tag
- final ICVSResource[] resources = getSelectedCVSResources();
- final CVSTag[] tag = new CVSTag[] { null };
- getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- // Collect the parent folders from which to determine the tags to show
- ICVSFolder[] folders = new ICVSFolder[resources.length];
- for (int i = 0; i < resources.length; i++) {
- if (resources[i].isFolder()) {
- folders[i] = (ICVSFolder)resources[i];
- } else {
- folders[i] = resources[i].getParent();
- }
- }
- tag[0] = promptForTag(folders);
- }
- });
- if (tag[0] == null) return;
-
- CVSUIPlugin.runWithProgressDialog(getShell(), true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- try {
- monitor.beginTask(null, 1000 * resources.length);
- for (int i = 0; i < resources.length; i++) {
- IStatus status = ((ICVSRemoteResource)resources[i]).tag(tag[0], getLocalOptions(), new SubProgressMonitor(monitor, 1000));
- addStatus(status);
- }
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- }
-
- /**
- * Prompt for the tag to be used by the tagging operation. The default behavior
- * is to prompt for a name and return a version tag of that name.
- *
- * Subclasses can override.
- *
- * @param folders the folders from which to obtain a list of existing tags
- * @return CVSTag the tag chosen
- */
- protected CVSTag promptForTag(ICVSFolder[] folders) {
- String name = promptForTag(folders[0]);
- if (name == null) return null;
- return new CVSTag(name, CVSTag.VERSION);
- }
-
- /**
- * Return the local options that should be used with the rtag command
- */
- protected LocalOption[] getLocalOptions() {
- return Command.NO_LOCAL_OPTIONS;
- }
-
- /**
- * Override to dislay the number of tag operations that succeeded
- */
- protected IStatus getStatusToDisplay(IStatus[] problems) {
- // We accumulated 1 status per resource above.
- IStatus[] status = getAccumulatedStatus();
- int resourceCount = status.length;
-
- MultiStatus combinedStatus;
- if(resourceCount == 1) {
- combinedStatus = new MultiStatus(CVSUIPlugin.ID, 0, Policy.bind("TagInRepositoryAction.tagProblemsMessage"), null); //$NON-NLS-1$
- } else {
- combinedStatus = new MultiStatus(CVSUIPlugin.ID, 0, Policy.bind("TagInRepositoryAction.tagProblemsMessageMultiple"), null); //$NON-NLS-1$
- }
- for (int i = 0; i < problems.length; i++) {
- combinedStatus.merge(problems[i]);
- }
- return combinedStatus;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UnmanageAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UnmanageAction.java
deleted file mode 100644
index 32e8addad..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UnmanageAction.java
+++ /dev/null
@@ -1,204 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.core.InfiniteSubProgressMonitor;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-/**
- * Unmanage action removes the cvs feature from a project and optionally
- * deletes the CVS meta information that is stored on disk.
- */
-public class UnmanageAction extends TeamAction {
-
- static class DeleteProjectDialog extends MessageDialog {
-
- private IProject[] projects;
- private boolean deleteContent = false;
- private Button radio1;
- private Button radio2;
-
- DeleteProjectDialog(Shell parentShell, IProject[] projects) {
- super(
- parentShell,
- getTitle(projects),
- null, // accept the default window icon
- getMessage(projects),
- MessageDialog.QUESTION,
- new String[] {IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL},
- 0); // yes is the default
- this.projects = projects;
- }
-
- static String getTitle(IProject[] projects) {
- if (projects.length == 1)
- return Policy.bind("Unmanage.title"); //$NON-NLS-1$
- else
- return Policy.bind("Unmanage.titleN"); //$NON-NLS-1$
- }
-
- static String getMessage(IProject[] projects) {
- if (projects.length == 1) {
- IProject project = projects[0];
- return Policy.bind("Unmanage.message", project.getName()); //$NON-NLS-1$
- }
- else {
- return Policy.bind("Unmanage.messageN", new Integer(projects.length).toString()); //$NON-NLS-1$
- }
- }
-
- protected Control createCustomArea(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout());
- radio1 = new Button(composite, SWT.RADIO);
- radio1.addSelectionListener(selectionListener);
-
- radio1.setText(Policy.bind("Unmanage.option2")); //$NON-NLS-1$
-
- radio2 = new Button(composite, SWT.RADIO);
- radio2.addSelectionListener(selectionListener);
-
- radio2.setText(Policy.bind("Unmanage.option1")); //$NON-NLS-1$
-
- // set initial state
- radio1.setSelection(deleteContent);
- radio2.setSelection(!deleteContent);
-
- return composite;
- }
-
- private SelectionListener selectionListener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Button button = (Button) e.widget;
- if (button.getSelection()) {
- deleteContent = (button == radio1);
- }
- }
- };
-
- public boolean getDeleteContent() {
- return deleteContent;
- }
- }
-
- private boolean deleteContent = false;
-
- /*
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- final Exception[] exceptions = new Exception[] {null};
- if(confirmDeleteProjects()) {
- try {
- new ProgressMonitorDialog(getShell()).run(true, true, getOperation());
- } catch (InvocationTargetException e) {
- exceptions[0] = e;
- } catch (InterruptedException e) {
- exceptions[0] = null;
- }
- }
- if (exceptions[0] != null) {
- handle(exceptions[0], null, Policy.bind("Unmanage.unmanagingError")); //$NON-NLS-1$
- }
- }
-
- private IRunnableWithProgress getOperation() {
- return new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- Hashtable table = getProviderMapping();
- Set keySet = table.keySet();
- monitor.beginTask("", keySet.size() * 1000); //$NON-NLS-1$
- monitor.setTaskName(Policy.bind("Unmanage.unmanaging")); //$NON-NLS-1$
- Iterator iterator = keySet.iterator();
- while (iterator.hasNext()) {
- IProgressMonitor subMonitor = new InfiniteSubProgressMonitor(monitor, 1000);
- subMonitor.beginTask(null, 100);
- CVSTeamProvider provider = (CVSTeamProvider)iterator.next();
- List list = (List)table.get(provider);
- IResource[] providerResources = (IResource[])list.toArray(new IResource[list.size()]);
- for (int i = 0; i < providerResources.length; i++) {
- IResource resource = providerResources[i];
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor((IContainer) resource);
- try {
- if(deleteContent) {
- folder.unmanage(Policy.subMonitorFor(subMonitor, 10));
- }
- } finally {
- // We want to remove the nature even if the unmanage operation fails
- RepositoryProvider.unmap((IProject)resource);
- }
- }
- }
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- };
- }
-
- boolean confirmDeleteProjects() {
- final int[] result = new int[] { MessageDialog.OK };
- IProject[] projects = getSelectedProjects();
- final DeleteProjectDialog dialog = new DeleteProjectDialog(shell, projects);
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- result[0] = dialog.open();
- }
- });
- deleteContent = dialog.getDeleteContent();
- return result[0] == 0; // YES
- }
-
- /*
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- IResource[] resources = getSelectedResources();
- if (resources.length == 0) return false;
- for (int i = 0; i < resources.length; i++) {
- if(resources[i].getType()!=IResource.PROJECT) return false;
- RepositoryProvider provider = RepositoryProvider.getProvider(resources[i].getProject(), CVSProviderPlugin.getTypeId());
- if (provider == null) return false;
- }
- return true;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UpdateAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UpdateAction.java
deleted file mode 100644
index 648da5d78..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UpdateAction.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-/**
- * UpdateAction performs a 'cvs update' command on the selected resources.
- * If conflicts are present (file has been changed both remotely and locally),
- * the changes will be merged into the local file such that the user must
- * resolve the conflicts. This action is temporary code; it will be removed
- * when a functional synchronize view has been implemented.
- */
-public class UpdateAction extends CVSAction {
- /*
- * @see IActionDelegate#run(IAction)
- */
- public void execute(IAction action) {
- run(new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- try {
- Hashtable table = getProviderMapping();
- Set keySet = table.keySet();
- monitor.beginTask("", keySet.size() * 1000); //$NON-NLS-1$
- monitor.setTaskName(Policy.bind("UpdateAction.updating")); //$NON-NLS-1$
- Iterator iterator = keySet.iterator();
- while (iterator.hasNext()) {
- IProgressMonitor subMonitor = new SubProgressMonitor(monitor, 1000);
- CVSTeamProvider provider = (CVSTeamProvider)iterator.next();
- List list = (List)table.get(provider);
- IResource[] providerResources = (IResource[])list.toArray(new IResource[list.size()]);
- provider.update(providerResources, Command.NO_LOCAL_OPTIONS, null, true /*createBackups*/, subMonitor);
- }
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- }, Policy.bind("UpdateAction.update"), this.PROGRESS_DIALOG); //$NON-NLS-1$
-
- }
- /*
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- IResource[] resources = getSelectedResources();
- if (resources.length == 0) return false;
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId());
- if (provider == null) return false;
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- ResourceSyncInfo info = cvsResource.getSyncInfo();
- if(cvsResource.isFolder()) {
- if(!((ICVSFolder)cvsResource).isCVSFolder()) return false;
- } else {
- if (!cvsResource.isManaged() || info.isAdded()) return false;
- }
- }
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeEditorInput.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeEditorInput.java
deleted file mode 100644
index bdb35a6d8..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeEditorInput.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.merge;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteResource;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.resources.CVSRemoteSyncElement;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFile;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.sync.CVSSyncCompareInput;
-import org.eclipse.team.internal.ui.sync.MergeResource;
-import org.eclipse.team.internal.ui.sync.SyncView;
-import org.eclipse.team.internal.ui.sync.TeamFile;
-
-public class MergeEditorInput extends CVSSyncCompareInput {
- CVSTag start;
- CVSTag end;
-
- public MergeEditorInput(IResource[] resources, CVSTag start, CVSTag end) {
- // we have to perform content comparison since files in different branches
- // may have different revisions but the same contents. Consider these files
- // for merge purposes as equal.
- super(resources, IRemoteSyncElement.GRANULARITY_CONTENTS);
- this.start = start;
- this.end = end;
- }
- public Viewer createDiffViewer(Composite parent) {
- Viewer viewer = super.createDiffViewer(parent);
- getViewer().syncModeChanged(SyncView.SYNC_MERGE);
- return viewer;
- }
- protected IRemoteSyncElement[] createSyncElements(IProgressMonitor monitor) throws TeamException {
- IResource[] resources = getResources();
- IRemoteSyncElement[] trees = new IRemoteSyncElement[resources.length];
- int work = 100 * resources.length;
- monitor.beginTask(null, work);
- try {
- for (int i = 0; i < trees.length; i++) {
- IResource resource = resources[i];
- IRemoteResource base = CVSWorkspaceRoot.getRemoteTree(resource, start, Policy.subMonitorFor(monitor, 50));
- IRemoteResource remote = CVSWorkspaceRoot.getRemoteTree(resource, end, Policy.subMonitorFor(monitor, 50));
- trees[i] = new CVSRemoteSyncElement(true /*three way*/, resource, base, remote);
- }
- } finally {
- monitor.done();
- }
- return trees;
- }
- public CVSTag getStartTag() {
- return start;
- }
- public CVSTag getEndTag() {
- return end;
- }
- public String getTitle() {
- return Policy.bind("MergeEditorInput.title", start.getName(), end.getName()); //$NON-NLS-1$
- }
- public boolean isSaveNeeded() {
- return false;
- }
- protected void contentsChanged(ICompareInput source) {
- }
-
- /*
- * Override collectResourceChanges to only determine the true sync state for incomming changes
- */
- protected IDiffElement collectResourceChanges(IDiffContainer parent, IRemoteSyncElement tree, IProgressMonitor pm) {
- if ( ! tree.isContainer()) {
- CVSRemoteSyncElement cvsTree = (CVSRemoteSyncElement)tree;
- RemoteFile base = (RemoteFile)cvsTree.getBase();
- RemoteFile remote = (RemoteFile)cvsTree.getRemote();
- if (base != null && remote != null && base.getRevision().equals(remote.getRevision())) {
- // If the base and remote are the same, we don't have an incomming change
- MergeResource mergeResource = new MergeResource(tree);
- TeamFile file = new TeamFile(parent, mergeResource, IRemoteSyncElement.IN_SYNC, getShell());
- return file;
- }
- }
- return super.collectResourceChanges(parent, tree, pm);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizard.java
deleted file mode 100644
index 62e954198..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizard.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.merge;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.compare.CompareUI;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-
-public class MergeWizard extends Wizard {
- MergeWizardStartPage startPage;
- MergeWizardEndPage endPage;
- IResource[] resources;
-
- public void addPages() {
-
- // when merging multiple resources, use the tags found on the first selected
- // resource. This makes sense because you would typically merge resources that
- // have a common context and are versioned and branched together.
- IProject projectForTagRetrieval = resources[0].getProject();
-
- setWindowTitle(Policy.bind("MergeWizard.title")); //$NON-NLS-1$
- ImageDescriptor mergeImage = CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_MERGE);
- startPage = new MergeWizardStartPage("startPage", Policy.bind("MergeWizard.start"), mergeImage); //$NON-NLS-1$ //$NON-NLS-2$
- startPage.setProject(projectForTagRetrieval);
- addPage(startPage);
- endPage = new MergeWizardEndPage("endPage", Policy.bind("MergeWizard.end"), mergeImage, startPage); //$NON-NLS-1$ //$NON-NLS-2$
- endPage.setProject(projectForTagRetrieval);
- addPage(endPage);
- }
-
- /*
- * @see IWizard#performFinish()
- */
- public boolean performFinish() {
- CVSTag startTag = startPage.getTag();
- CVSTag endTag = endPage.getTag();
- CompareUI.openCompareEditor(new MergeEditorInput(resources, startTag, endTag));
- return true;
- }
-
- /*
- * Set the resources that should be merged.
- */
- public void setResources(IResource[] resources) {
- this.resources = resources;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardEndPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardEndPage.java
deleted file mode 100644
index ec29209b7..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardEndPage.java
+++ /dev/null
@@ -1,119 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.merge;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-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.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.wizards.CVSWizardPage;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-public class MergeWizardEndPage extends CVSWizardPage {
- IProject project;
- TreeViewer tree;
- CVSTag result;
- ICVSRemoteFolder remote;
- // for accessing the start tag
- MergeWizardStartPage startPage;
-
- /**
- * MergeWizardEndPage constructor.
- *
- * @param pageName the name of the page
- * @param title the title of the page
- * @param titleImage the image for the page
- */
- public MergeWizardEndPage(String pageName, String title, ImageDescriptor titleImage, MergeWizardStartPage startPage) {
- super(pageName, title, titleImage);
- setDescription(Policy.bind("MergeWizardEndPage.description")); //$NON-NLS-1$
- this.startPage = startPage;
- }
- /*
- * @see IDialogPage#createControl(Composite)
- */
- public void createControl(Composite parent) {
- Composite composite = createComposite(parent, 2);
- // set F1 help
- // WorkbenchHelp.setHelp(composite, new DialogPageContextComputer (this, ITeamHelpContextIds.REPO_CONNECTION_MAIN_PAGE));
-
- tree = createTree(composite);
- tree.setContentProvider(new WorkbenchContentProvider());
- tree.setLabelProvider(new WorkbenchLabelProvider());
- tree.setSorter(new ViewerSorter() {
- public int compare(Viewer v, Object o1, Object o2) {
- int result = super.compare(v, o1, o2);
- if (o1 instanceof TagElement && o2 instanceof TagElement) {
- return -result;
- }
- return result;
- }
- });
- tree.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- Object selected = ((IStructuredSelection)tree.getSelection()).getFirstElement();
- if (selected instanceof TagElement) {
- result = ((TagElement)selected).getTag();
- if(!result.equals(startPage.getTag())) {
- setPageComplete(true);
- setMessage(null);
- } else {
- setMessage(Policy.bind("MergeWizardEndPage.duplicateTagSelected", result.getName()), WARNING); //$NON-NLS-1$
- setPageComplete(false);
- }
- } else {
- setMessage(null);
- result = null;
- setPageComplete(false);
- }
- }
- });
- setControl(composite);
- tree.setInput(new ProjectElement(CVSWorkspaceRoot.getCVSFolderFor(project), ProjectElement.INCLUDE_ALL_TAGS));
- setPageComplete(false);
- }
- protected TreeViewer createTree(Composite parent) {
- Tree tree = new Tree(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.SINGLE);
- tree.setLayoutData(new GridData(GridData.FILL_BOTH));
- return new TreeViewer(tree);
- }
- public void setProject(IProject project) {
- this.project = project;
- try {
- this.remote = (ICVSRemoteFolder) CVSWorkspaceRoot.getRemoteResourceFor(project);
- } catch (TeamException e) {
- // To do
- }
- }
- public CVSTag getTag() {
- return result;
- }
- /**
- * @see IDialogPage#setVisible(boolean)
- */
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- // refresh the tree because tags may have been added in the previous page
- tree.refresh();
- if (visible) {
- tree.getControl().setFocus();
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardStartPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardStartPage.java
deleted file mode 100644
index 64fea3f8b..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardStartPage.java
+++ /dev/null
@@ -1,148 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.merge;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.TagConfigurationDialog;
-import org.eclipse.team.internal.ccvs.ui.wizards.CVSWizardPage;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-public class MergeWizardStartPage extends CVSWizardPage {
- TableViewer table;
- CVSTag result;
- IProject project;
-
- private static final int TABLE_HEIGHT_HINT = 350;
-
- /**
- * MergeWizardStartPage constructor.
- *
- * @param pageName the name of the page
- * @param title the title of the page
- * @param titleImage the image for the page
- */
- public MergeWizardStartPage(String pageName, String title, ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- setDescription(Policy.bind("MergeWizardStartPage.description")); //$NON-NLS-1$
- }
- protected TableViewer createTable(Composite parent) {
- Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.heightHint = TABLE_HEIGHT_HINT;
- table.setLayoutData(data);
- TableLayout layout = new TableLayout();
- layout.addColumnData(new ColumnWeightData(100, true));
- table.setLayout(layout);
- TableColumn col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
-
- return new TableViewer(table);
- }
- /*
- * @see IDialogPage#createControl(Composite)
- */
- public void createControl(Composite parent) {
- Composite composite = createComposite(parent, 1);
- // set F1 help
- // WorkbenchHelp.setHelp(composite, new DialogPageContextComputer (this, ITeamHelpContextIds.REPO_CONNECTION_MAIN_PAGE));
-
- table = createTable(composite);
- table.setContentProvider(new WorkbenchContentProvider());
- table.setLabelProvider(new WorkbenchLabelProvider());
- table.setSorter(new ViewerSorter() {
- public int compare(Viewer v, Object o1, Object o2) {
- int result = super.compare(v, o1, o2);
- if (o1 instanceof TagElement && o2 instanceof TagElement) {
- return -result;
- }
- return result;
- }
- });
- table.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection selection = (IStructuredSelection)table.getSelection();
- if(!selection.isEmpty()) {
- TagElement element = (TagElement)((IStructuredSelection)table.getSelection()).getFirstElement();
- if(element!=null) {
- result = element.getTag();
- setPageComplete(true);
- }
- }
- }
- });
- table.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- getContainer().showPage(getNextPage());
- }
- });
-
- Runnable afterRefresh = new Runnable() {
- public void run() {
- getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- table.refresh();
- }
- });
- }
- };
-
- Runnable afterConfigure = new Runnable() {
- public void run() {
- getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- initialize();
- }
- });
- }
- };
-
- setControl(composite);
- TagConfigurationDialog.createTagDefinitionButtons(getShell(), composite, new ICVSFolder[] {CVSWorkspaceRoot.getCVSFolderFor(project)},
- convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT),
- convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH),
- afterRefresh, afterConfigure);
- initialize();
- setPageComplete(false);
- }
- private void initialize() {
- ICVSFolder cvsProject = CVSWorkspaceRoot.getCVSFolderFor(project);
- table.setInput(new TagRootElement(cvsProject, CVSTag.VERSION));
- }
- public void setProject(IProject project) {
- this.project = project;
- }
- public CVSTag getTag() {
- return result;
- }
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- table.getControl().setFocus();
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/OverrideUpdateMergeAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/OverrideUpdateMergeAction.java
deleted file mode 100644
index 2f0a2ce91..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/OverrideUpdateMergeAction.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.merge;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.sync.CVSSyncCompareInput;
-import org.eclipse.team.internal.ui.sync.ITeamNode;
-import org.eclipse.team.internal.ui.sync.SyncSet;
-
-public class OverrideUpdateMergeAction extends UpdateMergeAction {
- public OverrideUpdateMergeAction(CVSSyncCompareInput model, ISelectionProvider sp, String label, Shell shell) {
- super(model, sp, label, shell);
- }
- /*
- * Override removeNonApplicableNodes because conflicting nodes should not be removed from this set.
- */
- protected void removeNonApplicableNodes(SyncSet set, int syncMode) {
- set.removeOutgoingNodes();
- set.removeIncomingNodes();
- }
- protected boolean isEnabled(ITeamNode node) {
- // The force update action is enabled only for conflicting and outgoing changes
- SyncSet set = new SyncSet(new StructuredSelection(node));
- return (set.hasConflicts() && hasRealChanges(node, new int[] { ITeamNode.CONFLICTING }));
- }
- /**
- * @see MergeAction#getHelpContextID()
- */
- protected String getHelpContextID() {
- return IHelpContextIds.MERGE_FORCED_UPDATE_ACTION;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/ProjectElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/ProjectElement.java
deleted file mode 100644
index 3a1848d60..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/ProjectElement.java
+++ /dev/null
@@ -1,110 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.merge;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-public class ProjectElement implements IAdaptable, IWorkbenchAdapter {
- ICVSFolder project;
- TagRootElement branches;
- TagRootElement versions;
- int includeFlags;
-
- public static final int INCLUDE_HEAD_TAG = 1;
- public static final int INCLUDE_BASE_TAG = 2;
- public static final int INCLUDE_BRANCHES = 4;
- public static final int INCLUDE_VERSIONS = 8;
- public static final int INCLUDE_ALL_TAGS = INCLUDE_HEAD_TAG | INCLUDE_BASE_TAG | INCLUDE_BRANCHES | INCLUDE_VERSIONS;
-
- public static class ProjectElementSorter extends ViewerSorter {
- public boolean isOfInterest(Object o) {
- return (o instanceof TagRootElement) || (o instanceof TagElement);
- }
- public int compare(Viewer viewer, Object e1, Object e2) {
- boolean oneIsOfInterest = isOfInterest(e1);
- boolean twoIsOfInterest = isOfInterest(e2);
- if (oneIsOfInterest != twoIsOfInterest) {
- return oneIsOfInterest ? -1 : 1;
- }
- if (!oneIsOfInterest) {
- return super.compare(viewer, e1, e2);
- }
- // Tag elements can occur under branches and versions as well as HEAD and BASE
- if (e1 instanceof TagElement) {
- if (((TagElement)e1).getTag() == CVSTag.DEFAULT) return -1;
- if (((TagElement)e1).getTag() == CVSTag.BASE) return 1;
- }
- if (e2 instanceof TagElement) {
- if (((TagElement)e2).getTag() == CVSTag.DEFAULT) return 1;
- if (((TagElement)e2).getTag() == CVSTag.BASE) return -1;
- }
- if (e1 instanceof TagRootElement && e2 instanceof TagRootElement) {
- return ((TagRootElement)e1).getTypeOfTagRoot() == CVSTag.BRANCH ? -1 : 1;
- }
- // Sort in reverse order so larger numbered versions are at the top
- return -1 * super.compare(viewer, e1, e2);
- }
- }
-
- public ProjectElement(ICVSFolder project, int includeFlags) {
- this.project = project;
- this.includeFlags = includeFlags;
- if (this.includeFlags == 0) this.includeFlags = INCLUDE_ALL_TAGS;
- if ((includeFlags & INCLUDE_BRANCHES) > 0) {
- branches = new TagRootElement(project, CVSTag.BRANCH);
- }
- if ((includeFlags & INCLUDE_VERSIONS) > 0) {
- versions = new TagRootElement(project, CVSTag.VERSION);
- }
- }
-
- public Object[] getChildren(Object o) {
- ArrayList children = new ArrayList(4);
- if ((includeFlags & INCLUDE_HEAD_TAG) > 0) {
- children.add(new TagElement(CVSTag.DEFAULT));
- }
- if ((includeFlags & INCLUDE_BASE_TAG) > 0) {
- children.add(new TagElement(CVSTag.BASE));
- }
- if ((includeFlags & INCLUDE_BRANCHES) > 0) {
- children.add(branches);
- }
- if ((includeFlags & INCLUDE_VERSIONS) > 0) {
- children.add(versions);
- }
- return (Object[]) children.toArray(new Object[children.size()]);
- }
- public int getIncludeFlags() {
- return includeFlags;
- }
- public TagRootElement getBranches() {
- return branches;
- }
- public TagRootElement getVersions() {
- return versions;
- }
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) return this;
- return null;
- }
- public ImageDescriptor getImageDescriptor(Object object) {
- return null;
- }
- public String getLabel(Object o) {
- return null;
- }
- public Object getParent(Object o) {
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/TagElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/TagElement.java
deleted file mode 100644
index 6f29a98d5..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/TagElement.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.merge;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-public class TagElement implements IWorkbenchAdapter, IAdaptable {
- CVSTag tag;
- public TagElement(CVSTag tag) {
- this.tag = tag;
- }
- public Object[] getChildren(Object o) {
- return new Object[0];
- }
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) return this;
- return null;
- }
- public ImageDescriptor getImageDescriptor(Object object) {
- if (tag.getType() == CVSTag.BRANCH || tag == CVSTag.DEFAULT) {
- return CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_TAG);
- } else {
- return CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_PROJECT_VERSION);
- }
- }
- public String getLabel(Object o) {
- return tag.getName();
- }
- public Object getParent(Object o) {
- return null;
- }
- public CVSTag getTag() {
- return tag;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/TagRootElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/TagRootElement.java
deleted file mode 100644
index 8baf01328..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/TagRootElement.java
+++ /dev/null
@@ -1,106 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.merge;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-public class TagRootElement implements IWorkbenchAdapter, IAdaptable {
- private ICVSFolder project;
- private List cachedTags;
- private int typeOfTagRoot;
-
- public TagRootElement(ICVSFolder project, int typeOfTagRoot) {
- this.typeOfTagRoot = typeOfTagRoot;
- this.project = project;
- }
-
- public TagRootElement(ICVSFolder project, int typeOfTagRoot, CVSTag[] tags) {
- this(project, typeOfTagRoot);
- add(tags);
- }
-
- public Object[] getChildren(Object o) {
- CVSTag[] childTags = new CVSTag[0];
- if(cachedTags==null) {
- if(typeOfTagRoot==CVSTag.BRANCH) {
- childTags = CVSUIPlugin.getPlugin().getRepositoryManager().getKnownBranchTags(project);
- } else if(typeOfTagRoot==CVSTag.VERSION) {
- childTags = CVSUIPlugin.getPlugin().getRepositoryManager().getKnownVersionTags(project);
- }
- } else {
- childTags = getTags();
- }
- TagElement[] result = new TagElement[childTags.length];
- for (int i = 0; i < childTags.length; i++) {
- result[i] = new TagElement(childTags[i]);
- }
- return result;
- }
- public void removeAll() {
- if(cachedTags!=null) {
- cachedTags.clear();
- }
- }
- public void add(CVSTag[] tags) {
- if(cachedTags==null) {
- cachedTags = new ArrayList(tags.length);
- }
- cachedTags.addAll(Arrays.asList(tags));
- }
- public void remove(CVSTag tag) {
- if(cachedTags!=null) {
- cachedTags.remove(tag);
- }
- }
- public CVSTag[] getTags() {
- if(cachedTags!=null) {
- return (CVSTag[]) cachedTags.toArray(new CVSTag[cachedTags.size()]);
- } else {
- return new CVSTag[0];
- }
- }
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) return this;
- return null;
- }
- public ImageDescriptor getImageDescriptor(Object object) {
- if(typeOfTagRoot==CVSTag.BRANCH) {
- return CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_BRANCHES_CATEGORY);
- } else {
- return CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_VERSIONS_CATEGORY);
- }
- }
- public String getLabel(Object o) {
- if(typeOfTagRoot==CVSTag.BRANCH) {
- return Policy.bind("MergeWizardEndPage.branches"); //$NON-NLS-1$
- } else {
- return Policy.bind("VersionsElement.versions"); //$NON-NLS-1$
- }
- }
- public Object getParent(Object o) {
- return null;
- }
- /**
- * Gets the typeOfTagRoot.
- * @return Returns a int
- */
- public int getTypeOfTagRoot() {
- return typeOfTagRoot;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/UpdateMergeAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/UpdateMergeAction.java
deleted file mode 100644
index a73e3dd76..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/UpdateMergeAction.java
+++ /dev/null
@@ -1,161 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.merge;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteResource;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRunnable;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Update;
-import org.eclipse.team.internal.ccvs.core.resources.CVSRemoteSyncElement;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.RepositoryManager;
-import org.eclipse.team.internal.ccvs.ui.sync.CVSSyncCompareInput;
-import org.eclipse.team.internal.ccvs.ui.sync.UpdateSyncAction;
-import org.eclipse.team.internal.ui.sync.ITeamNode;
-
-/*
- * To be done:
- * 1. add another action that allows a force merge merging since we can't tell the manual vs automatic conflicts when building the sync tree.
- * 2. fix progress monitoring
- */
-public class UpdateMergeAction extends UpdateSyncAction {
- public UpdateMergeAction(CVSSyncCompareInput model, ISelectionProvider sp, String label, Shell shell) {
- super(model, sp, label, shell);
- }
-
- /*
- * @see UpdateSyncAction#runUpdateDeep(IProgressMonitor, List, RepositoryManager)
- * incoming-change
- * incoming-deletion
- */
- protected void runUpdateDeep(ITeamNode[] nodes, RepositoryManager manager, IProgressMonitor monitor) throws TeamException {
- ITeamNode[] incoming = removeOutgoing(nodes);
- monitor.beginTask(null, 1000 * incoming.length);
- try {
- for (int i = 0; i < incoming.length; i++) {
- CVSRemoteSyncElement element = CVSSyncCompareInput.getSyncElementFrom(incoming[i]);
- if(element!=null) {
- makeRemoteLocal(element, new SubProgressMonitor(monitor, 1000));
- }
- }
- } finally {
- monitor.done();
- }
- }
-
- /*
- * @see UpdateSyncAction#runUpdateIgnoreLocalShallow(IProgressMonitor, List, RepositoryManager)
- * incoming-addition
- * incoming-conflict (no-merge)
- */
- protected void runUpdateIgnoreLocalShallow(ITeamNode[] nodes, RepositoryManager manager, IProgressMonitor monitor) throws TeamException {
- runUpdateDeep(nodes, manager, monitor);
- }
-
- /*
- * @see UpdateSyncAction#runUpdateShallow(ITeamNode[], RepositoryManager, IProgressMonitor)
- * incoming-conflict (auto-mergeable)
- */
- protected void runUpdateShallow(ITeamNode[] nodes, RepositoryManager manager, IProgressMonitor monitor) throws TeamException {
- mergeWithLocal(nodes, manager, false, monitor);
- }
-
- protected void mergeWithLocal(ITeamNode[] nodes, RepositoryManager manager, boolean createBackup, IProgressMonitor monitor) throws TeamException {
- CVSTag startTag = ((MergeEditorInput)getDiffModel()).getStartTag();
- CVSTag endTag = ((MergeEditorInput)getDiffModel()).getEndTag();
-
- Command.LocalOption[] options = new Command.LocalOption[] {
- Command.DO_NOT_RECURSE,
- Update.makeArgumentOption(Update.JOIN, startTag.getName()),
- Update.makeArgumentOption(Update.JOIN, endTag.getName()) };
-
- // run a join update using the start and end tags and the join points
- manager.update(getIResourcesFrom(nodes), options, createBackup, monitor);
- }
-
- private ITeamNode[] removeOutgoing(ITeamNode[] nodes) {
- // no filter done yet
- return nodes;
- }
-
- /*
- * If called on a new folder, the folder will become an outgoing addition.
- */
- private void makeRemoteLocal(CVSRemoteSyncElement element, IProgressMonitor monitor) throws CVSException {
- IRemoteResource remote = element.getRemote();
- final IResource local = element.getLocal();
- try {
- if(remote==null) {
- // Need a runnable so that move/delete hook is disabled
- final CoreException[] exception = new CoreException[] { null };
- CVSWorkspaceRoot.getCVSFolderFor(local.getParent()).run(new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- try {
- local.delete(false, monitor);
- } catch(CoreException e) {
- exception[0] = e;
- }
- }
- }, monitor);
- if (exception[0] != null) {
- throw exception[0];
- }
- } else {
- if(remote.isContainer()) {
- if(!local.exists()) {
- ((IFolder)local).create(false /*don't force*/, true /*local*/, monitor);
- }
- } else {
- monitor.beginTask(null, 200);
- try {
- IFile localFile = (IFile)local;
- if(local.exists()) {
- localFile.setContents(remote.getContents(Policy.subMonitorFor(monitor, 100)), false /*don't force*/, true /*keep history*/, Policy.subMonitorFor(monitor, 100));
- } else {
- if (!localFile.getParent().exists()) {
- IContainer parent = localFile.getParent();
- while (!parent.exists()) {
- IFolder folder = (IFolder)parent;
- folder.create(false, true, null);
- parent = parent.getParent();
- }
- }
- localFile.create(remote.getContents(Policy.subMonitorFor(monitor, 100)), false /*don't force*/, Policy.subMonitorFor(monitor, 100));
- }
- } finally {
- monitor.done();
- }
- }
- }
- } catch(CoreException e) {
- throw new CVSException(Policy.bind("UpdateMergeActionProblems_merging_remote_resources_into_workspace_1"), e); //$NON-NLS-1$
- } catch(TeamException e) {
- throw new CVSException(Policy.bind("UpdateMergeActionProblems_merging_remote_resources_into_workspace_2"), e); //$NON-NLS-1$
- }
- }
- /**
- * @see MergeAction#getHelpContextID()
- */
- protected String getHelpContextID() {
- return IHelpContextIds.MERGE_UPDATE_ACTION;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/UpdateWithForcedJoinAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/UpdateWithForcedJoinAction.java
deleted file mode 100644
index fb075ffef..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/UpdateWithForcedJoinAction.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.merge;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.internal.ccvs.core.util.Assert;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.RepositoryManager;
-import org.eclipse.team.internal.ccvs.ui.sync.CVSSyncCompareInput;
-import org.eclipse.team.internal.ui.sync.ITeamNode;
-import org.eclipse.team.internal.ui.sync.SyncSet;
-
-/*
- * Used only in the merge editor. This action allows the user to select a single conflict and use
- * the cvs update -j command to merge the changes. This is required because when building the
- * sync tree for a merge the cvs command 'cvs -n update -j -j' does not tell us which files
- * can be auto-merged. This action then allows the user to run the merge without having to
- * individually select each difference and use the 'copy right to left' buttons.
- */
-public class UpdateWithForcedJoinAction extends UpdateMergeAction {
- public UpdateWithForcedJoinAction(CVSSyncCompareInput model, ISelectionProvider sp, String label, Shell shell) {
- super(model, sp, label, shell);
- }
-
- /*
- * @see UpdateSyncAction#runUpdateDeep(ITeamNode[], RepositoryManager, IProgressMonitor)
- */
- protected void runUpdateDeep(ITeamNode[] nodes, RepositoryManager manager, IProgressMonitor monitor) throws TeamException {
- // cannot be called from this action
- Assert.isTrue(false);
- }
-
- /*
- * @see UpdateSyncAction#runUpdateIgnoreLocalShallow(ITeamNode[], RepositoryManager, IProgressMonitor)
- */
- protected void runUpdateIgnoreLocalShallow(ITeamNode[] nodes, RepositoryManager manager, IProgressMonitor monitor) throws TeamException {
- // force an update -j -j to be called on the conflict
- mergeWithLocal(nodes, manager, true, monitor);
- }
-
- /*
- * @see UpdateSyncAction#runUpdateShallow(ITeamNode[], RepositoryManager, IProgressMonitor)
- */
- protected void runUpdateShallow(ITeamNode[] nodes, RepositoryManager manager, IProgressMonitor monitor) throws TeamException {
- // cannot be called from this action
- Assert.isTrue(false);
- }
-
- /*
- * @see MergeAction#isEnabled(ITeamNode)
- */
- protected boolean isEnabled(ITeamNode node) {
- int kind = node.getKind();
- if ((node.getChangeDirection() == IRemoteSyncElement.CONFLICTING) &&
- (kind & IRemoteSyncElement.AUTOMERGE_CONFLICT) == 0) {
- return true;
- } else {
- return false;
- }
- }
- /*
- * @see UpdateSyncAction#promptForConflicts()
- */
- protected boolean promptForConflicts() {
- // don't prompt for overriding conflicts, because this action is simply merging and creating a backup copy of the original file.
- return true;
- }
-
- /*
- * Override removeNonApplicableNodes because conflicting nodes should not be removed from this set.
- */
- protected void removeNonApplicableNodes(SyncSet set, int syncMode) {
- set.removeOutgoingNodes();
- set.removeIncomingNodes();
- }
- /**
- * @see MergeAction#getHelpContextID()
- */
- protected String getHelpContextID() {
- return IHelpContextIds.MERGE_UPDATE_WITH_JOIN_ACTION;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
deleted file mode 100644
index 9b15669c0..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
+++ /dev/null
@@ -1,737 +0,0 @@
-details=Press the details button for more information.
-simpleInternal=Internal error
-internal=An internal error has occurred, consult the error log for details.
-yes=Yes
-no=No
-information=Server Information
-exception=Server Exception
-confirmOverwriteTitle=Confirm Overwrite Project
-confirmOverwrite=The project already exists in the workspace. Its contents will be overwritten.
-question=Question
-localChanges=You have local changes which you are about to overwrite. Do you wish to continue?
-error=Error
-cvs=CVS
-notAvailable=Not Available
-
-nameAndRevision={0} {1}
-currentRevision=*{0}
-
-AddAction.add=Add
-AddAction.adding=Adding...
-
-AddToWorkspaceAction.checkoutFailed=Problems encountered performing checkout
-AddToWorkspaceAction.thisResourceExists=The resource ''{0}'' already exists in the workspace. Overwrite?
-AddToWorkspaceAction.thisExternalFileExists=The folder ''{0}'' exists in the local file system. Overwrite?
-AddToWorkspaceAction.confirmOverwrite=Confirm Overwrite
-
-AutoDefineTagsAction.defineTags = Auto-discover tags
-
-AvoidableMessageDialog.dontShowAgain=Don't show this again
-
-BranchWizard.title=Create a new CVS Branch
-BranchWizard.errorBranching=Error Branching Resources
-BranchWizardPage.pageDescription=Creates a new branch and a starting point version.
-BranchWizardPage.pageDescriptionVersion=Creates a new branch based on the version in the workspace.
-BranchWizardPage.specifyVersion=The version will provide a starting point for merging the branch back to the source branch.
-BranchWizardPage.branchName=Branch Name:
-BranchWizardPage.versionName=Version Name:
-BranchWizardPage.startWorking=Start working in the branch
-BranchWizardPage.versionPrefix=Root_
-BranchWizard.versionNameWarning=Version name: {0}
-BranchWizard.branchNameWarning=Branch name: {0}
-BranchWizard.branchAndVersionMustBeDifferent=The branch name and version name must be different.
-BranchWizard.branchNameAlreadyExists=Branch name already exists.
-BranchWizard.versionNameAlreadyExists=Version name already exists.
-BranchWizardPage.existingVersionsAndBranches=Existing Versions and Branches:
-
-ConsolePreferencePage.consoleColorSettings=Console text color settings.
-ConsolePreferencePage.commandColor=Command &Line:
-ConsolePreferencePage.messageColor=&Message:
-ConsolePreferencePage.errorColor=&Error:
-ConsolePreferencePage.font=Console font setting:
-ConsolePreferencePage.autoOpen=&Show CVS Console when there is output
-
-CVSAction.errorTitle=Errors Occured
-CVSAction.warningTitle=Warnings Occured
-CVSAction.multipleProblemsMessage=Multiple problems occured:
-CVSAction.mixingTagsTitle=Confirm Mixing Tags
-CVSAction.mixingTags=You are mixing tags within a project. Beware that synchronization uses the tag information associated with each resource to determine the remote resource with which the local resource is compared. \n\nThis means that the part(s) of your project that you are replacing with another tag will be synchronized with the tag ''{0}'' while others resources in the project will be sychronized with another tag. \n\nDo you wish to continue?
-
-CVSCatchupReleaseViewer.commit=&Commit...
-CVSCatchupReleaseViewer.update=&Update from Repository
-CVSCatchupReleaseViewer.forceCommit=Override and Co&mmit...
-CVSCatchupReleaseViewer.forceUpdate=Override and U&pdate
-CVSCatchupReleaseViewer.ignore=A&dd to .cvsignore
-CVSCatchupReleaseViewer.mergeUpdate=&Merge Changes into Local Copy
-CVSCatchupReleaseViewer.commonFile=Common file: {0}
-CVSCatchupReleaseViewer.commonFileRevision=Common file: {0} {1}
-CVSCatchupReleaseViewer.noCommonFile=No common file
-CVSCatchupReleaseViewer.noRepositoryFile=No repository file
-CVSCatchupReleaseViewer.repositoryFile=Repository file: {0}
-CVSCatchupReleaseViewer.repositoryFileRevision=Repository file: {0} {1} [{2}]
-CVSCatchupReleaseViewer.workspaceFile=Workspace file: {0}
-CVSCatchupReleaseViewer.showInHistory=Show in &Resource History
-CVSCatchupReleaseViewer.fileDecoration={0} ({1})
-CVSCatchupReleaseViewer.folderDecoration={0} {1}
-CVSCatchupReleaseViewer.confirmMerge=Mark as Mer&ged
-CVSCatchupReleaseViewer.addAction=&Add to Version Control
-
-CVSCompareEditorInput.branchLabel=<branch-{0}>
-CVSCompareEditorInput.headLabel=<HEAD>
-CVSCompareEditorInput.comparing=Comparing...
-CVSCompareEditorInput.different=Cannot compare resources of different kind.
-CVSCompareEditorInput.inBranch={0} in {1}
-CVSCompareEditorInput.inHead={0} in HEAD
-CVSCompareEditorInput.repository=Repository: {0} {1}
-CVSCompareEditorInput.titleAncestor=Compare {0} {1}-{2} and {3}
-CVSCompareEditorInput.titleNoAncestor=Compare {0} {1} and {2}
-CVSCompareEditorInput.titleNoAncestorDifferent=Compare {0} {1} and {2} {3}
-CVSCompareEditorInput.workspace=Workspace: {0}
-CVSCompareEditorInput.workspaceLabel=<workspace>
-CVSCompareEditorInput.noWorkspaceFile=No workspace file
-CVSCompareEditorInput.noRepositoryFile=No repository file
-
-CVSCompareRevisionsInput.addToWorkspace=Get
-CVSCompareRevisionsInput.compareResourceAndVersions=Compare {0} <workspace> and versions
-CVSCompareRevisionsInput.errorReplacingTitle=Unable to Replace
-CVSCompareRevisionsInput.errorReplacingMessage=Resource(s) could not be loaded. A communication error may have occured, or \
- the resource(s) may not exist on the server, or you may \
- not have permission to access them.
-CVSCompareRevisionsInput.repository=Repository file: {0}
-CVSCompareRevisionsInput.structureCompare=Structure Compare
-CVSCompareRevisionsInput.workspace=Workspace file: {0}
-CVSCompareRevisionsInput.truncate={0}[...]
-
-CVSDecorator.projectDecoration={0} [{1}]
-CVSDecorator.projectDecorationWithTag={0} [{1} {2}]
-CVSDecorator.fileDecorationWithTag={0} [{1}:{2}]
-CVSDecorator.fileDecorationNoTag={0} [{1}]
-CVSDecorator.folderDecoration={0} [{1}]
-
-CVSFilePropertiesPage.ignored=The file is ignored by CVS.
-CVSFilePropertiesPage.notManaged=The file is not managed by CVS.
-CVSFilePropertiesPage.isAdded=This file has been added to CVS control but has not been committed
-CVSFilePropertiesPage.baseRevision=Base Revision:
-CVSFilePropertiesPage.baseTimestamp=Base Timestamp:
-CVSFilePropertiesPage.dirty=Dirty:
-CVSFilePropertiesPage.modified=Modified:
-CVSFilePropertiesPage.keywordMode=Keyword Mode:
-CVSFilePropertiesPage.tag=Tag:
-CVSFilePropertiesPage.none=(none)
-CVSFilePropertiesPage.version={0} (Version)
-CVSFilePropertiesPage.branch={0} (Branch)
-CVSFilePropertiesPage.date={0} (Date)
-CVSFilePropertiesPage.error=An error occurred while creating this page.
-CVSFilePropertiesPage.permissions=Permissions:
-CVSFilePropertiesPage.notAvailable=Not Available
-
-CVSFolderPropertiesPage.ignored=The folder is ignored by CVS.
-CVSFolderPropertiesPage.notManaged=The folder is not managed by CVS.
-CVSFolderPropertiesPage.root=Repository Root:
-CVSFolderPropertiesPage.repository=Repository Path:
-CVSFolderPropertiesPage.static=Static:
-
-CVSLocalCompareEditorInput.title=CVS Compare [{0}]
-
-CVSOperationCancelledException.operationCancelled=Operation Cancelled
-
-CVSPropertiesPage.connectionType=Connection type:
-CVSPropertiesPage.user=User:
-CVSPropertiesPage.password=Password:
-CVSPropertiesPage.host=Host:
-CVSPropertiesPage.port=Port:
-CVSPropertiesPage.path=Repository path:
-CVSPropertiesPage.module=Module:
-CVSPropertiesPage.defaultPort=Default
-CVSPropertiesPage.tag=Tag:
-CVSPropertiesPage.update=Change &Tag...
-
-CVSPreferencePage.description=General CVS settings:
-CVSPreferencePage.pruneEmptyDirectories=&Prune empty directories
-CVSPreferencePage.timeoutValue=&Communication timeout (in seconds):
-CVSPreferencePage.quietness=&Quietness level:
-CVSPreferencePage.notquiet=Verbose
-CVSPreferencePage.somewhatquiet=Somewhat quiet
-CVSPreferencePage.reallyquiet=Very quiet
-CVSPreferencePage.silentWarningTitle="Very Quiet" mode is dangerous
-CVSPreferencePage.silentWarningMessage= In "Very Quiet" mode, some cvs servers may not communicate important information about errors that have occured. You may want to consider using "Somewhat quiet" mode instead.
-CVSPreferencePage.considerContentsInCompare=Con&sider file contents in comparisons
-CVSPreferencePage.showAddRemoveMarkers=Show added/deleted &markers
-CVSPreferencePage.replaceUnmanaged=&Delete unmanaged resources on replace
-CVSPreferencePage.defaultTextKSubst=Default &keyword substitution:
-CVSPreferencePage.compressionLevel=Compression &level:
-CVSPreferencePage.level0=0 (disabled)
-CVSPreferencePage.level1=1 (lowest compression)
-CVSPreferencePage.level2=2
-CVSPreferencePage.level3=3
-CVSPreferencePage.level4=4
-CVSPreferencePage.level5=5
-CVSPreferencePage.level6=6
-CVSPreferencePage.level7=7
-CVSPreferencePage.level8=8
-CVSPreferencePage.level9=9 (highest compression)
-CVSPreferencePage.Save_dirty_editors_before_CVS_operations_1=Save dirty editors before CVS operations
-CVSPreferencePage.&Never_2=&Never
-CVSPreferencePage.&Prompt_3=P&rompt
-CVSPreferencePage.Auto-&save_4=&Auto-save
-
-CVSRemoteFilePropertySource.name=Name
-CVSRemoteFilePropertySource.revision=Revision
-CVSRemoteFilePropertySource.date=Date
-CVSRemoteFilePropertySource.author=Author
-CVSRemoteFilePropertySource.comment=Comment
-CVSRemoteFilePropertySource.tag=Tag
-
-CVSRemoteFolderPropertySource.name=Name
-CVSRemoteFolderPropertySource.tag=Tag
-CVSRemoteFolderPropertySource.none=(none)
-
-CVSRepositoryLocationPropertySource.default=Default
-CVSRepositoryLocationPropertySource.host=Host
-CVSRepositoryLocationPropertySource.user=User
-CVSRepositoryLocationPropertySource.port=Port
-CVSRepositoryLocationPropertySource.root=Root
-CVSRepositoryLocationPropertySource.method=Connection Method
-
-CVSSyncCompareInput.confirmMergeMessageTitle=Information
-CVSSyncCompareInput.confirmMergeMessage=Your changes have been saved. When you are finished, \
- select 'Mark as Merged' to make this file an outgoing change.
-CVSSyncCompareInput.projectDeleted=Project ''{0}'' has been deleted locally and cannot be synchronized.
-
-CVSUIPlugin.refreshTitle=Refresh Resource?
-CVSUIPlugin.refreshQuestion={0} Would you like to refresh resource ''{1}''?
-CVSUIPlugin.refreshMultipleQuestion={0} Would you like to refresh the selected resources?
-
-CheckoutAsAction.checkoutFailed=Problems encountered performing checkout
-CheckoutAsAction.enterProjectTitle=Check Out {0} As...
-CheckoutAsAction.taskname=Checking out "{0}" from CVS as "{1}"
-
-CommitAction.commitFailed=Problems encountered performing commit
-
-CommitSyncAction.questionRelease=You have changes that conflict with the server. Release those changes?
-CommitSyncAction.titleRelease=Release Conflicts?
-CommitSyncAction.releaseAll=Release all changes, overriding any conflicting changes on the server.
-CommitSyncAction.releasePart=Only release the changes that don't conflict with changes on the server.
-CommitSyncAction.cancelRelease=Cancel the release operation.
-CommitSyncAction.errorCommitting=An error occurred while committing changes.
-
-CompareWithRemoteAction.compare=Error Comparing with Latest
-CompareWithRemoteAction.noRemote=No Remote Resource
-CompareWithRemoteAction.noRemoteLong=The selected resource has no remote resource to compare with.
-CompareWithRemoteAction.fetching=Comparing with latest from repository...
-
-CompareWithRevisionAction.compare=Error Comparing with Revision
-CompareWithRevisionAction.noRevisions=No Revisions
-CompareWithRevisionAction.noRevisionsLong=The selected resource has no revisions to compare with.
-CompareWithRevisionAction.fetching=Fetching revisions from repository...
-
-CompareWithTagAction.message=Compare with Branch or Version
-CompareWithTagAction.replace=Error Comparing With Branch or Version
-CompareWithTagAction.noRemote=No Remote Resource
-CompareWithTagAction.noRemoteLong=The selected tag has no remote resource to compare with.
-CompareWithTagAction.fetching=Fetching resources with tag {0}...
-
-CompareEditorInput.fileProgress=Comparing CVS file: {0}
-
-ConfigurationWizardAutoconnectPage.description=Your project already has CVS/ directories. It was probably previously shared, or checked out using another tool. It will be automatically shared using the following information.
-ConfigurationWizardAutoconnectPage.user=User:
-ConfigurationWizardAutoconnectPage.host=Host:
-ConfigurationWizardAutoconnectPage.port=Port:
-ConfigurationWizardAutoconnectPage.default=Default
-ConfigurationWizardAutoconnectPage.connectionType=Connection type:
-ConfigurationWizardAutoconnectPage.repositoryPath=Repository path:
-ConfigurationWizardAutoconnectPage.module=Module:
-ConfigurationWizardAutoconnectPage.validate=&Validate Connection on Finish
-ConfigurationWizardAutoconnectPage.noSyncInfo=Could not get folder information
-ConfigurationWizardAutoconnectPage.noCVSDirectory=Could not find CVS/ directory
-
-RepositorySelectionPage.description=This wizard will help you to share your files with the CVS repository for the first time. Your project will automatically be imported into the CVS repository, and the Synchronize view will open to allow you to commit your resources.
-RepositorySelectionPage.useExisting=&Use existing repository location:
-RepositorySelectionPage.useNew=&Create a new repository location
-
-ConfigurationWizardMainPage.connection=&Connection type:
-ConfigurationWizardMainPage.userName=&User:
-ConfigurationWizardMainPage.password=&Password:
-ConfigurationWizardMainPage.host=&Host:
-ConfigurationWizardMainPage.useDefaultPort=Use &Default Port
-ConfigurationWizardMainPage.usePort=Use Por&t:
-ConfigurationWizardMainPage.repositoryPath=&Repository path:
-ConfigurationWizardMainPage.invalidUserName=Invalid User Name
-ConfigurationWizardMainPage.invalidHostName=Invalid Host Name
-ConfigurationWizardMainPage.invalidPort=Invalid Port
-ConfigurationWizardMainPage.invalidPathWithSpaces=The repository path cannot have segments with leading or trailing spaces
-ConfigurationWizardMainPage.invalidPathWithSlashes=The repository path cannot contain a double slash (//)
-ConfigurationWizardMainPage.useNTFormat=Use NT path names for specifying CVSNT repository paths (e.g. C:\\cvs\\root)
-
-Console.copy=Copy
-Console.selectAll=Select All
-Console.clearOutput=Clear Output
-Console.resultServerError={0} {1}
-Console.resultException=failed due to an internal error {0}
-Console.resultAborted=operation canceled {0}
-Console.resultOk=ok {0}
-Console.resultTimeFormat='(took 'm:ss.SSS')'
-Console.preExecutionDelimiter=***
-Console.postExecutionDelimiter=***
-
-DefineVersionAction.enterTag=Enter Version Tag
-DefineVersionAction.enterTagLong=Enter the name of the version:
-
-DefineBranchAction.enterTag=Enter Branch Tag
-DefineBranchAction.enterTagLong=Enter the name of the branch:
-
-DiffAction.diff=Diff
-
-FixTypeAction.fix=Fix Types
-
-GenerateCVSDiff.title=Create Patch
-GenerateCVSDiff.pageTitle=Run and save CVS diff results in a file
-GenerateCVSDiff.pageDescription=The results of the CVS diff command can be used as an input file for the Compare with Patch wizard.
-GenerateCVSDiff.overwriteTitle=Confirm Overwrite
-GenerateCVSDiff.overwriteMsg=A file with that name already exists. Overwrite?
-GenerateCVSDiff.error=Error running the CVS diff command
-GenerateCVSDiff.working=Running CVS diff...
-GenerateCVSDiff.noDiffsFoundMsg=No differences found.
-GenerateCVSDiff.noDiffsFoundTitle=CVS diff
-
-GetSyncAction.questionCatchup=You have local changes which you are about to overwrite. Should the conflicting changes be added?
-GetSyncAction.titleCatchup=Catch up Over Conflicts?
-GetSyncAction.catchupAll=Catch up to all incoming changes, overriding any conflicting local changes.
-GetSyncAction.catchupPart=Only catch up to the changes that don't conflict with local changes.
-GetSyncAction.cancelCatchup=Cancel the catch up operation.
-UpdateSyncAction.errorUpdating=An error occurred while updating changes.
-
-HistoryFilterDialog.title = Filter Resource History
-HistoryFilterDialog.showMatching = Show entries matching:
-HistoryFilterDialog.matchingAny = a&ny of the provided criteria
-HistoryFilterDialog.matchingAll = a&ll of the provided criteria
-HistoryFilterDialog.author = &Author:
-HistoryFilterDialog.comment = &Comment containing:
-HistoryFilterDialog.fromDate = &From date (M/D/Y) :
-HistoryFilterDialog.toDate = &To date (M/D/Y) :
-
-HistoryView.getContentsAction=&Get Contents
-HistoryView.getRevisionAction=Get Sticky &Revision
-HistoryView.copy=&Copy
-HistoryView.revision=Revision
-HistoryView.tags=Tags
-HistoryView.date=Date
-HistoryView.author=Author
-HistoryView.comment=Comment
-HistoryView.refreshLabel=&Refresh View
-HistoryView.refresh=Refresh View
-HistoryView.selectAll=Select &All
-HistoryView.showComment=Show Comment Viewer
-HistoryView.showTags=Show Tag Viewer
-HistoryView.title=CVS Resource History
-HistoryView.titleWithArgument=CVS Resource History - {0}
-HistoryView.overwriteTitle=Overwrite local changes?
-HistoryView.overwriteMsg=You have local changes. Do you want to overwrite them?
-
-IgnoreAction.ignore=Error Ignoring Resource
-
-MergeAction.problemsDuringSync=Problems During Synchronization
-MergeAction.saveChangesTitle=Save Changes
-MergeAction.saveChanges=You have unsaved changes that will be saved before the action is performed.
-
-MergeEditorInput.title=Merge {0} with {1}
-
-MergeWizardEndPage.branches=Branches
-MergeWizardEndPage.description=This is the version or branch that contains the work you would like to merge.
-MergeWizardEndPage.duplicateTagSelected=Cannot select {0} because it has already been selected as the start tag.
-
-MergeWizardStartPage.description=This is the version you created when you branched.
-
-MergeWizard.title=Merge
-MergeWizard.start=Select the Merge Start Point
-MergeWizard.end=Select the Merge End Point
-MergeWizard.preparing=Preparing merge wizard
-MergeWizard.preparingStart=Fetching tags for start page
-MergeWizard.preparingEnd=Fetching tags for end page
-
-ModuleSelectionPage.moduleIsProject=Use project name as module name
-ModuleSelectionPage.specifyModule=Use specified module name:
-
-MoveTagAction.errorMessage=Error Tagging
-MoveTagAction.title=Tag with Existing Tag
-MoveTagAction.message=Select the tag to be moved:
-
-NewLocationWizard.title=Add CVS Repository
-NewLocationWizard.heading=Add a new CVS Repository
-NewLocationWizard.description=Add a new CVS Repository to the CVS Repositories view
-NewLocationWizard.validationFailedText={0}. Keep location anyway?
-NewLocationWizard.validationFailedTitle=Unable to Validate
-NewLocationWizard.exception=Unable to create repository location
-
-OpenLogEntryAction.open=Open
-OpenLogEntryAction.deletedTitle=Resource is Deleted
-OpenLogEntryAction.deleted=The selected revision represents a deletion. It cannot be opened.
-
-OpenRemoteFileAction.open=Open
-
-ReleaseCommentDialog.title=Commit Comment
-ReleaseCommentDialog.enterComment=Please enter a comment.
-
-RemoteFolderElement.nameAndTag={0} {1}
-
-RemoveRootAction.removeRoot=Error Discarding Location
-
-RemoveBranchTagAction.removeTag=Discard Branch
-RemoveModuleVersionAction.removeTag=Discard Version
-
-ReplaceWithTagAction.message=Replace with Branch or Version
-ReplaceWithTagAction.replace=Error Replacing With Tag
-ReplaceWithTagAction.replacing=Replacing with tag {0}
-ReplaceWithTagAction.mixingTags=You are mixing tags within a project. This may cause confusion \
- when synchronizing with the repository. Synchronize uses the tag information associated with \
- each resource to determine the remote resource with which the local resource is compared. \
- For example, with version tags, the state of the tagged resources never change so you will \
- not see changes made to the resources in HEAD (or other branches). Do you wish to continue?
-
-ReplaceWithRemoteAction.replacing=Replacing
-ReplaceWithRemoteAction.problemMessage=Error Replacing With Latest From Repository
-
-ReplaceWithAction.confirmOverwrite=Confirm Overwrite
-ReplaceWithAction.localChanges={0} has local changes which you are about to overwrite. Do you wish to overwrite?
-
-RepositoryDialog.getRepository=Select a repository
-RepositoryDialog.description=Select a repository to connect your project to
-
-RepositoryManager.getting=Getting
-RepositoryManager.committing=Committing
-RepositoryManager.updating=Updating
-RepositoryManager.deleting=Deleting
-RepositoryManager.adding=Adding
-RepositoryManager.rename=An IO Exception occurred while renaming the state file
-RepositoryManager.save=An IO Exception occurred while saving the state file
-RepositoryManager.ioException=An IO Exception occurred while reading the state file
-
-RepositoriesView.refresh=&Refresh View
-RepositoriesView.refreshTooltip=Refresh View
-RepositoriesView.new=&Repository Location...
-RepositoriesView.newSubmenu=&New
-RepositoriesView.Show_Folders_6=Show Folders
-RepositoriesView.Show_Modules_7=Show Modules
-RepositoriesView.newAnonCVS=&Anonymous Repository Location to dev.eclipse.org...
-
-ResourcePropertiesPage.status=Status
-ResourcePropertiesPage.notManaged=Not managed by CVS
-ResourcePropertiesPage.versioned=versioned
-ResourcePropertiesPage.notVersioned=not versioned
-ResourcePropertiesPage.state=State
-ResourcePropertiesPage.checkedOut=Checked Out
-ResourcePropertiesPage.checkedIn=Checked In
-#ResourcePropertiesPage.baseRevision=Base Revision
-#ResourcePropertiesPage.none=none
-ResourcePropertiesPage.error=Error
-
-KSubstWizard.title=Set Keyword Substitution
-KSubstWizard.working=Setting keyword substitution mode...
-KSubstWizard.problemsMessage=Problems encountered setting keyword substitution
-KSubstWizard.errorTitle=Errors Occurred
-KSubstWizard.warningTitle=Warnings Occured
-
-KSubstWizardSharedFilesPage.pageTitle=Include versioned files
-KSubstWizardSharedFilesPage.pageDescription=\
- Choose to include or exclude files that are already in the repository
-KSubstWizardSharedFilesPage.contents=\
- Since the keyword substitution mode attribute is not version controlled, the \
- change will be reflected immediately on all branches and in all revisions of \
- any affected files that are already shared in the repository. You should inform \
- all developers that they must delete and check out fresh copies of the affected \
- files before committing new changes to the repository. You may also experience \
- side-effects working with earlier revisions of these files.
-KSubstWizardSharedFilesPage.includeSharedFiles=&Include files that are already shared in the repository.
-KSubstWizardSharedFilesPage.sharedFilesViewer.title=&The following files were selected and are already shared in the repository:
-
-KSubstWizardDirtyFilesPage.pageTitle=Include files with outgoing changes
-KSubstWizardDirtyFilesPage.pageDescription=\
- Choose to include or exclude files with outgoing changes
-KSubstWizardDirtyFilesPage.contents=\
- This operation may commit changes to files without first providing a chance to resolve \
- conflicts.
-KSubstWizardDirtyFilesPage.includeDirtyFiles=&Include files that have outgoing changes.
-KSubstWizardDirtyFilesPage.dirtyFilesViewer.title=&The following files were selected and have outgoing changes.
-
-KSubstWizardSelectionPage.pageTitle=Select Keyword Substitution Mode
-KSubstWizardSelectionPage.pageDescription=\
- Choose the desired keyword substitution mode for the selected files.
-KSubstWizardSelectionPage.automaticButton=&Automatic
-KSubstWizardSelectionPage.automaticLabel=\
- Automatically chooses ''{0}'' or ''{1}'' \
- for each file according to the Team file extension preferences.
-KSubstWizardSelectionPage.binaryButton=&Binary (-kb)
-KSubstWizardSelectionPage.binaryLabel=\
- Binary files are stored in the repository without alteration.\n\
- CVS does not directly support conflict resolution for binary files.
-KSubstWizardSelectionPage.textButton=&Text without keyword substitution (-ko)
-KSubstWizardSelectionPage.textLabel=\
- End of lines are replaced with the appropriate convention for the client system.\n\
- CVS supports conflict resolution and differencing of text files with single line granularity.
-KSubstWizardSelectionPage.textWithSubstitutionsButton=Text with &keyword substitution
-KSubstWizardSelectionPage.textWithSubstitutionsLabel=\
- End of lines are replaced with the appropriate convention for the client system.\n\
- Text files may contain keywords that are expanded by the CVS server during file transfers.\n\
- Please consult the CVS documentation for a description of the various supported keywords and modes.
-
-KSubstWizardSummaryPage.pageTitle=Summary
-KSubstWizardSummaryPage.pageDescription=\
- Summary of keyword substitution changes to be performed.
-KSubstWizardSummaryPage.contents=\
- Click on \'Finish\' to change the keyword substitution mode of the checked files indicated below.\n\
- You can change the mode on a per file basis by clicking in the corresponding cell.\n\
- Note: Files that are not checked, or that already have the indicated mode will not be affected in any way.
-KSubstWizardSummaryPage.showUnaffectedFiles=&Show files that already have the requested keyword substitution mode.
-KSubstWizardSummaryPage.summaryViewer.title=&The following checked files will have their keyword substitution mode changed to the indicated value.
-KSubstWizardSummaryPage.summaryViewer.fileHeader=File Location
-KSubstWizardSummaryPage.summaryViewer.ksubstHeader=Keyword Substitution Mode
-
-SharingWizard.autoConnectTitle=Connect Project to Repository
-SharingWizard.autoConnectOneOTitle=Connect Project from Eclise 1.0 to Repository
-SharingWizard.autoConnectTitleDescription=Project is already configured with CVS repository information.
-SharingWizard.couldNotImport=Remote Project Exists
-SharingWizard.couldNotImportLong=Module ''{0}'' already exists remotely. Would you like to synchronize your local project with the existing remote module?
-SharingWizard.selectTagTitle=Select Tag
-SharingWizard.selectTag=Select the tag to synchronize with:
-SharingWizard.description=Configure a Project to Use CVS
-SharingWizard.importTitle=Share Project with CVS Repository
-SharingWizard.importTitleDescription=Select an existing repository location or create a new location.
-SharingWizard.title=Share Project
-SharingWizard.heading=Configure a Project to Use CVS
-SharingWizard.enterInformation=Enter Repository Location Information
-SharingWizard.enterInformationDescription=Define the location and protocol required to connect with an existing CVS repository.
-SharingWizard.enterModuleName=Enter Module Name
-SharingWizard.enterModuleNameDescription=Select the name of the module in the CVS repository.
-SharingWizard.readyToFinish=Ready to Share Project
-SharingWizard.readyToFinishDescription=Select Finish to import the project into the CVS repository.
-SharingWizard.validationFailedText={0}. Set project sharing anyway?
-SharingWizard.validationFailedTitle=Unable to Validate
-
-SharingWizardFinishPage.message=The wizard has all the information necessary to share your project with the CVS repository. When you click \"Finish\", the wizard will import your project into the repository and open the Synchronize view to allow you to commit your resources.
-
-ShowHistoryAction.showHistory=Show in Resource History
-ShowHistoryAction.noHistory=No History Available
-ShowHistoryAction.noHistoryLong=No resource history available for selected resources.
-
-SyncAction.sync=Synchronize
-
-TagAction.tagErrorTitle=Tagging Error
-TagAction.tagWarningTitle=Tagging Warning
-TagAction.tagProblemsMessage=Problems reported tagging the resource.
-TagAction.tagProblemsMessageMultiple=Problems tagging the resources. {0} project(s) successfully tagged and {1} project(s) with errors.
-TagAction.tagResources=Tag Resources
-TagAction.enterTag=Please enter a version tag:
-TagAction.uncommittedChangesTitle=Confirm Uncommitted Changes
-TagAction.uncommittedChanges=You are tagging ''{0}'' that has uncommitted changes. These changes are not in the repository and will not be included in the version you are creating. Do you still want to tag this resource?
-TagAction.tagAlreadyExists=Version tag already exists.
-TagAction.existingVersions=Existing Versions:
-
-TagInRepositoryAction.tagProblemsMessage=Problems reported tagging the resource.
-TagInRepositoryAction.tagProblemsMessageMultiple=Problems reported tagging the resources.
-
-UpdateAction.update=Problems encountered performing update
-UpdateAction.updating=Updating...
-
-UpdateWizard.title=Update
-UpdateWizard.updatePage=Update
-
-UpdateWizardPage.description=&Select a tag to update the project sharing to:
-UpdateWizardPage.overwrite=&Overwrite local changes
-
-UserValidationDialog.required=Password Required
-UserValidationDialog.labelUser=Enter a user name and password for the following repository:\n{0}
-UserValidationDialog.labelPassword=Enter a password for {0} in the following repository:\n{1}
-UserValidationDialog.password=Password:
-UserValidationDialog.user=User name:
-
-VersionsElement.versions=Versions
-
-WorkbenchUserAuthenticator.cancelled=Operation cancelled because login cancelled
-WorkbenchUserAuthenticator.errorFlushing=Error occurred while flushing password for {0}
-WorkbenchUserAuthenticator.errorSaving=Error occurred while saving password for {0}
-
-Unmanage.unmanaging=Disconnecting from CVS...
-Unmanage.unmanage=Disconnect from CVS
-Unmanage.title=Confirm Disconnect from CVS
-Unmanage.titleN=Confirm Multiple Project Disconnect from CVS
-Unmanage.message=Are you sure you want to disconnect CVS from ''{0}''?
-Unmanage.messageN=Are you sure you want to disconnect CVS from these {0} projects?
-Unmanage.option1=Do not delete the CVS meta information (e.g. CVS sub-directories).
-Unmanage.option2=Also delete the CVS meta information from the file system.
-Unmanage.unmanagingError=Errors occured while disconnecting
-
-Unmanage.message=Are you sure you want to disconnect CVS from ''{0}''?
-Unmanage.messageN=Are you sure you want to disconnect CVS from these {0} projects?
-
-
-AddToWorkspace.taskName1=Checking out ''{0}'' from CVS
-AddToWorkspace.taskNameN=Checking out {0} folders from CVS
-
-Enter_a_valid_file_name_or_select_the_clipboard_option_1=Enter a valid file name or select the clipboard option
-Save_To_Clipboard_2=Save To Clipboard
-Save_In_File_System_3=Save In File System
-Browse..._4=Browse...
-Save_Patch_As_5=Save Patch As
-patch.txt_6=patch.txt
-Save_In_Workspace_7=Save In Workspace
-Select_a_folder_then_type_in_the_file_name__8=Select a folder then type in the file name:
-Fi&le_name__9=Fi&le name:
-Do_not_recurse_into_sub-folders_10=Recurse into sub-folders
-Do_not_include_new_files_in_patch_11=Include new files in patch
-Diff_output_format_12=Diff output format
-Unified_(format_required_by_Compare_With_Patch_feature)_13=Unified (format required by Compare With Patch feature)
-Context_14=Context
-Standard_15=Standard
-Advanced_options_19=Advanced options
-Configure_the_options_used_for_the_CVS_diff_command_20=Configure the options used for the CVS diff command
-
-After_configuring_the_project__1=After configuring the project:
-Open_the_Synchronize_view_on_the_project_2=Open the Synchronize view on the project
-Automatically_import_the_local_resources_into_the_repository_3=Automatically import the local resources into the repository
-Run_update_4=Run update
-Do_nothing_5=Do nothing
-Validate_Connection_on_Finish_7=Validate Location on Finish
-
-TagSelectionDialog.Select_a_Tag_1=Select a branch or version:
-TagSelectionDialog.recurseOption=&Recurse into sub-folders
-
-UpdateSyncAction.Conflicting_changes_found_1=Conflicting changes found
-UpdateSyncAction.You_have_local_changes_you_are_about_to_overwrite_2=You have local changes you are about to overwrite
-UpdateSyncAction.Only_update_resources_that_can_be_automatically_merged_3=Only update resources that can be automatically merged
-UpdateSyncAction.Update_all_resources,_overwriting_local_changes_with_remote_contents_4=Update all resources, overwriting local changes with remote contents
-UpdateSyncAction.Overwrite_local_changes__5=Overwrite local changes?
-UpdateSyncAction.You_have_local_changes_you_are_about_to_overwrite._Do_you_wish_to_continue__6=You have local changes you are about to overwrite. Do you wish to continue?
-
-Example__1=Example:
-Text_Labels_12=Text
-Select_the_format_for_file,_folders,_and_project_text_labels__13=Select the format for file, folders, and project text labels:
-&File_Format__14=&File Format:
-Add_&Variables_15=Add &Variables
-F&older_Format__16=F&older Format:
-Add_Varia&bles_17=Add Varia&bles
-&Project_Format__18=&Project Format:
-Add_Variable&s_19=Add Variable&s
-&Label_decoration_for_outgoing__20=&Label decoration for outgoing:
-Label_decorat&ion_for_added__22=Label decorat&ion for added:
-Icon_Overlays_24=Icons
-Sho&w_outgoing_25=Sho&w outgoing
-Show_has_&remote_26=Show has &remote
-S&how_is_added_27=S&how is added
-&Compute_deep_outgoing_state_for_folders_(disabling_this_will_improve_decorator_performance)_28=&Compute deep outgoing state for folders (disabling this will improve decorator performance)
-Select_the_&variables_to_add_to_the_decoration_format__30=Select the &variables to add to the decoration format:
-Add_Variables_31=Add Variables
-name_of_the_resource_being_decorated_34=name of the resource being decorated
-the_tag_applied_to_the_resource_(version,_branch,_or_date)_35=the tag applied to the resource (version, branch, or date)
-the_repository_location__s_hostname_36=the repository location\'s hostname
-the_connection_method_(e.g._pserver,_ssh)_37=the connection method (e.g. pserver, ssh)
-user_name_for_the_connection_38=user name for the connection
-repository_home_directory_on_server_39=repository home directory on server
-root_relative_directory_40=root relative directory
-flag_indicating_that_the_folder_has_a_child_resource_with_outgoing_changes_41=flag indicating that the folder has a child resource with outgoing changes
-name_of_the_resource_being_decorated_42=name of the resource being decorated
-the_tag_applied_to_the_resource_43=the tag applied to the resource
-keyword_subsitution_rule_for_the_resource_44=keyword subsitution rule for the resource
-last_revision_loaded_into_workspace_45=last revision loaded into workspace
-flag_indicating_that_the_file_has_outgoing_changes_46=flag indicating that the file has outgoing changes
-flag_indicating_that_the_file_has_been_added_to_the_server_47=flag indicating that the file has been added to the server
-
-ExtMethodPreferencePage_message=These variables define the external connection program to use with the \'ext\' connection method.\nThese values should be the same as the \'ext\' CVS command-line environment variable settings.
-ExtMethodPreferencePage_CVS_RSH=CVS_RSH:
-ExtMethodPreferencePage_Browse=&Browse...
-ExtMethodPreferencePage_Details=Select a program or script
-ExtMethodPreferencePage_Note__5=Note:
-ExtMethodPreferencePage_note_CVS_RSH=The RSH command must fit the following calling pattern:\n<CVS_RSH> <HOST> -l <USERNAME> <CVS_SERVER>\nThis program will be called to connect to the remote CVS server
-ExtMethodPreferencePage_CVS_SERVER__7=CVS_SERVER:
-ExtMethodPreferencePage_Note__8=Note:
-ExtMethodPreferencePage_NoteForCVS_SERVER=This is the name of the remote CVS server program.\nChange this setting only if the remote CVS server name\nis different than the default
-UpdateMergeActionProblems_merging_remote_resources_into_workspace_1=Problems merging remote resources into workspace
-UpdateMergeActionProblems_merging_remote_resources_into_workspace_2=Problems merging remote resources into workspace
-CVSAddResolutionGenerator.Add_Resource_to_CVS_1=Add Resource to CVS
-CVSAddResolutionGenerator.Add_Resource_and_Children_to_CVS_2=Add Resource and Children to CVS
-CVSAddResolutionGenerator.Add_to_.cvsignore_3=Add to .cvsignore
-CVSRemoveResolutionGenerator.Commit_Deletion_to_CVS_1=Commit Deletion to CVS
-CVSRemoveResolutionGenerator.Undo_Deletion_from_Local_History_2=Undo Deletion from Local History
-CVSRemoveResolutionGenerator.No_local_history_available._Try_undoing_from_the_server_3=No local history available. Try undoing from the server
-CVSRemoveResolutionGenerator.Undo_Deletion_from_CVS_Server_4=Undo Deletion from CVS Server
-CVSRemoveResloutionGenerator.Commit_Deletion_to_CVS_1=Commit Deletion to CVS
-CVSRemoveResloutionGenerator.Undo_Deletion_from_Local_History_2=Undo Deletion from Local History
-CVSRemoveResloutionGenerator.No_local_history_available._Try_undoing_from_the_server_3=No local history available. Try undoing from the server
-CVSRemoveResloutionGenerator.Undo_Deletion_from_CVS_Server_4=Undo Deletion from CVS Server
-
-TagConfigurationDialog.1=Tag Configuration for {0}
-TagConfigurationDialog.2=Tag Configuration for {0} projects
-TagConfigurationDialog.4=Configure the branch and version tags you will see in the workbench for these projects.
-TagConfigurationDialog.5=&Browse files for tags:
-TagConfigurationDialog.6=&New tags found in the selected files:
-TagConfigurationDialog.7=Remembered &tags for these projects:
-TagConfigurationDialog.8=&Add Checked Tags
-TagConfigurationDialog.9=&Remove
-TagConfigurationDialog.10=Re&move All
-TagConfigurationDialog.11=&List of files to be automatically examined when refreshing tags:
-TagConfigurationDialog.12=A&dd Selected Files
-TagConfigurationDialog.13=Rem&ove
-TagConfigurationDialog.14=Error fetching tags from remote CVS files
-TagConfigurationDialog.20=&Refresh from Repository
-TagConfigurationDialog.21=&Configure Tags
-TagConfigurationDialog.22=Updating Tags
-
-ChangeListener.Deleting_CVS_folders_1=Deleting CVS folders
-ChangeListener.Folders_cannot_be_deleted_from_a_CVS_server_from_the_client._To_delete_the_folder_2=Folders cannot be deleted from a CVS server from the client. To delete the folder
-ChangeListener.Do_not_ask_me_about_this_again_3=Do not ask me about this again
-ConfigureTagsFromRepoViewConfigure_Tag_Error_1=Configure Tag Error
-ConfigureTagsFromRepoViewError_retreiving_root_folders_from_repository_2=Error retreiving root folders from repository
-ConfigureTagsFromRepoViewConfiguring_branch_tags_3=Configuring branch tags
-ConfigureTagsFromRepoViewOnFolderConfiguring_branch_tags_1=Configuring branch tags
-RemoteRootAction.Unable_to_Discard_Location_1=Unable to Discard Location
-RemoteRootAction.Projects_in_the_local_workspace_are_shared_with__2=Projects in the local workspace are shared with {0}. This location cannot be discarded until all local projects are disconnected from it.
-RemoveRootAction.removeRoot_3=RemoveRootAction.removeRoot
-RemoteRootAction.The_projects_that_are_shared_with_the_above_repository_are__4=The projects that are shared with the above repository are:
-
-BranchCategory.Branches_1=Branches
-GroupedByVersionCategory.Versions_1=Versions
-VersionCategory.Versions_1=Versions
-HistoryView.[...]_4=[...]
-
-RepositoryManager.refreshDefinedTags=Refreshing defined tags
-
-CVSProjectPropertiesPage.Select_a_Repository_1=Select a Repository
-CVSProjectPropertiesPage.Select_a_CVS_repository_location_to_share_the_project_with__2=Select a compatible CVS repository location to share the project with:
-CVSProjectPropertiesPage.Change_Sharing_5=&Change Sharing...
-CVSRepositoryPropertiesPage.Confirm_Project_Sharing_Changes_1=Confirm Project Sharing Changes
-CVSRepositoryPropertiesPage.There_are_projects_in_the_workspace_shared_with_this_repository_2=There are projects in the workspace shared with this repository. The projects will be updated with the new information that you have entered
-CVSRepositoryPropertiesPage.sharedProject=The projects that are shared with {0} are:
-
-CVSProjectSetSerializer.Confirm_Overwrite_Project_8=Confirm Overwrite Project
-CVSProjectSetSerializer.The_project_{0}_already_exists._Do_you_wish_to_overwrite_it__9=The project {0} already exists. Do you wish to overwrite it?
-
-IgnoreResourcesDialog.titleSingle=Add {0} to .cvsignore
-IgnoreResourcesDialog.titleMany=Add {0} resources to .cvsignore
-IgnoreResourcesDialog.prompt=Select what to add to the .cvsignore file(s):
-IgnoreResourcesDialog.addNameEntryButton=Resource(s) by name
-IgnoreResourcesDialog.addNameEntryExample=Examples: file1.so, file2.so, .rcfile, bin
-IgnoreResourcesDialog.addExtensionEntryButton=Wildcard extension
-IgnoreResourcesDialog.addExtensionEntryExample=Examples: *.so, *.rcfile, bin
-IgnoreResourcesDialog.addCustomEntryButton=Custom pattern
-IgnoreResourcesDialog.addCustomEntryExample=The wildcard characters ''*'' and ''?'' are permitted.
-IgnoreResourcesDialog.patternMustNotBeEmpty=Pattern must not be empty.
-IgnoreResourcesDialog.patternDoesNotMatchFile=Pattern does not match all selected resources: eg. {0}
-
-ContentAction.Confirm_Long_Operation_1=Confirm Long Operation
-ContentAction.Changing_this_setting_will_involve_contacting_the_server_and_may_be_long-running_2=Changing this setting will involve contacting the server and may be long-running
-
-CVSProjectPropertiesPage.You_can_change_the_sharing_of_this_project_to_another_repository_location._However,_this_is_only_possible_if_the_new_location_is___compatible___(on_the_same_host_with_the_same_repository_path)._1=You can change the sharing of this project to another repository location. However, this is only possible if the new location is \"compatible\" (on the same host with the same repository path).
-
-ConfigurationWizardMainPage.Location_1=Location
-ConfigurationWizardMainPage.Authentication_2=Authentication
-ConfigurationWizardMainPage.Connection_3=Connection
-AlternateUserValidationDialog.Enter_Password_2=Enter Password
-AlternateUserValidationDialog.OK_6=OK
-AlternateUserValidationDialog.Cancel_7=Cancel
-AlternateUserValidationDialog.message=Enter the password for {0}:
-WorkbenchUserAuthenticator.The_operation_was_canceled_by_the_user_1=The operation was canceled by the user
-CVSCatchupReleaseViewer.No_workspace_file_1=No workspace file
-CVSPreferencesPage.Timeout_must_not_be_negative_1=Timeout must not be negative
-CVSPreferencesPage.Timeout_must_be_a_number_2=Timeout must be a number
-CVSCatchupReleaseViewer.Select_&Outgoing_Additions_1=Select &New Resources
-ForceCommitSyncAction.Outgoing_Changes_Not_Added_1=Outgoing Changes Not Added
-ForceCommitSyncAction.You_have_chosen_to_commit_new_resources_which_have_not_been_added_to_version_control._Do_you_wish_to_add_them_to_version_control_now__2=You have chosen to commit new resources which have not been added to version control. Do you wish to add them to version control now?
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/AllRootsElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/AllRootsElement.java
deleted file mode 100644
index bcebf58b9..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/AllRootsElement.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-/**
- * AllRootsElement is the model element for the repositories view.
- * Its children are the array of all known repository roots.
- */
-public class AllRootsElement extends CVSModelElement implements IAdaptable {
- public ImageDescriptor getImageDescriptor(Object object) {
- return null;
- }
- public Object[] getChildren(Object o) {
- return CVSUIPlugin.getPlugin().getRepositoryManager().getKnownRoots();
- }
- public String getLabel(Object o) {
- return null;
- }
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) return this;
- return null;
- }
- public Object getParent(Object o) {
- return null;
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/BranchCategory.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/BranchCategory.java
deleted file mode 100644
index dfa68ede9..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/BranchCategory.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-/**
- * BranchCategory is the model element for the branches category
- * for a particular repsitory in the repositories view. Its children
- * are the array of all known branch tags, other than HEAD, for the
- * given repository.
- */
-public class BranchCategory extends CVSModelElement implements IAdaptable {
- private ICVSRepositoryLocation repository;
-
- /**
- * TeamStreamsCategory constructor.
- */
- public BranchCategory(ICVSRepositoryLocation repository) {
- super();
- this.repository = repository;
- }
-
- /**
- * Returns an object which is an instance of the given class
- * associated with this object. Returns <code>null</code> if
- * no such object can be found.
- */
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) return this;
- return null;
- }
-
- /**
- * Returns the children of this object. When this object
- * is displayed in a tree, the returned objects will be this
- * element's children. Returns an empty enumeration if this
- * object has no children.
- */
- public Object[] getChildren(Object o) {
- CVSTag[] tags = CVSUIPlugin.getPlugin().getRepositoryManager().getKnownBranchTags(repository);
- BranchTag[] branchElements = new BranchTag[tags.length];
- for (int i = 0; i < tags.length; i++) {
- branchElements[i] = new BranchTag(tags[i], repository);
- }
- return branchElements;
- }
-
- /**
- * Returns an image descriptor to be used for displaying an object in the workbench.
- * Returns null if there is no appropriate image.
- *
- * @param object The object to get an image descriptor for.
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- return CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_BRANCHES_CATEGORY);
- }
-
- /**
- * Returns the name of this element. This will typically
- * be used to assign a label to this object when displayed
- * in the UI. Returns an empty string if there is no appropriate
- * name for this object.
- *
- * @param object The object to get a label for.
- */
- public String getLabel(Object o) {
- return Policy.bind("BranchCategory.Branches_1"); //$NON-NLS-1$
- }
-
- /**
- * Returns the logical parent of the given object in its tree.
- * Returns null if there is no parent, or if this object doesn't
- * belong to a tree.
- *
- * @param object The object to get the parent for.
- */
- public Object getParent(Object o) {
- return repository;
- }
-
- /**
- * Return the repository the given element belongs to.
- */
- public ICVSRepositoryLocation getRepository(Object o) {
- return repository;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/BranchTag.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/BranchTag.java
deleted file mode 100644
index d9290538a..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/BranchTag.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-public class BranchTag extends CVSModelElement implements IAdaptable {
- CVSTag tag;
- ICVSRepositoryLocation root;
-
- /**
- * Create a branch tag
- */
- public BranchTag(CVSTag tag, ICVSRepositoryLocation root) {
- this.tag = tag;
- this.root = root;
- }
- public ICVSRepositoryLocation getRoot() {
- return root;
- }
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) return this;
- return null;
- }
- public CVSTag getTag() {
- return tag;
- }
- public boolean equals(Object o) {
- if (!(o instanceof BranchTag)) return false;
- BranchTag t = (BranchTag)o;
- if (!tag.equals(t.tag)) return false;
- return root.equals(t.root);
- }
- public int hashCode() {
- return root.hashCode() ^ tag.hashCode();
- }
- /**
- * Return children of the root with this tag.
- */
- public Object[] getChildren(Object o) {
- // Return the remote elements for the tag
- final Object[][] result = new Object[1][];
- try {
- CVSUIPlugin.runWithProgress(null, true /*cancelable*/, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- IPreferenceStore store = CVSUIPlugin.getPlugin().getPreferenceStore();
- result[0] = root.members(tag, store.getBoolean(ICVSUIConstants.PREF_SHOW_MODULES), monitor);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InterruptedException e) {
- return new Object[0];
- } catch (InvocationTargetException e) {
- handle(e.getTargetException());
- }
- return result[0];
- }
- public ImageDescriptor getImageDescriptor(Object object) {
- if (!(object instanceof BranchTag)) return null;
- return CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_TAG);
- }
- public String getLabel(Object o) {
- if (!(o instanceof BranchTag)) return null;
- return ((BranchTag)o).tag.getName();
- }
- public Object getParent(Object o) {
- if (!(o instanceof BranchTag)) return null;
- return ((BranchTag)o).root;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSAdapterFactory.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSAdapterFactory.java
deleted file mode 100644
index e009a2448..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSAdapterFactory.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.ui.views.properties.IPropertySource;
-
-public class CVSAdapterFactory implements IAdapterFactory {
- private Object fileAdapter = new RemoteFileElement();
- private Object folderAdapter = new RemoteFolderElement();
- private Object rootAdapter = new CVSRepositoryRootElement();
-
- // Property cache
- private Object cachedPropertyObject = null;
- private Object cachedPropertyValue = null;
-
- /** (Non-javadoc)
- * Method declared on IAdapterFactory.
- */
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- if (IWorkbenchAdapter.class == adapterType) {
- if (adaptableObject instanceof ICVSRemoteFile) {
- return fileAdapter;
- } else if (adaptableObject instanceof ICVSRepositoryLocation) {
- return rootAdapter;
- } else if (adaptableObject instanceof ICVSRemoteFolder) {
- return folderAdapter;
- }
- return null;
- }
- if (IPropertySource.class == adapterType) {
- return getPropertySource(adaptableObject);
- }
- return null;
- }
- /** (Non-javadoc)
- * Method declared on IAdapterFactory.
- */
- public Class[] getAdapterList() {
- return new Class[] {IWorkbenchAdapter.class, IPropertySource.class};
- }
- /**
- * Returns the property source for the given object. Caches
- * the result because the property sheet is extremely inefficient,
- * it asks for the source seven times in a row.
- */
- public Object getPropertySource(Object adaptableObject) {
- if (adaptableObject == cachedPropertyObject) {
- return cachedPropertyValue;
- }
- cachedPropertyObject = adaptableObject;
- if (adaptableObject instanceof ICVSRemoteFile) {
- cachedPropertyValue = new CVSRemoteFilePropertySource((ICVSRemoteFile)adaptableObject);
- } else if (adaptableObject instanceof ICVSRemoteFolder) {
- cachedPropertyValue = new CVSRemoteFolderPropertySource((ICVSRemoteFolder)adaptableObject);
- } else if (adaptableObject instanceof ICVSRepositoryLocation) {
- cachedPropertyValue = new CVSRepositoryLocationPropertySource((ICVSRepositoryLocation)adaptableObject);
- } else {
- cachedPropertyValue = null;
- }
- return cachedPropertyValue;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSFileElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSFileElement.java
deleted file mode 100644
index 6b21d0bcc..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSFileElement.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.ui.PlatformUI;
-
-public class CVSFileElement extends CVSResourceElement {
-
- private ICVSFile file;
-
- public CVSFileElement(ICVSFile file) {
- this.file = file;
- }
-
- /**
- * Initial implementation: return null;
- */
- public Object[] getChildren(Object o) {
- return new Object[0];
- }
- /**
- * Initial implementation: return null.
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- return PlatformUI.getWorkbench().getEditorRegistry().getImageDescriptor(file.getName());
- }
- /**
- * Initial implementation: return the file's name and version
- */
- public String getLabel(Object o) {
- try {
- ResourceSyncInfo info = file.getSyncInfo();
- if(info!=null) {
- return file.getName() + " " + info.getRevision(); //$NON-NLS-1$
- } else {
- return file.getName();
- }
- } catch (TeamException e) {
- handle(e);
- return null;
- }
- }
- /**
- * @see IWorkbenchAdapter#getParent(Object)
- */
- public Object getParent(Object o) {
- return null;
- }
-
- public ICVSFile getCVSFile() {
- return file;
- }
- /**
- * @see CVSResourceElement#getCVSResource()
- */
- public ICVSResource getCVSResource() {
- return file;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSFolderElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSFolderElement.java
deleted file mode 100644
index cd079708b..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSFolderElement.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-public class CVSFolderElement extends CVSResourceElement {
-
- private ICVSFolder folder;
- private boolean includeUnmanaged;
-
- public CVSFolderElement(ICVSFolder folder, boolean includeUnmanaged) {
- this.folder = folder;
- this.includeUnmanaged = includeUnmanaged;
- }
-
- /**
- * Returns CVSResourceElement instances
- */
- public Object[] getChildren(Object o) {
- final Object[][] result = new Object[1][];
- try {
- CVSUIPlugin.runWithProgress(null, true /*cancelable*/, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- ICVSResource[] children = folder.fetchChildren(monitor);
- CVSResourceElement[] elements = new CVSResourceElement[children.length];
- for (int i = 0; i < children.length; i++) {
- ICVSResource resource = children[i];
- if(resource.isFolder()) {
- elements[i] = new CVSFolderElement((ICVSFolder)resource, includeUnmanaged);
- } else {
- elements[i] = new CVSFileElement((ICVSFile)resource);
- }
- }
- result[0] = elements;
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InterruptedException e) {
- return new Object[0];
- } catch (InvocationTargetException e) {
- handle(e.getTargetException());
- return new Object[0];
- }
- return result[0];
- }
- /**
- * Overridden to append the version name to remote folders which
- * have version tags and are top-level folders.
- */
- public String getLabel(Object o) {
- return folder.getName();
- }
-
- public ImageDescriptor getImageDescriptor(Object object) {
- return PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
- }
-
- /**
- * @see IWorkbenchAdapter#getParent(Object)
- */
- public Object getParent(Object o) {
- return new CVSFolderElement(folder.getParent(), includeUnmanaged);
- }
-
- /**
- * @see CVSResourceElement#getCVSResource()
- */
- public ICVSResource getCVSResource() {
- return folder ;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSModelElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSModelElement.java
deleted file mode 100644
index e665a85e0..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSModelElement.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-public abstract class CVSModelElement implements IWorkbenchAdapter {
- /**
- * Handles exceptions that occur in CVS model elements.
- */
- protected void handle(Throwable t) {
- IStatus error = null;
- if (t instanceof CoreException) {
- error = ((CoreException)t).getStatus();
- } else if (t instanceof TeamException) {
- error = ((TeamException)t).getStatus();
- } else {
- error = new Status(IStatus.ERROR, CVSUIPlugin.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)) {
- CVSUIPlugin.log(error);
- }
- }
-}
-
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRemoteFilePropertySource.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRemoteFilePropertySource.java
deleted file mode 100644
index 5ccbfe112..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRemoteFilePropertySource.java
+++ /dev/null
@@ -1,161 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.ErrorDialog;
-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.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ILogEntry;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-public class CVSRemoteFilePropertySource implements IPropertySource {
- ICVSRemoteFile file;
- ILogEntry entry;
- boolean initialized;
-
- // Property Descriptors
- static protected IPropertyDescriptor[] propertyDescriptors = new IPropertyDescriptor[5];
- {
- PropertyDescriptor descriptor;
- String category = Policy.bind("cvs"); //$NON-NLS-1$
-
- // resource name
- descriptor = new PropertyDescriptor(ICVSUIConstants.PROP_NAME, Policy.bind("CVSRemoteFilePropertySource.name")); //$NON-NLS-1$
- descriptor.setAlwaysIncompatible(true);
- descriptor.setCategory(category);
- propertyDescriptors[0] = descriptor;
- // revision
- descriptor = new PropertyDescriptor(ICVSUIConstants.PROP_REVISION, Policy.bind("CVSRemoteFilePropertySource.revision")); //$NON-NLS-1$
- descriptor.setAlwaysIncompatible(true);
- descriptor.setCategory(category);
- propertyDescriptors[1] = descriptor;
- // date
- descriptor = new PropertyDescriptor(ICVSUIConstants.PROP_DATE, Policy.bind("CVSRemoteFilePropertySource.date")); //$NON-NLS-1$
- descriptor.setAlwaysIncompatible(true);
- descriptor.setCategory(category);
- propertyDescriptors[2] = descriptor;
- // author
- descriptor = new PropertyDescriptor(ICVSUIConstants.PROP_AUTHOR, Policy.bind("CVSRemoteFilePropertySource.author")); //$NON-NLS-1$
- descriptor.setAlwaysIncompatible(true);
- descriptor.setCategory(category);
- propertyDescriptors[3] = descriptor;
- // comment
- descriptor = new PropertyDescriptor(ICVSUIConstants.PROP_COMMENT, Policy.bind("CVSRemoteFilePropertySource.comment")); //$NON-NLS-1$
- descriptor.setAlwaysIncompatible(true);
- descriptor.setCategory(category);
- propertyDescriptors[4] = descriptor;
- }
-
- /**
- * Create a PropertySource and store its file
- */
- public CVSRemoteFilePropertySource(ICVSRemoteFile file) {
- this.file = file;
- }
-
- /**
- * Do nothing because properties are read only.
- */
- public Object getEditableValue() {
- return this;
- }
-
- /**
- * Return the Property Descriptors for the receiver.
- */
- public IPropertyDescriptor[] getPropertyDescriptors() {
- return propertyDescriptors;
- }
-
- /*
- * @see IPropertySource#getPropertyValue(Object)
- */
- public Object getPropertyValue(Object id) {
- if (!initialized) {
- initialize();
- initialized = true;
- }
- if (id.equals(ICVSUIConstants.PROP_NAME)) {
- return file.getName();
- }
- if (entry != null) {
- if (id.equals(ICVSUIConstants.PROP_REVISION)) {
- return entry.getRevision();
- }
- if (id.equals(ICVSUIConstants.PROP_DATE)) {
- return entry.getDate();
- }
- if (id.equals(ICVSUIConstants.PROP_AUTHOR)) {
- return entry.getAuthor();
- }
- if (id.equals(ICVSUIConstants.PROP_COMMENT)) {
- return entry.getComment();
- }
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Answer true if the value of the specified property
- * for this object has been changed from the default.
- */
- public boolean isPropertySet(Object property) {
- return false;
- }
- /**
- * Reset the specified property's value to its default value.
- * Do nothing because properties are read only.
- *
- * @param property The property to reset.
- */
- public void resetPropertyValue(Object property) {
- }
- /**
- * Do nothing because properties are read only.
- */
- public void setPropertyValue(Object name, Object value) {
- }
-
- private void initialize() {
- try {
- CVSUIPlugin.runWithProgress(null, true /*cancelable*/, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- ILogEntry[] entries = file.getLogEntries(monitor);
- String revision = file.getRevision();
- for (int i = 0; i < entries.length; i++) {
- if (entries[i].getRevision().equals(revision)) {
- entry = entries[i];
- return;
- }
- }
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InterruptedException e) { // ignore cancellation
- } catch (InvocationTargetException e) {
- Throwable t = e.getTargetException();
- if (t instanceof TeamException) {
- Shell shell = new Shell(Display.getDefault());
- ErrorDialog.openError(shell, null, null, ((TeamException) t).getStatus());
- shell.dispose();
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRemoteFolderPropertySource.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRemoteFolderPropertySource.java
deleted file mode 100644
index 9f14d6f29..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRemoteFolderPropertySource.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-public class CVSRemoteFolderPropertySource implements IPropertySource {
- ICVSRemoteFolder folder;
-
- // Property Descriptors
- static protected IPropertyDescriptor[] propertyDescriptors = new IPropertyDescriptor[2];
- {
- PropertyDescriptor descriptor;
- String category = Policy.bind("cvs"); //$NON-NLS-1$
-
- // resource name
- descriptor = new PropertyDescriptor(ICVSUIConstants.PROP_NAME, Policy.bind("CVSRemoteFolderPropertySource.name")); //$NON-NLS-1$
- descriptor.setAlwaysIncompatible(true);
- descriptor.setCategory(category);
- propertyDescriptors[0] = descriptor;
- // tag
- descriptor = new PropertyDescriptor(ICVSUIConstants.PROP_TAG, Policy.bind("CVSRemoteFolderPropertySource.tag")); //$NON-NLS-1$
- descriptor.setAlwaysIncompatible(true);
- descriptor.setCategory(category);
- propertyDescriptors[1] = descriptor;
- }
-
- /**
- * Create a PropertySource and store its file
- */
- public CVSRemoteFolderPropertySource(ICVSRemoteFolder folder) {
- this.folder = folder;
- }
-
- /**
- * Do nothing because properties are read only.
- */
- public Object getEditableValue() {
- return this;
- }
-
- /**
- * Return the Property Descriptors for the receiver.
- */
- public IPropertyDescriptor[] getPropertyDescriptors() {
- return propertyDescriptors;
- }
-
- /*
- * @see IPropertySource#getPropertyValue(Object)
- */
- public Object getPropertyValue(Object id) {
- if (id.equals(ICVSUIConstants.PROP_NAME)) {
- return folder.getName();
- }
- if (id.equals(ICVSUIConstants.PROP_TAG)) {
- CVSTag tag = folder.getTag();
- if (tag == null) {
- return Policy.bind("CVSRemoteFolderPropertySource.none"); //$NON-NLS-1$
- }
- return tag.getName();
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Answer true if the value of the specified property
- * for this object has been changed from the default.
- */
- public boolean isPropertySet(Object property) {
- return false;
- }
- /**
- * Reset the specified property's value to its default value.
- * Do nothing because properties are read only.
- *
- * @param property The property to reset.
- */
- public void resetPropertyValue(Object property) {
- }
- /**
- * Do nothing because properties are read only.
- */
- public void setPropertyValue(Object name, Object value) {
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRepositoryLocationPropertySource.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRepositoryLocationPropertySource.java
deleted file mode 100644
index a0fab60e5..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRepositoryLocationPropertySource.java
+++ /dev/null
@@ -1,120 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.ui.views.properties.PropertyDescriptor;
-
-public class CVSRepositoryLocationPropertySource implements IPropertySource {
- ICVSRepositoryLocation location;
-
- // Property Descriptors
- static protected IPropertyDescriptor[] propertyDescriptors = new IPropertyDescriptor[5];
- {
- PropertyDescriptor descriptor;
- String category = Policy.bind("cvs"); //$NON-NLS-1$
-
- // host
- descriptor = new PropertyDescriptor(ICVSUIConstants.PROP_HOST, Policy.bind("CVSRepositoryLocationPropertySource.host")); //$NON-NLS-1$
- descriptor.setAlwaysIncompatible(true);
- descriptor.setCategory(category);
- propertyDescriptors[0] = descriptor;
- // user
- descriptor = new PropertyDescriptor(ICVSUIConstants.PROP_USER, Policy.bind("CVSRepositoryLocationPropertySource.user")); //$NON-NLS-1$
- descriptor.setAlwaysIncompatible(true);
- descriptor.setCategory(category);
- propertyDescriptors[1] = descriptor;
- // port
- descriptor = new PropertyDescriptor(ICVSUIConstants.PROP_PORT, Policy.bind("CVSRepositoryLocationPropertySource.port")); //$NON-NLS-1$
- descriptor.setAlwaysIncompatible(true);
- descriptor.setCategory(category);
- propertyDescriptors[2] = descriptor;
- // root
- descriptor = new PropertyDescriptor(ICVSUIConstants.PROP_ROOT, Policy.bind("CVSRepositoryLocationPropertySource.root")); //$NON-NLS-1$
- descriptor.setAlwaysIncompatible(true);
- descriptor.setCategory(category);
- propertyDescriptors[3] = descriptor;
- // method
- descriptor = new PropertyDescriptor(ICVSUIConstants.PROP_METHOD, Policy.bind("CVSRepositoryLocationPropertySource.method")); //$NON-NLS-1$
- descriptor.setAlwaysIncompatible(true);
- descriptor.setCategory(category);
- propertyDescriptors[4] = descriptor;
- }
-
- /**
- * Create a PropertySource and store its file
- */
- public CVSRepositoryLocationPropertySource(ICVSRepositoryLocation location) {
- this.location = location;
- }
-
- /**
- * Do nothing because properties are read only.
- */
- public Object getEditableValue() {
- return this;
- }
-
- /**
- * Return the Property Descriptors for the receiver.
- */
- public IPropertyDescriptor[] getPropertyDescriptors() {
- return propertyDescriptors;
- }
-
- /*
- * @see IPropertySource#getPropertyValue(Object)
- */
- public Object getPropertyValue(Object id) {
- if (id.equals(ICVSUIConstants.PROP_HOST)) {
- return location.getHost();
- }
- if (id.equals(ICVSUIConstants.PROP_USER)) {
- return location.getUsername();
- }
- if (id.equals(ICVSUIConstants.PROP_METHOD)) {
- return location.getMethod().getName();
- }
- if (id.equals(ICVSUIConstants.PROP_ROOT)) {
- return location.getRootDirectory();
- }
- if (id.equals(ICVSUIConstants.PROP_PORT)) {
- int port = location.getPort();
- if (port == ICVSRepositoryLocation.USE_DEFAULT_PORT) {
- return Policy.bind("CVSRepositoryLocationPropertySource.default"); //$NON-NLS-1$
- }
- return "" + port; //$NON-NLS-1$
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Answer true if the value of the specified property
- * for this object has been changed from the default.
- */
- public boolean isPropertySet(Object property) {
- return false;
- }
- /**
- * Reset the specified property's value to its default value.
- * Do nothing because properties are read only.
- *
- * @param property The property to reset.
- */
- public void resetPropertyValue(Object property) {
- }
- /**
- * Do nothing because properties are read only.
- */
- public void setPropertyValue(Object name, Object value) {
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRepositoryRootElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRepositoryRootElement.java
deleted file mode 100644
index 8ed4aaa08..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRepositoryRootElement.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-
-/**
- * RemoteRootElement is the model element for a repository that
- * appears in the repositories view. Its children are:
- * a) HEAD
- * b) Branch tags category
- * c) Version tags category
- */
-public class CVSRepositoryRootElement extends CVSModelElement {
- public ImageDescriptor getImageDescriptor(Object object) {
- if (!(object instanceof ICVSRepositoryLocation)) return null;
- return CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_REPOSITORY);
- }
- public String getLabel(Object o) {
- if (!(o instanceof ICVSRepositoryLocation)) return null;
- ICVSRepositoryLocation root = (ICVSRepositoryLocation)o;
- return root.getLocation();
- }
- public Object getParent(Object o) {
- return null;
- }
- public Object[] getChildren(Object o) {
- if (!(o instanceof ICVSRepositoryLocation)) return null;
- return new Object[] {
- new BranchTag(CVSTag.DEFAULT, (ICVSRepositoryLocation)o),
- new BranchCategory((ICVSRepositoryLocation)o),
- new VersionCategory((ICVSRepositoryLocation)o)
- };
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSResourceElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSResourceElement.java
deleted file mode 100644
index 9246cefab..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSResourceElement.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-public abstract class CVSResourceElement extends CVSModelElement implements IAdaptable {
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) return this;
- return null;
- }
- /**
- * Initial implementation: return the resource's name
- */
- public String getLabel(Object o) {
- if (!(o instanceof ICVSResource)) return null;
- return ((ICVSResource)o).getName();
- }
- /**
- * Return null.
- */
- public Object getParent(Object o) {
- if (!(o instanceof ICVSResource)) return null;
- return null;
- }
-
- abstract public ICVSResource getCVSResource();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRootFolderElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRootFolderElement.java
deleted file mode 100644
index b78dc3da1..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRootFolderElement.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.model;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-
-public class CVSRootFolderElement extends CVSResourceElement {
-
- ICVSFolder[] roots;
-
- public CVSRootFolderElement(ICVSFolder[] roots) {
- this.roots = roots;
- }
-
- /**
- * @see IWorkbenchAdapter#getChildren(Object)
- */
- public Object[] getChildren(Object o) {
- CVSFolderElement[] folders = new CVSFolderElement[roots.length];
- for (int i = 0; i < roots.length; i++) {
- folders[i] = new CVSFolderElement(roots[i], false);
- }
- return folders;
- }
-
- /**
- * @see IWorkbenchAdapter#getImageDescriptor(Object)
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- return null;
- }
-
- /**
- * @see CVSResourceElement#getCVSResource()
- */
- public ICVSResource getCVSResource() {
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/GroupedByVersionCategory.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/GroupedByVersionCategory.java
deleted file mode 100644
index 63ff74dc6..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/GroupedByVersionCategory.java
+++ /dev/null
@@ -1,110 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolder;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-public class GroupedByVersionCategory extends CVSModelElement implements IAdaptable {
- private ICVSRepositoryLocation repository;
-
- /**
- * ProjectVersionsCategory constructor.
- */
- public GroupedByVersionCategory(ICVSRepositoryLocation repo) {
- super();
- this.repository = repo;
- }
-
- /**
- * Returns an object which is an instance of the given class
- * associated with this object. Returns <code>null</code> if
- * no such object can be found.
- */
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) return this;
- return null;
- }
-
- /**
- * Returns the children of this object. When this object
- * is displayed in a tree, the returned objects will be this
- * element's children. Returns an empty enumeration if this
- * object has no children.
- */
- public Object[] getChildren(Object o) {
- //String -> CTags[]
- Map mappings = CVSUIPlugin.getPlugin().getRepositoryManager().getKnownProjectsAndVersions(repository);
- Map remoteVersionModules = new HashMap();
- for (Iterator it = mappings.keySet().iterator(); it.hasNext();) {
- String project = (String) it.next();
- CVSTag[] versions = (CVSTag[])((HashSet)mappings.get(project)).toArray(new CVSTag[0]);
- for (int i = 0; i < versions.length; i++) {
- CVSTag tag = versions[i];
- RemoteVersionModule module = (RemoteVersionModule)remoteVersionModules.get(tag);
- if(module==null) {
- module = new RemoteVersionModule(tag, this);
- remoteVersionModules.put(tag, module);
- }
- module.addProject(new RemoteFolder(null, repository, new Path(project), tag));
- }
- }
- return (RemoteVersionModule[])remoteVersionModules.values().toArray(new RemoteVersionModule[0]);
- }
-
- /**
- * Returns an image descriptor to be used for displaying an object in the workbench.
- * Returns null if there is no appropriate image.
- *
- * @param object The object to get an image descriptor for.
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- return CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_VERSIONS_CATEGORY);
- }
-
- /**
- * Returns the name of this element. This will typically
- * be used to assign a label to this object when displayed
- * in the UI. Returns an empty string if there is no appropriate
- * name for this object.
- *
- * @param object The object to get a label for.
- */
- public String getLabel(Object o) {
- return Policy.bind("GroupedByVersionCategory.Versions_1"); //$NON-NLS-1$
- }
-
- /**
- * Returns the logical parent of the given object in its tree.
- * Returns null if there is no parent, or if this object doesn't
- * belong to a tree.
- *
- * @param object The object to get the parent for.
- */
- public Object getParent(Object o) {
- return repository;
- }
-
- /**
- * Return the repository the given element belongs to.
- */
- public ICVSRepositoryLocation getRepository(Object o) {
- return repository;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteContentProvider.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteContentProvider.java
deleted file mode 100644
index a90794dfb..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteContentProvider.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteResource;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-
-/**
- * Extension to the generic workbench content provider mechanism
- * to lazily determine whether an element has children. That is,
- * children for an element aren't fetched until the user clicks
- * on the tree expansion box.
- */
-public class RemoteContentProvider extends WorkbenchContentProvider {
- /* (non-Javadoc)
- * Method declared on WorkbenchContentProvider.
- */
- public boolean hasChildren(Object element) {
- if (element == null) {
- return false;
- }
- // the + box will always appear, but then disappear
- // if not needed after you first click on it.
- if (element instanceof ICVSRemoteResource) {
- if (element instanceof ICVSRemoteFolder) {
- return ((ICVSRemoteFolder)element).isExpandable();
- }
- return ((ICVSRemoteResource)element).isContainer();
- } else if(element instanceof CVSResourceElement) {
- ICVSResource r = ((CVSResourceElement)element).getCVSResource();
- if(r instanceof RemoteResource) {
- return r.isFolder();
- }
- } else if(element instanceof VersionCategory) {
- return true;
- } else if(element instanceof BranchTag) {
- return true;
- } else if(element instanceof RemoteModule) {
- return true;
- }
- return super.hasChildren(element);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteFileElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteFileElement.java
deleted file mode 100644
index f6f3be1cf..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteFileElement.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.PlatformUI;
-
-public class RemoteFileElement extends RemoteResourceElement {
- /**
- * Initial implementation: return null;
- */
- public Object[] getChildren(Object o) {
- return new Object[0];
- }
- /**
- * Initial implementation: return null.
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- if (!(object instanceof ICVSRemoteFile)) return null;
- return PlatformUI.getWorkbench().getEditorRegistry().getImageDescriptor(((ICVSRemoteFile)object).getName());
- }
- /**
- * Initial implementation: return the file's name and version
- */
- public String getLabel(Object o) {
- if (!(o instanceof ICVSRemoteFile)) return null;
- ICVSRemoteFile file = (ICVSRemoteFile)o;
- try {
- return Policy.bind("nameAndRevision", file.getName(), file.getRevision()); //$NON-NLS-1$
- } catch (TeamException e) {
- handle(e);
- return null;
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteFolderElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteFolderElement.java
deleted file mode 100644
index 3ece5f021..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteFolderElement.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-public class RemoteFolderElement extends RemoteResourceElement {
- public Object[] getChildren(final Object o) {
- if (!(o instanceof ICVSRemoteFolder)) return null;
- final Object[][] result = new Object[1][];
- try {
- CVSUIPlugin.runWithProgress(null, true /*cancelable*/, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- result[0] = ((ICVSRemoteFolder)o).members(monitor);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InterruptedException e) {
- return new Object[0];
- } catch (InvocationTargetException e) {
- handle(e.getTargetException());
- }
- return result[0];
- }
- /**
- * Overridden to append the version name to remote folders which
- * have version tags and are top-level folders.
- */
- public String getLabel(Object o) {
- if (!(o instanceof ICVSRemoteFolder)) return null;
- ICVSRemoteFolder folder = (ICVSRemoteFolder)o;
- CVSTag tag = folder.getTag();
- if (tag != null && tag.getType() == CVSTag.VERSION) {
- if (folder.getRemoteParent() == null) {
- return Policy.bind("RemoteFolderElement.nameAndTag", folder.getName(), tag.getName()); //$NON-NLS-1$
- }
- }
- return folder.getName();
- }
- public ImageDescriptor getImageDescriptor(Object object) {
- if (!(object instanceof ICVSRemoteFolder)) return null;
- return PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteModule.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteModule.java
deleted file mode 100644
index 987a63c34..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteModule.java
+++ /dev/null
@@ -1,129 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.RepositoryManager;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-/**
- * This class represents an IProject resource in a repository. The
- * children of a RemoteModule are its versions. A RemoteModule is
- * a child of the VersionsCategory.
- */
-public class RemoteModule extends CVSModelElement implements IAdaptable {
- ICVSRemoteFolder folder;
- VersionCategory parent;
-
- /**
- * RemoteProject constructor.
- */
- public RemoteModule(ICVSRemoteFolder folder, VersionCategory parent) {
- this.folder = folder;
- this.parent = parent;
- }
-
- /**
- * Returns an object which is an instance of the given class
- * associated with this object. Returns <code>null</code> if
- * no such object can be found.
- */
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) return this;
- return null;
- }
-
- /**
- * Returns the children of this object. When this object
- * is displayed in a tree, the returned objects will be this
- * element's children. Returns an empty enumeration if this
- * object has no children. The children of the RemoteModule
- * are the versions for that module.
- */
- public Object[] getChildren(Object o) {
- final Object[][] result = new Object[1][];
- try {
- CVSUIPlugin.runWithProgress(null, true /*cancelable*/, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- RepositoryManager manager = CVSUIPlugin.getPlugin().getRepositoryManager();
- try {
- manager.refreshDefinedTags(folder, false, monitor);
- } catch(TeamException e) {
- // continue
- }
- CVSTag[] tags = CVSUIPlugin.getPlugin().getRepositoryManager().getKnownVersionTags(folder);
- Object[] versions = new Object[tags.length];
- for (int i = 0; i < versions.length; i++) {
- versions[i] = folder.getRepository().getRemoteFolder(folder.getRepositoryRelativePath(), tags[i]);
- }
- result[0] = versions;
- }
- });
- } catch (InterruptedException e) {
- return new Object[0];
- } catch (InvocationTargetException e) {
- handle(e.getTargetException());
- }
- return result[0];
- }
-
- /**
- * Returns an image to be used for displaying an object in the desktop.
- * @param object The object to get an image for.
- * @param owner The viewer that the image will be used in. The image will
- * be disposed when this viewer is closed. If the owner is null, a new
- * image is returned, and the caller is responsible for disposing it.
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- return CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_PROJECT_VERSION);
- }
-
- /**
- * Returns the name of this element. This will typically
- * be used to assign a label to this object when displayed
- * in the UI.
- */
- public String getLabel(Object o) {
- return folder.getName();
- }
-
- /**
- * Returns the logical parent of the given object in its tree.
- */
- public Object getParent(Object o) {
- return parent;
- }
-
- /**
- * Return the repository the given element belongs to.
- */
- public ICVSRepositoryLocation getRepository(Object o) {
- return folder.getRepository();
- }
-
- /** (Non-javadoc)
- * For debugging purposes only.
- */
- public String toString() {
- return "RemoteModule(" + folder.getName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public ICVSRemoteResource getCVSResource() {
- return folder;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteResourceElement.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteResourceElement.java
deleted file mode 100644
index 0f6987e34..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteResourceElement.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-
-public abstract class RemoteResourceElement extends CVSModelElement {
- /**
- * Initial implementation: return the resource's name
- */
- public String getLabel(Object o) {
- if (!(o instanceof ICVSRemoteResource)) return null;
- return ((ICVSRemoteResource)o).getName();
- }
- /**
- * Return null.
- */
- public Object getParent(Object o) {
- if (!(o instanceof ICVSRemoteResource)) return null;
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteVersionModule.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteVersionModule.java
deleted file mode 100644
index 41bc0d194..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteVersionModule.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-/**
- * This class represents an IProject resource in a repository. The
- * children of a RemoteModule are its versions. A RemoteModule is
- * a child of the VersionsCategory.
- */
-public class RemoteVersionModule extends CVSModelElement implements IAdaptable {
- CVSTag tag;
- List projects = new ArrayList();
- GroupedByVersionCategory parent;
-
- /**
- * RemoteProject constructor.
- */
- public RemoteVersionModule(CVSTag tag, GroupedByVersionCategory parent) {
- this.tag = tag;
- this.parent = parent;
- }
-
- /**
- * Returns an object which is an instance of the given class
- * associated with this object. Returns <code>null</code> if
- * no such object can be found.
- */
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) return this;
- return null;
- }
-
- public void addProject(ICVSRemoteFolder project) {
- projects.add(project);
- }
-
- /**
- * Returns the children of this object. When this object
- * is displayed in a tree, the returned objects will be this
- * element's children. Returns an empty enumeration if this
- * object has no children. The children of the RemoteModule
- * are the versions for that module.
- */
- public Object[] getChildren(Object o) {
- return (ICVSRemoteFolder[]) projects.toArray(new ICVSRemoteFolder[projects.size()]);
- }
-
- /**
- * Returns an image to be used for displaying an object in the desktop.
- * @param object The object to get an image for.
- * @param owner The viewer that the image will be used in. The image will
- * be disposed when this viewer is closed. If the owner is null, a new
- * image is returned, and the caller is responsible for disposing it.
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- return CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_PROJECT_VERSION);
- }
-
- /**
- * Returns the name of this element. This will typically
- * be used to assign a label to this object when displayed
- * in the UI.
- */
- public String getLabel(Object o) {
- return tag.getName();
- }
-
- /**
- * Returns the logical parent of the given object in its tree.
- */
- public Object getParent(Object o) {
- return parent;
- }
-
-
- /** (Non-javadoc)
- * For debugging purposes only.
- */
- public String toString() {
- return "RemoteVersionModule(" + tag.getName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/VersionCategory.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/VersionCategory.java
deleted file mode 100644
index d24419aac..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/VersionCategory.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-public class VersionCategory extends CVSModelElement implements IAdaptable {
- private ICVSRepositoryLocation repository;
-
- /**
- * ProjectVersionsCategory constructor.
- */
- public VersionCategory(ICVSRepositoryLocation repo) {
- super();
- this.repository = repo;
- }
-
- /**
- * Returns an object which is an instance of the given class
- * associated with this object. Returns <code>null</code> if
- * no such object can be found.
- */
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) return this;
- return null;
- }
-
- /**
- * Returns the children of this object. When this object
- * is displayed in a tree, the returned objects will be this
- * element's children. Returns an empty enumeration if this
- * object has no children.
- */
- public Object[] getChildren(Object o) {
- final Object[][] result = new Object[1][];
- try {
- CVSUIPlugin.runWithProgress(null, true /*cancelable*/, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- IPreferenceStore store = CVSUIPlugin.getPlugin().getPreferenceStore();
- ICVSRemoteResource[] resources = repository.members(CVSTag.DEFAULT,
- store.getBoolean(ICVSUIConstants.PREF_SHOW_MODULES), monitor);
- Object[] modules = new Object[resources.length];
- for (int i = 0; i < resources.length; i++) {
- modules[i] = new RemoteModule((ICVSRemoteFolder)resources[i], VersionCategory.this);
- }
- result[0] = modules;
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InterruptedException e) {
- return new Object[0];
- } catch (InvocationTargetException e) {
- handle(e.getTargetException());
- }
- return result[0];
- }
-
- /**
- * Returns an image descriptor to be used for displaying an object in the workbench.
- * Returns null if there is no appropriate image.
- *
- * @param object The object to get an image descriptor for.
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- return CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_VERSIONS_CATEGORY);
- }
-
- /**
- * Returns the name of this element. This will typically
- * be used to assign a label to this object when displayed
- * in the UI. Returns an empty string if there is no appropriate
- * name for this object.
- *
- * @param object The object to get a label for.
- */
- public String getLabel(Object o) {
- return Policy.bind("VersionCategory.Versions_1"); //$NON-NLS-1$
- }
-
- /**
- * Returns the logical parent of the given object in its tree.
- * Returns null if there is no parent, or if this object doesn't
- * belong to a tree.
- *
- * @param object The object to get the parent for.
- */
- public Object getParent(Object o) {
- return repository;
- }
-
- /**
- * Return the repository the given element belongs to.
- */
- public ICVSRepositoryLocation getRepository(Object o) {
- return repository;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/AddSyncAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/AddSyncAction.java
deleted file mode 100644
index 574a1887e..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/AddSyncAction.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-
-package org.eclipse.team.internal.ccvs.ui.sync;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.Vector;
-
-import org.eclipse.compare.structuremergeviewer.DiffContainer;
-import org.eclipse.compare.structuremergeviewer.Differencer;
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.syncinfo.MutableResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.resources.CVSRemoteSyncElement;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.RepositoryManager;
-import org.eclipse.team.internal.ui.sync.ChangedTeamContainer;
-import org.eclipse.team.internal.ui.sync.ITeamNode;
-import org.eclipse.team.internal.ui.sync.SyncSet;
-import org.eclipse.team.internal.ui.sync.SyncView;
-import org.eclipse.team.internal.ui.sync.TeamFile;
-
-/**
- * This is a CVS sync view action that will
- */
-public class AddSyncAction extends MergeAction {
- public AddSyncAction(CVSSyncCompareInput model, ISelectionProvider sp, String label, Shell shell) {
- super(model, sp, label, shell);
- }
-
- protected SyncSet run(SyncSet syncSet, IProgressMonitor monitor) {
- boolean result = saveIfNecessary();
- if (!result) return null;
-
- ITeamNode[] changed = syncSet.getChangedNodes();
- if (changed.length == 0) {
- return syncSet;
- }
- List additions = new ArrayList();
-
- try {
- for (int i = 0; i < changed.length; i++) {
- int kind = changed[i].getKind();
- // leave the added nodes in the sync view. Their sync state
- // won't change but the decoration should.
- IResource resource = changed[i].getResource();
- if ((kind & Differencer.DIRECTION_MASK) == ITeamNode.CONFLICTING) {
- if (resource.getType() == IResource.FOLDER) {
- makeInSync(changed[i]);
- } else {
- makeAdded(changed[i]);
- }
- } else {
- if (resource.getType() == resource.FILE) {
- additions.add(resource);
- }
- }
- }
-
- RepositoryManager manager = CVSUIPlugin.getPlugin().getRepositoryManager();
- if (additions.size() != 0) {
- manager.add((IResource[])additions.toArray(new IResource[0]), monitor);
- }
-
- // for all files ensure that parent folders are made in sync after
- // the add completes.
- for (int i = 0; i < changed.length; i++) {
- ITeamNode node = changed[i];
- IResource resource = changed[i].getResource();
- if (resource.getType() == resource.FILE) {
- syncSet.remove(node);
- }
- }
- } catch (final TeamException e) {
- getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- ErrorDialog.openError(getShell(), null, null, e.getStatus());
- }
- });
- return null;
- }
-
- return syncSet;
- }
-
- protected void makeAdded(ITeamNode changed)
- throws TeamException, CVSException {
- // Fake the add locally since add command will fail
- makeInSync(changed.getParent());
- CVSRemoteSyncElement syncElement = (CVSRemoteSyncElement)((TeamFile)changed).getMergeResource().getSyncElement();
- ICVSResource remote = (ICVSResource)syncElement.getRemote();
- MutableResourceSyncInfo info = remote.getSyncInfo().cloneMutable();
- info.setTimeStamp(null);
- info.setAdded();
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor((IFile)changed.getResource());
- cvsFile.setSyncInfo(info);
- }
-
- /**
- * Enabled for folders and files that aren't added.
- */
- protected boolean isEnabled(ITeamNode node) {
- try {
- CVSSyncSet set = new CVSSyncSet(new StructuredSelection(node));
- set.removeConflictingNodes();
- return set.hasNonAddedChanges();
- } catch (CVSException e) {
- CVSUIPlugin.log(e.getStatus());
- return false;
- }
- }
-
- /**
- * Remove all nodes that aren't files and folders that need to be added.
- */
- protected void removeNonApplicableNodes(SyncSet set, int syncMode) {
- set.removeIncomingNodes();
- set.removeConflictingNodes();
- ((CVSSyncSet)set).removeAddedChanges();
- }
- /**
- * @see MergeAction#getHelpContextID()
- */
- protected String getHelpContextID() {
- return IHelpContextIds.SYNC_ADD_ACTION;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSCatchupReleaseViewer.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSCatchupReleaseViewer.java
deleted file mode 100644
index 8350e2a42..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSCatchupReleaseViewer.java
+++ /dev/null
@@ -1,567 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.sync;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.structuremergeviewer.DiffContainer;
-import org.eclipse.compare.structuremergeviewer.DiffElement;
-import org.eclipse.compare.structuremergeviewer.DiffNode;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteResource;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.ILogEntry;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.CVSDecoration;
-import org.eclipse.team.internal.ccvs.ui.CVSDecorationRunnable;
-import org.eclipse.team.internal.ccvs.ui.CVSDecoratorConfiguration;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.HistoryView;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.OverlayIcon;
-import org.eclipse.team.internal.ccvs.ui.OverlayIconCache;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.merge.OverrideUpdateMergeAction;
-import org.eclipse.team.internal.ccvs.ui.merge.UpdateMergeAction;
-import org.eclipse.team.internal.ccvs.ui.merge.UpdateWithForcedJoinAction;
-import org.eclipse.team.internal.ui.sync.CatchupReleaseViewer;
-import org.eclipse.team.internal.ui.sync.ChangedTeamContainer;
-import org.eclipse.team.internal.ui.sync.ITeamNode;
-import org.eclipse.team.internal.ui.sync.MergeResource;
-import org.eclipse.team.internal.ui.sync.SyncView;
-import org.eclipse.team.internal.ui.sync.TeamFile;
-import org.eclipse.team.internal.ui.sync.UnchangedTeamContainer;
-import org.eclipse.team.ui.ISharedImages;
-import org.eclipse.team.ui.TeamImages;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-public class CVSCatchupReleaseViewer extends CatchupReleaseViewer {
- // Actions
- private UpdateSyncAction updateAction;
- private ForceUpdateSyncAction forceUpdateAction;
-
- private CommitSyncAction commitAction;
- private ForceCommitSyncAction forceCommitAction;
-
- private UpdateMergeAction updateMergeAction;
- private UpdateWithForcedJoinAction updateWithJoinAction;
- private OverrideUpdateMergeAction forceUpdateMergeAction;
-
- private IgnoreAction ignoreAction;
- private HistoryAction showInHistory;
-
- private Action confirmMerge;
- private AddSyncAction addAction;
-
- private Action selectAdditions;
-
- private static class DiffOverlayIcon extends OverlayIcon {
- private static final int HEIGHT = 16;
- private static final int WIDTH = 22;
- public DiffOverlayIcon(Image baseImage, ImageDescriptor[] overlays, int[] locations) {
- super(baseImage, overlays, locations, new Point(WIDTH, HEIGHT));
- }
- 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;
- }
- }
- }
- }
-
- private static class HistoryAction extends Action implements ISelectionChangedListener {
- IStructuredSelection selection;
- public HistoryAction(String label) {
- super(label);
- }
- public void run() {
- if (selection.isEmpty()) {
- return;
- }
- HistoryView view = HistoryView.openInActivePerspective();
- if (view == null) {
- return;
- }
- ITeamNode node = (ITeamNode)selection.getFirstElement();
- IRemoteSyncElement remoteSyncElement = ((TeamFile)node).getMergeResource().getSyncElement();
- ICVSRemoteFile remoteFile = (ICVSRemoteFile)remoteSyncElement.getRemote();
- IResource local = remoteSyncElement.getLocal();
- ICVSRemoteFile baseFile = (ICVSRemoteFile)remoteSyncElement.getBase();
-
- // can only show history if remote exists or local has a base.
- String currentRevision = null;
- try {
- currentRevision = baseFile != null ? baseFile.getRevision(): null;
- } catch(TeamException e) {
- CVSUIPlugin.log(e.getStatus());
- }
- if (remoteFile != null) {
- view.showHistory(remoteFile, currentRevision);
- } else if (baseFile != null) {
- view.showHistory(baseFile, currentRevision);
- }
- }
- public void selectionChanged(SelectionChangedEvent event) {
- ISelection selection = event.getSelection();
- if (!(selection instanceof IStructuredSelection)) {
- setEnabled(false);
- return;
- }
- IStructuredSelection ss = (IStructuredSelection)selection;
- if (ss.size() != 1) {
- setEnabled(false);
- return;
- }
- ITeamNode first = (ITeamNode)ss.getFirstElement();
- if (first instanceof TeamFile) {
- // can only show history on elements that have a remote file
- this.selection = ss;
- IRemoteSyncElement remoteSyncElement = ((TeamFile)first).getMergeResource().getSyncElement();
- if(remoteSyncElement.getRemote() != null || remoteSyncElement.getBase() != null) {
- setEnabled(true);
- } else {
- setEnabled(false);
- }
- } else {
- this.selection = null;
- setEnabled(false);
- }
- }
- }
-
- public CVSCatchupReleaseViewer(Composite parent, CVSSyncCompareInput model) {
- super(parent, model);
- initializeActions(model);
- initializeLabelProvider();
- // set F1 help
- WorkbenchHelp.setHelp(this.getControl(), IHelpContextIds.CATCHUP_RELEASE_VIEWER);
- }
-
- private void initializeLabelProvider() {
- final ImageDescriptor conflictDescriptor = CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_MERGEABLE_CONFLICT);
- final ImageDescriptor hasRemoteDescriptor = TeamImages.getImageDescriptor(ISharedImages.IMG_CHECKEDIN_OVR);
- final ImageDescriptor addedDescriptor = TeamImages.getImageDescriptor(ISharedImages.IMG_CHECKEDOUT_OVR);
- final LabelProvider oldProvider = (LabelProvider)getLabelProvider();
- setLabelProvider(new LabelProvider() {
- private OverlayIconCache iconCache = new OverlayIconCache();
-
- public void dispose() {
- iconCache.disposeAll();
- oldProvider.dispose();
- }
- public Image getImage(Object element) {
- Image image = oldProvider.getImage(element);
- if (element instanceof ITeamNode) {
- ITeamNode node = (ITeamNode)element;
- int kind = node.getKind();
- IResource resource = node.getResource();
-
- // use the default cvs image decorations
- if (resource.exists()) {
- CVSTeamProvider provider = (CVSTeamProvider)RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId());
- List overlays = new ArrayList();
- List locations = new ArrayList();
-
- CVSDecoration decoration = new CVSDecoration();
-
- CVSDecorationRunnable.computeLabelOverlaysFor(node.getResource(), decoration, false, provider);
- List stdOverlays = decoration.getOverlays();
- if (stdOverlays != null) {
- overlays.addAll(stdOverlays);
- int[] stdLocations = decoration.getLocations();
- for (int i = 0; i < stdLocations.length; i++) {
- locations.add(new Integer(stdLocations[i]));
- }
- }
- if ((kind & IRemoteSyncElement.AUTOMERGE_CONFLICT) != 0) {
- overlays.add(conflictDescriptor);
- locations.add(new Integer(OverlayIcon.TOP_LEFT));
- }
- if (!overlays.isEmpty()) {
- Integer[] integers = (Integer[])locations.toArray(new Integer[locations.size()]);
- int[] locs = new int[integers.length];
- for (int i = 0; i < integers.length; i++) {
- locs[i] = integers[i].intValue();
- }
- return iconCache.getImageFor(new DiffOverlayIcon(image,
- (ImageDescriptor[]) overlays.toArray(new ImageDescriptor[overlays.size()]),
- locs));
- } else {
- return image;
- }
- }
- }
- return image;
- }
- public String getText(Object element) {
- if (element instanceof ITeamNode) {
- ITeamNode node = (ITeamNode)element;
- IResource resource = node.getResource();
- if (resource.exists()) {
-
- // use the default text decoration preferences
- CVSDecoration decoration = CVSDecorationRunnable.computeTextLabelFor(resource, false /*don't show dirty*/);
- String format = decoration.getFormat();
- Map bindings = decoration.getBindings();
-
- // don't show the revision number, it will instead be shown in
- // the label for the remote/base/local files editors
- bindings.remove(CVSDecoratorConfiguration.FILE_REVISION);
-
- bindings.put(CVSDecoratorConfiguration.RESOURCE_NAME, oldProvider.getText(element));
- return CVSDecoratorConfiguration.bind(format, bindings);
- }
- }
- return oldProvider.getText(element);
- }
- });
- }
-
- protected void fillContextMenu(IMenuManager manager) {
- super.fillContextMenu(manager);
- if (showInHistory != null) {
- manager.add(showInHistory);
- }
- manager.add(new Separator());
- switch (getSyncMode()) {
- case SyncView.SYNC_INCOMING:
- updateAction.update(SyncView.SYNC_INCOMING);
- manager.add(updateAction);
- forceUpdateAction.update(SyncView.SYNC_INCOMING);
- manager.add(forceUpdateAction);
- manager.add(new Separator());
- manager.add(confirmMerge);
- break;
- case SyncView.SYNC_OUTGOING:
- addAction.update(SyncView.SYNC_OUTGOING);
- manager.add(addAction);
- commitAction.update(SyncView.SYNC_OUTGOING);
- manager.add(commitAction);
- forceCommitAction.update(SyncView.SYNC_OUTGOING);
- manager.add(forceCommitAction);
- ignoreAction.update();
- manager.add(ignoreAction);
- manager.add(new Separator());
- manager.add(confirmMerge);
- manager.add(selectAdditions);
- break;
- case SyncView.SYNC_BOTH:
- addAction.update(SyncView.SYNC_BOTH);
- manager.add(addAction);
- commitAction.update(SyncView.SYNC_BOTH);
- manager.add(commitAction);
- updateAction.update(SyncView.SYNC_BOTH);
- manager.add(updateAction);
- manager.add(new Separator());
- forceCommitAction.update(SyncView.SYNC_BOTH);
- manager.add(forceCommitAction);
- forceUpdateAction.update(SyncView.SYNC_BOTH);
- manager.add(forceUpdateAction);
- manager.add(new Separator());
- manager.add(confirmMerge);
- break;
- case SyncView.SYNC_MERGE:
- updateMergeAction.update(SyncView.SYNC_INCOMING);
- forceUpdateMergeAction.update(SyncView.SYNC_INCOMING);
- updateWithJoinAction.update(SyncView.SYNC_INCOMING);
- manager.add(updateMergeAction);
- manager.add(forceUpdateMergeAction);
- manager.add(updateWithJoinAction);
- break;
- }
- }
-
- /**
- * Creates the actions for this viewer.
- */
- private void initializeActions(final CVSSyncCompareInput diffModel) {
- Shell shell = getControl().getShell();
- commitAction = new CommitSyncAction(diffModel, this, Policy.bind("CVSCatchupReleaseViewer.commit"), shell); //$NON-NLS-1$
- forceCommitAction = new ForceCommitSyncAction(diffModel, this, Policy.bind("CVSCatchupReleaseViewer.forceCommit"), shell); //$NON-NLS-1$
- updateAction = new UpdateSyncAction(diffModel, this, Policy.bind("CVSCatchupReleaseViewer.update"), shell); //$NON-NLS-1$
- forceUpdateAction = new ForceUpdateSyncAction(diffModel, this, Policy.bind("CVSCatchupReleaseViewer.forceUpdate"), shell); //$NON-NLS-1$
- updateMergeAction = new UpdateMergeAction(diffModel, this, Policy.bind("CVSCatchupReleaseViewer.update"), shell); //$NON-NLS-1$
- ignoreAction = new IgnoreAction(diffModel, this, Policy.bind("CVSCatchupReleaseViewer.ignore"), shell); //$NON-NLS-1$
- updateWithJoinAction = new UpdateWithForcedJoinAction(diffModel, this, Policy.bind("CVSCatchupReleaseViewer.mergeUpdate"), shell); //$NON-NLS-1$
- forceUpdateMergeAction = new OverrideUpdateMergeAction(diffModel, this, Policy.bind("CVSCatchupReleaseViewer.forceUpdate"), shell); //$NON-NLS-1$
- addAction = new AddSyncAction(diffModel, this, Policy.bind("CVSCatchupReleaseViewer.addAction"), shell); //$NON-NLS-1$
-
- // Show in history view
- showInHistory = new HistoryAction(Policy.bind("CVSCatchupReleaseViewer.showInHistory")); //$NON-NLS-1$
- addSelectionChangedListener(showInHistory);
-
- selectAdditions = new Action(Policy.bind("CVSCatchupReleaseViewer.Select_&Outgoing_Additions_1"), null) { //$NON-NLS-1$
- public boolean isEnabled() {
- DiffNode node = diffModel.getDiffRoot();
- IDiffElement[] elements = node.getChildren();
- for (int i = 0; i < elements.length; i++) {
- IDiffElement element = elements[i];
- if (element instanceof ITeamNode) {
- CVSSyncSet set = new CVSSyncSet(new StructuredSelection(element));
- try {
- if (set.hasNonAddedChanges()) return true;
- } catch (CVSException e) {
- // Log the error and enable the menu item
- CVSUIPlugin.log(e.getStatus());
- return true;
- }
- } else {
- // unanticipated situation, just enable the action
- return true;
- }
- }
- return false;
- }
- public void run() {
- List additions = new ArrayList();
- DiffNode root = diffModel.getDiffRoot();
- visit(root, additions);
- setSelection(new StructuredSelection(additions));
- }
- private void visit(IDiffElement node, List additions) {
- try {
- if (node instanceof TeamFile) {
- TeamFile file = (TeamFile)node;
- if (file.getChangeDirection() == IRemoteSyncElement.OUTGOING) {
- if (file.getChangeType() == IRemoteSyncElement.ADDITION) {
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(file.getResource());
- if (cvsResource.isManaged()) return;
- additions.add(node);
- }
- }
- return;
- }
- if (node instanceof ChangedTeamContainer) {
- ChangedTeamContainer container = (ChangedTeamContainer)node;
- if (container.getChangeDirection() == IRemoteSyncElement.OUTGOING) {
- if (container.getChangeType() == IRemoteSyncElement.ADDITION) {
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(container.getResource());
- if (!((ICVSFolder)cvsResource).isCVSFolder()) {
- additions.add(node);
- }
- }
- }
-
- }
- if (node instanceof DiffContainer) {
- IDiffElement[] children = ((DiffContainer)node).getChildren();
- for (int i = 0; i < children.length; i++) {
- visit(children[i], additions);
- }
- }
- } catch (TeamException e) {
- CVSUIPlugin.log(e.getStatus());
- }
- }
- };
-
- // confirm merge
- confirmMerge = new Action(Policy.bind("CVSCatchupReleaseViewer.confirmMerge"), null) { //$NON-NLS-1$
- public void run() {
- ISelection s = getSelection();
- if (!(s instanceof IStructuredSelection) || s.isEmpty()) {
- return;
- }
- List needsMerge = new ArrayList();
- for (Iterator it = ((IStructuredSelection)s).iterator(); it.hasNext();) {
- final Object element = it.next();
- if(element instanceof DiffElement) {
- mergeRecursive((IDiffElement)element, needsMerge);
- }
- }
- TeamFile[] files = (TeamFile[]) needsMerge.toArray(new TeamFile[needsMerge.size()]);
- if(files.length != 0) {
- try {
- for (int i = 0; i < files.length; i++) {
- TeamFile teamFile = (TeamFile)files[i];
- CVSUIPlugin.getPlugin().getRepositoryManager().merged(new IRemoteSyncElement[] {teamFile.getMergeResource().getSyncElement()});
- teamFile.merged();
- }
- } catch(TeamException e) {
- ErrorDialog.openError(getControl().getShell(), null, null, e.getStatus());
- }
- }
- refresh();
- diffModel.updateStatusLine();
- }
-
- public boolean isEnabled() {
- ISelection s = getSelection();
- if (!(s instanceof IStructuredSelection) || s.isEmpty()) {
- return false;
- }
- for (Iterator it = ((IStructuredSelection)s).iterator(); it.hasNext();) {
- Object element = (Object) it.next();
- if(element instanceof TeamFile) {
- TeamFile file = (TeamFile)element;
- if(file.hasBeenSaved()) {
- int direction = file.getChangeDirection();
- int type = file.getChangeType();
- if(direction == IRemoteSyncElement.INCOMING ||
- direction == IRemoteSyncElement.CONFLICTING) {
- continue;
- }
- }
- }
- return false;
- }
- return true;
- }
- };
- }
-
- protected void mergeRecursive(IDiffElement element, List needsMerge) {
- if (element instanceof DiffContainer) {
- DiffContainer container = (DiffContainer)element;
- IDiffElement[] children = container.getChildren();
- for (int i = 0; i < children.length; i++) {
- mergeRecursive(children[i], needsMerge);
- }
- } else if (element instanceof TeamFile) {
- TeamFile file = (TeamFile)element;
- needsMerge.add(file);
- }
- }
-
- /**
- * Provide CVS-specific labels for the editors.
- */
- protected void updateLabels(MergeResource resource) {
- CompareConfiguration config = getCompareConfiguration();
- String name = resource.getName();
- config.setLeftLabel(Policy.bind("CVSCatchupReleaseViewer.workspaceFile", name)); //$NON-NLS-1$
-
- IRemoteSyncElement syncTree = resource.getSyncElement();
- IRemoteResource remote = syncTree.getRemote();
- if (remote != null) {
- try {
- final ICVSRemoteFile remoteFile = (ICVSRemoteFile)remote;
- String revision = remoteFile.getRevision();
- final String[] author = new String[] { "" }; //$NON-NLS-1$
- try {
- CVSUIPlugin.runWithProgress(getTree().getShell(), true /*cancelable*/,
- new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- ILogEntry logEntry = remoteFile.getLogEntry(monitor);
- author[0] = logEntry.getAuthor();
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InterruptedException e) { // ignore cancellation
- } catch (InvocationTargetException e) {
- Throwable t = e.getTargetException();
- if (t instanceof TeamException) {
- throw (TeamException) t;
- }
- // should not get here
- }
- config.setRightLabel(Policy.bind("CVSCatchupReleaseViewer.repositoryFileRevision", new Object[] {name, revision, author[0]})); //$NON-NLS-1$
- } catch (TeamException e) {
- ErrorDialog.openError(getControl().getShell(), null, null, e.getStatus());
- config.setRightLabel(Policy.bind("CVSCatchupReleaseViewer.repositoryFile", name)); //$NON-NLS-1$
- }
- } else {
- config.setRightLabel(Policy.bind("CVSCatchupReleaseViewer.noRepositoryFile")); //$NON-NLS-1$
- }
-
- IRemoteResource base = syncTree.getBase();
- if (base != null) {
- try {
- String revision = ((ICVSRemoteFile)base).getRevision();
- config.setAncestorLabel(Policy.bind("CVSCatchupReleaseViewer.commonFileRevision", new Object[] {name, revision} )); //$NON-NLS-1$
- } catch (TeamException e) {
- ErrorDialog.openError(getControl().getShell(), null, null, e.getStatus());
- config.setRightLabel(Policy.bind("CVSCatchupReleaseViewer.commonFile", name)); //$NON-NLS-1$
- }
- } else {
- config.setAncestorLabel(Policy.bind("CVSCatchupReleaseViewer.noCommonFile")); //$NON-NLS-1$
- }
-
- IResource local = syncTree.getLocal();
- if (local != null) {
- if (!local.exists()) {
- config.setLeftLabel(Policy.bind("CVSCatchupReleaseViewer.No_workspace_file_1")); //$NON-NLS-1$
- } else {
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor((IFile)local);
- ResourceSyncInfo info = null;
- try {
- info = cvsFile.getSyncInfo();
- name = local.getName();
- String revision = null;
- if (info != null) {
- revision = info.getRevision();
- if (info.isAdded() || info.isDeleted()) {
- revision = null;
- }
- }
- if (revision != null) {
- config.setLeftLabel(Policy.bind("CVSCatchupReleaseViewer.commonFileRevision", name, revision)); //$NON-NLS-1$
- } else {
- config.setLeftLabel(Policy.bind("CVSCatchupReleaseViewer.commonFile", name)); //$NON-NLS-1$
- }
- } catch (CVSException e) {
- ErrorDialog.openError(getControl().getShell(), null, null, e.getStatus());
- config.setLeftLabel(Policy.bind("CVSCatchupReleaseViewer.commonFile", name)); //$NON-NLS-1$
- }
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSSyncCompareUnsharedInput.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSSyncCompareUnsharedInput.java
deleted file mode 100644
index 4698e911f..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSSyncCompareUnsharedInput.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.sync;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-
-public class CVSSyncCompareUnsharedInput extends CVSSyncCompareInput {
-
- private ICVSRepositoryLocation location;
- private String moduleName;
- private CVSTag tag;
-
- public CVSSyncCompareUnsharedInput(IProject project, ICVSRepositoryLocation location, String moduleName, CVSTag tag) {
- super(new IResource[] { project });
- this.location = location;
- this.moduleName = moduleName;
- this.tag = tag;
- }
-
- protected IRemoteSyncElement[] createSyncElements(IProgressMonitor monitor) throws TeamException {
- IResource[] resources = getResources();
- IRemoteSyncElement[] trees = new IRemoteSyncElement[resources.length];
- int work = 1000 * resources.length;
- monitor.beginTask(null, work);
- try {
- for (int i = 0; i < trees.length; i++) {
- trees[i] = CVSWorkspaceRoot.getRemoteSyncTree((IProject)resources[i], location, moduleName, tag, Policy.subMonitorFor(monitor, 1000));
- }
- } finally {
- monitor.done();
- }
- return trees;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSSyncSet.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSSyncSet.java
deleted file mode 100644
index aa6be31df..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSSyncSet.java
+++ /dev/null
@@ -1,182 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.sync;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ui.sync.ITeamNode;
-import org.eclipse.team.internal.ui.sync.SyncSet;
-
-/**
- * This class contains a set of CVS resources that are slated to be
- * synchronized. This adds CVS specific handling to the common sync set
- * class, specifically to deal with non-added outgoing changes.
- */
-public class CVSSyncSet extends SyncSet {
-
- /**
- * Creates a new sync set on the nodes in the given selection.
- */
- public CVSSyncSet(IStructuredSelection nodeSelection) {
- super(nodeSelection);
- }
-
- public ITeamNode[] getNonAddedNodes() throws CVSException {
- List result = new ArrayList();
- for (Iterator it = getSyncSet().iterator(); it.hasNext();) {
- ITeamNode node = (ITeamNode)it.next();
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(node.getResource());
- if (cvsResource.isFolder()) {
- if (!((ICVSFolder)cvsResource).isCVSFolder()) {
- result.add(node);
- }
- } else if (!cvsResource.isManaged()) {
- result.add(node);
- }
- }
- return (ITeamNode[])result.toArray(new ITeamNode[result.size()]);
- }
-
- public boolean hasNonAddedChanges() throws CVSException {
- for (Iterator it = getSyncSet().iterator(); it.hasNext();) {
- ITeamNode node = (ITeamNode)it.next();
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(node.getResource());
- if (cvsResource.exists()) {
- if (cvsResource.isFolder()) {
- if (!((ICVSFolder)cvsResource).isCVSFolder()) {
- return true;
- }
- } else if (!cvsResource.isManaged()) {
- return true;
- }
- }
- }
- return false;
- }
-
- public boolean removeNonAddedChanges() {
- for (Iterator it = getSyncSet().iterator(); it.hasNext();) {
- try {
- ITeamNode node = (ITeamNode)it.next();
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(node.getResource());
- if (cvsResource.exists()) {
- if(cvsResource.isFolder()) {
- if(!((ICVSFolder)cvsResource).isCVSFolder()) {
- it.remove();
- }
- } else {
- if(!cvsResource.isManaged()) {
- it.remove();
- }
- }
- }
- } catch (CVSException e) {
- // isManaged or isCVSFolder threw an exception
- // Log it and continue
- CVSUIPlugin.log(e.getStatus());
- }
- }
- return false;
- }
-
- public boolean removeAddedChanges() {
- for (Iterator it = getSyncSet().iterator(); it.hasNext();) {
- try {
- ITeamNode node = (ITeamNode)it.next();
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(node.getResource());
- if(cvsResource.isFolder()) {
- if(((ICVSFolder)cvsResource).isCVSFolder()) {
- it.remove();
- }
- } else {
- if(cvsResource.isManaged()) {
- it.remove();
- }
- }
- } catch (CVSException e) {
- // isManaged or isCVSFolder threw an exception
- // Log it and continue
- CVSUIPlugin.log(e.getStatus());
- }
- }
- return false;
- }
-
- /**
- * Returns a message for the status line describing this sync set.
- *
- * Override the method in SyncSet to add information about new resources
- */
- public String getStatusLineMessage() {
- int incoming = 0;
- int outgoing = 0;
- int conflicts = 0;
- int newResources = 0;
- ITeamNode[] nodes = getChangedNodes();
- for (int i = 0; i < nodes.length; i++) {
- ITeamNode next = nodes[i];
- switch (next.getChangeDirection()) {
- case IRemoteSyncElement.INCOMING:
- incoming++;
- break;
- case IRemoteSyncElement.OUTGOING:
- outgoing++;
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(next.getResource());
- try {
- if (cvsResource.exists()) {
- if (cvsResource.isFolder()) {
- if (!((ICVSFolder)cvsResource).isCVSFolder()) {
- newResources++;
- }
- } else if (!cvsResource.isManaged()) {
- newResources++;
- }
- }
- } catch (CVSException e) {
- CVSUIPlugin.log(e.getStatus());
- }
- break;
- case IRemoteSyncElement.CONFLICTING:
- conflicts++;
- break;
- }
- }
- StringBuffer result = new StringBuffer();
-
- if (conflicts == 0) {
- result.append(Policy.bind("CVSSyncSet.noConflicts")); //$NON-NLS-1$
- } else {
- result.append(Policy.bind("CVSSyncSet.conflicts", new Object[] {Integer.toString(conflicts)} )); //$NON-NLS-1$
- }
- if (incoming == 0) {
- result.append(Policy.bind("CVSSyncSet.noIncomings")); //$NON-NLS-1$
- } else {
- result.append(Policy.bind("CVSSyncSet.incomings", new Object[] {Integer.toString(incoming)} )); //$NON-NLS-1$
- }
- if (outgoing == 0) {
- result.append(Policy.bind("CVSSyncSet.noOutgoings")); //$NON-NLS-1$
- } else {
- result.append(Policy.bind("CVSSyncSet.outgoings", new Object[] {Integer.toString(outgoing)} )); //$NON-NLS-1$
- }
- if (newResources == 0) {
- result.append(Policy.bind("CVSSyncSet.noNew")); //$NON-NLS-1$
- } else {
- result.append(Policy.bind("CVSSyncSet.new", new Object[] {Integer.toString(newResources)} )); //$NON-NLS-1$
- }
-
- return result.toString();
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CommitSyncAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CommitSyncAction.java
deleted file mode 100644
index b83b873f4..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CommitSyncAction.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.team.internal.ccvs.ui.sync;
-
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ui.sync.ITeamNode;
-import org.eclipse.team.internal.ui.sync.SyncSet;
-
-/**
- * Override ForceCommitSyncAction to only work on outgoing nodes
- */
-public class CommitSyncAction extends ForceCommitSyncAction {
- public CommitSyncAction(CVSSyncCompareInput model, ISelectionProvider sp, String label, Shell shell) {
- super(model, sp, label, shell);
- }
-
- protected boolean isEnabled(ITeamNode node) {
- // The commit action is enabled only for non-conflicting outgoing changes
- CVSSyncSet set = new CVSSyncSet(new StructuredSelection(node));
- return set.hasOutgoingChanges();
- }
-
- protected void removeNonApplicableNodes(SyncSet set, int syncMode) {
- set.removeConflictingNodes();
- set.removeIncomingNodes();
- }
- /**
- * @see MergeAction#getHelpContextID()
- */
- protected String getHelpContextID() {
- return IHelpContextIds.SYNC_COMMIT_ACTION;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/ForceCommitSyncAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/ForceCommitSyncAction.java
deleted file mode 100644
index 49ed1bcac..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/ForceCommitSyncAction.java
+++ /dev/null
@@ -1,364 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.team.internal.ccvs.ui.sync;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.Vector;
-
-import org.eclipse.compare.structuremergeviewer.Differencer;
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.resources.CVSRemoteSyncElement;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.RepositoryManager;
-import org.eclipse.team.internal.ui.sync.ChangedTeamContainer;
-import org.eclipse.team.internal.ui.sync.ITeamNode;
-import org.eclipse.team.internal.ui.sync.SyncSet;
-import org.eclipse.team.internal.ui.sync.SyncView;
-import org.eclipse.team.internal.ui.sync.TeamFile;
-
-public class ForceCommitSyncAction extends MergeAction {
- public ForceCommitSyncAction(CVSSyncCompareInput model, ISelectionProvider sp, String label, Shell shell) {
- super(model, sp, label, shell);
- }
-
- protected SyncSet run(SyncSet syncSet, IProgressMonitor monitor) {
- boolean result = saveIfNecessary();
- if (!result) return null;
-
- // If there is a conflict in the syncSet, we need to prompt the user before proceeding.
- if (syncSet.hasConflicts() || syncSet.hasIncomingChanges()) {
- switch (promptForConflicts(syncSet)) {
- case 0:
- // Yes, synchronize conflicts as well
- break;
- case 1:
- // No, only synchronize non-conflicting changes.
- syncSet.removeConflictingNodes();
- syncSet.removeIncomingNodes();
- break;
- case 2:
- default:
- // Cancel
- return null;
- }
- }
- ITeamNode[] changed = syncSet.getChangedNodes();
- if (changed.length == 0) {
- return syncSet;
- }
-
- if (syncSet instanceof CVSSyncSet) {
- CVSSyncSet cvsSyncSet = (CVSSyncSet)syncSet;
- try {
- if (cvsSyncSet.hasNonAddedChanges()) {
- final int[] r = new int[1];
- getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- MessageDialog dialog = new MessageDialog(
- getShell(),
- Policy.bind("ForceCommitSyncAction.Outgoing_Changes_Not_Added_1"), //$NON-NLS-1$
- null,
- Policy.bind("ForceCommitSyncAction.You_have_chosen_to_commit_new_resources_which_have_not_been_added_to_version_control._Do_you_wish_to_add_them_to_version_control_now__2"), //$NON-NLS-1$
- MessageDialog.QUESTION,
- new String[] {IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL},
- 0);
- r[0] = dialog.open();
- }
- });
- switch (r[0]) {
- case 0: // yes
- break;
- case 1: // no
- cvsSyncSet.removeNonAddedChanges();
- changed = syncSet.getChangedNodes();
- if (changed.length == 0) {
- return syncSet;
- }
- break;
- case 2: // cancel
- return null;
- }
- }
- } catch (CVSException e) {
- CVSUIPlugin.log(e.getStatus());
- }
- }
- List commits = new ArrayList();
- List additions = new ArrayList();
- List deletions = new ArrayList();
- List toMerge = new ArrayList();
- List incoming = new ArrayList();
-
- // A list of diff elements in the sync set which are incoming folder additions
- List parentCreationElements = new ArrayList();
- // A list of diff elements in the sync set which are folder conflicts
- List parentConflictElements = new ArrayList();
-
- for (int i = 0; i < changed.length; i++) {
- int kind = changed[i].getKind();
- IResource resource = changed[i].getResource();
- if (resource.getType() == resource.FILE) {
- commits.add(resource);
- }
- IDiffContainer parent = changed[i].getParent();
- if (parent != null) {
- int parentKind = changed[i].getParent().getKind();
- if (((parentKind & Differencer.CHANGE_TYPE_MASK) == Differencer.ADDITION) &&
- ((parentKind & Differencer.DIRECTION_MASK) == ITeamNode.INCOMING)) {
- parentCreationElements.add(parent);
- } else if ((parentKind & Differencer.DIRECTION_MASK) == ITeamNode.CONFLICTING) {
- parentConflictElements.add(parent);
- }
- }
- switch (kind & Differencer.DIRECTION_MASK) {
- case ITeamNode.INCOMING:
- // Incoming change. Make it outgoing before committing.
- incoming.add(changed[i]);
- break;
- case ITeamNode.OUTGOING:
- switch (kind & Differencer.CHANGE_TYPE_MASK) {
- case Differencer.ADDITION:
- // Outgoing addition. 'add' it before committing.
- additions.add(resource);
- break;
- case Differencer.DELETION:
- // Outgoing deletion. 'delete' it before committing.
- deletions.add(resource);
- break;
- case Differencer.CHANGE:
- // Outgoing change. Just commit it.
- break;
- }
- break;
- case ITeamNode.CONFLICTING:
- if (changed[i] instanceof TeamFile) {
- toMerge.add(((TeamFile)changed[i]).getMergeResource().getSyncElement());
- }
- break;
- }
- }
- try {
- RepositoryManager manager = CVSUIPlugin.getPlugin().getRepositoryManager();
- String comment = promptForComment(manager);
- if (comment == null) {
- // User cancelled. Remove the nodes from the sync set.
- return null;
- }
- if (parentCreationElements.size() > 0) {
- // If a node has a parent that is an incoming folder creation, we have to
- // create that folder locally and set its sync info before we can get the
- // node itself. We must do this for all incoming folder creations (recursively)
- // in the case where there are multiple levels of incoming folder creations.
- Iterator it = parentCreationElements.iterator();
- while (it.hasNext()) {
- makeInSync((IDiffElement)it.next());
- }
- }
- if (parentConflictElements.size() > 0) {
- // If a node has a parent that is a folder conflict, that means that the folder
- // exists locally but has no sync info. In order to get the node, we have to
- // create the sync info for the folder (and any applicable parents) before we
- // get the node itself.
- Iterator it = parentConflictElements.iterator();
- while (it.hasNext()) {
- makeInSync((IDiffElement)it.next());
- }
- }
-
- // Handle any real incomming deletions by unmanaging them before adding
- Iterator it = incoming.iterator();
- Set incomingDeletions = new HashSet(incoming.size());
- while (it.hasNext()) {
- ITeamNode node = (ITeamNode)it.next();
- collectIncomingDeletions(node, incomingDeletions, monitor);
- if ((node instanceof TeamFile) && !additions.contains(node)) {
- CVSRemoteSyncElement element = (CVSRemoteSyncElement)((TeamFile)node).getMergeResource().getSyncElement();
- element.makeOutgoing(monitor);
- }
- }
- it = incomingDeletions.iterator();
- while (it.hasNext()) {
- ITeamNode node = (ITeamNode)it.next();
- CVSRemoteSyncElement syncElement;
- if (node instanceof TeamFile) {
- syncElement = (CVSRemoteSyncElement)((TeamFile)node).getMergeResource().getSyncElement();
- } else {
- syncElement = (CVSRemoteSyncElement)((ChangedTeamContainer)node).getMergeResource().getSyncElement();
- }
- additions.add(syncElement.getLocal());
- CVSWorkspaceRoot.getCVSResourceFor(syncElement.getLocal()).unmanage(null);
- }
-
- if (additions.size() != 0) {
- manager.add((IResource[])additions.toArray(new IResource[0]), monitor);
- }
- if (deletions.size() != 0) {
- manager.delete((IResource[])deletions.toArray(new IResource[0]), monitor);
- }
- if (toMerge.size() != 0) {
- manager.merged((IRemoteSyncElement[])toMerge.toArray(new IRemoteSyncElement[0]));
- }
- manager.commit((IResource[])commits.toArray(new IResource[commits.size()]), comment, monitor);
-
- // Reset the timestamps for any files that were not committed
- // because their contents match that of the server
- for (Iterator iter = commits.iterator(); iter.hasNext(); ) {
- IResource resource = (IResource)iter.next();
- if (resource.getType() == IResource.FILE) {
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor((IFile)resource);
- // If the file is still modified after the commit, it probably is a pseudo change
- if (cvsFile.exists() && cvsFile.isModified()) {
- cvsFile.setTimeStamp(cvsFile.getSyncInfo().getTimeStamp());
- }
- }
- }
-
- } catch (final TeamException e) {
- getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- ErrorDialog.openError(getShell(), null, null, e.getStatus());
- }
- });
- return null;
- }
-
- return syncSet;
- }
-
- protected boolean isEnabled(ITeamNode node) {
- // The force commit action is enabled only for conflicting and incoming changes
- CVSSyncSet set = new CVSSyncSet(new StructuredSelection(node));
- if (syncMode == SyncView.SYNC_OUTGOING) {
- return (set.hasConflicts() && hasRealChanges(node, new int[] { ITeamNode.CONFLICTING }));
- } else {
- return ((set.hasIncomingChanges() || set.hasConflicts()) && hasRealChanges(node, new int[] { ITeamNode.CONFLICTING, ITeamNode.INCOMING }));
- }
- }
-
- /**
- * Prompts the user to determine how conflicting changes should be handled.
- * Note: This method is designed to be overridden by test cases.
- * @return 0 to sync conflicts, 1 to sync all non-conflicts, 2 to cancel
- */
- protected int promptForConflicts(SyncSet syncSet) {
- String[] buttons = new String[] {IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL};
- String question = Policy.bind("CommitSyncAction.questionRelease"); //$NON-NLS-1$
- String title = Policy.bind("CommitSyncAction.titleRelease"); //$NON-NLS-1$
- String[] tips = new String[] {
- Policy.bind("CommitSyncAction.releaseAll"), //$NON-NLS-1$
- Policy.bind("CommitSyncAction.releasePart"), //$NON-NLS-1$
- Policy.bind("CommitSyncAction.cancelRelease") //$NON-NLS-1$
- };
- Shell shell = getShell();
- final ToolTipMessageDialog dialog = new ToolTipMessageDialog(shell, title, null, question, MessageDialog.QUESTION, buttons, tips, 0);
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- dialog.open();
- }
- });
- return dialog.getReturnCode();
- }
-
- /**
- * Prompts the user for a release comment.
- * Note: This method is designed to be overridden by test cases.
- * @return the comment, or null to cancel
- */
- protected String promptForComment(RepositoryManager manager) {
- return manager.promptForComment(getShell());
- }
-
- protected void removeNonApplicableNodes(SyncSet set, int syncMode) {
- set.removeOutgoingNodes();
- if (syncMode != SyncView.SYNC_BOTH) {
- set.removeIncomingNodes();
- }
- }
-
- /*
- * Handle incoming folder deletion.
- *
- * Special handling is required in the case were a folder has been deleted remotely
- * (i.e using "rm -rf" on the server).
- *
- * We need to determine if there is a remote folder corresponding to this folder
- * If there isn't, we need to unmanage the local resource and then add the folder
- * Unfortunately, unmanaging may effect the state of the children which are also incoming deletions
- */
- private void collectIncomingDeletions(ITeamNode node, Set additions, IProgressMonitor monitor) throws TeamException {
- if (isIncomingDeletion(node) && ! additions.contains(node) && ! existsRemotely(node, monitor)) {
-
- // Make sure that the parent is handled
- IDiffContainer parent = node.getParent();
- if (isIncomingDeletion((ITeamNode)parent)) {
- collectIncomingDeletions((ITeamNode)parent, additions, monitor);
- }
-
- // Add the node to the list
- additions.add(node);
- }
- }
-
- private boolean isIncomingDeletion(ITeamNode node) {
- return (node.getChangeDirection() == ITeamNode.INCOMING && node.getChangeType() == Differencer.DELETION);
- }
-
- /*
- * For files, use the remote of the sync element to determine whether there is a remote or not.
- * For folders, if there is no remote in the tree check remotely in case the folder was pruned
- */
- private boolean existsRemotely(ITeamNode node, IProgressMonitor monitor) throws TeamException {
-
- CVSRemoteSyncElement syncElement;
- if (node instanceof TeamFile) {
- syncElement = (CVSRemoteSyncElement)((TeamFile)node).getMergeResource().getSyncElement();
- } else {
- syncElement = (CVSRemoteSyncElement)((ChangedTeamContainer)node).getMergeResource().getSyncElement();
- }
- if (syncElement.getRemote() != null) {
- return true;
- }
- if (syncElement.getLocal().getType() == IResource.FILE) {
- return false;
- }
- return CVSWorkspaceRoot.getRemoteResourceFor(syncElement.getLocal()).exists(monitor);
- }
- /**
- * @see MergeAction#getHelpContextID()
- */
- protected String getHelpContextID() {
- return IHelpContextIds.SYNC_FORCED_COMMIT_ACTION;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/ForceUpdateSyncAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/ForceUpdateSyncAction.java
deleted file mode 100644
index 83cfa68bf..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/ForceUpdateSyncAction.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.sync;
-
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ui.sync.ITeamNode;
-import org.eclipse.team.internal.ui.sync.SyncSet;
-import org.eclipse.team.internal.ui.sync.SyncView;
-
-public class ForceUpdateSyncAction extends UpdateSyncAction {
-
- public ForceUpdateSyncAction(CVSSyncCompareInput model, ISelectionProvider sp, String label, Shell shell) {
- super(model, sp, label, shell);
- }
-
- protected boolean isEnabled(ITeamNode node) {
- // The force update action is enabled only for conflicting and outgoing changes
- SyncSet set = new SyncSet(new StructuredSelection(node));
- if (syncMode == SyncView.SYNC_INCOMING) {
- return (set.hasConflicts() && hasRealChanges(node, new int[] { ITeamNode.CONFLICTING }));
- } else {
- return ((set.hasOutgoingChanges() || set.hasConflicts()) && hasRealChanges(node, new int[] { ITeamNode.CONFLICTING, ITeamNode.OUTGOING }));
- }
- }
-
- protected void removeNonApplicableNodes(SyncSet set, int syncMode) {
- set.removeIncomingNodes();
- if (syncMode != SyncView.SYNC_BOTH) {
- set.removeOutgoingNodes();
- }
- }
- protected boolean promptForConflicts() {
- return true;
- }
- /**
- * @see MergeAction#getHelpContextID()
- */
- protected String getHelpContextID() {
- return IHelpContextIds.SYNC_FORCED_UPDATE_ACTION;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/IgnoreAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/IgnoreAction.java
deleted file mode 100644
index ce086ab9f..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/IgnoreAction.java
+++ /dev/null
@@ -1,131 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.sync;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.compare.structuremergeviewer.DiffContainer;
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.IgnoreResourcesDialog;
-import org.eclipse.team.internal.ui.sync.ChangedTeamContainer;
-import org.eclipse.team.internal.ui.sync.ITeamNode;
-import org.eclipse.team.internal.ui.sync.MergeResource;
-import org.eclipse.team.internal.ui.sync.SyncSet;
-import org.eclipse.team.internal.ui.sync.TeamFile;
-import org.eclipse.team.internal.ui.sync.UnchangedTeamContainer;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-public class IgnoreAction extends Action {
- Shell shell;
- private CVSSyncCompareInput diffModel;
- private ISelectionProvider selectionProvider;
-
- public IgnoreAction(CVSSyncCompareInput model, ISelectionProvider sp, String label, Shell shell) {
- super(label);
- this.shell = shell;
- this.diffModel = model;
- this.selectionProvider = sp;
- WorkbenchHelp.setHelp(this, IHelpContextIds.SYNC_IGNORE_ACTION);
- }
- public void run() {
- IStructuredSelection selection = (IStructuredSelection)selectionProvider.getSelection();
- if (selection.isEmpty()) return;
- // Do the update
- Object first = selection.getFirstElement();
- ICVSResource cvsResource = null;
- IResource resource = null;
- if (first instanceof TeamFile) {
- resource = ((TeamFile)first).getMergeResource().getResource();
- cvsResource = CVSWorkspaceRoot.getCVSFileFor((IFile) resource);
- } else if (first instanceof ChangedTeamContainer) {
- resource = ((ChangedTeamContainer)first).getMergeResource().getResource();
- cvsResource = CVSWorkspaceRoot.getCVSFolderFor((IContainer) resource);
- }
- if (resource != null) {
- try {
- IgnoreResourcesDialog dialog = new IgnoreResourcesDialog(shell, new IResource[] {resource});
- if (dialog.open() != IgnoreResourcesDialog.OK) return;
- String pattern = dialog.getIgnorePatternFor(resource);
- cvsResource.setIgnoredAs(pattern);
- } catch (CVSException e) {
- ErrorDialog.openError(shell, null, null, e.getStatus());
- return;
- }
- removeNodes(new SyncSet(selection).getChangedNodes());
- diffModel.refresh();
- }
- }
- /**
- * Enabled if only one item is selected and it is an outgoing addition.
- *
- * This may be a folder or a single file, which will be handled differently.
- */
- protected boolean isEnabled(Object[] nodes) {
- if (nodes.length != 1) return false;
- if (!(nodes[0] instanceof ITeamNode)) return false;
- ITeamNode node = (ITeamNode)nodes[0];
- if (node.getKind() != (ITeamNode.OUTGOING | IRemoteSyncElement.ADDITION)) return false;
- IResource resource = node.getResource();
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- try {
- if (cvsResource.isManaged()) return false;
- if (cvsResource.isIgnored()) return false;
- } catch (CVSException e) {
- CVSUIPlugin.log(e.getStatus());
- return false;
- }
- return true;
- }
- public void update() {
- IStructuredSelection selection = (IStructuredSelection)selectionProvider.getSelection();
- setEnabled(isEnabled(selection.toArray()));
- }
- /**
- * The given nodes have been synchronized. Remove them from
- * the sync set.
- */
- private void removeNodes(final ITeamNode[] nodes) {
- // Update the model
- for (int i = 0; i < nodes.length; i++) {
- if (nodes[i].getClass() == UnchangedTeamContainer.class) {
- // Unchanged containers get removed automatically when all
- // children are removed
- continue;
- }
- if (nodes[i].getClass() == ChangedTeamContainer.class) {
- // If this node still has children, convert to an
- // unchanged container, then it will disappear when
- // all children have been removed.
- ChangedTeamContainer container = (ChangedTeamContainer)nodes[i];
- IDiffElement[] children = container.getChildren();
- if (children.length > 0) {
- IDiffContainer parent = container.getParent();
- UnchangedTeamContainer unchanged = new UnchangedTeamContainer(parent, container.getResource());
- for (int j = 0; j < children.length; j++) {
- unchanged.add(children[j]);
- }
- parent.removeToRoot(container);
- continue;
- }
- // No children, it will get removed below.
- }
- nodes[i].getParent().removeToRoot(nodes[i]);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/MergeAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/MergeAction.java
deleted file mode 100644
index b0ee0ba5e..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/MergeAction.java
+++ /dev/null
@@ -1,362 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.sync;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.structuremergeviewer.Differencer;
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.resources.CVSRemoteSyncElement;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ui.sync.ChangedTeamContainer;
-import org.eclipse.team.internal.ui.sync.ITeamNode;
-import org.eclipse.team.internal.ui.sync.SyncSet;
-import org.eclipse.team.internal.ui.sync.UnchangedTeamContainer;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * Applies merge related actions to the selected ITeamNodes.
- */
-abstract class MergeAction extends Action {
- public static final int CHECKIN = 0;
- public static final int GET = 1;
- public static final int DELETE_REMOTE = 2;
- public static final int DELETE_LOCAL = 3;
-
- private CVSSyncCompareInput diffModel;
- private ISelectionProvider selectionProvider;
-
- protected int syncMode;
- private Shell shell;
-
- /**
- * Creates a MergeAction which works on selection and doesn't commit changes.
- */
- public MergeAction(CVSSyncCompareInput model, ISelectionProvider sp, String label, Shell shell) {
- super(label);
- this.diffModel = model;
- this.selectionProvider = sp;
- this.shell = shell;
- String helpContextId = getHelpContextID();
- if (helpContextId != null) {
- WorkbenchHelp.setHelp(this, helpContextId);
- }
- }
-
- /**
- * Method getHelpContextID.
- * @return String
- */
- protected String getHelpContextID() {
- return null;
- }
-
- protected Shell getShell() {
- return shell;
- }
-
- protected CVSSyncCompareInput getDiffModel() {
- return diffModel;
- }
-
- /**
- * Returns true if at least one node can perform the specified action.
- */
- private boolean isEnabled(Object[] nodes) {
- for (int i = 0; i < nodes.length; i++) {
- if (nodes[i] instanceof ITeamNode) {
- ITeamNode node = (ITeamNode)nodes[i];
- if (isEnabled(node)) {
- return true;
- }
- } else {
- if (nodes[i] instanceof IDiffContainer)
- if (isEnabled(((IDiffContainer)nodes[i]).getChildren()))
- return true;
- }
- }
- return false;
- }
-
- protected abstract boolean isEnabled(ITeamNode node);
-
- /**
- * Perform the sychronization operation.
- */
- public void run() {
- ISelection s = selectionProvider.getSelection();
- if (!(s instanceof IStructuredSelection) || s.isEmpty()) {
- return;
- }
- final SyncSet set = new CVSSyncSet((IStructuredSelection)s);
- removeNonApplicableNodes(set, syncMode);
- final SyncSet[] result = new SyncSet[1];
- WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- result[0] = MergeAction.this.run(set, monitor);
- }
- };
- try {
- run(op, Policy.bind("MergeAction.problemsDuringSync")); //$NON-NLS-1$
- } catch (InterruptedException e) {
- }
- if (result[0] != null) {
- // all returned nodes that have a changed sync kind are assumed
- // to have been operated on and will be removed from the diff tree.
- removeNodes(result[0].getChangedNodes());
-
- // any node that claims that it's IN_SYNC will be automatically
- // filtered from the diff tree - see DiffElement.setKind().
- diffModel.updateView();
- }
- }
-
- protected abstract void removeNonApplicableNodes(SyncSet set, int syncMode);
-
- /**
- * The given nodes have been synchronized. Remove them from
- * the sync set.
- *
- * For folders that are outgoing deletions, we may need to leave the
- * folder as is or adjust the sync kind depending on the sync kind of
- * the folder's children.
- *
- * @see CVSSyncCompareInput#collectResourceChanges(IDiffContainer, IRemoteSyncElement, IProgressMonitor)
- */
- private void removeNodes(final ITeamNode[] nodes) {
- // Update the model
- Set outgoingFolderDeletions = new HashSet();
- for (int i = 0; i < nodes.length; i++) {
- if (nodes[i].getClass() == UnchangedTeamContainer.class) {
- // Unchanged containers get removed automatically when all
- // children are removed
- continue;
- }
- if (nodes[i].getClass() == ChangedTeamContainer.class) {
- // If this node still has children, convert to an
- // unchanged container, then it will disappear when
- // all children have been removed.
- ChangedTeamContainer container = (ChangedTeamContainer)nodes[i];
- IDiffElement[] children = container.getChildren();
- if (children.length > 0) {
- if (isLocallyDeletedFolder(container)) {
- // For locally deleted folders, we postpone the handling until all other children are removed
- outgoingFolderDeletions.add(container);
- } else {
- IDiffContainer parent = container.getParent();
- UnchangedTeamContainer unchanged = new UnchangedTeamContainer(parent, container.getResource());
- for (int j = 0; j < children.length; j++) {
- unchanged.add(children[j]);
- }
- parent.removeToRoot(container);
- }
- continue;
- }
- // No children, it will get removed below.
- } else if (nodes[i].getParent().getClass() == ChangedTeamContainer.class) {
- // If the parent is a locally deleted folder, we may want to update it's sync state as well
- if (isLocallyDeletedFolder(nodes[i].getParent())) {
- outgoingFolderDeletions.add(nodes[i].getParent());
- }
- }
- nodes[i].getParent().removeToRoot(nodes[i]);
- }
- // Remove any locally deleted folders from the sync tree as appropriate
- for (Iterator iter = outgoingFolderDeletions.iterator(); iter.hasNext();) {
- removeLocallyDeletedFolder((ChangedTeamContainer)iter.next());
- }
- }
-
- /**
- * Updates the action with the latest selection, setting enablement
- * as necessary.
- */
- public void update(int syncMode) {
- this.syncMode = syncMode;
- IStructuredSelection selection = (IStructuredSelection)selectionProvider.getSelection();
- setEnabled(isEnabled(selection.toArray()));
- }
-
- /**
- * Subclasses must implement this method, which performs action-specific code.
- *
- * It may return the sync set which was passed in, or null.
- */
- protected abstract SyncSet run(SyncSet syncSet, IProgressMonitor monitor);
-
- /**
- * Helper method to run a runnable in a progress monitor dialog, and display any errors.
- */
- protected void run(IRunnableWithProgress op, String problemMessage) throws InterruptedException {
- ProgressMonitorDialog dialog = new ProgressMonitorDialog(getShell());
- try {
- dialog.run(true, true, op);
- } catch (InvocationTargetException e) {
- Throwable throwable = e.getTargetException();
- IStatus error = null;
- if (throwable instanceof CoreException) {
- error = ((CoreException)throwable).getStatus();
- } else {
- error = new Status(IStatus.ERROR, CVSUIPlugin.ID, 1, Policy.bind("simpleInternal") , throwable); //$NON-NLS-1$
- }
- ErrorDialog.openError(shell, problemMessage, error.getMessage(), error);
- CVSUIPlugin.log(error);
- }
- }
-
- /**
- * Helper method. Check if a save is necessary. If it is, prompt the user to save.
- * Return true if all necessary saves have been performed, false otherwise.
- */
- protected boolean saveIfNecessary() {
- return getDiffModel().saveIfNecessary();
- }
-
- /**
- * Answer true if the given diff element represents a locally deleted CVS folder.
- * The sync state of locally deleted CVS folders is either outgoing deletion or
- * conflicting change.
- */
- protected boolean isLocallyDeletedFolder(IDiffElement element) {
- if ( ! (element.getType() == IDiffElement.FOLDER_TYPE)) return false;
- int kind = element.getKind();
- return (((kind & Differencer.CHANGE_TYPE_MASK) == Differencer.DELETION) &&
- ((kind & Differencer.DIRECTION_MASK) == ITeamNode.OUTGOING))
- || (((kind & Differencer.CHANGE_TYPE_MASK) == Differencer.CHANGE) &&
- ((kind & Differencer.DIRECTION_MASK) == ITeamNode.CONFLICTING));
- }
-
- /**
- * Recreate any parents that are outgoing folder deletions
- */
- protected void recreateLocallyDeletedFolder(IDiffElement element) throws TeamException {
- // Recursively make the parent element (and its parents) in sync.
- // Walk up and find the parents which need to be made in sync too. (For
- // each parent that doesn't already have sync info).
- if (element == null) return;
- if (element instanceof ChangedTeamContainer) {
- CVSRemoteSyncElement syncElement = (CVSRemoteSyncElement)((ChangedTeamContainer)element).getMergeResource().getSyncElement();
- // recreate the folder
- ICVSFolder cvsFolder = (ICVSFolder) CVSWorkspaceRoot.getCVSResourceFor(syncElement.getLocal());
- if (! cvsFolder.exists()) {
- recreateLocallyDeletedFolder(element.getParent());
- cvsFolder.mkdir();
- syncElement.makeInSync(Policy.monitorFor(null));
- ((ChangedTeamContainer)element).makeInSync();
- }
- }
- }
-
- /**
- * Adjust the sync kind of the locally deleted folder and remove
- * the folder if it doesn't contain any real changes
- */
- private void removeLocallyDeletedFolder(ChangedTeamContainer container) {
- boolean hasIncoming = hasRealChanges(container, new int[] { ITeamNode.INCOMING });
- boolean hasOutgoing = hasRealChanges(container, new int[] { ITeamNode.OUTGOING });
- boolean hasConflicting = hasRealChanges(container, new int[] { ITeamNode.CONFLICTING });
- IDiffContainer parent = container.getParent();
- if (hasConflicting || (hasOutgoing && hasIncoming)) {
- // Leave as a conflict
- return;
- } else if (hasOutgoing) {
- // Convert to an outgoing deletion
- container.setKind(ITeamNode.OUTGOING | Differencer.DELETION);
- } else if (hasIncoming) {
- container.setKind(ITeamNode.INCOMING | Differencer.ADDITION);
- } else {
- // The folder is empty, remove it
- if (parent != null) {
- parent.removeToRoot(container);
- }
- }
- // The parent may need adjusting as well
- if (parent != null && isLocallyDeletedFolder(parent)) {
- removeLocallyDeletedFolder((ChangedTeamContainer)parent);
- }
- }
-
- /**
- * Look for real changes of the given type. Real changes are those that
- * are not locally deleted folders that are persisted as phantoms
- * to report local file deletions to the server.
- */
- protected boolean hasRealChanges(IDiffElement node, int[] changeDirections) {
- // For regular nodes (i.e. not local folder deletions), check the sync kind of the node
- if ( ! isLocallyDeletedFolder(node)) {
- int direction = node.getKind() & Differencer.DIRECTION_MASK;
- for (int i = 0; i < changeDirections.length; i++) {
- if (direction == changeDirections[i]) {
- return true;
- }
- }
- }
- // For folders, check their children (if we didn't get a match above)
- if (node.getType() == node.FOLDER_TYPE) {
- IDiffElement[] children = ((IDiffContainer)node).getChildren();
- for (int i = 0; i < children.length; i++) {
- if (hasRealChanges(children[i], changeDirections)) {
- return true;
- }
- }
- }
- // If no matches occured above, we don't have any "real" changes in the given directions
- return false;
- }
-
- /**
- * Recursively make the parent element (and its parents) in sync.
- * Walk up and find the parents which need to be made in sync too. (For
- * each parent that doesn't already have sync info).
- */
- protected void makeInSync(IDiffElement parentElement) throws TeamException {
- ArrayList v = new ArrayList();
- int parentKind = parentElement.getKind();
- int direction = parentKind & Differencer.DIRECTION_MASK;
- int change = parentKind & Differencer.CHANGE_TYPE_MASK;
- while ((change == Differencer.ADDITION) &&
- ((direction == ITeamNode.INCOMING) || (direction == ITeamNode.CONFLICTING))) {
- v.add(0, parentElement);
- parentElement = parentElement.getParent();
- parentKind = parentElement == null ? 0 : parentElement.getKind();
- direction = parentKind & Differencer.DIRECTION_MASK;
- change = parentKind & Differencer.CHANGE_TYPE_MASK;
- }
- Iterator parentIt = v.iterator();
- while (parentIt.hasNext()) {
- IDiffElement next = (IDiffElement)parentIt.next();
- if (next instanceof ChangedTeamContainer) {
- CVSRemoteSyncElement syncElement = (CVSRemoteSyncElement)((ChangedTeamContainer)next).getMergeResource().getSyncElement();
- // Create the sync info
- syncElement.makeInSync(Policy.monitorFor(null));
- ((ChangedTeamContainer)next).setKind(IRemoteSyncElement.IN_SYNC);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/ToolTipMessageDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/ToolTipMessageDialog.java
deleted file mode 100644
index 3dd338bcc..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/ToolTipMessageDialog.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.sync; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Shell;
-/**
- * A class that adds tool-tips to the buttons of a standard message dialog.
- */
-public class ToolTipMessageDialog extends MessageDialog {
- private String[] buttonToolTips;
- /**
- * Same as the MessageDialog constructor, with the addition of a button tooltip
- * argument. The number of button tool tips must match the number of button labels.
- */
- public ToolTipMessageDialog(Shell parentShell, String dialogTitle, Image dialogTitleImage, String dialogMessage, int dialogImageType, String[] dialogButtonLabels, String[] buttonToolTips, int defaultIndex) {
- super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex);
- this.buttonToolTips = buttonToolTips;
- }
- /**
- * Method declared on MessageDialog.
- */
- protected void createButtonsForButtonBar(Composite parent) {
- super.createButtonsForButtonBar(parent);
- if (buttonToolTips != null) {
- for (int i = 0; i < buttonToolTips.length; i++) {
- getButton(i).setToolTipText(buttonToolTips[i]);
- }
- }
- } }
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/UpdateSyncAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/UpdateSyncAction.java
deleted file mode 100644
index 338bcc8a2..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/UpdateSyncAction.java
+++ /dev/null
@@ -1,407 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ccvs.ui.sync;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.Vector;
-
-import org.eclipse.compare.structuremergeviewer.Differencer;
-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.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Update;
-import org.eclipse.team.internal.ccvs.core.resources.CVSRemoteSyncElement;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.RepositoryManager;
-import org.eclipse.team.internal.ui.sync.ChangedTeamContainer;
-import org.eclipse.team.internal.ui.sync.ITeamNode;
-import org.eclipse.team.internal.ui.sync.SyncSet;
-import org.eclipse.team.internal.ui.sync.TeamFile;
-
-/**
- * UpdateSyncAction is run on a set of sync nodes when the "Update" menu item is performed
- * in the Synchronize view.
- *
- * This class is also used as the super class of the merge update actions for regular and forced
- * update.
- */
-public class UpdateSyncAction extends MergeAction {
- public static class ConfirmDialog extends MessageDialog {
-
- private boolean autoMerge = true;
- private Button radio1;
- private Button radio2;
-
- public ConfirmDialog(Shell parentShell) {
- super(
- parentShell,
- Policy.bind("UpdateSyncAction.Conflicting_changes_found_1"), //$NON-NLS-1$
- null, // accept the default window icon
- Policy.bind("UpdateSyncAction.You_have_local_changes_you_are_about_to_overwrite_2"), //$NON-NLS-1$
- MessageDialog.QUESTION,
- new String[] {IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL},
- 0); // yes is the default
- }
-
- protected Control createCustomArea(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout());
- radio1 = new Button(composite, SWT.RADIO);
- radio1.addSelectionListener(selectionListener);
-
- radio1.setText(Policy.bind("UpdateSyncAction.Only_update_resources_that_can_be_automatically_merged_3")); //$NON-NLS-1$
-
- radio2 = new Button(composite, SWT.RADIO);
- radio2.addSelectionListener(selectionListener);
-
- radio2.setText(Policy.bind("UpdateSyncAction.Update_all_resources,_overwriting_local_changes_with_remote_contents_4")); //$NON-NLS-1$
-
- // set initial state
- radio1.setSelection(autoMerge);
- radio2.setSelection(!autoMerge);
-
- return composite;
- }
-
- private SelectionListener selectionListener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Button button = (Button)e.widget;
- if (button.getSelection()) {
- autoMerge = (button == radio1);
- }
- }
- };
-
- public boolean getAutomerge() {
- return autoMerge;
- }
- }
-
- public UpdateSyncAction(CVSSyncCompareInput model, ISelectionProvider sp, String label, Shell shell) {
- super(model, sp, label, shell);
- }
-
- protected SyncSet run(final SyncSet syncSet, IProgressMonitor monitor) {
- boolean result = saveIfNecessary();
- if (!result) return null;
-
- // If there are conflicts or outgoing changes in the syncSet, we need to warn the user.
- boolean onlyUpdateAutomergeable = false;
- if (syncSet.hasConflicts() || syncSet.hasOutgoingChanges()) {
- if (syncSet.hasAutoMergeableConflicts()) {
- switch (promptForMergeableConflicts()) {
- case 0: // cancel
- return null;
- case 1: // only update auto-mergeable conflicts
- onlyUpdateAutomergeable = true;
- syncSet.removeNonMergeableNodes();
- break;
- case 2: // update all conflicts
- onlyUpdateAutomergeable = false;
- break;
- }
- } else {
- if (! promptForConflicts()) return null;
- }
- }
-
- ITeamNode[] changed = syncSet.getChangedNodes();
- if (changed.length == 0) {
- return syncSet;
- }
-
- List updateIgnoreLocalShallow = new ArrayList();
- List updateDeep = new ArrayList();
- List updateShallow = new ArrayList();
-
- // A list of diff elements in the sync set which are incoming folder additions
- Set parentCreationElements = new HashSet();
- // A list of diff elements in the sync set which are folder conflicts
- Set parentConflictElements = new HashSet();
- // A list of diff elements in the sync set which are outgoing folder deletions
- Set parentDeletionElements = new HashSet();
- // A list of the team nodes that we need to perform makeIncoming on
- List makeIncoming = new ArrayList();
- // A list of diff elements that need to be unmanaged and locally deleted
- List deletions = new ArrayList();
-
- for (int i = 0; i < changed.length; i++) {
- IDiffContainer parent = changed[i].getParent();
- if (parent != null) {
- int parentKind = changed[i].getParent().getKind();
- if (((parentKind & Differencer.CHANGE_TYPE_MASK) == Differencer.ADDITION) &&
- ((parentKind & Differencer.DIRECTION_MASK) == ITeamNode.INCOMING)) {
- parentCreationElements.add(parent);
- } else if (isLocallyDeletedFolder(parent)) {
- parentDeletionElements.add(parent);
- } else if ((parentKind & Differencer.DIRECTION_MASK) == ITeamNode.CONFLICTING) {
- parentConflictElements.add(parent);
- }
- }
- ITeamNode changedNode = changed[i];
- IResource resource = changedNode.getResource();
- int kind = changedNode.getKind();
- switch (kind & Differencer.DIRECTION_MASK) {
- case ITeamNode.INCOMING:
- switch (kind & Differencer.CHANGE_TYPE_MASK) {
- case Differencer.ADDITION:
- updateIgnoreLocalShallow.add(changedNode);
- break;
- case Differencer.DELETION:
- case Differencer.CHANGE:
- updateDeep.add(changedNode);
- break;
- }
- break;
- case ITeamNode.OUTGOING:
- switch (kind & Differencer.CHANGE_TYPE_MASK) {
- case Differencer.ADDITION:
- // Unmanage the file if necessary and delete it.
- deletions.add(changedNode);
- break;
- case Differencer.DELETION:
- if (resource.getType() == IResource.FILE) {
- makeIncoming.add(changedNode);
- updateDeep.add(changedNode);
- }
- break;
- case Differencer.CHANGE:
- updateIgnoreLocalShallow.add(changedNode);
- break;
- }
- break;
- case ITeamNode.CONFLICTING:
- switch (kind & Differencer.CHANGE_TYPE_MASK) {
- case Differencer.ADDITION:
- if(changedNode instanceof IDiffContainer) {
- parentConflictElements.add(changedNode);
- } else {
- makeIncoming.add(changedNode);
- deletions.add(changedNode);
- updateIgnoreLocalShallow.add(changedNode);
- }
- break;
- case Differencer.DELETION:
- // Doesn't happen, these nodes don't appear in the tree.
- break;
- case Differencer.CHANGE:
- if (resource.getType() == IResource.FILE) {
- // Depends on the flag.
- if (onlyUpdateAutomergeable && (changedNode.getKind() & IRemoteSyncElement.AUTOMERGE_CONFLICT) != 0) {
- updateShallow.add(changedNode);
- } else {
- // Check to see if there is a remote
- if (((TeamFile)changedNode).getMergeResource().getSyncElement().getRemote() == null) {
- // If a locally modified file has no remote, "update -C" will fail.
- // We must unmanage and delete the file ourselves
- deletions.add(changedNode);
- } else {
- updateIgnoreLocalShallow.add(changedNode);
- // If the resource doesn't exist remotely, we must ensure the sync info will allow the above update.
- if (!resource.exists()) {
- makeIncoming.add(changedNode);
- }
- }
- }
- } else {
- // Conflicting change on a folder only occurs if the folder has been deleted locally
- // The folder should only be recreated if there were children in the changed set.
- // Such folders would have been added to the parentDeletionElements set above
- }
- break;
- }
- break;
- }
- }
- try {
- // Calculate the total amount of work needed
- int work = (makeIncoming.size() + (deletions.size() * 2) + updateShallow.size() + updateIgnoreLocalShallow.size() + updateDeep.size()) * 100;
- monitor.beginTask(null, work);
-
- RepositoryManager manager = CVSUIPlugin.getPlugin().getRepositoryManager();
- if (parentDeletionElements.size() > 0) {
- // If a node has a parent that is an outgoing folder deletion, we have to
- // recreate that folder locally (it's sync info already exists locally).
- // We must do this for all outgoing folder deletions (recursively)
- // in the case where there are multiple levels of outgoing folder deletions.
- Iterator it = parentDeletionElements.iterator();
- while (it.hasNext()) {
- recreateLocallyDeletedFolder((IDiffElement)it.next());
- }
- }
- if (parentCreationElements.size() > 0) {
- // If a node has a parent that is an incoming folder creation, we have to
- // create that folder locally and set its sync info before we can get the
- // node itself. We must do this for all incoming folder creations (recursively)
- // in the case where there are multiple levels of incoming folder creations.
- Iterator it = parentCreationElements.iterator();
- while (it.hasNext()) {
- IDiffElement element = (IDiffElement)it.next();
- makeInSync(element);
- // Remove the folder from the update shallow list since we have it locally now
- updateIgnoreLocalShallow.remove(element);
- }
- }
- if (parentConflictElements.size() > 0) {
- // If a node has a parent that is a folder conflict, that means that the folder
- // exists locally but has no sync info. In order to get the node, we have to
- // create the sync info for the folder (and any applicable parents) before we
- // get the node itself.
- Iterator it = parentConflictElements.iterator();
- while (it.hasNext()) {
- makeInSync((IDiffElement)it.next());
- }
- }
- // Make any outgoing changes or deletions into incoming changes before updating.
- Iterator it = makeIncoming.iterator();
- while (it.hasNext()) {
- ITeamNode node = (ITeamNode)it.next();
- CVSRemoteSyncElement element = CVSSyncCompareInput.getSyncElementFrom(node);
- element.makeIncoming(Policy.subMonitorFor(monitor, 100));
- }
- // Outgoing additions must be unmanaged (if necessary) and locally deleted.
- it = deletions.iterator();
- while (it.hasNext()) {
- ITeamNode node = (ITeamNode)it.next();
- CVSRemoteSyncElement element = CVSSyncCompareInput.getSyncElementFrom(node);
- element.makeIncoming(Policy.subMonitorFor(monitor, 100));
- element.getLocal().delete(true, Policy.subMonitorFor(monitor, 100));
- }
-
- if (updateShallow.size() > 0) {
- runUpdateShallow((ITeamNode[])updateShallow.toArray(new ITeamNode[updateShallow.size()]), manager, Policy.subMonitorFor(monitor, 100));
- }
- if (updateIgnoreLocalShallow.size() > 0) {
- runUpdateIgnoreLocalShallow((ITeamNode[])updateIgnoreLocalShallow.toArray(new ITeamNode[updateIgnoreLocalShallow.size()]), manager, Policy.subMonitorFor(monitor, 100));
- }
- if (updateDeep.size() > 0) {
- runUpdateDeep((ITeamNode[])updateDeep.toArray(new ITeamNode[updateDeep.size()]), manager, Policy.subMonitorFor(monitor, 100));
- }
- } catch (final TeamException e) {
- getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- ErrorDialog.openError(getShell(), null, null, e.getStatus());
- }
- });
- return null;
- } catch (final CoreException e) {
- getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- ErrorDialog.openError(getShell(), Policy.bind("simpleInternal"), Policy.bind("internal"), e.getStatus()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- });
- CVSUIPlugin.log(e.getStatus());
- return null;
- } finally {
- monitor.done();
- }
- return syncSet;
- }
-
- protected void runUpdateDeep(ITeamNode[] nodes, RepositoryManager manager, IProgressMonitor monitor) throws TeamException {
- manager.update(getIResourcesFrom(nodes), Command.NO_LOCAL_OPTIONS, false, monitor);
- }
-
- protected void runUpdateIgnoreLocalShallow(ITeamNode[] nodes, RepositoryManager manager, IProgressMonitor monitor) throws TeamException {
- manager.update(getIResourcesFrom(nodes), new Command.LocalOption[] { Update.IGNORE_LOCAL_CHANGES, Command.DO_NOT_RECURSE }, false, monitor);
- }
-
- protected void runUpdateShallow(ITeamNode[] nodes, RepositoryManager manager, IProgressMonitor monitor) throws TeamException {
- manager.update(getIResourcesFrom(nodes), new Command.LocalOption[] { Command.DO_NOT_RECURSE }, false, monitor);
- }
-
- protected IResource[] getIResourcesFrom(ITeamNode[] nodes) {
- List resources = new ArrayList(nodes.length);
- for (int i = 0; i < nodes.length; i++) {
- resources.add(nodes[i].getResource());
- }
- return (IResource[]) resources.toArray(new IResource[resources.size()]);
- }
-
- protected boolean isEnabled(ITeamNode node) {
- // The update action is enabled only for non-conflicting incoming changes
- return new SyncSet(new StructuredSelection(node)).hasIncomingChanges();
- }
-
- /**
- * Prompt for mergeable conflicts.
- * Note: This method is designed to be overridden by test cases.
- * @return 0 to cancel, 1 to only update mergeable conflicts, 2 to overwrite if unmergeable
- */
- protected int promptForMergeableConflicts() {
- final boolean doAutomerge[] = new boolean[] {false};
- final int[] result = new int[] {Dialog.CANCEL};
- final Shell shell = getShell();
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- ConfirmDialog dialog = new ConfirmDialog(shell);
- result[0] = dialog.open();
- doAutomerge[0] = dialog.getAutomerge();
- }
- });
- if (result[0] == Dialog.CANCEL) return 0;
- return doAutomerge[0] ? 1 : 2;
- }
-
- /**
- * Prompt for non-automergeable conflicts.
- * Note: This method is designed to be overridden by test cases.
- * @return false to cancel, true to overwrite local changes
- */
- protected boolean promptForConflicts() {
- final boolean[] result = new boolean[] { false };
- final Shell shell = getShell();
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- result[0] = MessageDialog.openQuestion(shell, Policy.bind("UpdateSyncAction.Overwrite_local_changes__5"), Policy.bind("UpdateSyncAction.You_have_local_changes_you_are_about_to_overwrite._Do_you_wish_to_continue__6")); //$NON-NLS-1$ //$NON-NLS-2$
- }
- });
- return result[0];
- }
- protected void removeNonApplicableNodes(SyncSet set, int syncMode) {
- set.removeConflictingNodes();
- set.removeOutgoingNodes();
- }
- /**
- * @see MergeAction#getHelpContextID()
- */
- protected String getHelpContextID() {
- return IHelpContextIds.SYNC_UPDATE_ACTION;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSWizardPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSWizardPage.java
deleted file mode 100644
index 96983ae56..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSWizardPage.java
+++ /dev/null
@@ -1,238 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.Collection;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.ListViewer;
-import org.eclipse.jface.viewers.Viewer;
-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.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.model.WorkbenchViewerSorter;
-
-/**
- * Common superclass for CVS wizard pages. Provides convenience methods
- * for widget creation.
- */
-public abstract class CVSWizardPage extends WizardPage {
- protected static final int LABEL_WIDTH_HINT = 400;
- protected static final int LABEL_INDENT_WIDTH = 32;
- protected static final int LIST_HEIGHT_HINT = 100;
- protected static final int SPACER_HEIGHT = 8;
-
- /**
- * CVSWizardPage constructor comment.
- * @param pageName the name of the page
- */
- public CVSWizardPage(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 CVSWizardPage(String pageName, String title, ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- }
- /**
- * Creates a 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
- */
- protected Button createCheckBox(Composite group, String label) {
- Button button = new Button(group, SWT.CHECK | SWT.LEFT);
- button.setText(label);
- GridData data = new GridData();
- data.horizontalSpan = 2;
- button.setLayoutData(data);
- return button;
- }
- /**
- * Utility method that creates a combo box
- *
- * @param parent the parent for the new label
- * @return the new widget
- */
- protected Combo createCombo(Composite parent) {
- Combo combo = new Combo(parent, SWT.READ_ONLY);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
- combo.setLayoutData(data);
- return combo;
- }
- /**
- * 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
- */
- public static 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
- */
- public static 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;
- }
- /**
- * Utility method that creates a label instance with word wrap 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
- * @param widthHint the nominal width of the label
- * @return the new label
- */
- protected Label createWrappingLabel(Composite parent, String text, int indent, int widthHint) {
- 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 = indent;
- data.grabExcessHorizontalSpace = true;
- data.widthHint = widthHint;
- 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
- */
- static public 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;
- }
- /**
- * Utility method to create a radio button
- *
- * @param parent the parent of the radio button
- * @param label the label of the radio button
- * @param span the number of columns to span
- * @return the created radio 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;
- }
- /**
- * Utility method to create a full width separator preceeded by a blank space
- *
- * @param parent the parent of the separator
- * @param verticalSpace the vertical whitespace to insert before the label
- */
- protected void createSeparator(Composite parent, int verticalSpace) {
- // space
- Label label = new Label(parent, SWT.NONE);
- GridData data = new GridData();
- data.heightHint = verticalSpace;
- label.setLayoutData(data);
- // separator
- label = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
- data = new GridData(GridData.FILL_HORIZONTAL);
- label.setLayoutData(data);
- }
-
- /**
- * Creates a ListViewer whose input is an array of IFiles.
- *
- * @param parent the parent of the viewer
- * @param title the text for the title label
- * @param heightHint the nominal height of the list
- * @return the created list viewer
- */
- public ListViewer createFileListViewer(Composite parent, String title, int heightHint) {
- createLabel(parent, title);
- ListViewer listViewer = new ListViewer(parent, SWT.READ_ONLY | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
- listViewer.setContentProvider(new IStructuredContentProvider() {
- public Object[] getElements(Object inputElement) {
- return (Object[]) inputElement;
- }
- public void dispose() {
- }
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
- });
- listViewer.setLabelProvider(new LabelProvider() {
- public String getText(Object element) {
- return ((IFile) element).getFullPath().toString();
- }
- });
- listViewer.setSorter(new WorkbenchViewerSorter());
-
- GridData data = new GridData(GridData.FILL_BOTH);
- data.heightHint = heightHint;
- listViewer.getList().setLayoutData(data);
- return listViewer;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardAutoconnectPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardAutoconnectPage.java
deleted file mode 100644
index 7e4507d80..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardAutoconnectPage.java
+++ /dev/null
@@ -1,148 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * This configuration page explains to the user that CVS/ directories already exists and
- * it will attach the selected project to the repository that is specified in the CVS/ files.
- *
- * This is useful for people who have checked out a project using command-line tools.
- */
-public class ConfigurationWizardAutoconnectPage extends CVSWizardPage {
- private boolean validate = true;
- private FolderSyncInfo info;
- ICVSRepositoryLocation location;
-
- public ConfigurationWizardAutoconnectPage(String pageName, String title, ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- }
-
- /*
- * @see IDialogPage#createControl(Composite)
- */
- public void createControl(Composite parent) {
- Composite composite = createComposite(parent, 2);
- setControl(composite);
-
- // set F1 help
- WorkbenchHelp.setHelp(composite, IHelpContextIds.SHARING_AUTOCONNECT_PAGE);
-
- Label description = new Label(composite, SWT.WRAP);
- GridData data = new GridData();
- data.horizontalSpan = 2;
- data.widthHint = 350;
- description.setLayoutData(data);
- description.setText(Policy.bind("ConfigurationWizardAutoconnectPage.description")); //$NON-NLS-1$
-
- if (location == null) return;
-
- // Spacer
- createLabel(composite, ""); //$NON-NLS-1$
- createLabel(composite, ""); //$NON-NLS-1$
-
- createLabel(composite, Policy.bind("ConfigurationWizardAutoconnectPage.user")); //$NON-NLS-1$
- createLabel(composite, location.getUsername());
- createLabel(composite, Policy.bind("ConfigurationWizardAutoconnectPage.host")); //$NON-NLS-1$
- createLabel(composite, location.getHost());
- createLabel(composite, Policy.bind("ConfigurationWizardAutoconnectPage.port")); //$NON-NLS-1$
- int port = location.getPort();
- if (port == location.USE_DEFAULT_PORT) {
- createLabel(composite, Policy.bind("ConfigurationWizardAutoconnectPage.default")); //$NON-NLS-1$
- } else {
- createLabel(composite, "" + port); //$NON-NLS-1$
- }
- createLabel(composite, Policy.bind("ConfigurationWizardAutoconnectPage.connectionType")); //$NON-NLS-1$
- createLabel(composite, location.getMethod().getName());
- createLabel(composite, Policy.bind("ConfigurationWizardAutoconnectPage.repositoryPath")); //$NON-NLS-1$
- createLabel(composite, location.getRootDirectory());
- createLabel(composite, Policy.bind("ConfigurationWizardAutoconnectPage.module")); //$NON-NLS-1$
- createLabel(composite, info.getRepository());
-
- // Spacer
- createLabel(composite, ""); //$NON-NLS-1$
- createLabel(composite, ""); //$NON-NLS-1$
-
- final Button check = new Button(composite, SWT.CHECK);
- data = new GridData();
- data.horizontalSpan = 2;
- check.setText(Policy.bind("ConfigurationWizardAutoconnectPage.validate")); //$NON-NLS-1$
- check.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- validate = check.getSelection();
- }
- });
- check.setSelection(true);
- }
-
- public FolderSyncInfo getFolderSyncInfo() {
- return info;
- }
- public boolean getValidate() {
- return validate;
- }
- public void setProject(IProject project) {
- try {
- ICVSFolder folder = (ICVSFolder)CVSWorkspaceRoot.getCVSResourceFor(project);
- info = folder.getFolderSyncInfo();
- if (info == null) {
- // This should never happen
- ErrorDialog.openError(getContainer().getShell(), Policy.bind("ConfigurationWizardAutoconnectPage.noSyncInfo"), Policy.bind("ConfigurationWizardAutoconnectPage.noCVSDirectory"), null); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
- location = CVSRepositoryLocation.fromString(info.getRoot());
- } catch (TeamException e) {
- Shell shell = new Shell(Display.getDefault());
- ErrorDialog.openError(shell, null, null, e.getStatus());
- shell.dispose();
- }
- }
-
- public void setSharing(FolderSyncInfo info) {
- this.info = info;
- try {
- this. location = CVSRepositoryLocation.fromString(info.getRoot());
- } catch (CVSException e) {
- Shell shell = new Shell(Display.getDefault());
- ErrorDialog.openError(shell, null, null, e.getStatus());
- shell.dispose();
- }
- }
-
- public FolderSyncInfo getSharing() {
- return info;
- }
- /**
- * Gets the location.
- * @return Returns a ICVSRepositoryLocation
- */
- public ICVSRepositoryLocation getLocation() {
- return location;
- }
-
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardMainPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardMainPage.java
deleted file mode 100644
index 9662cc9d0..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardMainPage.java
+++ /dev/null
@@ -1,485 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Properties;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * Wizard page for entering information about a CVS repository location.
- */
-public class ConfigurationWizardMainPage extends CVSWizardPage {
- private boolean showValidate;
- private boolean validate;
-
- // Widgets
-
- // Connection Method
- private Combo connectionMethodCombo;
- // User
- private Combo userCombo;
- // Password
- private Text passwordText;
- // Port
- private Text portText;
- private Button useDefaultPort;
- private Button useCustomPort;
- // Host
- private Combo hostCombo;
- // Repository Path
- private Combo repositoryPathCombo;
- // Validation
- private Button validateButton;
-
- private static final int COMBO_HISTORY_LENGTH = 5;
-
- private Properties properties = null;
-
- // Dialog store id constants
- private static final String STORE_USERNAME_ID =
- "ConfigurationWizardMainPage.STORE_USERNAME_ID";//$NON-NLS-1$
- private static final String STORE_HOSTNAME_ID =
- "ConfigurationWizardMainPage.STORE_HOSTNAME_ID";//$NON-NLS-1$
- private static final String STORE_PATH_ID =
- "ConfigurationWizardMainPage.STORE_PATH_ID";//$NON-NLS-1$
- private static final String STORE_DONT_VALIDATE_ID =
- "ConfigurationWizardMainPage.STORE_DONT_VALIDATE_ID";//$NON-NLS-1$
-
- // In case the page was launched from a different wizard
- private IDialogSettings settings;
-
- /**
- * ConfigurationWizardMainPage constructor.
- *
- * @param pageName the name of the page
- * @param title the title of the page
- * @param titleImage the image for the page
- */
- public ConfigurationWizardMainPage(String pageName, String title, ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- }
- /**
- * Adds an entry to a history, while taking care of duplicate history items
- * and excessively long histories. The assumption is made that all histories
- * should be of length <code>ConfigurationWizardMainPage.COMBO_HISTORY_LENGTH</code>.
- *
- * @param history the current history
- * @param newEntry the entry to add to the history
- * @return the history with the new entry appended
- */
- private String[] addToHistory(String[] history, String newEntry) {
- ArrayList l = new ArrayList(Arrays.asList(history));
- addToHistory(l, newEntry);
- String[] r = new String[l.size()];
- l.toArray(r);
- return r;
- }
- protected IDialogSettings getDialogSettings() {
- return settings;
- }
- protected void setDialogSettings(IDialogSettings settings) {
- this.settings = settings;
- }
- /**
- * Adds an entry to a history, while taking care of duplicate history items
- * and excessively long histories. The assumption is made that all histories
- * should be of length <code>ConfigurationWizardMainPage.COMBO_HISTORY_LENGTH</code>.
- *
- * @param history the current history
- * @param newEntry the entry to add to the history
- */
- private void addToHistory(List history, String newEntry) {
- history.remove(newEntry);
- history.add(0,newEntry);
-
- // since only one new item was added, we can be over the limit
- // by at most one item
- if (history.size() > COMBO_HISTORY_LENGTH)
- history.remove(COMBO_HISTORY_LENGTH);
- }
- /**
- * Creates the UI part of the page.
- *
- * @param parent the parent of the created widgets
- */
- public void createControl(Composite parent) {
- Composite composite = createComposite(parent, 2);
- // set F1 help
- WorkbenchHelp.setHelp(composite, IHelpContextIds.SHARING_NEW_REPOSITORY_PAGE);
-
- Listener listener = new Listener() {
- public void handleEvent(Event event) {
- updateWidgetEnablements();
- }
- };
-
- Group g = createGroup(composite, Policy.bind("ConfigurationWizardMainPage.Location_1")); //$NON-NLS-1$
-
- // Host name
- createLabel(g, Policy.bind("ConfigurationWizardMainPage.host")); //$NON-NLS-1$
- hostCombo = createEditableCombo(g);
- hostCombo.addListener(SWT.Selection, listener);
- hostCombo.addListener(SWT.Modify, listener);
-
- // Repository Path
- createLabel(g, Policy.bind("ConfigurationWizardMainPage.repositoryPath")); //$NON-NLS-1$
- repositoryPathCombo = createEditableCombo(g);
- repositoryPathCombo.addListener(SWT.Selection, listener);
- repositoryPathCombo.addListener(SWT.Modify, listener);
-
- g = createGroup(composite, Policy.bind("ConfigurationWizardMainPage.Authentication_2")); //$NON-NLS-1$
-
- // User name
- createLabel(g, Policy.bind("ConfigurationWizardMainPage.userName")); //$NON-NLS-1$
- userCombo = createEditableCombo(g);
- userCombo.addListener(SWT.Selection, listener);
- userCombo.addListener(SWT.Modify, listener);
-
- // Password
- createLabel(g, Policy.bind("ConfigurationWizardMainPage.password")); //$NON-NLS-1$
- passwordText = createTextField(g);
- passwordText.setEchoChar('*');
-
- g = createGroup(composite, Policy.bind("ConfigurationWizardMainPage.Connection_3")); //$NON-NLS-1$
-
- // Connection type
- createLabel(g, Policy.bind("ConfigurationWizardMainPage.connection")); //$NON-NLS-1$
- connectionMethodCombo = createCombo(g);
-
- // Port number
- // create a composite to ensure the radio buttons come in the correct order
- Composite portGroup = new Composite(g, SWT.NONE);
- GridData data = new GridData();
- data.horizontalSpan = 2;
- portGroup.setLayoutData(data);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- portGroup.setLayout(layout);
- useDefaultPort = createRadioButton(portGroup, Policy.bind("ConfigurationWizardMainPage.useDefaultPort"), 2); //$NON-NLS-1$
- useCustomPort = createRadioButton(portGroup, Policy.bind("ConfigurationWizardMainPage.usePort"), 1); //$NON-NLS-1$
- useCustomPort.addListener(SWT.Selection, listener);
- portText = createTextField(portGroup);
- portText.addListener(SWT.Selection, listener);
-
- // create a composite to ensure the validate button is in its own tab group
- if (showValidate) {
- Composite validateButtonTabGroup = new Composite(composite, SWT.NONE);
- data = new GridData();
- data.horizontalSpan = 2;
- validateButtonTabGroup.setLayoutData(data);
- validateButtonTabGroup.setLayout(new FillLayout());
-
- validateButton = new Button(validateButtonTabGroup, SWT.CHECK);
- validateButton.setText(Policy.bind("ConfigurationWizardAutoconnectPage.validate")); //$NON-NLS-1$
- validateButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- validate = validateButton.getSelection();
- }
- });
- }
-
- initializeValues();
- updateWidgetEnablements();
- hostCombo.setFocus();
-
- setControl(composite);
- }
- /**
- * Utility method to create an editable combo box
- *
- * @param parent the parent of the combo box
- * @return the created combo
- */
- protected Combo createEditableCombo(Composite parent) {
- Combo combo = new Combo(parent, SWT.NULL);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
- combo.setLayoutData(data);
- return combo;
- }
-
- protected Group createGroup(Composite parent, String text) {
- Group group = new Group(parent, SWT.NULL);
- group.setText(text);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- //data.widthHint = GROUP_WIDTH;
-
- group.setLayoutData(data);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- group.setLayout(layout);
- return group;
- }
-
- /**
- * @see CVSWizardPage#finish
- */
- public boolean finish(IProgressMonitor monitor) {
- // Set the result to be the current values
- Properties result = new Properties();
- result.setProperty("connection", connectionMethodCombo.getText()); //$NON-NLS-1$
- result.setProperty("user", userCombo.getText()); //$NON-NLS-1$
- result.setProperty("password", passwordText.getText()); //$NON-NLS-1$
- result.setProperty("host", hostCombo.getText()); //$NON-NLS-1$
- if (useCustomPort.getSelection()) {
- result.setProperty("port", portText.getText()); //$NON-NLS-1$
- }
- result.setProperty("root", repositoryPathCombo.getText()); //$NON-NLS-1$
- this.properties = result;
-
- saveWidgetValues();
-
- return true;
- }
- /**
- * Returns the properties for the repository connection
- *
- * @return the properties or null
- */
- public Properties getProperties() {
- return properties;
- }
- /**
- * Initializes states of the controls.
- */
- private void initializeValues() {
- // Set remembered values
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- String[] hostNames = settings.getArray(STORE_HOSTNAME_ID);
- if (hostNames != null) {
- for (int i = 0; i < hostNames.length; i++) {
- hostCombo.add(hostNames[i]);
- }
- }
- String[] paths = settings.getArray(STORE_PATH_ID);
- if (paths != null) {
- for (int i = 0; i < paths.length; i++) {
- repositoryPathCombo.add(paths[i]);
- }
- }
- String[] userNames = settings.getArray(STORE_USERNAME_ID);
- if (userNames != null) {
- for (int i = 0; i < userNames.length; i++) {
- userCombo.add(userNames[i]);
- }
- }
- if (showValidate) {
- validate = !settings.getBoolean(STORE_DONT_VALIDATE_ID);
- validateButton.setSelection(validate);
- }
- }
-
- // Initialize other values and widget states
- String[] methods = CVSProviderPlugin.getProvider().getSupportedConnectionMethods();
- for (int i = 0; i < methods.length; i++) {
- connectionMethodCombo.add(methods[i]);
- }
-
- connectionMethodCombo.select(0);
- useDefaultPort.setSelection(true);
-
- if(properties != null) {
- String method = (String)properties.getProperty("connection"); //$NON-NLS-1$
- if (method == null) {
- connectionMethodCombo.select(0);
- } else {
- connectionMethodCombo.select(connectionMethodCombo.indexOf(method));
- }
-
- String user = (String)properties.getProperty("user"); //$NON-NLS-1$
- if (user != null) {
- userCombo.setText(user);
- }
-
- String password = (String)properties.getProperty("password"); //$NON-NLS-1$
- if (password != null) {
- passwordText.setText(password);
- }
-
- String host = (String)properties.getProperty("host"); //$NON-NLS-1$
- if (host != null) {
- hostCombo.setText(host);
- }
-
- String port = (String)properties.getProperty("port"); //$NON-NLS-1$
- if (port != null) {
- useCustomPort.setSelection(true);
- portText.setText(port);
- }
-
- String repositoryPath = (String)properties.getProperty("root"); //$NON-NLS-1$
- if (repositoryPath != null) {
- repositoryPathCombo.setText(repositoryPath);
- }
- }
- }
- /**
- * Saves the widget values
- */
- private void saveWidgetValues() {
- // Update history
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- String[] userNames = settings.getArray(STORE_USERNAME_ID);
- if (userNames == null) userNames = new String[0];
- userNames = addToHistory(userNames, userCombo.getText());
- settings.put(STORE_USERNAME_ID, userNames);
-
- String[] hostNames = settings.getArray(STORE_HOSTNAME_ID);
- if (hostNames == null) hostNames = new String[0];
- hostNames = addToHistory(hostNames, hostCombo.getText());
- settings.put(STORE_HOSTNAME_ID, hostNames);
-
- String[] paths = settings.getArray(STORE_PATH_ID);
- if (paths == null) paths = new String[0];
- paths = addToHistory(paths, repositoryPathCombo.getText());
- settings.put(STORE_PATH_ID, paths);
-
- if (showValidate) {
- settings.put(STORE_DONT_VALIDATE_ID, !validate);
- }
- }
- }
-
- public void setShowValidate(boolean showValidate) {
- this.showValidate = showValidate;
- }
-
- /**
- * Sets the properties for the repository connection
- *
- * @param properties the properties or null
- */
- public void setProperties(Properties properties) {
- this.properties = properties;
- }
-
- /**
- * Updates widget enablements and sets error message if appropriate.
- */
- protected void updateWidgetEnablements() {
- if (useDefaultPort.getSelection()) {
- portText.setEnabled(false);
- } else {
- portText.setEnabled(true);
- }
-
- validateFields();
- }
- /**
- * Validates the contents of the editable fields and set page completion
- * and error messages appropriately.
- */
- private void validateFields() {
- String user = userCombo.getText();
- if (user.length() == 0) {
- setErrorMessage(null);
- setPageComplete(false);
- return;
- }
- if ((user.indexOf('@') != -1) || (user.indexOf(':') != -1)) {
- setErrorMessage(Policy.bind("ConfigurationWizardMainPage.invalidUserName")); //$NON-NLS-1$
- setPageComplete(false);
- return;
- }
-
- String host = hostCombo.getText();
- if (host.length() == 0) {
- setErrorMessage(null);
- setPageComplete(false);
- return;
- }
- if (host.indexOf(':') != -1) {
- setErrorMessage(Policy.bind("ConfigurationWizardMainPage.invalidHostName")); //$NON-NLS-1$
- setPageComplete(false);
- return;
- }
-
- if (portText.isEnabled()) {
- if (portText.getText().length() == 0) {
- setErrorMessage(null);
- setPageComplete(false);
- return;
- }
- try {
- Integer.parseInt(portText.getText());
- } catch (NumberFormatException e) {
- setErrorMessage(Policy.bind("ConfigurationWizardMainPage.invalidPort")); //$NON-NLS-1$
- setPageComplete(false);
- return;
- }
- }
-
- if (repositoryPathCombo.getText().length() == 0) {
- setErrorMessage(null);
- setPageComplete(false);
- return;
- } else {
- String pathString = repositoryPathCombo.getText();
- IPath path = new Path(pathString);
- String[] segments = path.segments();
- for (int i = 0; i < segments.length; i++) {
- String string = segments[i];
- if (string.charAt(0) == ' ' || string.charAt(string.length() -1) == ' ') {
- setErrorMessage(Policy.bind("ConfigurationWizardMainPage.invalidPathWithSpaces")); //$NON-NLS-1$
- setPageComplete(false);
- return;
- }
- }
- // look for // and inform the user that we support use of C:\cvs\root instead of /c//cvs/root
- if (pathString.indexOf("//") != -1) { //$NON-NLS-1$
- if (pathString.indexOf("//") == 2) { //$NON-NLS-1$
- // The user is probably trying to specify a CVSNT path
- setErrorMessage(Policy.bind("ConfigurationWizardMainPage.useNTFormat")); //$NON-NLS-1$
- } else {
- setErrorMessage(Policy.bind("ConfigurationWizardMainPage.invalidPathWithSlashes")); //$NON-NLS-1$
- }
- setPageComplete(false);
- return;
- }
- }
- setErrorMessage(null);
- setPageComplete(true);
- }
-
- public boolean getValidate() {
- return validate;
- }
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- hostCombo.setFocus();
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileOperation.java
deleted file mode 100644
index 193697eac..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileOperation.java
+++ /dev/null
@@ -1,111 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.PrintStream;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-
-/**
- * An operation to run the CVS diff operation on a set of resources. The result
- * of the diff is written to a file. If there are no differences found, the
- * user is notified and the output file is not created.
- */
-public class GenerateDiffFileOperation implements IRunnableWithProgress {
-
- private File outputFile;
- private IResource resource;
- private Shell shell;
- private LocalOption[] options;
- private boolean toClipboard;
-
- GenerateDiffFileOperation(IResource resource, File file, boolean toClipboard, LocalOption[] options, Shell shell) {
- this.resource = resource;
- this.outputFile = file;
- this.shell = shell;
- this.options = options;
- this.toClipboard = toClipboard;
- }
-
- /**
- * @see IRunnableWithProgress#run(IProgressMonitor)
- */
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- monitor.beginTask("", 500); //$NON-NLS-1$
- monitor.setTaskName(
- Policy.bind("GenerateCVSDiff.working")); //$NON-NLS-1$
-
- OutputStream os;
- if(toClipboard) {
- os = new ByteArrayOutputStream();
- } else {
- os = new FileOutputStream(outputFile);
- }
- try {
- CVSTeamProvider provider = (CVSTeamProvider)RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId());
- provider.diff(resource, options, new PrintStream(os), new SubProgressMonitor(monitor, 500));
- } finally {
- os.close();
- }
-
- boolean emptyDiff = false;
-
- if(toClipboard) {
- ByteArrayOutputStream baos = (ByteArrayOutputStream)os;
- if(baos.size() == 0) {
- emptyDiff = true;
- } else {
- TextTransfer plainTextTransfer = TextTransfer.getInstance();
- Clipboard clipboard= new Clipboard(shell.getDisplay());
- clipboard.setContents(
- new String[]{baos.toString()},
- new Transfer[]{plainTextTransfer});
- clipboard.dispose();
- }
- } else {
- if(outputFile.length() == 0) {
- emptyDiff = true;
- outputFile.delete();
- }
- }
-
- //check for empty diff and report
- if (emptyDiff) {
- MessageDialog.openInformation(
- shell,
- Policy.bind("GenerateCVSDiff.noDiffsFoundTitle"), //$NON-NLS-1$
- Policy.bind("GenerateCVSDiff.noDiffsFoundMsg")); //$NON-NLS-1$
- }
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } catch(IOException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java
deleted file mode 100644
index 4bf05dd7e..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java
+++ /dev/null
@@ -1,567 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.io.File;
-import java.lang.reflect.InvocationTargetException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-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.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.team.internal.ccvs.core.client.Diff;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.ui.internal.misc.ContainerContentProvider;
-import org.eclipse.ui.internal.misc.ResourceAndContainerGroup;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-/**
- * A wizard for creating a patch file by running the CVS diff command.
- */
-public class GenerateDiffFileWizard extends Wizard {
-
- private PatchFileSelectionPage mainPage;
- private PatchFileCreationOptionsPage optionsPage;
-
- private IStructuredSelection selection;
- private IResource resource;
-
- /**
- * Page to select a patch file. Overriding validatePage was necessary to allow
- * entering a file name that already exists.
- */
- private class PatchFileSelectionPage extends WizardPage {
-
- private IStructuredSelection currentSelection;
- private ResourceAndContainerGroup resourceGroup;
- private Text filenameCombo;
- private Button browseButton;
-
- private TreeViewer treeViewer;
- private IContainer selectedContainer;
- private Text workspaceFilename;
- private Button saveInFilesystem;
- private Button saveInWorkspace;
- private Button saveToClipboard;
-
- public final int CLIPBOARD = 1;
- public final int FILESYSTEM = 2;
- public final int WORKSPACE = 3;
-
- // sizing constants
- private static final int SIZING_SELECTION_PANE_HEIGHT = 125;
- private static final int SIZING_SELECTION_PANE_WIDTH = 200;
-
- PatchFileSelectionPage(String pageName, String title, ImageDescriptor image, IStructuredSelection selection) {
- super(pageName, title, image);
- this.currentSelection = selection;
- setPageComplete(false);
- }
-
- /**
- * Allow the user to finish if a valid file has been entered.
- */
- protected boolean validatePage() {
- boolean valid = false;
-
- switch (getSaveType()) {
- case WORKSPACE:
- if (selectedContainer != null && getWorkspaceFile() != null) {
- valid = true;
- }
- break;
- case FILESYSTEM:
- if (new File(getFilesystemFile()).isAbsolute()) {
- valid = true;
- }
- break;
- case CLIPBOARD:
- valid = true;
- break;
- }
-
- // Avoid draw flicker by clearing error message
- // if all is valid.
- if (valid) {
- setMessage(null);
- setErrorMessage(null);
- } else {
- setErrorMessage(Policy.bind("Enter_a_valid_file_name_or_select_the_clipboard_option_1")); //$NON-NLS-1$
- }
- setPageComplete(valid);
- return valid;
- }
-
- /**
- * Answers a full path to a file system file or <code>null</code> if the user
- * selected to save the patch in the workspace.
- */
- public String getFilesystemFile() {
- if(saveInFilesystem.getSelection()) {
- return filenameCombo.getText();
- }
- return null;
- }
-
- /**
- * Answers a workspace file or <code>null</code> if the user selected to save
- * the patch outside of the workspace.
- */
- public IFile getWorkspaceFile() {
- if(saveInWorkspace.getSelection() && selectedContainer !=null) {
- String filename = workspaceFilename.getText();
- if(filename==null || filename.length() == 0) {
- return null;
- }
- return selectedContainer.getFile(new Path(workspaceFilename.getText()));
- }
- return null;
- }
-
- /**
- * Allow the user to chose to save the patch to the workspace or outside
- * of the workspace.
- */
- public void createControl(Composite parent) {
-
- Composite composite= new Composite(parent, SWT.NULL);
- GridLayout layout= new GridLayout();
- composite.setLayout(layout);
- composite.setLayoutData(new GridData());
- setControl(composite);
-
- // set F1 help
- WorkbenchHelp.setHelp(composite, IHelpContextIds.PATCH_SELECTION_PAGE);
-
- // Clipboard
- saveToClipboard= new Button(composite, SWT.RADIO);
- saveToClipboard.setText(Policy.bind("Save_To_Clipboard_2")); //$NON-NLS-1$
- saveToClipboard.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- validatePage();
- updateEnablements();
- }
- });
-
- // File System
- saveInFilesystem= new Button(composite, SWT.RADIO);
- saveInFilesystem.setText(Policy.bind("Save_In_File_System_3")); //$NON-NLS-1$
- saveInFilesystem.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- validatePage();
- updateEnablements();
- }
- });
-
- Composite nameGroup = new Composite(composite,SWT.NONE);
- layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginWidth = 0;
- nameGroup.setLayout(layout);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
- nameGroup.setLayoutData(data);
-
- filenameCombo= new Text(nameGroup, SWT.BORDER);
- GridData gd= new GridData(GridData.FILL_HORIZONTAL);
- filenameCombo.setLayoutData(gd);
- filenameCombo.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validatePage();
- }
- });
-
- browseButton = new Button(nameGroup, SWT.NULL);
- browseButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
- browseButton.setText(Policy.bind("Browse..._4")); //$NON-NLS-1$
- browseButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- FileDialog d = new FileDialog(getShell());
- d.setText(Policy.bind("Save_Patch_As_5")); //$NON-NLS-1$
- d.setFileName(Policy.bind("patch.txt_6")); //$NON-NLS-1$
- String file = d.open();
- if(file!=null) {
- IPath path = new Path(file);
- setFilesystemFilename(path.toOSString());
- }
- }
- });
-
- // Workspace
- saveInWorkspace= new Button(composite, SWT.RADIO);
- saveInWorkspace.setText(Policy.bind("Save_In_Workspace_7")); //$NON-NLS-1$
- saveInWorkspace.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- validatePage();
- updateEnablements();
- }
- });
-
- createTreeViewer(composite);
- saveToClipboard.setSelection(true);
- validatePage();
- updateEnablements();
- }
-
- /**
- * Sets the file name in the file system text.
- */
- protected void setFilesystemFilename(String filename) {
- filenameCombo.setText(filename);
- }
-
- /**
- * Create the tree viewer that shows the container available in the workspace. The user
- * can then enter a filename in the text box below the viewer.
- */
- protected void createTreeViewer(Composite parent) {
- // Create tree viewer inside drill down.
- new Label(parent, SWT.LEFT).setText(Policy.bind("Select_a_folder_then_type_in_the_file_name__8")); //$NON-NLS-1$
-
- treeViewer = new TreeViewer(parent, SWT.BORDER);
- ContainerContentProvider cp = new ContainerContentProvider();
- cp.showClosedProjects(false);
- GridData data = new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL |
- GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL);
-
- data.widthHint = SIZING_SELECTION_PANE_WIDTH;
- data.heightHint = SIZING_SELECTION_PANE_HEIGHT;
-
- treeViewer.getTree().setLayoutData(data);
- treeViewer.setContentProvider(cp);
- treeViewer.setLabelProvider(new WorkbenchLabelProvider());
- treeViewer.addSelectionChangedListener(
- new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection selection = (IStructuredSelection)event.getSelection();
- containerSelectionChanged((IContainer) selection.getFirstElement()); // allow null
- validatePage();
- }
- });
-
- treeViewer.addDoubleClickListener(
- new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- ISelection selection = event.getSelection();
- if (selection instanceof IStructuredSelection) {
- Object item = ((IStructuredSelection)selection).getFirstElement();
- if (treeViewer.getExpandedState(item))
- treeViewer.collapseToLevel(item, 1);
- else
- treeViewer.expandToLevel(item, 1);
- }
- }
- });
-
- // This has to be done after the viewer has been laid out
- treeViewer.setInput(ResourcesPlugin.getWorkspace());
-
- // name group
- Composite nameGroup = new Composite(parent,SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginWidth = 0;
- nameGroup.setLayout(layout);
- data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
- nameGroup.setLayoutData(data);
-
- Label label = new Label(nameGroup,SWT.NONE);
- label.setText(Policy.bind("Fi&le_name__9")); //$NON-NLS-1$
-
- // resource name entry field
- workspaceFilename = new Text(nameGroup,SWT.BORDER);
- data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
- workspaceFilename.setLayoutData(data);
- workspaceFilename.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validatePage();
- }
- });
- }
-
- /**
- * Enable and disable controls based on the selected radio button.
- */
- protected void updateEnablements() {
- int type = getSaveType();
-
- browseButton.setEnabled(type==FILESYSTEM);
- filenameCombo.setEnabled(type==FILESYSTEM);
- treeViewer.getTree().setEnabled(type==WORKSPACE);
- workspaceFilename.setEnabled(type==WORKSPACE);
- }
-
- /**
- * Answers the type of the patch file destination.
- */
- public int getSaveType() {
- if(saveInFilesystem.getSelection()) {
- return FILESYSTEM;
- } else if(saveToClipboard.getSelection()) {
- return CLIPBOARD;
- } else {
- return WORKSPACE;
- }
- }
-
- /**
- * Remember the container selected in the tree viewer.
- */
- public void containerSelectionChanged(IContainer container) {
- selectedContainer = container;
- }
- }
- // end of PatchFileSelectionPage
-
- /**
- * Page to select the options for creating the patch.
- */
- public class PatchFileCreationOptionsPage extends WizardPage {
-
- private Button recurseOption;
- private Button contextDiffOption;
- private Button unifiedDiffOption;
- private Button regularDiffOption;
- private Button includeNewFilesOptions;
-
- /**
- * Constructor for PatchFileCreationOptionsPage.
- */
- protected PatchFileCreationOptionsPage(String pageName) {
- super(pageName);
- }
-
- /**
- * Constructor for PatchFileCreationOptionsPage.
- */
- protected PatchFileCreationOptionsPage(String pageName, String title, ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- }
-
- /*
- * @see IDialogPage#createControl(Composite)
- */
- public void createControl(Composite parent) {
- Composite composite= new Composite(parent, SWT.NULL);
- GridLayout layout= new GridLayout();
- composite.setLayout(layout);
- composite.setLayoutData(new GridData());
- setControl(composite);
-
- // set F1 help
- WorkbenchHelp.setHelp(composite, IHelpContextIds.PATCH_OPTIONS_PAGE);
-
- recurseOption = new Button(composite, SWT.CHECK);
- recurseOption.setText(Policy.bind("Do_not_recurse_into_sub-folders_10")); //$NON-NLS-1$
- recurseOption.setSelection(true);
-
- includeNewFilesOptions = new Button(composite, SWT.CHECK);
- includeNewFilesOptions.setText(Policy.bind("Do_not_include_new_files_in_patch_11")); //$NON-NLS-1$
- includeNewFilesOptions.setSelection(true);
-
- Group diffTypeGroup = new Group(composite, SWT.NONE);
- layout = new GridLayout();
- layout.marginHeight = 0;
- diffTypeGroup.setLayout(layout);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
- diffTypeGroup.setLayoutData(data);
- diffTypeGroup.setText(Policy.bind("Diff_output_format_12")); //$NON-NLS-1$
-
- unifiedDiffOption = new Button(diffTypeGroup, SWT.RADIO);
- unifiedDiffOption.setText(Policy.bind("Unified_(format_required_by_Compare_With_Patch_feature)_13")); //$NON-NLS-1$
- unifiedDiffOption.setSelection(true);
- contextDiffOption = new Button(diffTypeGroup, SWT.RADIO);
- contextDiffOption.setText(Policy.bind("Context_14")); //$NON-NLS-1$
- regularDiffOption = new Button(diffTypeGroup, SWT.RADIO);
- regularDiffOption.setText(Policy.bind("Standard_15")); //$NON-NLS-1$
- }
-
- /**
- * Answers if the difference operation should be run recursively.
- */
- public boolean isRecursive() {
- return !recurseOption.getSelection();
- }
-
- /**
- * Return the list of Diff command options configured on this page.
- */
- public LocalOption[] getOptions() {
- List options = new ArrayList(5);
- if(includeNewFilesOptions.getSelection()) {
- options.add(Diff.INCLUDE_NEWFILES);
- }
- if(!recurseOption.getSelection()) {
- options.add(Diff.DO_NOT_RECURSE);
- }
- if(unifiedDiffOption.getSelection()) {
- options.add(Diff.UNIFIED_FORMAT);
- } else if(contextDiffOption.getSelection()) {
- options.add(Diff.CONTEXT_FORMAT);
- }
- return (LocalOption[]) options.toArray(new LocalOption[options.size()]);
- }
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- recurseOption.setFocus();
- }
- }
- }
- // end of PatchFileCreationOptionsPage
-
- public GenerateDiffFileWizard(IStructuredSelection selection, IResource resource) {
- super();
- this.selection = selection;
- this.resource = resource;
- setWindowTitle(Policy.bind("GenerateCVSDiff.title")); //$NON-NLS-1$
- initializeDefaultPageImageDescriptor();
- }
-
- public void addPages() {
- String pageTitle = Policy.bind("GenerateCVSDiff.pageTitle"); //$NON-NLS-1$
- String pageDescription = Policy.bind("GenerateCVSDiff.pageDescription"); //$NON-NLS-1$
- mainPage = new PatchFileSelectionPage(pageTitle, pageTitle, CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_DIFF), selection);
- mainPage.setDescription(pageDescription);
- addPage(mainPage);
-
- pageTitle = Policy.bind("Advanced_options_19"); //$NON-NLS-1$
- pageDescription = Policy.bind("Configure_the_options_used_for_the_CVS_diff_command_20"); //$NON-NLS-1$
- optionsPage = new PatchFileCreationOptionsPage(pageTitle, pageTitle, CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_DIFF));
- optionsPage.setDescription(pageDescription);
- addPage(optionsPage);
- }
-
- /**
- * Initializes this creation wizard using the passed workbench and
- * object selection.
- *
- * @param workbench the current workbench
- * @param selection the current object selection
- */
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- }
- /**
- * Declares the wizard banner iamge descriptor
- */
- protected void initializeDefaultPageImageDescriptor() {
- String iconPath;
- if (Display.getCurrent().getIconDepth() > 4) {
- iconPath = "icons/full/"; //$NON-NLS-1$
- } else {
- iconPath = "icons/basic/"; //$NON-NLS-1$
- }
- try {
- URL installURL = CVSUIPlugin.getPlugin().getDescriptor().getInstallURL();
- URL url = new URL(installURL, iconPath + "wizards/newconnect_wiz.gif"); //$NON-NLS-1$
- ImageDescriptor desc = ImageDescriptor.createFromURL(url);
- setDefaultPageImageDescriptor(desc);
- } catch (MalformedURLException e) {
- // Should not happen. Ignore.
- }
- }
-
- /* (Non-javadoc)
- * Method declared on IWizard.
- */
- public boolean needsProgressMonitor() {
- return true;
- }
- /**
- * Completes processing of the wizard. If this method returns <code>
- * true</code>, the wizard will close; otherwise, it will stay active.
- */
- public boolean performFinish() {
- String fs = mainPage.getFilesystemFile();
- IFile ws = mainPage.getWorkspaceFile();
- int type = mainPage.getSaveType();
-
- try {
- if(type != mainPage.CLIPBOARD) {
- File file = new File(fs!=null ? fs : ws.getLocation().toOSString());
- if (file.exists()) {
- // prompt then delete
- String title = Policy.bind("GenerateCVSDiff.overwriteTitle"); //$NON-NLS-1$
- String msg = Policy.bind("GenerateCVSDiff.overwriteMsg"); //$NON-NLS-1$
- final MessageDialog dialog = new MessageDialog(getShell(), title, null, msg, MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.CANCEL_LABEL }, 0);
-
- dialog.open();
-
- if (dialog.getReturnCode() != 0) {
- // cancel
- return false;
- }
- }
- getContainer().run(false, true, new GenerateDiffFileOperation(resource, file, false, optionsPage.getOptions(), getShell()));
- if(type==mainPage.WORKSPACE) {
- ws.getParent().refreshLocal(IResource.DEPTH_ONE, null);
- }
- } else {
- getContainer().run(false, true, new GenerateDiffFileOperation(resource, null, true, optionsPage.getOptions(), getShell()));
- }
- return true;
- } catch (InterruptedException e1) {
- return true;
- } catch(CoreException e) {
- ErrorDialog.openError(getShell(), Policy.bind("GenerateCVSDiff.error"), null, e.getStatus()); //$NON-NLS-1$
- return false;
- } catch (InvocationTargetException e2) {
- if (e2.getTargetException() instanceof CoreException) {
- CoreException e = (CoreException) e2.getTargetException();
- ErrorDialog.openError(getShell(), Policy.bind("GenerateCVSDiff.error"), null, e.getStatus()); //$NON-NLS-1$
- return false;
- } else {
- Throwable target = e2.getTargetException();
- if (target instanceof RuntimeException) {
- throw (RuntimeException) target;
- }
- if (target instanceof Error) {
- throw (Error) target;
- }
- }
- return true;
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizard.java
deleted file mode 100644
index 1e9c17944..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizard.java
+++ /dev/null
@@ -1,401 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceVisitor;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-
-/**
- * A wizard for changing the keyword substitution mode of files.
- *
- * 1. Ask the user select to select the desired keyword substitution mode.
- * 2. Compute the set of possibly affected resources
- * 3. If the affected resources include existing committed files, warn the user
- * and provide an option to include them in the operation anyways.
- * 4. If the affected resources include dirty files, warn the user and provide
- * an option to include them in the operation anyways.
- * 5. Perform the operation on Finish.
- */
-public class KSubstWizard extends Wizard {
- private KSubstOption defaultKSubst;
-
- private final IResource[] resources;
- private final int depth;
- private List changeList = null;
- private KSubstOption changeOption = null;
-
- private KSubstWizardSelectionPage mainPage;
- private KSubstWizardSummaryPage summaryPage;
- private KSubstWizardSharedFilesPage sharedFilesPage;
- private KSubstWizardDirtyFilesPage dirtyFilesPage;
-
- public class KSubstChangeElement {
- public static final int ADDED_FILE = 1;
- public static final int CHANGED_FILE = 2;
- public static final int UNCHANGED_FILE = 4;
-
- private IFile file;
- private int classification;
- private boolean excluded;
- private KSubstOption fromKSubst;
- private KSubstOption toKSubst;
-
- private KSubstChangeElement(IFile file, int classification, boolean excluded, KSubstOption fromKSubst, KSubstOption toKSubst) {
- this.file = file;
- this.classification = classification;
- this.excluded = excluded;
- this.fromKSubst = fromKSubst;
- this.toKSubst = toKSubst;
- }
- public boolean matchesFilter(int filter) {
- return (classification & filter) != 0;
- }
- public boolean isExcluded() {
- return excluded;
- }
- public void setExcluded(boolean excluded) {
- this.excluded = excluded;
- }
- public boolean isNewKSubstMode() {
- return ! fromKSubst.equals(toKSubst);
- }
- public void setKSubst(KSubstOption toKSubst) {
- this.toKSubst = toKSubst;
- }
- public KSubstOption getKSubst() {
- return toKSubst;
- }
- public IFile getFile() {
- return file;
- }
- }
-
- /**
- * Creates a wizard to set the keyword substitution mode for the specified resources.
- *
- * @param resources the resources to alter
- * @param depth the recursion depth
- * @param defaultOption the keyword substitution option to select by default
- */
- public KSubstWizard(IResource[] resources, int depth, KSubstOption defaultOption) {
- super();
- this.defaultKSubst = defaultOption;
- this.resources = resources;
- this.depth = depth;
- setWindowTitle(Policy.bind("KSubstWizard.title")); //$NON-NLS-1$
- }
-
- /**
- * Returns the keyword substitution option that was selected at the time
- * the Finish button was pressed.
- */
- public KSubstOption getKSubstOption() {
- return defaultKSubst;
- }
-
- public void addPages() {
- ImageDescriptor substImage = CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_KEYWORD);
-
- // add main page
- String pageTitle = Policy.bind("KSubstWizardSelectionPage.pageTitle"); //$NON-NLS-1$
- String pageDescription = Policy.bind("KSubstWizardSelectionPage.pageDescription"); //$NON-NLS-1$
- mainPage = new KSubstWizardSelectionPage(pageTitle, pageTitle, substImage, defaultKSubst);
- mainPage.setDescription(pageDescription);
- mainPage.setTitle(pageTitle);
- addPage(mainPage);
-
- // add summary page
- pageTitle = Policy.bind("KSubstWizardSummaryPage.pageTitle"); //$NON-NLS-1$
- pageDescription = Policy.bind("KSubstWizardSummaryPage.pageDescription"); //$NON-NLS-1$
- summaryPage = new KSubstWizardSummaryPage(pageTitle, pageTitle, substImage, false);
- summaryPage.setDescription(pageDescription);
- addPage(summaryPage);
-
- // add shared files warning page
- pageTitle = Policy.bind("KSubstWizardSharedFilesPage.pageTitle"); //$NON-NLS-1$
- pageDescription = Policy.bind("KSubstWizardSharedFilesPage.pageDescription"); //$NON-NLS-1$
- sharedFilesPage = new KSubstWizardSharedFilesPage(pageTitle, pageTitle, substImage, false);
- sharedFilesPage.setDescription(pageDescription);
- addPage(sharedFilesPage);
-
- // add changed files warning page
- pageTitle = Policy.bind("KSubstWizardDirtyFilesPage.pageTitle"); //$NON-NLS-1$
- pageDescription = Policy.bind("KSubstWizardDirtyFilesPage.pageDescription"); //$NON-NLS-1$
- dirtyFilesPage = new KSubstWizardDirtyFilesPage(pageTitle, pageTitle, substImage, false);
- dirtyFilesPage.setDescription(pageDescription);
- addPage(dirtyFilesPage);
- }
-
- public IWizardPage getNextPage(IWizardPage page) {
- if (page == mainPage) {
- if (prepareSharedFilesPage()) return sharedFilesPage;
- } else if (page == sharedFilesPage) {
- if (sharedFilesPage.includeSharedFiles() && prepareDirtyFilesPage()) return dirtyFilesPage;
- } else if (page == summaryPage) {
- return null;
- }
- prepareSummaryPage();
- return summaryPage;
- }
-
- public IWizardPage getPreviousPage(IWizardPage page) {
- if (page == summaryPage) {
- if (sharedFilesPage.includeSharedFiles() && prepareDirtyFilesPage()) return dirtyFilesPage;
- if (prepareSharedFilesPage()) return sharedFilesPage;
- return mainPage;
- } else if (page == dirtyFilesPage) {
- if (prepareSharedFilesPage()) return sharedFilesPage;
- return mainPage;
- } else if (page == sharedFilesPage) {
- return mainPage;
- }
- return null;
- }
-
- /* (Non-javadoc)
- * Method declared on IWizard.
- */
- public boolean needsProgressMonitor() {
- return true;
- }
-
- /* (Non-javadoc)
- * Method declared on IWizard.
- */
- public boolean needsPreviousAndNextButtons() {
- return true;
- }
-
- /* (Non-javadoc)
- * Method declared on IWizard.
- */
- public boolean performFinish() {
- try {
- defaultKSubst = mainPage.getKSubstOption();
- final List messages = new ArrayList();
- getContainer().run(false /*fork*/, true /*cancelable*/, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- monitor.beginTask("", 10000); //$NON-NLS-1$
- monitor.setTaskName(Policy.bind("KSubstWizard.working")); //$NON-NLS-1$
- computeChangeList(mainPage.getKSubstOption());
- Map table = getProviderMapping();
-
- int workPerProvider = 10000 / (table.size() + 1);
- monitor.worked(workPerProvider);
- for (Iterator it = table.entrySet().iterator(); it.hasNext();) {
- Map.Entry entry = (Map.Entry) it.next();
- CVSTeamProvider provider = (CVSTeamProvider) entry.getKey();
- Map providerFiles = (Map) entry.getValue();
-
- IStatus status = provider.setKeywordSubstitution(providerFiles,
- Policy.subMonitorFor(monitor, workPerProvider));
- if (status.getCode() != CVSStatus.OK) {
- messages.add(status);
- }
- }
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- });
- // Check for any status messages and display them
- if ( ! messages.isEmpty()) {
- boolean error = false;
- MultiStatus combinedStatus = new MultiStatus(CVSUIPlugin.ID, 0,
- Policy.bind("KSubstWizard.problemsMessage"), null); //$NON-NLS-1$
- for (int i = 0; i < messages.size(); i++) {
- IStatus status = (IStatus)messages.get(i);
- if (status.getSeverity() == IStatus.ERROR || status.getCode() == CVSStatus.SERVER_ERROR) {
- error = true;
- }
- combinedStatus.merge(status);
- }
- String message = null;
- IStatus statusToDisplay;
- if (combinedStatus.getChildren().length == 1) {
- message = combinedStatus.getMessage();
- statusToDisplay = combinedStatus.getChildren()[0];
- } else {
- statusToDisplay = combinedStatus;
- }
- String title;
- if (error) {
- title = Policy.bind("KSubstWizard.errorTitle"); //$NON-NLS-1$
- } else {
- title = Policy.bind("KSubstWizard.warningTitle"); //$NON-NLS-1$
- }
- ErrorDialog.openError(getShell(), title, message, statusToDisplay);
- }
- return true;
- } catch (InterruptedException e1) {
- return true;
- } catch (InvocationTargetException e2) {
- if (e2.getTargetException() instanceof CoreException) {
- CoreException e = (CoreException) e2.getTargetException();
- ErrorDialog.openError(getShell(), Policy.bind("KSubstWizard.problemsMessage"), null, e.getStatus()); //$NON-NLS-1$
- return false;
- } else {
- Throwable target = e2.getTargetException();
- if (target instanceof RuntimeException) {
- throw (RuntimeException) target;
- }
- if (target instanceof Error) {
- throw (Error) target;
- }
- }
- return true;
- }
- }
-
- private boolean prepareDirtyFilesPage() {
- BusyIndicator.showWhile(getContainer().getShell().getDisplay(), new Runnable() {
- public void run() {
- computeChangeList(mainPage.getKSubstOption());
- dirtyFilesPage.setChangeList(changeList);
- }
- });
- return ! dirtyFilesPage.isListEmpty();
- }
-
- private boolean prepareSharedFilesPage() {
- BusyIndicator.showWhile(getContainer().getShell().getDisplay(), new Runnable() {
- public void run() {
- computeChangeList(mainPage.getKSubstOption());
- sharedFilesPage.setChangeList(changeList);
- }
- });
- return ! sharedFilesPage.isListEmpty();
- }
-
- private void prepareSummaryPage() {
- BusyIndicator.showWhile(getContainer().getShell().getDisplay(), new Runnable() {
- public void run() {
- computeChangeList(mainPage.getKSubstOption());
- summaryPage.setChangeList(changeList, getFilters());
- }
- });
- }
-
- /**
- * @param ksubst the desired keyword substitution mode, if null chooses for each file:
- * <code>KSubstOption.fromPattern(fileName).isBinary() ? KSUBST_BINARY : KSUBST_TEXT</code>
- */
- private void computeChangeList(final KSubstOption ksubst) {
- if (changeList != null) {
- if (changeOption == ksubst) return;
- changeList.clear();
- } else {
- changeList = new ArrayList();
- }
- changeOption = ksubst;
- // recurse over all specified resources, considering each exactly once
- final Set seen = new HashSet();
- for (int i = 0; i < resources.length; i++) {
- final IResource currentResource = resources[i];
- try {
- currentResource.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- try {
- if (resource.getType() == IResource.FILE && resource.exists() && ! seen.contains(resource)) {
- seen.add(resource);
- IFile file = (IFile) resource;
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor(file);
- if (cvsFile.isManaged()) {
- ResourceSyncInfo info = cvsFile.getSyncInfo();
- // classify the change
- final int classification;
- if (info.isAdded()) {
- classification = KSubstChangeElement.ADDED_FILE;
- } else if (info.isDeleted()) {
- return true;
- } else if (cvsFile.isModified()) {
- classification = KSubstChangeElement.CHANGED_FILE;
- } else {
- classification = KSubstChangeElement.UNCHANGED_FILE;
- }
- // determine the to/from substitution modes
- KSubstOption fromKSubst = info.getKeywordMode();
- KSubstOption toKSubst = ksubst;
- if (ksubst == null) {
- toKSubst = KSubstOption.fromFile(file);
- }
- changeList.add(new KSubstChangeElement(file, classification, false, fromKSubst, toKSubst));
- }
- }
- } catch (TeamException e) {
- throw new CoreException(e.getStatus());
- }
- // always return true and let the depth determine if children are visited
- return true;
- }
- }, depth, false);
- } catch (CoreException e) {
- ErrorDialog.openError(getShell(), Policy.bind("KSubstWizard.problemsMessage"), null, e.getStatus()); //$NON-NLS-1$
- }
- }
- }
-
- private int getFilters() {
- return KSubstChangeElement.ADDED_FILE |
- (sharedFilesPage.includeSharedFiles() ? KSubstChangeElement.UNCHANGED_FILE |
- (dirtyFilesPage.includeDirtyFiles() ? KSubstChangeElement.CHANGED_FILE : 0) : 0);
- }
-
- private Map getProviderMapping() {
- Map table = new HashMap();
- int filter = getFilters();
- for (Iterator it = changeList.iterator(); it.hasNext();) {
- KSubstChangeElement change = (KSubstChangeElement) it.next();
- if (! change.isExcluded() && change.isNewKSubstMode() && change.matchesFilter(filter)) {
- // classify file according to its provider
- IFile file = change.getFile();
- RepositoryProvider provider = RepositoryProvider.getProvider(file.getProject(), CVSProviderPlugin.getTypeId());
- Map providerMap = (Map) table.get(provider);
- if (providerMap == null) {
- providerMap = new HashMap();
- table.put(provider, providerMap);
- }
- providerMap.put(file, change.toKSubst);
- }
- }
- return table;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardDirtyFilesPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardDirtyFilesPage.java
deleted file mode 100644
index 550a26099..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardDirtyFilesPage.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ListViewer;
-import org.eclipse.swt.SWT;
-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.Listener;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.wizards.KSubstWizard.KSubstChangeElement;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * Page to warn user about uncommitted outgoing changes.
- */
-public class KSubstWizardDirtyFilesPage extends CVSWizardPage {
- private boolean includeDirtyFiles;
- private Button includeDirtyFilesButton;
- private ListViewer listViewer;
-
- public KSubstWizardDirtyFilesPage(String pageName, String title, ImageDescriptor image, boolean includeDirtyFiles) {
- super(pageName, title, image);
- this.includeDirtyFiles = includeDirtyFiles;
- }
-
- public void createControl(Composite parent) {
- Composite top = new Composite(parent, SWT.NONE);
- top.setLayout(new GridLayout());
- setControl(top);
-
- // set F1 help
- WorkbenchHelp.setHelp(top, IHelpContextIds.KEYWORD_SUBSTITUTION_CHANGED_PAGE);
-
- createWrappingLabel(top, Policy.bind("KSubstWizardDirtyFilesPage.contents"), 0, LABEL_WIDTH_HINT); //$NON-NLS-1$
-
- includeDirtyFilesButton = new Button(top, SWT.CHECK);
- includeDirtyFilesButton.setText(Policy.bind("KSubstWizardDirtyFilesPage.includeDirtyFiles")); //$NON-NLS-1$
- includeDirtyFilesButton.setSelection(includeDirtyFiles);
- includeDirtyFilesButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- includeDirtyFiles = includeDirtyFilesButton.getSelection();
- }
- });
-
- createSeparator(top, SPACER_HEIGHT);
- listViewer = createFileListViewer(top,
- Policy.bind("KSubstWizardDirtyFilesPage.dirtyFilesViewer.title"), LIST_HEIGHT_HINT); //$NON-NLS-1$
- }
-
- public boolean includeDirtyFiles() {
- return includeDirtyFiles;
- }
-
- public void setChangeList(List changes) {
- List filteredFiles = new ArrayList();
- for (Iterator it = changes.iterator(); it.hasNext();) {
- KSubstChangeElement change = (KSubstChangeElement) it.next();
- if (change.matchesFilter(KSubstChangeElement.CHANGED_FILE)) {
- filteredFiles.add(change.getFile());
- }
- }
- listViewer.setInput(filteredFiles.toArray());
- }
-
- public boolean isListEmpty() {
- // returns true iff the list is empty after filtering
- return listViewer.getList().getItemCount() == 0;
- }
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- includeDirtyFilesButton.setFocus();
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardSelectionPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardSelectionPage.java
deleted file mode 100644
index 616af2ba8..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardSelectionPage.java
+++ /dev/null
@@ -1,149 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-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.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * Page to select keyword substitution mode.
- */
-public class KSubstWizardSelectionPage extends CVSWizardPage {
- private KSubstOption ksubst;
- private List ksubstOptions;
- private Button automaticRadioButton;
- private Button binaryRadioButton;
- private Button textRadioButton;
- private Button ksubstRadioButton;
- private Combo ksubstOptionCombo;
-
- public KSubstWizardSelectionPage(String pageName, String title, ImageDescriptor image, KSubstOption defaultKSubst) {
- super(pageName, title, image);
- this.ksubst = defaultKSubst;
-
- // sort the options by display text
- KSubstOption[] options = KSubstOption.getAllKSubstOptions();
- this.ksubstOptions = new ArrayList();
- for (int i = 0; i < options.length; i++) {
- KSubstOption option = options[i];
- if (! (Command.KSUBST_BINARY.equals(option) ||
- Command.KSUBST_TEXT.equals(option))) {
- ksubstOptions.add(option);
- }
- }
- Collections.sort(ksubstOptions, new Comparator() {
- public int compare(Object a, Object b) {
- String aKey = ((KSubstOption) a).getLongDisplayText();
- String bKey = ((KSubstOption) b).getLongDisplayText();
- return aKey.compareTo(bKey);
- }
- });
- }
-
- public void createControl(Composite parent) {
- Composite top = new Composite(parent, SWT.NONE);
- top.setLayout(new GridLayout());
- setControl(top);
-
- // set F1 help
- WorkbenchHelp.setHelp(top, IHelpContextIds.KEYWORD_SUBSTITUTION_SELECTION_PAGE);
-
- Listener selectionListener = new Listener() {
- public void handleEvent(Event event) {
- updateEnablements();
- }
- };
-
- // Automatic
- automaticRadioButton = createRadioButton(top, Policy.bind("KSubstWizardSelectionPage.automaticButton"), 1); //$NON-NLS-1$
- automaticRadioButton.addListener(SWT.Selection, selectionListener);
- automaticRadioButton.setSelection(ksubst == null);
- createWrappingLabel(top, Policy.bind("KSubstWizardSelectionPage.automaticLabel", //$NON-NLS-1$
- Command.KSUBST_BINARY.getLongDisplayText(),
- CVSProviderPlugin.getPlugin().getDefaultTextKSubstOption().getLongDisplayText()),
- LABEL_INDENT_WIDTH, LABEL_WIDTH_HINT);
-
- // Binary
- binaryRadioButton = createRadioButton(top, Policy.bind("KSubstWizardSelectionPage.binaryButton"), 1); //$NON-NLS-1$
- binaryRadioButton.addListener(SWT.Selection, selectionListener);
- binaryRadioButton.setSelection(Command.KSUBST_BINARY.equals(ksubst));
- createIndentedLabel(top, Policy.bind("KSubstWizardSelectionPage.binaryLabel"), LABEL_INDENT_WIDTH); //$NON-NLS-1$
-
- // Text without keyword substitution
- textRadioButton = createRadioButton(top, Policy.bind("KSubstWizardSelectionPage.textButton"), 1); //$NON-NLS-1$
- textRadioButton.addListener(SWT.Selection, selectionListener);
- textRadioButton.setSelection(Command.KSUBST_TEXT.equals(ksubst));
- createIndentedLabel(top, Policy.bind("KSubstWizardSelectionPage.textLabel"), LABEL_INDENT_WIDTH); //$NON-NLS-1$
-
- // Text with keyword substitution
- ksubstRadioButton = createRadioButton(top, Policy.bind("KSubstWizardSelectionPage.textWithSubstitutionsButton"), 1); //$NON-NLS-1$
- ksubstRadioButton.addListener(SWT.Selection, selectionListener);
- ksubstRadioButton.setSelection(false);
- createIndentedLabel(top, Policy.bind("KSubstWizardSelectionPage.textWithSubstitutionsLabel"), LABEL_INDENT_WIDTH); //$NON-NLS-1$
-
- ksubstOptionCombo = new Combo(top, SWT.READ_ONLY);
- ksubstOptionCombo.addListener(SWT.Selection, selectionListener);
- GridData data = new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_BEGINNING);
- data.horizontalIndent = LABEL_INDENT_WIDTH;
- ksubstOptionCombo.setLayoutData(data);
-
- // populate the combo box and select the default option
- for (int i = 0; i < ksubstOptions.size(); ++i) {
- KSubstOption option = (KSubstOption) ksubstOptions.get(i);
- ksubstOptionCombo.add(option.getLongDisplayText());
- if (option.equals(ksubst)) {
- ksubstOptionCombo.select(i);
- ksubstRadioButton.setSelection(true);
- } else if (option.equals(Command.KSUBST_TEXT_EXPAND)) {
- // if no expansion mode selected, show KSUBST_TEXT_EXPAND
- // since it is the server default
- if (! ksubstRadioButton.getSelection()) ksubstOptionCombo.select(i);
- }
- }
- updateEnablements();
- }
-
- /**
- * Enable and disable controls based on the selected radio button.
- */
- protected void updateEnablements() {
- if (ksubstRadioButton.getSelection()) {
- ksubstOptionCombo.setEnabled(true);
- ksubst = (KSubstOption) ksubstOptions.get(ksubstOptionCombo.getSelectionIndex());
- } else {
- ksubstOptionCombo.setEnabled(false);
- if (automaticRadioButton.getSelection()) {
- ksubst = null;
- } else if (binaryRadioButton.getSelection()) {
- ksubst = Command.KSUBST_BINARY;
- } else if (textRadioButton.getSelection()) {
- ksubst = Command.KSUBST_TEXT;
- }
- }
- }
-
- public KSubstOption getKSubstOption() {
- return ksubst;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardSharedFilesPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardSharedFilesPage.java
deleted file mode 100644
index cac1ad4c8..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardSharedFilesPage.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ListViewer;
-import org.eclipse.swt.SWT;
-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.Listener;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.wizards.KSubstWizard.KSubstChangeElement;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * Page to warn user about the side-effects of changing keyword
- * substitution on already committed files.
- */
-public class KSubstWizardSharedFilesPage extends CVSWizardPage {
- private boolean includeSharedFiles;
- private Button includeSharedFilesButton;
- private ListViewer listViewer;
-
- public KSubstWizardSharedFilesPage(String pageName, String title, ImageDescriptor image, boolean includeSharedFiles) {
- super(pageName, title, image);
- this.includeSharedFiles = includeSharedFiles;
- }
-
- public void createControl(Composite parent) {
- Composite top = new Composite(parent, SWT.NONE);
- top.setLayout(new GridLayout());
- setControl(top);
- createWrappingLabel(top, Policy.bind("KSubstWizardSharedFilesPage.contents"), 0, LABEL_WIDTH_HINT); //$NON-NLS-1$
-
- // set F1 help
- WorkbenchHelp.setHelp(top, IHelpContextIds.KEYWORD_SUBSTITUTION_SHARED_PAGE);
-
- includeSharedFilesButton = new Button(top, SWT.CHECK);
- includeSharedFilesButton.setText(Policy.bind("KSubstWizardSharedFilesPage.includeSharedFiles")); //$NON-NLS-1$
- includeSharedFilesButton.setSelection(includeSharedFiles);
- includeSharedFilesButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- includeSharedFiles = includeSharedFilesButton.getSelection();
- }
- });
-
- createSeparator(top, SPACER_HEIGHT);
- listViewer = createFileListViewer(top,
- Policy.bind("KSubstWizardSharedFilesPage.sharedFilesViewer.title"), LIST_HEIGHT_HINT); //$NON-NLS-1$
- }
-
- public boolean includeSharedFiles() {
- return includeSharedFiles;
- }
-
- public void setChangeList(List changes) {
- List filteredFiles = new ArrayList();
- for (Iterator it = changes.iterator(); it.hasNext();) {
- KSubstChangeElement change = (KSubstChangeElement) it.next();
- if (change.matchesFilter(KSubstChangeElement.CHANGED_FILE | KSubstChangeElement.UNCHANGED_FILE)) {
- filteredFiles.add(change.getFile());
- }
- }
- listViewer.setInput(filteredFiles.toArray());
- }
-
- public boolean isListEmpty() {
- // returns true iff the list is empty after filtering
- return listViewer.getList().getItemCount() == 0;
- }
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- includeSharedFilesButton.setFocus();
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardSummaryPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardSummaryPage.java
deleted file mode 100644
index 755e62745..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardSummaryPage.java
+++ /dev/null
@@ -1,283 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.ComboBoxCellEditor;
-import org.eclipse.jface.viewers.ICellModifier;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
-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.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.wizards.KSubstWizard.KSubstChangeElement;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.ui.model.WorkbenchViewerSorter;
-
-public class KSubstWizardSummaryPage extends CVSWizardPage {
- private CheckboxTableViewer tableViewer = null;
- private KSubstOption[] ksubstOptions;
- private String[] ksubstOptionsDisplayText;
- private int filterType;
-
- private Button showUnaffectedFilesButton;
- private boolean showUnaffectedFiles;
-
- public KSubstWizardSummaryPage(String pageName, String title, ImageDescriptor image, boolean showUnaffectedFiles) {
- super(pageName, title, image);
- this.showUnaffectedFiles = showUnaffectedFiles;
-
- // sort the options by display text
- ksubstOptions = KSubstOption.getAllKSubstOptions();
- ksubstOptionsDisplayText = new String[ksubstOptions.length];
- Arrays.sort(ksubstOptions, new Comparator() {
- public int compare(Object a, Object b) {
- String aKey = getModeDisplayText((KSubstOption) a);
- String bKey = getModeDisplayText((KSubstOption) b);
- return aKey.compareTo(bKey);
- }
- });
- for (int i = 0; i < ksubstOptions.length; i++) {
- ksubstOptionsDisplayText[i] = getModeDisplayText(ksubstOptions[i]);
- }
- }
-
- public void createControl(Composite parent) {
- Composite top = new Composite(parent, SWT.NONE);
- top.setLayout(new GridLayout());
- setControl(top);
- createWrappingLabel(top, Policy.bind("KSubstWizardSummaryPage.contents"), 0, LABEL_WIDTH_HINT); //$NON-NLS-1$
-
- // set F1 help
- WorkbenchHelp.setHelp(top, IHelpContextIds.KEYWORD_SUBSTITUTION_SUMMARY_PAGE);
-
- createSeparator(top, 0);
-
- showUnaffectedFilesButton = new Button(top, SWT.CHECK);
- showUnaffectedFilesButton.setText(Policy.bind("KSubstWizardSummaryPage.showUnaffectedFiles")); //$NON-NLS-1$
- showUnaffectedFilesButton.setSelection(showUnaffectedFiles);
- showUnaffectedFilesButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- BusyIndicator.showWhile(getContainer().getShell().getDisplay(), new Runnable() {
- public void run() {
- showUnaffectedFiles = showUnaffectedFilesButton.getSelection();
- refresh(false);
- }
- });
- }
- });
-
- tableViewer = createFileTableViewer(top,
- Policy.bind("KSubstWizardSummaryPage.summaryViewer.title"), //$NON-NLS-1$
- Policy.bind("KSubstWizardSummaryPage.summaryViewer.fileHeader"), //$NON-NLS-1$
- Policy.bind("KSubstWizardSummaryPage.summaryViewer.ksubstHeader"), //$NON-NLS-1$
- LIST_HEIGHT_HINT);
- }
-
- /**
- * Creates a TableViewer whose input is a Map from IFile to KSubstOption.
- *
- * @param parent the parent of the viewer
- * @param title the text for the title label
- * @param heightHint the nominal height of the list
- * @return the created list viewer
- */
- public CheckboxTableViewer createFileTableViewer(Composite parent, String title,
- String fileHeader, String ksubstHeader, int heightHint) {
- createLabel(parent, title);
- // create a table
- Table table = new Table(parent, SWT.CHECK | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER | SWT.FULL_SELECTION);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.heightHint = heightHint;
- table.setLayoutData(data);
- table.setLinesVisible(true);
- table.setHeaderVisible(true);
-
- // add the columns
- TableColumn column = new TableColumn(table, SWT.LEFT);
- column.setText(fileHeader);
- column = new TableColumn(table, SWT.LEFT);
- column.setText(ksubstHeader);
- TableLayout tableLayout = new TableLayout();
- table.setLayout(tableLayout);
- tableLayout.addColumnData(new ColumnWeightData(1, true));
- tableLayout.addColumnData(new ColumnWeightData(1, true));
-
- // create a viewer for the table
- final CheckboxTableViewer tableViewer = new CheckboxTableViewer(table);
- tableViewer.setContentProvider(new IStructuredContentProvider() {
- public Object[] getElements(Object inputElement) {
- return (Object[]) inputElement;
- }
- public void dispose() {
- }
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
- });
-
- // show file name and keyword substitution mode
- tableViewer.setLabelProvider(new ITableLabelProvider() {
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
- public String getColumnText(Object element, int columnIndex) {
- KSubstChangeElement change = (KSubstChangeElement) element;
- if (columnIndex == 0) {
- return change.getFile().getFullPath().toString();
- } else if (columnIndex == 1) {
- return getModeDisplayText(change.getKSubst());
- }
- return null;
- }
- public void addListener(ILabelProviderListener listener) {
- }
- public void dispose() {
- }
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
- public void removeListener(ILabelProviderListener listener) {
- }
- });
-
- // sort by file name
- tableViewer.setSorter(new WorkbenchViewerSorter() {
- public int compare(Viewer viewer, Object e1, Object e2) {
- IFile file1 = ((KSubstChangeElement) e1).getFile();
- IFile file2 = ((KSubstChangeElement) e2).getFile();
- return super.compare(viewer, file1, file2);
- }
- });
-
- // filter
- tableViewer.addFilter(new ViewerFilter() {
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- KSubstChangeElement change = (KSubstChangeElement) element;
- return ( showUnaffectedFiles || change.isNewKSubstMode()) && change.matchesFilter(filterType);
- }
- });
-
- // add a check state listener
- tableViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- KSubstChangeElement change = (KSubstChangeElement) event.getElement();
- if (tableViewer.getGrayed(change)) {
- // if it's grayed then give it the appearance of being disabled
- updateCheckStatus(change);
- } else {
- // otherwise record the change
- change.setExcluded(! event.getChecked());
- }
- }
- });
-
- // add a cell editor in the Keyword Substitution Mode column
- TableEditor tableEditor = new TableEditor(table);
- CellEditor cellEditor = new ComboBoxCellEditor(table, ksubstOptionsDisplayText);
- tableViewer.setCellEditors(new CellEditor[] { null, cellEditor });
- tableViewer.setColumnProperties(new String[] { "file", "mode" }); //$NON-NLS-1$ //$NON-NLS-2$
- tableViewer.setCellModifier(new ICellModifier() {
- public Object getValue(Object element, String property) {
- KSubstChangeElement change = (KSubstChangeElement) element;
- KSubstOption option = change.getKSubst();
- for (int i = 0; i < ksubstOptions.length; ++i) {
- if (ksubstOptions[i].equals(option)) return new Integer(i);
- }
- // XXX need to handle this better
- return null;
- }
- public boolean canModify(Object element, String property) {
- return true;
- }
- public void modify(Object element, String property, Object value) {
- // XXX The runtime type of 'element' seems to be a TableItem instead of the
- // actual element data as with the other methods. As a workaround, use
- // the table's selection mechanism instead.
- IStructuredSelection selection = (IStructuredSelection) tableViewer.getSelection();
- element = selection.getFirstElement();
- int index = ((Integer) value).intValue();
- // selection will be -1 if some arbitrary text was entered since the combo box is not read only
- if (index != -1) {
- KSubstChangeElement change = (KSubstChangeElement) element;
- KSubstOption newOption = ksubstOptions[index];
- if (! newOption.equals(change.getKSubst())) {
- // the option has been changed, include it by default now if it wasn't before
- // since the user has shown interest in it
- change.setKSubst(newOption);
- change.setExcluded(false);
- tableViewer.refresh(change, true /*updateLabels*/);
- updateCheckStatus(change);
- }
- }
- }
- });
- return tableViewer;
- }
-
- public void setChangeList(List changes, int filterType) {
- this.filterType = filterType;
- tableViewer.setInput(changes.toArray());
- refresh(true);
- }
-
- private void refresh(boolean updateLabels) {
- tableViewer.refresh(updateLabels);
- Object[] elements = (Object[]) tableViewer.getInput();
- for (int i = 0; i < elements.length; i++) {
- KSubstChangeElement change = (KSubstChangeElement) elements[i];
- updateCheckStatus(change);
- }
- }
-
- private void updateCheckStatus(KSubstChangeElement change) {
- if (change.isNewKSubstMode()) {
- // if the mode differs, the checkbox indicates the inclusion/exclusion status
- tableViewer.setGrayed(change, false);
- tableViewer.setChecked(change, ! change.isExcluded());
- } else {
- // otherwise, the checkbox is meaningless except to indicate that the file will not be changed
- tableViewer.setGrayed(change, true);
- tableViewer.setChecked(change, false);
- }
- }
-
- private String getModeDisplayText(KSubstOption option) {
- return option.getLongDisplayText();
- }
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- showUnaffectedFilesButton.setFocus();
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ModuleSelectionPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ModuleSelectionPage.java
deleted file mode 100644
index 3bb0e8388..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ModuleSelectionPage.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-public class ModuleSelectionPage extends CVSWizardPage {
- Button useProjectNameButton;
- Button useSpecifiedNameButton;
- Text text;
-
- String result;
- boolean useProjectName = true;
-
- public ModuleSelectionPage(String pageName, String title, ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- }
-
- public void createControl(Composite parent) {
- Composite composite = createComposite(parent, 2);
- // set F1 help
- WorkbenchHelp.setHelp(composite, IHelpContextIds.SHARING_MODULE_PAGE);
-
- useProjectNameButton = createRadioButton(composite, Policy.bind("ModuleSelectionPage.moduleIsProject"), 2); //$NON-NLS-1$
- useSpecifiedNameButton = createRadioButton(composite, Policy.bind("ModuleSelectionPage.specifyModule"), 1); //$NON-NLS-1$
- useProjectNameButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- useProjectName = useProjectNameButton.getSelection();
- if (useProjectName) {
- text.setEnabled(false);
- result = null;
- setPageComplete(true);
- } else {
- text.setEnabled(true);
- result = text.getText();
- if (result.length() == 0) {
- result = null;
- setPageComplete(false);
- } else {
- setPageComplete(true);
- }
- }
- }
- });
-
- text = createTextField(composite);
- text.setEnabled(false);
- text.addListener(SWT.Modify, new Listener() {
- public void handleEvent(Event event) {
- result = text.getText();
- if (result.length() == 0) {
- result = null;
- setPageComplete(false);
- } else {
- setPageComplete(true);
- }
- }
- });
- useSpecifiedNameButton.setSelection(false);
- useProjectNameButton.setSelection(true);
- setControl(composite);
- setPageComplete(true);
- }
- public String getModuleName() {
- return result;
- }
- public boolean useProjectName() {
- return useProjectName;
- }
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- useProjectNameButton.setFocus();
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/NewLocationWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/NewLocationWizard.java
deleted file mode 100644
index d0131d891..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/NewLocationWizard.java
+++ /dev/null
@@ -1,127 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Properties;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-
-public class NewLocationWizard extends Wizard {
- private ConfigurationWizardMainPage mainPage;
-
- private Properties properties = null;
-
- public NewLocationWizard() {
- IDialogSettings workbenchSettings = CVSUIPlugin.getPlugin().getDialogSettings();
- IDialogSettings section = workbenchSettings.getSection("NewLocationWizard");//$NON-NLS-1$
- if (section == null) {
- section = workbenchSettings.addNewSection("NewLocationWizard");//$NON-NLS-1$
- }
- setDialogSettings(section);
- setWindowTitle(Policy.bind("NewLocationWizard.title")); //$NON-NLS-1$
- }
-
- public NewLocationWizard(Properties initialProperties) {
- this();
- this.properties = initialProperties;
- }
-
- /**
- * Creates the wizard pages
- */
- public void addPages() {
- mainPage = new ConfigurationWizardMainPage("repositoryPage1", Policy.bind("NewLocationWizard.heading"), CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_NEW_LOCATION)); //$NON-NLS-1$ //$NON-NLS-2$
- if (properties != null) {
- mainPage.setProperties(properties);
- }
- mainPage.setShowValidate(true);
- mainPage.setDescription(Policy.bind("NewLocationWizard.description")); //$NON-NLS-1$
- mainPage.setDialogSettings(getDialogSettings());
- addPage(mainPage);
- }
- /*
- * @see IWizard#performFinish
- */
- public boolean performFinish() {
- mainPage.finish(new NullProgressMonitor());
- Properties properties = mainPage.getProperties();
- final ICVSRepositoryLocation[] root = new ICVSRepositoryLocation[1];
- ICVSProvider provider = CVSProviderPlugin.getProvider();
- try {
- root[0] = provider.createRepository(properties);
- if (mainPage.getValidate()) {
- try {
- new ProgressMonitorDialog(getShell()).run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- root[0].validateConnection(monitor);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InterruptedException e) {
- return false;
- } catch (InvocationTargetException e) {
- Throwable t = e.getTargetException();
- if (t instanceof TeamException) {
- throw (TeamException)t;
- }
- }
- }
- provider.addRepository(root[0]);
- } catch (TeamException e) {
- IStatus error = e.getStatus();
- if (root[0] == null) {
- // Exception creating the root, we cannot continue
- ErrorDialog.openError(getContainer().getShell(), Policy.bind("NewLocationWizard.exception"), null, error); //$NON-NLS-1$
- return false;
- } else {
- // Exception validating. We can continue if the user wishes.
- if (error.isMultiStatus() && error.getChildren().length == 1) {
- error = error.getChildren()[0];
- }
-
- boolean keep = false;
- if (error.isMultiStatus()) {
- ErrorDialog.openError(getContainer().getShell(), Policy.bind("NewLocationWizard.validationFailedTitle"), null, error); //$NON-NLS-1$
- } else {
- keep = MessageDialog.openQuestion(getContainer().getShell(),
- Policy.bind("NewLocationWizard.validationFailedTitle"), //$NON-NLS-1$
- Policy.bind("NewLocationWizard.validationFailedText", new Object[] {error.getMessage()})); //$NON-NLS-1$
- }
- try {
- if (keep) {
- provider.addRepository(root[0]);
- } else {
- provider.disposeRepository(root[0]);
- }
- } catch (TeamException e1) {
- ErrorDialog.openError(getContainer().getShell(), Policy.bind("exception"), null, e1.getStatus()); //$NON-NLS-1$
- return false;
- }
- return keep;
- }
- }
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RepositorySelectionPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RepositorySelectionPage.java
deleted file mode 100644
index 9f8f64303..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RepositorySelectionPage.java
+++ /dev/null
@@ -1,139 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.ui.internal.model.AdaptableList;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-/**
- * First wizard page for importing a project into a CVS repository.
- * This page prompts the user to select an existing repo or create a new one.
- * If the user selected an existing repo, then getLocation() will return it.
- */
-public class RepositorySelectionPage extends CVSWizardPage {
- private TableViewer table;
- private Button useExistingRepo;
- private Button useNewRepo;
-
- private ICVSRepositoryLocation result;
-
- /**
- * RepositorySelectionPage constructor.
- *
- * @param pageName the name of the page
- * @param title the title of the page
- * @param titleImage the image for the page
- */
- public RepositorySelectionPage(String pageName, String title, ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- }
- protected TableViewer createTable(Composite parent) {
- Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION);
- table.setLayoutData(new GridData(GridData.FILL_BOTH));
- TableLayout layout = new TableLayout();
- layout.addColumnData(new ColumnWeightData(100, true));
- table.setLayout(layout);
- TableColumn col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
-
- return new TableViewer(table);
- }
- /**
- * Creates the UI part of the page.
- *
- * @param parent the parent of the created widgets
- */
- public void createControl(Composite parent) {
- Composite composite = createComposite(parent, 2);
- // set F1 help
- WorkbenchHelp.setHelp(composite, IHelpContextIds.SHARING_SELECT_REPOSITORY_PAGE);
-
- Label description = new Label(composite, SWT.WRAP);
- GridData data = new GridData();
- data.horizontalSpan = 2;
- data.widthHint = 350;
- description.setLayoutData(data);
- description.setText(Policy.bind("RepositorySelectionPage.description")); //$NON-NLS-1$
-
- useExistingRepo = createRadioButton(composite, Policy.bind("RepositorySelectionPage.useExisting"), 2); //$NON-NLS-1$
- table = createTable(composite);
- table.setContentProvider(new WorkbenchContentProvider());
- table.setLabelProvider(new WorkbenchLabelProvider());
- table.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- result = (ICVSRepositoryLocation)((IStructuredSelection)table.getSelection()).getFirstElement();
- setPageComplete(true);
- }
- });
- useNewRepo = createRadioButton(composite, Policy.bind("RepositorySelectionPage.useNew"), 2); //$NON-NLS-1$
-
- useExistingRepo.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- if (useNewRepo.getSelection()) {
- table.getTable().setEnabled(false);
- result = null;
- } else {
- table.getTable().setEnabled(true);
- result = (ICVSRepositoryLocation)((IStructuredSelection)table.getSelection()).getFirstElement();
- }
- setPageComplete(true);
- }
- });
-
- setControl(composite);
-
- initializeValues();
- }
- /**
- * Initializes states of the controls.
- */
- private void initializeValues() {
- ICVSRepositoryLocation[] locations = CVSUIPlugin.getPlugin().getRepositoryManager().getKnownRoots();
- AdaptableList input = new AdaptableList(locations);
- table.setInput(input);
- if (locations.length == 0) {
- useNewRepo.setSelection(true);
- } else {
- useExistingRepo.setSelection(true);
- table.setSelection(new StructuredSelection(locations[0]));
- }
- }
-
- public ICVSRepositoryLocation getLocation() {
- return result;
- }
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- useExistingRepo.setFocus();
- }
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizard.java
deleted file mode 100644
index ff7f6eabf..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizard.java
+++ /dev/null
@@ -1,442 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.Properties;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.TagSelectionDialog;
-import org.eclipse.team.internal.ccvs.ui.sync.CVSSyncCompareInput;
-import org.eclipse.team.internal.ccvs.ui.sync.CVSSyncCompareUnsharedInput;
-import org.eclipse.team.internal.ui.sync.SyncView;
-import org.eclipse.team.ui.IConfigurationWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PartInitException;
-
-/**
- * This wizard helps the user to import a new project in their workspace
- * into a CVS repository for the first time.
- */
-public class SharingWizard extends Wizard implements IConfigurationWizard {
- // The project to configure
- private IProject project;
-
- // The autoconnect page is used if CVS/ directories already exist.
- private ConfigurationWizardAutoconnectPage autoconnectPage;
-
- // The import page is used if CVS/ directories do not exist.
- private RepositorySelectionPage locationPage;
-
- // The page that prompts the user for connection information.
- private ConfigurationWizardMainPage createLocationPage;
-
- // The page that prompts the user for module name.
- private ModuleSelectionPage modulePage;
-
- // The page that tells the user what's going to happen.
- private SharingWizardFinishPage finishPage;
-
- public SharingWizard() {
- IDialogSettings workbenchSettings = CVSUIPlugin.getPlugin().getDialogSettings();
- IDialogSettings section = workbenchSettings.getSection("NewLocationWizard");//$NON-NLS-1$
- if (section == null) {
- section = workbenchSettings.addNewSection("NewLocationWizard");//$NON-NLS-1$
- }
- setDialogSettings(section);
- setNeedsProgressMonitor(true);
- setWindowTitle(Policy.bind("SharingWizard.title")); //$NON-NLS-1$
- }
-
- public void addPages() {
- ImageDescriptor sharingImage = CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_SHARE);
- if (doesCVSDirectoryExist()) {
- autoconnectPage = new ConfigurationWizardAutoconnectPage("autoconnectPage", Policy.bind("SharingWizard.autoConnectTitle"), sharingImage); //$NON-NLS-1$ //$NON-NLS-2$
- autoconnectPage.setProject(project);
- autoconnectPage.setDescription(Policy.bind("SharingWizard.autoConnectTitleDescription"));
- addPage(autoconnectPage);
- } else {
- FolderSyncInfo info = getRepositoryInfoFromOneO(project);
- if (info != null) {
- // The project is from 1.0 and has sharing info
- autoconnectPage = new ConfigurationWizardAutoconnectPage("autoconnectPage", Policy.bind("SharingWizard.autoConnectOneOTitle"), sharingImage); //$NON-NLS-1$ //$NON-NLS-2$
- autoconnectPage.setSharing(info);
- autoconnectPage.setDescription(Policy.bind("SharingWizard.autoConnectTitleDescription"));
- addPage(autoconnectPage);
- } else {
- ICVSRepositoryLocation[] locations = CVSUIPlugin.getPlugin().getRepositoryManager().getKnownRoots();
- if (locations.length > 0) {
- locationPage = new RepositorySelectionPage("importPage", Policy.bind("SharingWizard.importTitle"), sharingImage); //$NON-NLS-1$ //$NON-NLS-2$
- locationPage.setDescription(Policy.bind("SharingWizard.importTitleDescription"));
- addPage(locationPage);
- }
- createLocationPage = new ConfigurationWizardMainPage("createLocationPage", Policy.bind("SharingWizard.enterInformation"), sharingImage); //$NON-NLS-1$ //$NON-NLS-2$
- createLocationPage.setDescription(Policy.bind("SharingWizard.enterInformationDescription"));
- addPage(createLocationPage);
- createLocationPage.setDialogSettings(getDialogSettings());
- modulePage = new ModuleSelectionPage("modulePage", Policy.bind("SharingWizard.enterModuleName"), sharingImage); //$NON-NLS-1$ //$NON-NLS-2$
- modulePage.setDescription(Policy.bind("SharingWizard.enterModuleNameDescription"));
- addPage(modulePage);
- finishPage = new SharingWizardFinishPage("finishPage", Policy.bind("SharingWizard.readyToFinish"), sharingImage); //$NON-NLS-1$ //$NON-NLS-2$
- finishPage.setDescription(Policy.bind("SharingWizard.readyToFinishDescription"));
- addPage(finishPage);
- }
- }
- }
- public boolean canFinish() {
- IWizardPage page = getContainer().getCurrentPage();
- if (page == locationPage) {
- if (locationPage.getLocation() == null) {
- return createLocationPage.isPageComplete();
- } else {
- return modulePage.useProjectName() || modulePage.getModuleName() != null;
- }
- } else if (page == modulePage) {
- return modulePage.useProjectName() || modulePage.getModuleName() != null;
- } else if (page == finishPage) {
- return true;
- }
- return super.canFinish();
- }
- protected String getMainPageDescription() {
- return Policy.bind("SharingWizard.description"); //$NON-NLS-1$
- }
- protected String getMainPageTitle() {
- return Policy.bind("SharingWizard.heading"); //$NON-NLS-1$
- }
- public IWizardPage getNextPage(IWizardPage page) {
- if (page == autoconnectPage) return null;
- if (page == locationPage) {
- if (locationPage.getLocation() == null) {
- return createLocationPage;
- } else {
- return modulePage;
- }
- }
- if (page == createLocationPage) {
- return modulePage;
- }
- if (page == modulePage) {
- return finishPage;
- }
- return null;
- }
- /*
- * @see IWizard#performFinish
- */
- public boolean performFinish() {
- final boolean[] result = new boolean[] { true };
- try {
- final boolean[] doSync = new boolean[] { false };
- final boolean[] projectExists = new boolean[] { false };
- getContainer().run(false, false, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- try {
- monitor.beginTask("", 100); //$NON-NLS-1$
- if (autoconnectPage != null && doesCVSDirectoryExist()) {
- // Autoconnect to the repository using CVS/ directories
-
- FolderSyncInfo info = autoconnectPage.getFolderSyncInfo();
- if (info == null) {
- // Error!
- return;
- }
-
- // Get the repository location (the get will add the locatin to the provider)
- boolean isPreviouslyKnown = CVSProviderPlugin.getProvider().isKnownRepository(info.getRoot());
- ICVSRepositoryLocation location = CVSProviderPlugin.getProvider().getRepository(info.getRoot());
-
- // Validate the connection if the user wants to
- boolean validate = autoconnectPage.getValidate();
- if (validate) {
- // Do the validation
- try {
- location.validateConnection(new SubProgressMonitor(monitor, 50));
- } catch (TeamException e) {
- // Exception validating. We can continue if the user wishes.
- boolean keep = MessageDialog.openQuestion(getContainer().getShell(),
- Policy.bind("SharingWizard.validationFailedTitle"), //$NON-NLS-1$
- Policy.bind("SharingWizard.validationFailedText", new Object[] {e.getStatus().getMessage()})); //$NON-NLS-1$
- if (!keep) {
- // Remove the root
- try {
- if (!isPreviouslyKnown) {
- CVSProviderPlugin.getProvider().disposeRepository(location);
- }
- } catch (TeamException e1) {
- ErrorDialog.openError(getContainer().getShell(), Policy.bind("exception"), null, e1.getStatus()); //$NON-NLS-1$
- }
- result[0] = false;
- return;
- }
- // They want to keep the connection anyway. Fall through.
- }
- }
-
- // Set the sharing
- CVSProviderPlugin.getProvider().setSharing(project, info, new SubProgressMonitor(monitor, 50));
- } else {
- // Import
- doSync[0] = true;
- // Check if the directory exists on the server
- ICVSRepositoryLocation location;
- boolean isKnown;
- try {
- location = getLocation();
- isKnown = CVSProviderPlugin.getProvider().isKnownRepository(location.getLocation());
- location.validateConnection(monitor);
- String moduleName = getModuleName();
- ICVSRemoteFolder folder = location.getRemoteFolder(moduleName, null);
- if (folder.exists(new SubProgressMonitor(monitor, 50))) {
- projectExists[0] = true;
- boolean sync = true;
- if (autoconnectPage == null) {
- sync = MessageDialog.openQuestion(getShell(), Policy.bind("SharingWizard.couldNotImport"), Policy.bind("SharingWizard.couldNotImportLong", getModuleName())); //$NON-NLS-1$ //$NON-NLS-2$
- }
- result[0] = sync;
- doSync[0] = sync;
- return;
- }
- } catch (TeamException e) {
- ErrorDialog.openError(getShell(), null, null, e.getStatus());
- result[0] = false;
- doSync[0] = false;
- return;
- }
- // Add the location to the provider if it is new
- if (!isKnown) {
- CVSProviderPlugin.getProvider().addRepository(location);
- }
- // Create the remote module for the project
- CVSProviderPlugin.getProvider().createModule(location, project, getModuleName(), new SubProgressMonitor(monitor, 50));
- }
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- });
- if (doSync[0]) {
- // Sync of the project
- SyncView view = (SyncView)CVSUIPlugin.getActivePage().findView(SyncView.VIEW_ID);
- if (view == null) {
- view = SyncView.findInActivePerspective();
- }
- if (view != null) {
- try {
- CVSUIPlugin.getActivePage().showView(SyncView.VIEW_ID);
- } catch (PartInitException e) {
- CVSUIPlugin.log(e.getStatus());
- }
- CVSSyncCompareInput input;
- if (projectExists[0]) {
- try {
- String moduleName = getModuleName();
- CVSTag tag;
- if (autoconnectPage == null) {
- TagSelectionDialog dialog = new TagSelectionDialog(getShell(),
- new ICVSFolder[] {(ICVSFolder)getLocation().getRemoteFolder(moduleName, null)},
- Policy.bind("SharingWizard.selectTagTitle"), //$NON-NLS-1$
- Policy.bind("SharingWizard.selectTag"), //$NON-NLS-1$
- TagSelectionDialog.INCLUDE_HEAD_TAG | TagSelectionDialog.INCLUDE_BRANCHES,
- false, /*don't show recurse option*/
- IHelpContextIds.SHARE_WITH_EXISTING_TAG_SELETION_DIALOG);
- dialog.setBlockOnOpen(true);
- if (dialog.open() == Dialog.CANCEL) {
- return false;
- }
- tag = dialog.getResult();
- } else {
- tag = autoconnectPage.getSharing().getTag();
- }
- input = new CVSSyncCompareUnsharedInput(project, getLocation(), moduleName, tag);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- } else {
- input = new CVSSyncCompareInput(new IResource[] {project});
- }
- view.showSync(input);
- }
- }
- } catch (InterruptedException e) {
- return true;
- } catch (InvocationTargetException e) {
- Throwable target = e.getTargetException();
- if (target instanceof RuntimeException) {
- throw (RuntimeException)target;
- }
- if (target instanceof Error) {
- throw (Error)target;
- } else if (target instanceof TeamException) {
- ErrorDialog.openError(getContainer().getShell(), null, null, ((TeamException)target).getStatus());
- }
- }
-
- return result[0];
- }
-
- /**
- * Return an ICVSRepositoryLocation
- */
- private ICVSRepositoryLocation getLocation() throws TeamException {
- // If there is an autoconnect page then it has the location
- if (autoconnectPage != null) {
- return autoconnectPage.getLocation();
- }
-
- // If the import page has a location, use it.
- if (locationPage != null) {
- ICVSRepositoryLocation location = locationPage.getLocation();
- if (location != null) return location;
- }
-
- getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- createLocationPage.finish(new NullProgressMonitor());
- }
- });
- Properties properties = createLocationPage.getProperties();
- CVSRepositoryLocation location = CVSRepositoryLocation.fromProperties(properties);
- return CVSProviderPlugin.getProvider().getRepository(location.getLocation());
- }
- /**
- * Return the module name.
- */
- private String getModuleName() {
- // If there is an autoconnect page then it has the module name
- if (autoconnectPage != null) {
- return autoconnectPage.getSharing().getRepository();
- }
- String moduleName = modulePage.getModuleName();
- if (moduleName == null) moduleName = project.getName();
- return moduleName;
- }
- /*
- * @see IConfigurationWizard#init(IWorkbench, IProject)
- */
- public void init(IWorkbench workbench, IProject project) {
- this.project = project;
- }
- private boolean doesCVSDirectoryExist() {
- // Determine if there is an existing CVS/ directory from which configuration
- // information can be retrieved.
- Shell shell = null;
- if (getContainer() != null) {
- shell = getContainer().getShell();
- }
- final boolean[] isCVSFolder = new boolean[] { false };
- try {
- CVSUIPlugin.runWithRefresh(shell, new IResource[] { project }, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- ICVSFolder folder = (ICVSFolder)CVSWorkspaceRoot.getCVSResourceFor(project);
- FolderSyncInfo info = folder.getFolderSyncInfo();
- isCVSFolder[0] = info != null;
- } catch (final TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- }, null);
- } catch (InvocationTargetException e) {
- final IStatus[] status = new IStatus[] { null };
- if (e.getTargetException() instanceof CoreException) {
- status[0] = ((CoreException)e.getTargetException()).getStatus();
- } else if (e.getTargetException() instanceof TeamException) {
- status[0] = ((TeamException)e.getTargetException()).getStatus();
- } else {
- status[0] = new Status(IStatus.ERROR, CVSUIPlugin.ID, 0, e.getTargetException().getMessage(), e.getTargetException());
- }
- Runnable runnable = new Runnable() {
- public void run() {
- Shell shell = null;
- if (getContainer() != null) {
- shell = getContainer().getShell();
- }
- ErrorDialog.openError(shell, null, null, status[0]);
- }
- };
- if (shell == null) {
- Display.getDefault().syncExec(runnable);
- } else {
- runnable.run();
- }
- } catch (InterruptedException e) {
- }
- return isCVSFolder[0];
- }
-
- private FolderSyncInfo getRepositoryInfoFromOneO(IProject project) {
- try {
- QualifiedName key = new QualifiedName("org.eclipse.vcm.core", "Sharing");
- byte[] syncBytes = ResourcesPlugin.getWorkspace().getSynchronizer().getSyncInfo(key, project); //$NON-NLS-1$ //$NON-NLS-2$
- if (syncBytes != null) {
- DataInputStream reader = new DataInputStream(new ByteArrayInputStream(syncBytes));
- String repoType = reader.readUTF();
- String repoLocation = reader.readUTF();
- String stream = reader.readUTF();
- reader.close();
- ResourcesPlugin.getWorkspace().getSynchronizer().flushSyncInfo(key, project, IResource.DEPTH_INFINITE);
- if (repoType.equals("CVS")) { //$NON-NLS-1$
- // Get the repository so it is added to the provider
- // (in case the user cancels after we purge the old info)
- CVSProviderPlugin.getProvider().getRepository(repoLocation);
- CVSTag tag;
- if (stream.equals("HEAD")) { //$NON-NLS-1$
- tag = CVSTag.DEFAULT;
- } else {
- tag = new CVSTag(stream, CVSTag.BRANCH);
- }
- return new FolderSyncInfo(project.getName(), repoLocation, tag, false);
- }
- }
- } catch (CVSException ex) {
- CVSUIPlugin.log(ex.getStatus());
- } catch (CoreException ex) {
- // Ignore the core exception since we will get one if the key is not registered
- } catch (IOException ex) {
- CVSUIPlugin.log(CVSException.wrapException(ex).getStatus());
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardFinishPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardFinishPage.java
deleted file mode 100644
index 2797b3772..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardFinishPage.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-public class SharingWizardFinishPage extends CVSWizardPage {
- public SharingWizardFinishPage(String pageName, String title, ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- }
-
- /*
- * @see IDialogPage#createControl(Composite)
- */
- public void createControl(Composite parent) {
- Composite composite = createComposite(parent, 1);
- // set F1 help
- WorkbenchHelp.setHelp(composite, IHelpContextIds.SHARING_FINISH_PAGE);
- Label label = new Label(composite, SWT.LEFT | SWT.WRAP);
- label.setText(Policy.bind("SharingWizardFinishPage.message")); //$NON-NLS-1$
- GridData data = new GridData();
- data.widthHint = 350;
- label.setLayoutData(data);
- setControl(composite);
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/UpdateWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/UpdateWizard.java
deleted file mode 100644
index d05a3f9a9..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/UpdateWizard.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-
-public class UpdateWizard extends Wizard {
-
- UpdateWizardPage updatePage;
- IProject project;
-
- public UpdateWizard() {
- setNeedsProgressMonitor(true);
- setWindowTitle(Policy.bind("UpdateWizard.title")); //$NON-NLS-1$
- }
-
- public void addPages() {
- // Provide a progress monitor to indicate what is going on
- try {
- new ProgressMonitorDialog(getShell()).run(false, false, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- monitor.beginTask(null, 100);
- updatePage = new UpdateWizardPage("updatePage", Policy.bind("UpdateWizard.updatePage"), CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_SHARE)); //$NON-NLS-1$ //$NON-NLS-2$
- updatePage.setProject(project);
- addPage(updatePage);
- monitor.done();
- }
- });
- } catch (InvocationTargetException e) {
- CVSUIPlugin.log(new Status(IStatus.ERROR, CVSUIPlugin.ID, 0, Policy.bind("internal"), e.getTargetException())); //$NON-NLS-1$
- } catch (InterruptedException e) {
- // Ignore
- }
- }
-
- /*
- * @see IWizard#performFinish()
- */
- public boolean performFinish() {
- final boolean[] result = new boolean[] {false};
- try {
- getContainer().run(false, false, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- try {
- CVSTeamProvider provider = ((CVSTeamProvider)RepositoryProvider.getProvider(project));
- provider.update(new IResource[] { project }, updatePage.getLocalOptions(),
- updatePage.getTag(), true /*createBackups*/, monitor);
- result[0] = true;
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- });
- } catch (InterruptedException e) {
- return true;
- } catch (InvocationTargetException e) {
- Throwable target = e.getTargetException();
- if (target instanceof CVSException) {
- ErrorDialog.openError(getShell(), null, null, ((CVSException)target).getStatus());
- return false;
- }
- if (target instanceof RuntimeException) {
- throw (RuntimeException)target;
- }
- if (target instanceof Error) {
- throw (Error)target;
- }
- }
- return result[0];
- }
-
- public void setProject(IProject project) {
- this.project = project;
- }
-}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/UpdateWizardPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/UpdateWizardPage.java
deleted file mode 100644
index 20d8292b0..000000000
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/UpdateWizardPage.java
+++ /dev/null
@@ -1,153 +0,0 @@
-package org.eclipse.team.internal.ccvs.ui.wizards;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Update;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.TagConfigurationDialog;
-import org.eclipse.team.internal.ccvs.ui.merge.ProjectElement;
-import org.eclipse.team.internal.ccvs.ui.merge.TagElement;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-public class UpdateWizardPage extends CVSWizardPage {
-
- IProject project;
- TreeViewer tree;
- CVSTag result;
- ICVSRemoteFolder remote;
- boolean doOverwrite;
-
- public UpdateWizardPage(String pageName, String title, ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- }
-
- /*
- * @see IDialogPage#createControl(Composite)
- */
- public void createControl(Composite parent) {
- Composite composite = createComposite(parent, 2);
- // set F1 help
- // WorkbenchHelp.setHelp(composite, new DialogPageContextComputer (this, ITeamHelpContextIds.REPO_CONNECTION_MAIN_PAGE));
-
- Label description = new Label(composite, SWT.WRAP);
- GridData data = new GridData();
- data.horizontalSpan = 2;
- data.widthHint = 350;
- description.setLayoutData(data);
- description.setText(Policy.bind("UpdateWizardPage.description")); //$NON-NLS-1$
-
- tree = createTree(composite);
- tree.setContentProvider(new WorkbenchContentProvider());
- tree.setLabelProvider(new WorkbenchLabelProvider());
- tree.setSorter(new ViewerSorter() {
- public int compare(Viewer v, Object o1, Object o2) {
- int result = super.compare(v, o1, o2);
- if (o1 instanceof TagElement && o2 instanceof TagElement) {
- return -result;
- }
- return result;
- }
- });
- tree.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- Object selected = ((IStructuredSelection)tree.getSelection()).getFirstElement();
- if (selected instanceof TagElement) {
- result = ((TagElement)selected).getTag();
- setPageComplete(true);
- } else {
- result = null;
- setPageComplete(false);
- }
- }
- });
-
- createLabel(composite, ""); //$NON-NLS-1$
- createLabel(composite, ""); //$NON-NLS-1$
-
- doOverwrite = false;
- final Button overwrite = new Button(composite, SWT.CHECK);
- data = new GridData();
- data.horizontalSpan = 2;
- overwrite.setLayoutData(data);
- overwrite.setText(Policy.bind("UpdateWizardPage.overwrite")); //$NON-NLS-1$
- overwrite.setSelection(doOverwrite);
- overwrite.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- doOverwrite = overwrite.getSelection();
- }
- });
-
- setControl(composite);
- tree.setInput(new ProjectElement(CVSWorkspaceRoot.getCVSFolderFor(project), ProjectElement.INCLUDE_ALL_TAGS));
-
- Runnable refresh = new Runnable() {
- public void run() {
- tree.refresh();
- }
- };
- TagConfigurationDialog.createTagDefinitionButtons(getShell(), composite, new ICVSFolder[] {CVSWorkspaceRoot.getCVSFolderFor(project)},
- convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT),
- convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH), refresh, refresh);
-
- Label seperator = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);
- data = new GridData (GridData.FILL_BOTH);
- data.horizontalSpan = 2;
- seperator.setLayoutData(data);
-
- setPageComplete(false);
- }
-
- protected TreeViewer createTree(Composite parent) {
- Tree tree = new Tree(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.SINGLE);
- tree.setLayoutData(new GridData(GridData.FILL_BOTH));
- return new TreeViewer(tree);
- }
-
- public void setProject(IProject project) {
- this.project = project;
- try {
- this.remote = (ICVSRemoteFolder) CVSWorkspaceRoot.getRemoteResourceFor(project);
- } catch (TeamException e) {
- // To do
- }
- }
-
- public CVSTag getTag() {
- return result;
- }
-
- public LocalOption[] getLocalOptions() {
- if (doOverwrite) {
- return new LocalOption[] { Update.IGNORE_LOCAL_CHANGES };
- }
- return Command.NO_LOCAL_OPTIONS;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/.classpath b/bundles/org.eclipse.team.ui/.classpath
deleted file mode 100644
index b9991d9b2..000000000
--- a/bundles/org.eclipse.team.ui/.classpath
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="/org.eclipse.team.core"/>
- <classpathentry kind="src" path="/org.eclipse.core.resources"/>
- <classpathentry kind="src" path="/org.eclipse.ui"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
- <classpathentry kind="src" path="/org.eclipse.swt"/>
- <classpathentry kind="src" path="/org.eclipse.compare"/>
- <classpathentry kind="src" path="/org.apache.xerces"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.team.ui/.cvsignore b/bundles/org.eclipse.team.ui/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/bundles/org.eclipse.team.ui/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/bundles/org.eclipse.team.ui/.project b/bundles/org.eclipse.team.ui/.project
deleted file mode 100644
index 55c7e2e2a..000000000
--- a/bundles/org.eclipse.team.ui/.project
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.team.ui</name>
- <comment></comment>
- <projects>
- <project>org.apache.xerces</project>
- <project>org.eclipse.compare</project>
- <project>org.eclipse.core.resources</project>
- <project>org.eclipse.core.runtime</project>
- <project>org.eclipse.swt</project>
- <project>org.eclipse.team.core</project>
- <project>org.eclipse.ui</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.team.cvs.core.cvsnature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.team.ui/README b/bundles/org.eclipse.team.ui/README
deleted file mode 100644
index 6a358f07a..000000000
--- a/bundles/org.eclipse.team.ui/README
+++ /dev/null
@@ -1,13 +0,0 @@
-Note to users of this plug-in
-
-The classes and interfaces in this plug-in are part of an API that is
-still under development and expected to change significantly before
-reaching stability. It is being made available at this early stage to
-solicit feedback from pioneering adopters on the understanding
-that any code that uses this API will almost certainly be broken
-(repeatedly) as the API evolves.
-
-For up-to-date information on these APIs and other related news see
-our component page:
-
-http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/platform-vcm-home/main.html \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/about.html b/bundles/org.eclipse.team.ui/about.html
deleted file mode 100644
index 441774f92..000000000
--- a/bundles/org.eclipse.team.ui/about.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<html>
-<head>
-<title>About</title>
-<style type="text/css">
-p, table, td, th { font-family: arial, helvetica, geneva; font-size: 10pt}
-pre { font-family: "Courier New", Courier, mono; font-size: 10pt}
-h2 { font-family: arial, helvetica, geneva; font-size: 18pt; font-weight: bold ; line-height: 14px}
-code { font-family: "Courier New", Courier, mono; font-size: 10pt}
-sup { font-family: arial,helvetica,geneva; font-size: 10px}
-h3 { font-family: arial, helvetica, geneva; font-size: 14pt; font-weight: bold}
-li { font-family: arial, helvetica, geneva; font-size: 10pt}
-h1 { font-family: arial, helvetica, geneva; font-size: 28px; font-weight: bold}
-body { font-family: arial, helvetica, geneva; font-size: 10pt; clip: rect( ); margin-top: 5mm; margin-left: 3mm}
-</style>
-</head>
-<body lang="EN-US" link="blue" vlink="purple">
-<table border="0" cellspacing="5" cellpadding="2" width="100%" >
- <tr>
- <td align="LEFT" valign="TOP" colspan="2" bgcolor="#0080C0"><b><font color="#FFFFFF">About This Content</font></b></td>
- </tr>
- <tr>
- <td>
-<p>11th December, 2001</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in &quot;Content&quot;. Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-<a href="http://www.eclipse.org/legal/cpl-v05.html">Common Public License Version 0.5</a> &quot;CPL&quot;. For purposes of the CPL, &quot;Program&quot; will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL &quot;Other License&quot;, any modifications, enhancements and/or
-other code and/or documentation &quot;Modifications&quot; uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-</td></tr></table>
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/build.properties b/bundles/org.eclipse.team.ui/build.properties
deleted file mode 100644
index 3ef4fb5d6..000000000
--- a/bundles/org.eclipse.team.ui/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-# Eclipse build contribution
-bin.includes=about.html,icons/,plugin.xml,plugin.properties,*.jar,help_contexts.xml
-source.teamui.jar=src/
-src.includes=about.html
diff --git a/bundles/org.eclipse.team.ui/doc/hglegal.htm b/bundles/org.eclipse.team.ui/doc/hglegal.htm
deleted file mode 100644
index c59811321..000000000
--- a/bundles/org.eclipse.team.ui/doc/hglegal.htm
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.73 [en] (Win98; U) [Netscape]">
- <title>Legal Notices</title>
-</head>
-<body>
-
-<h3>
-<a NAME="Notices"></a>Notices</h3>
-(c) Copyright IBM Corp. 2000, 2001. All Rights Reserved.
-</body>
-</html>
diff --git a/bundles/org.eclipse.team.ui/doc/ngibmcpy.gif b/bundles/org.eclipse.team.ui/doc/ngibmcpy.gif
deleted file mode 100644
index 360f8e998..000000000
--- a/bundles/org.eclipse.team.ui/doc/ngibmcpy.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/doc/org_eclipse_team_ui.html b/bundles/org.eclipse.team.ui/doc/org_eclipse_team_ui.html
deleted file mode 100644
index 807b2ff6c..000000000
--- a/bundles/org.eclipse.team.ui/doc/org_eclipse_team_ui.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Team UI Extension Points</title>
-</head>
-<body link="#0000FF" vlink="#800080">
-
-<center>
-<h1>Team UI Plug-in</h1></center>
-This document lists all of the extension points that the Team UI plug-in makes available to provider developers.
-<p>
-<hr WIDTH="100%">
-<h1>
-General Extension Points</h1>
-The following extension point can be used to register a configuration mechanism for associating a project
-with a team provider:
-<ul>
-<li>
-<a href="org_eclipse_team_ui_configurationWizards.html">org.eclipse.team.ui.configurationWizards</a></li>
-</ul>
-<a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2001. All Rights Reserved." BORDER=0 height=12 width=195></a>
-</body>
-</html>
diff --git a/bundles/org.eclipse.team.ui/doc/org_eclipse_team_ui_configurationWizards.html b/bundles/org.eclipse.team.ui/doc/org_eclipse_team_ui_configurationWizards.html
deleted file mode 100644
index 69eed425a..000000000
--- a/bundles/org.eclipse.team.ui/doc/org_eclipse_team_ui_configurationWizards.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Eclipse Team UI Extension Point: Configuration Wizards</title>
-</head>
-<body link="#0000FF" vlink="#800080">
-
-<center>
-<h1>
-Configuration Wizards</h1></center>
-<b><i>Identifier: </i></b>org.eclipse.team.ui.configurationWizards
-<p><b><i>Description: </i></b>This extension point is used to register
-a method for configuration of a project. Configuration involves the association
-of a project with a team provider, including all information necessary to
-initialize that team provider, including such things as username, password, and
-any relevant information necessary to locate the provider.
-<p>Providers may provide an extension for this extension point, and an
-implementation of <code>org.eclipse.team.ui.IConfigurationWizard</code> which
-gathers the necessary information and configures the project.
-<p><b><i>Configuration Markup:</i></b>
-<p><tt>&nbsp;&nbsp; &lt;!ELEMENT wizard EMPTY></tt>
-<br><tt>&nbsp;&nbsp; &lt;!ATTLIST wizard</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; icon&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp; ></tt>
-
-<ul>
-<li><b>name -</b> the name of the configuration type, as it should appear in the configuration wizard. Examples are "CVS", "WebDAV".</li>
-<li><b>icon -</b> the icon to present in the configuration wizard next to the name.</li>
-<li><b>class -</b> a fully qualified name of the Java class implementing <tt>org.eclipse.team.ui.IConfigurationWizard</tt>.</li>
-<li><b>id - </b> a unique identifier for this extension.</li>
-</ul>
-
-<b><i>Examples:</i></b>
-<p>Following is an example of a configuration wizard extension:
-<p><tt>&nbsp;&nbsp; &lt;extension point="org.eclipse.team.ui.configurationWizard"></tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;wizard</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name="WebDAV"</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; icon="webdav.gif"</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class="com.xyz.DAVDecorator"</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id="com.xyz.dav"></tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/wizard></tt>
-<br><tt>&nbsp;&nbsp; &lt;/extension></tt>
-
-<p><b><i>API Information</i>: </b>The value of the <tt>class</tt> attribute
-must represent a class that implements <tt>org.eclipse.team.ui.IConfigurationWizard</tt>.
-This interface supports configuration of a wizard given a workbench and a project.
-
-<p><b><i>Supplied Implementation: </i></b>The plug-in org.eclipse.team.provider.examples.ui contains
-sample implementations of IConfigurationWizard for the WebDAV and filesystem provider types.
-
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2001. All Rights Reserved." BORDER=0 height=12 width=195></a>
-</body>
-</html>
diff --git a/bundles/org.eclipse.team.ui/help_contexts.xml b/bundles/org.eclipse.team.ui/help_contexts.xml
deleted file mode 100644
index 8c8caf7d1..000000000
--- a/bundles/org.eclipse.team.ui/help_contexts.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?NLS TYPE="org.eclipse.help.contexts"?>
-<contexts>
-
- <!-- ********************************** -->
- <!-- Preference Pages -->
- <!-- ********************************** -->
- <context id="ignore_preference_page_context" >
- <description>You may wish to exclude certain resources from version control. Resources whose names match any enabled pattern will not be released. The wildcard characters '*' and '?' are permitted. These settings will not affect resources already under version control.
- </description>
- <!-- Old reference fom 1.0 -->
- <topic label="More info" href="reference/ref20.html"/>
- </context>
-
- <!-- ********************************** -->
- <!-- TargetMenuActions -->
- <!-- ********************************** -->
-
- <context id="target_get_action_context">
- <description>Downloads the file(s) from the remote server
- </description>
- </context>
-
- <context id="target_put_action_context">
- <description>Uploads the file(s) to the remote server
- </description>
- </context>
-
- <context id="target_synchronize_action_context">
- <description>Gets the remote &amp; local projects in sync with each other
- </description>
- </context>
-
- <context id="target_getas_action_context">
- <description>Save the file with a different name
- </description>
- </context>
-
- <context id="target_getasproject_action_context">
- <description>Save the project under a different name
- </description>
- </context>
-
- <context id="target_disconnect_action_context">
- <description>Remove the Target provider
- </description>
- </context>
-
- <!-- ********************************** -->
- <!-- TargetCatchupReleaseViewer -->
- <!-- ********************************** -->
-
- <context id="catchup_release_viewer_context">
- <description>Bring the local project up-to-date with the remote one
- </description>
- </context>
-
- <!-- ********************************** -->
- <!-- TargetActions -->
- <!-- ********************************** -->
-
- <context id="sync_get_action">
- <description>Sync the local project to the remote one
- </description>
- </context>
-
- <context id="sync_put_action">
- <description>Sync the remote project to the local one
- </description>
- </context>
-
- <!-- ********************************** -->
- <!-- Views -->
- <!-- ********************************** -->
-
- <context id="site_explorer_view">
- <description>This view allows you to manipulate the files on the remote server.
- </description>
- </context>
-
-</contexts> \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/icons/full/clcl16/catchup_rls.gif b/bundles/org.eclipse.team.ui/icons/full/clcl16/catchup_rls.gif
deleted file mode 100644
index ba8ee00a3..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/clcl16/catchup_rls.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/clcl16/catchuprelease_rls.gif b/bundles/org.eclipse.team.ui/icons/full/clcl16/catchuprelease_rls.gif
deleted file mode 100644
index 25d4c998b..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/clcl16/catchuprelease_rls.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/clcl16/conflict_synch.gif b/bundles/org.eclipse.team.ui/icons/full/clcl16/conflict_synch.gif
deleted file mode 100644
index ecde52ea8..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/clcl16/conflict_synch.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/clcl16/contents.gif b/bundles/org.eclipse.team.ui/icons/full/clcl16/contents.gif
deleted file mode 100644
index bb2d85225..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/clcl16/contents.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/clcl16/ignorews_edit.gif b/bundles/org.eclipse.team.ui/icons/full/clcl16/ignorews_edit.gif
deleted file mode 100644
index 097ecdda5..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/clcl16/ignorews_edit.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/clcl16/incom_synch.gif b/bundles/org.eclipse.team.ui/icons/full/clcl16/incom_synch.gif
deleted file mode 100644
index dc9bfc62d..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/clcl16/incom_synch.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/clcl16/outgo_synch.gif b/bundles/org.eclipse.team.ui/icons/full/clcl16/outgo_synch.gif
deleted file mode 100644
index afe6b1736..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/clcl16/outgo_synch.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/clcl16/refresh.gif b/bundles/org.eclipse.team.ui/icons/full/clcl16/refresh.gif
deleted file mode 100644
index a063c230a..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/clcl16/refresh.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/clcl16/release_rls.gif b/bundles/org.eclipse.team.ui/icons/full/clcl16/release_rls.gif
deleted file mode 100644
index 3162b9373..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/clcl16/release_rls.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/clcl16/site_element.gif b/bundles/org.eclipse.team.ui/icons/full/clcl16/site_element.gif
deleted file mode 100644
index 9dd4d8300..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/clcl16/site_element.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/cview16/site_view.gif b/bundles/org.eclipse.team.ui/icons/full/cview16/site_view.gif
deleted file mode 100644
index 6f03d10e5..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/cview16/site_view.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/cview16/synch_synch.gif b/bundles/org.eclipse.team.ui/icons/full/cview16/synch_synch.gif
deleted file mode 100644
index c4a11c3cc..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/cview16/synch_synch.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/obj/export_projectset.gif b/bundles/org.eclipse.team.ui/icons/full/obj/export_projectset.gif
deleted file mode 100644
index ab35990f1..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/obj/export_projectset.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/obj/import_projectset.gif b/bundles/org.eclipse.team.ui/icons/full/obj/import_projectset.gif
deleted file mode 100644
index 17cb2e7db..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/obj/import_projectset.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/obj/share_project.gif b/bundles/org.eclipse.team.ui/icons/full/obj/share_project.gif
deleted file mode 100644
index 2b73ce2b3..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/obj/share_project.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/ovr/checkedin_ov.gif b/bundles/org.eclipse.team.ui/icons/full/ovr/checkedin_ov.gif
deleted file mode 100644
index a2b345d79..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/ovr/checkedin_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/ovr/checkedout_ov.gif b/bundles/org.eclipse.team.ui/icons/full/ovr/checkedout_ov.gif
deleted file mode 100644
index a11a542b1..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/ovr/checkedout_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/ovr/dirty_ov.gif b/bundles/org.eclipse.team.ui/icons/full/ovr/dirty_ov.gif
deleted file mode 100644
index e291d8a5f..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/ovr/dirty_ov.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/wizban/export_projectset_wizban.gif b/bundles/org.eclipse.team.ui/icons/full/wizban/export_projectset_wizban.gif
deleted file mode 100644
index 28443a5ed..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/wizban/export_projectset_wizban.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/wizban/import_projectset_wizban.gif b/bundles/org.eclipse.team.ui/icons/full/wizban/import_projectset_wizban.gif
deleted file mode 100644
index 47a869b59..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/wizban/import_projectset_wizban.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/wizban/newconnect_wizban.gif b/bundles/org.eclipse.team.ui/icons/full/wizban/newconnect_wizban.gif
deleted file mode 100644
index 3038a23c0..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/wizban/newconnect_wizban.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/icons/full/wizban/share_wizban.gif b/bundles/org.eclipse.team.ui/icons/full/wizban/share_wizban.gif
deleted file mode 100644
index d32a9696e..000000000
--- a/bundles/org.eclipse.team.ui/icons/full/wizban/share_wizban.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.team.ui/plugin.properties b/bundles/org.eclipse.team.ui/plugin.properties
deleted file mode 100644
index e7237b82d..000000000
--- a/bundles/org.eclipse.team.ui/plugin.properties
+++ /dev/null
@@ -1,37 +0,0 @@
-providerName=Eclipse.org
-pluginName=Team Support UI
-
-TeamPreferencePage.name=Team
-
-TextPreferencePage.name=File Content
-
-IgnorePreferencePage.name=Ignored Resources
-
-ConfigureProject.label=&Share Project...
-ConfigureProject.tooltip=Share the project with others using a version and configuration management system.
-
-TeamGroupMenu.label=T&eam
-Team.viewCategory=Team
-
-SyncView.name=Synchronize
-
-ProjectSetImportWizard.description=A wizard that imports a Team Project Set
-ProjectSetImportWizard.name=Team Project Set
-ProjectSetExportWizard.name=Team Project Set
-ProjectSetExportWizard.description=A wizard that exports a Team Project Set
-
-SiteExplorerView.name=Site Explorer
-
-Deployment.viewCategory=Target Management
-Deployment.group=Depl&oy
-Deployment.getAction=&Target
-Deployment.uploadAction=Upl&oad
-Deployment.configSite=Tar&get Site...
-Deployment.synchronize=Synchroni&ze with Target...
-
-SiteExplorerGetAs.label=Download &As...
-SiteExplorerGetAs.tooltip=Download the selected remote folder with a user specified project type and name.
-SiteExplorerGetAsProject.label=&Download As Project
-SiteExplorerGetAsProject.tooltip=Download the selected remote folder and create a project with the same name.
-SiteExplorerDiscardSite.label=D&iscard Site
-SiteExplorerDiscardSite.tooltip=Discard the site \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/plugin.xml b/bundles/org.eclipse.team.ui/plugin.xml
deleted file mode 100644
index 2fba0801d..000000000
--- a/bundles/org.eclipse.team.ui/plugin.xml
+++ /dev/null
@@ -1,240 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- File written by PDE 1.0 -->
-<plugin
- id="org.eclipse.team.ui"
- name="%pluginName"
- version="2.0.0"
- provider-name="%providerName"
- class="org.eclipse.team.internal.ui.TeamUIPlugin">
-
-<requires>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.team.core"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.compare"/>
- <import plugin="org.apache.xerces"/>
-</requires>
-
-<runtime>
- <library name="teamui.jar">
- <export name="*"/>
- </library>
-</runtime>
-
-<extension-point id="configurationWizards" name="Configuration Wizards"/>
-<extension-point id="targetConfigWizards" name="Target Site Addition Wizards"/>
-
-<!-- *************** Help **************** -->
- <extension point="org.eclipse.help.contexts">
- <contexts file="help_contexts.xml" plugin="org.eclipse.team.ui"/>
- </extension>
-
-<!-- **************** PREFERENCES ******************* -->
- <extension
- point = "org.eclipse.ui.preferencePages">
- <page id="org.eclipse.team.ui.TeamPreferences"
- class="org.eclipse.team.internal.ui.TeamPreferencePage"
- name="%TeamPreferencePage.name">
- </page>
- <page id="org.eclipse.team.ui.TextPreferences"
- class="org.eclipse.team.internal.ui.TextPreferencePage"
- name="%TextPreferencePage.name"
- category="org.eclipse.team.ui.TeamPreferences">
- </page>
- <page id="org.eclipse.team.ui.IgnorePreferences"
- class="org.eclipse.team.internal.ui.IgnorePreferencePage"
- name="%IgnorePreferencePage.name"
- category="org.eclipse.team.ui.TeamPreferences">
- </page>
- </extension>
-
-<!-- ****************** POPUP ACTIONS *************** -->
-
-<extension
- point="org.eclipse.ui.popupMenus">
- <objectContribution
- id="org.eclipse.team.ui.ResourceContributions"
- objectClass="org.eclipse.core.resources.IResource" adaptable="true">
- <menu
- id="team.main"
- path="additions"
- label="%TeamGroupMenu.label">
- <separator name="group1"/>
- <separator name="group2"/>
- <separator name="group3"/>
- <separator name="group4"/>
- <separator name="group5"/>
- <separator name="group6"/>
- <separator name="group7"/>
- <separator name="group8"/>
- <separator name="group9"/>
- <separator name="group10"/>
- <separator name="targetGroup"/>
- <separator name="projectGroup"/>
- </menu>
- </objectContribution>
- <objectContribution
- id="org.eclipse.team.ui.ProjectContributions"
- objectClass="org.eclipse.core.resources.IProject" adaptable="true">
- <action
- id="org.eclipse.team.ui.ConfigureProject"
- label="%ConfigureProject.label"
- tooltip="%ConfigureProject.tooltip"
- menubarPath="team.main/projectGroup"
- enablesFor="1"
- class="org.eclipse.team.internal.ui.actions.ConfigureProjectAction">
- </action>
- </objectContribution>
-
- <!-- ****************** Target Management Popup Actions *************** -->
-
- <objectContribution
- id="org.eclipse.team.ui.targetResourceContributionsActions"
- objectClass="org.eclipse.core.resources.IResource" adaptable="true">
- <filter
- name="projectPersistentProperty"
- value="org.eclipse.team.target=basic">
- </filter>
- <action
- menubarPath="replaceWithMenu/replaceWithGroup"
- class="org.eclipse.team.internal.ui.target.GetAction"
- helpContextId="org.eclipse.team.ui.target_get_action_context"
- id="org.eclipse.team.target.getAction"
- label="%Deployment.getAction">
- </action>
- <action
- menubarPath="team.main/targetGroup"
- class="org.eclipse.team.internal.ui.target.UploadAction"
- id="org.eclipse.team.target.uploadAction"
- helpContextId="org.eclipse.team.ui.target_put_action_context"
- label="%Deployment.uploadAction">
- </action>
- <action
- menubarPath="team.main/targetGroup"
- class="org.eclipse.team.internal.ui.target.SyncAction"
- helpContextId="org.eclipse.team.ui.target_synchronize_action_context"
- id="org.eclipse.team.target.SyncAction"
- label="%Deployment.synchronize">
- </action>
- </objectContribution>
-
- <objectContribution
- id="org.eclipse.team.ui.ProjectContributions"
- objectClass="org.eclipse.core.resources.IProject" adaptable="true">
- <action
- id="org.eclipse.team.ui.TargetProject"
- label="%Deployment.configSite"
- tooltip="%ConfigureTargetProject.tooltip"
- menubarPath="team.main/projectGroup"
- enablesFor="1"
- class="org.eclipse.team.internal.ui.target.TargetProjectAction">
- </action>
- </objectContribution>
-
- <objectContribution
- objectClass="org.eclipse.team.internal.ui.target.RemoteResourceElement"
- id="org.eclipse.team.internal.ui.target.RemoteResourceElement">
- <action
- label="%SiteExplorerGetAs.label"
- tooltip="%SiteExplorerGetAs.tooltip"
- class="org.eclipse.team.internal.ui.target.GetAsAction"
- helpContextId="org.eclipse.team.ui.target_getas_action_context"
- id="org.eclipse.team.internal.ui.target.GetAsAction">
- </action>
- <action
- label="%SiteExplorerGetAsProject.label"
- tooltip="%SiteExplorerGetAsProject.tooltip"
- class="org.eclipse.team.internal.ui.target.GetAsProjectAction"
- helpContextId="org.eclipse.team.ui.target_getasproject_action_context"
- id="org.eclipse.team.internal.ui.target.GetAsProjectAction">
- </action>
- </objectContribution>
-
- <objectContribution
- objectClass="org.eclipse.team.internal.ui.target.SiteElement"
- id="org.eclipse.team.internal.ui.target.SiteElement">
- <action
- label="%SiteExplorerDiscardSite.label"
- tooltip="%SiteExplorerDiscardSite.tooltip"
- class="org.eclipse.team.internal.ui.target.DiscardSiteAction"
- helpContextId="org.eclipse.team.ui.target_disconnect_action_context"
- id="org.eclipse.team.internal.ui.target.DiscardSiteAction">
- </action>
- </objectContribution>
-</extension>
-
-<!-- ************** Views ********************** -->
-<extension point="org.eclipse.ui.views">
- <category
- id="org.eclipse.team.ui"
- name="%Team.viewCategory">
- </category>
- <view
- id="org.eclipse.team.ui.sync.SyncView"
- name="%SyncView.name"
- icon="icons/full/cview16/synch_synch.gif"
- fastViewWidthRatio="0.75"
- category="org.eclipse.team.ui"
- class="org.eclipse.team.internal.ui.sync.SyncView">
- </view>
-
- <category
- id="org.eclipse.team.ui.target"
- name="%Deployment.viewCategory">
- </category>
- <view
- id="org.eclipse.team.ui.target.SiteExplorerView"
- name="%SiteExplorerView.name"
- icon="icons/full/cview16/site_view.gif"
- category="org.eclipse.team.ui.target"
- fastViewWidthRatio="0.75"
- class="org.eclipse.team.internal.ui.target.SiteExplorerView">
- </view>
-
-</extension>
-
-<!-- ****************** Import Wizards ********************* -->
- <extension
- point="org.eclipse.ui.importWizards">
- <wizard
- id="org.eclipse.team.ui.ProjectSetImportWizard"
- name="%ProjectSetImportWizard.name"
- class="org.eclipse.team.internal.ui.ProjectSetImportWizard"
- icon="icons/full/obj/import_projectset.gif">
- <description>
- %ProjectSetImportWizard.description
- </description>
- <selection class="org.eclipse.core.resources.IProject"/>
- </wizard>
- </extension>
-
-<!-- ****************** Export Wizards ********************* -->
- <extension
- point="org.eclipse.ui.exportWizards">
- <wizard
- id="org.eclipse.team.ui.ProjectSetExportWizard"
- name="%ProjectSetExportWizard.name"
- class="org.eclipse.team.internal.ui.ProjectSetExportWizard"
- icon="icons/full/obj/export_projectset.gif">
- <description>
- %ProjectSetExportWizard.description
- </description>
- <selection class="org.eclipse.core.resources.IProject"/>
- </wizard>
- </extension>
-
-<!-- ***************** Perspective Extensions ********************** -->
- <extension point="org.eclipse.ui.perspectiveExtensions">
- <perspectiveExtension
- targetID="org.eclipse.ui.resourcePerspective">
- <view id="org.eclipse.team.ui.sync.SyncView"
- relative="org.eclipse.ui.views.TaskList"
- visible="false"
- relationship="stack"/>
- <view id="org.eclipse.team.ui.target.SiteExplorerView"
- relative="org.eclipse.ui.views.ResourceNavigator"
- visible="false"
- relationship="stack"/>
- </perspectiveExtension>
- </extension>
-</plugin>
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ConfigurationWizardElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ConfigurationWizardElement.java
deleted file mode 100644
index b40b54eb2..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ConfigurationWizardElement.java
+++ /dev/null
@@ -1,137 +0,0 @@
-package org.eclipse.team.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.internal.model.WorkbenchAdapter;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.team.ui.*;
-
-/**
- * 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/ConfigurationWizardNode.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ConfigurationWizardNode.java
deleted file mode 100644
index f0a5f015d..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ConfigurationWizardNode.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.eclipse.team.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.IWizardNode;
-import org.eclipse.swt.graphics.Point;
-
-/**
- * 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/ConfigureProjectWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ConfigureProjectWizard.java
deleted file mode 100644
index 1ff35957c..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ConfigureProjectWizard.java
+++ /dev/null
@@ -1,213 +0,0 @@
-package org.eclipse.team.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IPluginRegistry;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.team.ui.IConfigurationWizard;
-import org.eclipse.team.ui.TeamImages;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.internal.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 = UIConstants.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 UIConstants.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.getStatus());
- return;
- }
- }
- mainPage = new ConfigureProjectWizardMainPage("configurePage1", getWizardLabel(), TeamImages.getImageDescriptor(UIConstants.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() {
- if (wizard != null) {
- return wizard.performFinish();
- }
- return true;
- }
- /**
- * 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(TeamImages.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/ConfigureProjectWizardMainPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ConfigureProjectWizardMainPage.java
deleted file mode 100644
index 7df6e7b75..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ConfigureProjectWizardMainPage.java
+++ /dev/null
@@ -1,165 +0,0 @@
-package org.eclipse.team.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TableViewer;
-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.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.team.ui.IConfigurationWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.ui.internal.model.AdaptableList;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-/**
- * 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 boolean creationMode = true;
-
- 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 wizard the wizards to populate the table with
- */
- public ConfigureProjectWizardMainPage(String pageName, String title, ImageDescriptor titleImage, AdaptableList wizards) {
- super(pageName, title, titleImage);
- this.wizards = wizards;
- this.creationMode = creationMode;
- }
- 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(Policy.bind("ConfigureProjectWizardMainPage.selectRepository")); //$NON-NLS-1$
- 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);
- }
- /**
- * 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/DetailsDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/DetailsDialog.java
deleted file mode 100644
index 5434a16cb..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/DetailsDialog.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui;
-
-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.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * 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
- okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- if (includeCancelButton()) {
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
- }
- detailsButton = createButton(parent, IDialogConstants.DETAILS_ID, IDialogConstants.SHOW_DETAILS_LABEL, false);
- updateEnablements();
- }
-
- /* (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
- Image image = JFaceResources.getImageRegistry().get(getImageKey());
- 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));
- top.setFont(parent.getFont());
-
- // 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_CENTER));
-
- // 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));
- right.setFont(parent.getFont());
- createMainDialogArea(right);
- } else {
- createMainDialogArea(composite);
- }
-
- errorMessageLabel = new Label(composite, SWT.NONE);
- errorMessageLabel.setLayoutData(new GridData(
- GridData.GRAB_HORIZONTAL |
- GridData.HORIZONTAL_ALIGN_FILL));
- errorMessageLabel.setFont(parent.getFont());
- errorMessageLabel.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_RED));
-
- 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(IDialogConstants.SHOW_DETAILS_LABEL);
- } else {
- detailsComposite = createDropDownDialogArea((Composite)getContents());
- detailsCreated = true;
- detailsButton.setText(IDialogConstants.HIDE_DETAILS_LABEL);
- }
-
- 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;
- }
- /**
- * 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;
- }
-
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/DetailsDialogWithProjects.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/DetailsDialogWithProjects.java
deleted file mode 100644
index a120c3ffe..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/DetailsDialogWithProjects.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui;
-
-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.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.target.TargetManager;
-import org.eclipse.team.core.target.TargetProvider;
-
-/**
- * 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 Button actionButton;
- 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);
- label.setFont(composite.getFont());
- 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));
- composite.setFont(parent.getFont());
-
- 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/ExportProjectSetMainPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ExportProjectSetMainPage.java
deleted file mode 100644
index 20ae1d2a1..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ExportProjectSetMainPage.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui;
-
-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.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.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());
- table.setLayoutData(new GridData(GridData.FILL_BOTH));
- 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$
- 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(), SWT.SAVE);
- d.setFilterExtensions(new String[] {Policy.bind("ExportProjectSetMainPage.*.psf_2")}); //$NON-NLS-1$
- d.setFilterNames(new String[] {Policy.bind("ExportProjectSetMainPage.Project_Set_Files_3")}); //$NON-NLS-1$
- String f = d.open();
- if (f != null) {
- fileText.setText(f);
- file = f;
- }
- }
- });
-
- initializeProjects();
- setControl(composite);
- updateEnablement();
- }
-
- 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/IHelpContextIds.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IHelpContextIds.java
deleted file mode 100644
index 1432d17b0..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IHelpContextIds.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial 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$
-
- // Catchup Release Viewers
- public static final String CATCHUP_RELEASE_VIEWER = PREFIX + "catchup_release_viewer_context"; //$NON-NLS-1$
-
- // Target Actions
- public static final String SYNC_GET_ACTION = PREFIX + "sync_get_action"; //$NON-NLS-1$
- public static final String SYNC_PUT_ACTION = PREFIX + "sync_put_action"; //$NON-NLS-1$
-
- // Views
- public static final String SITE_EXPLORER_VIEW = PREFIX + "site_explorer_view"; //$NON-NLS-1$
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPromptCondition.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPromptCondition.java
deleted file mode 100644
index 19a4a12e8..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPromptCondition.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui;
-
-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/IgnorePreferencePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IgnorePreferencePage.java
deleted file mode 100644
index 9c22ede50..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IgnorePreferencePage.java
+++ /dev/null
@@ -1,4 +0,0 @@
-package org.eclipse.team.internal.ui; /* * (c) Copyright IBM Corp. 2000, 2002. * All Rights Reserved. */ import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.InputDialog; import org.eclipse.jface.dialogs.MessageDialog; 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.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableItem; import org.eclipse.team.core.IIgnoreInfo; import org.eclipse.team.core.Team; 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) { noDefaultAndApplyButton(); 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); 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(); 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; } private void fillTable() { IIgnoreInfo[] ignore = Team.getAllIgnores(); 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/ImportProjectSetMainPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ImportProjectSetMainPage.java
deleted file mode 100644
index 70609e0fe..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ImportProjectSetMainPage.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui;
-
-import java.io.File;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.resource.ImageDescriptor;
-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.Text;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-public class ImportProjectSetMainPage extends TeamWizardPage {
- Text fileText;
- String file = ""; //$NON-NLS-1$
- Button browseButton;
-
- 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[] {Policy.bind("ImportProjectSetMainPage.*.psf_1")}); //$NON-NLS-1$
- d.setFilterNames(new String[] {Policy.bind("ImportProjectSetMainPage.Project_Set_Files_2")}); //$NON-NLS-1$
- String f = d.open();
- if (f != null) {
- fileText.setText(f);
- file = f;
- }
- }
- });
-
- setControl(composite);
- updateEnablement();
- }
-
- private void updateEnablement() {
- boolean complete;
-
- if (file.length() == 0) {
- setMessage(null);
- 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 = true;
- }
- }
- if (complete) {
- setMessage(null);
- }
- 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();
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/NatureToPropertyAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/NatureToPropertyAction.java
deleted file mode 100644
index 8d8fbdb3c..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/NatureToPropertyAction.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.eclipse.team.internal.ui;
-
-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.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-/**
- * @author Administrator
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class NatureToPropertyAction extends TeamAction {
-
- /**
- * @see org.eclipse.team.internal.ui.actions.TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- return true;
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- run(new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- try {
- IProject[] projects = getSelectedProjects();
- for (int i = 0; i < projects.length; i++) {
- RepositoryProvider.convertNatureToProperty(projects[i], true);
- }
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- }, Policy.bind("NatureToPropertyAction.label"), this.PROGRESS_DIALOG); //$NON-NLS-1$
- }
-
-}
-
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 6de855bdb..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Policy.java
+++ /dev/null
@@ -1,133 +0,0 @@
-package org.eclipse.team.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.text.MessageFormat;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.team.internal.core.InfiniteSubProgressMonitor;
-
-/**
- * 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 });
- }
-
- /**
- * 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);
- }
-} \ No newline at end of file
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 308680152..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetContentHandler.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - 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 {
- if (localName.equals("psf")) { //$NON-NLS-1$
- 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 (localName.equals("provider")) { //$NON-NLS-1$
- 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 (localName.equals("project")) { //$NON-NLS-1$
- 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 {
- if (localName.equals("psf")) { //$NON-NLS-1$
- inPsf = false;
- return;
- }
- if (isVersionOne) return;
- if (localName.equals("provider")) { //$NON-NLS-1$
- map.put(id, references);
- references = null;
- inProvider = false;
- return;
- }
- if (localName.equals("project")) { //$NON-NLS-1$
- inProject = false;
- return;
- }
- }
-
- public Map getReferences() {
- return map;
- }
-
- public boolean isVersionOne() {
- return isVersionOne;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetExportWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetExportWizard.java
deleted file mode 100644
index f17896c8b..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetExportWizard.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-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.IProjectSetSerializer;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.core.TeamPlugin;
-import org.eclipse.team.ui.TeamImages;
-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"), TeamImages.getImageDescriptor(UIConstants.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();
- 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;
- }
- }
- OutputStreamWriter writer = null;
- try {
- writer = new OutputStreamWriter(new FileOutputStream(file), "UTF-8"); //$NON-NLS-1$
-
- writer.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); //$NON-NLS-1$
- writer.write("<psf version=\"2.0\">\n"); //$NON-NLS-1$
- IProject[] projects = mainPage.getSelectedProjects();
-
- // Hash the projects by provider
- 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);
- }
- }
-
- // For each provider id, do the writing
- Shell shell = getShell();
- 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("\">\n"); //$NON-NLS-1$
- List list = (List)map.get(id);
- IProject[] projectArray = (IProject[])list.toArray(new IProject[list.size()]);
- IProjectSetSerializer serializer = Team.getProjectSetSerializer(id);
- if (serializer != null) {
- String[] references = serializer.asReference(projectArray, shell, new SubProgressMonitor(monitor, 1000));
- for (int i = 0; i < references.length; i++) {
- writer.write("\t\t<project reference=\""); //$NON-NLS-1$
- writer.write(references[i]);
- writer.write("\"/>\n"); //$NON-NLS-1$
- }
- }
- writer.write("\t</provider>\n"); //$NON-NLS-1$
- }
- writer.write("</psf>\n"); //$NON-NLS-1$
- result[0] = true;
- } catch (IOException e) {
- throw new InvocationTargetException(e);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- if (writer != null) {
- try {
- writer.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];
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- this.selection = selection;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImportWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImportWizard.java
deleted file mode 100644
index 371add5cb..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImportWizard.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui;
-
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.lang.reflect.InvocationTargetException;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.xerces.parsers.SAXParser;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.team.core.IProjectSetSerializer;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.ui.TeamImages;
-import org.eclipse.ui.IImportWizard;
-import org.eclipse.ui.IWorkbench;
-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"), TeamImages.getImageDescriptor(UIConstants.IMG_PROJECTSET_IMPORT_BANNER)); //$NON-NLS-1$ //$NON-NLS-2$
- mainPage.setFileName(lastFile);
- addPage(mainPage);
- }
- public boolean performFinish() {
- final boolean[] result = new boolean[] {false};
- try {
- getContainer().run(true, true, new IRunnableWithProgress() {
- public void run(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$
-
- SAXParser parser = new SAXParser();
- ProjectSetContentHandler handler = new ProjectSetContentHandler();
- parser.setContentHandler(handler);
- InputSource source = new InputSource(reader);
- parser.parse(source);
-
- Map map = handler.getReferences();
- if (map.size() == 0 && handler.isVersionOne) {
- IProjectSetSerializer serializer = Team.getProjectSetSerializer("versionOneSerializer"); //$NON-NLS-1$
- if (serializer != null) {
- serializer.addToWorkspace(new String[0], filename, getShell(), monitor);
- }
- } else {
- Iterator it = map.keySet().iterator();
- while (it.hasNext()) {
- String id = (String)it.next();
- List references = (List)map.get(id);
- IProjectSetSerializer serializer = Team.getProjectSetSerializer(id);
- if (serializer != null) {
- serializer.addToWorkspace((String[])references.toArray(new String[references.size()]), filename, getShell(), monitor);
- }
- }
- }
- result[0] = true;
- } catch (IOException e) {
- throw new InvocationTargetException(e);
- } catch (SAXException e) {
- throw new InvocationTargetException(e);
- } catch (TeamException 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];
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/PromptingDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/PromptingDialog.java
deleted file mode 100644
index 87d1630f6..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/PromptingDialog.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui;
-
-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;
-
- /**
- * 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.condition = condition;
- this.resources = resources;
- this.title = title;
- this.shell = shell;
- this.hasMultipleResources = resources.length > 1;
- if (hasMultipleResources) {
- 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
- 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/TeamPreferencePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamPreferencePage.java
deleted file mode 100644
index 63a4382ce..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamPreferencePage.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui;
-
-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.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-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();
-
- 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(UIConstants.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(UIConstants.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(UIConstants.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/TeamUIPlugin.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
deleted file mode 100644
index 173b832fa..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
+++ /dev/null
@@ -1,237 +0,0 @@
-package org.eclipse.team.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IPluginDescriptor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-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.preference.IPreferenceStore;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.ui.IWorkbenchPage;
-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;
- public static final String ID = "org.eclipse.team.ui"; //$NON-NLS-1$
-
- private static List propertyChangeListeners = new ArrayList(5);
-
- /**
- * Creates a new TeamUIPlugin.
- *
- * @param descriptor the plugin descriptor
- */
- public TeamUIPlugin(IPluginDescriptor descriptor) {
- super(descriptor);
- 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
- *
- * @return the active workbench page
- */
- public static IWorkbenchPage getActivePage() {
- return getPlugin().getWorkbench().getActiveWorkbenchWindow().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(UIConstants.PREF_ALWAYS_IN_INCOMING_OUTGOING, 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);
- }
-
- 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);
- }
-
- /**
- * @see Plugin#startup()
- */
- public void startup() throws CoreException {
- Policy.localize("org.eclipse.team.internal.ui.messages"); //$NON-NLS-1$
- initializePreferences();
- }
-
- 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);
- }
- }
-
- /**
- * 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);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamWizardPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamWizardPage.java
deleted file mode 100644
index 7eb5198f5..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamWizardPage.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui;
-
-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;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TextPreferencePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TextPreferencePage.java
deleted file mode 100644
index 2ca63db5d..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TextPreferencePage.java
+++ /dev/null
@@ -1 +0,0 @@
-package org.eclipse.team.internal.ui; /* * (c) Copyright IBM Corp. 2000, 2002. * All Rights Reserved. */ import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.InputDialog; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.preference.PreferencePage; import org.eclipse.jface.viewers.CellEditor; import org.eclipse.jface.viewers.ColumnWeightData; import org.eclipse.jface.viewers.ComboBoxCellEditor; import org.eclipse.jface.viewers.DoubleClickEvent; import org.eclipse.jface.viewers.ICellModifier; import org.eclipse.jface.viewers.IDoubleClickListener; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredContentProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.ITableLabelProvider; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.viewers.TableLayout; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerSorter; 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.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; import org.eclipse.team.core.IFileTypeInfo; import org.eclipse.team.core.Team; import org.eclipse.team.internal.core.TeamPlugin; 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 name of the parameter in the file registry private static final String TYPE = "type"; //$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) { noDefaultAndApplyButton(); 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); 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(); 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 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() { this.input = new ArrayList(); IFileTypeInfo[] infos = Team.getAllTypes(); 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); } } \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/UIConstants.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/UIConstants.java
deleted file mode 100644
index 7130a9982..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/UIConstants.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package org.eclipse.team.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-/**
- * Central location for constants used by the Team user interface.
- */
-public interface UIConstants {
- // plugin id
- public final String PLUGIN_ID = "org.eclipse.team.ui"; //$NON-NLS-1$
-
- // extension points
- public final String PT_CONFIGURATION ="configurationWizards"; //$NON-NLS-1$
- public final String PT_TARGETCONFIG ="targetConfigWizards"; //$NON-NLS-1$
- public final String PT_DECORATORS = "decorators"; //$NON-NLS-1$
-
- // image paths
- public final String ICON_PATH = "icons/full/"; //$NON-NLS-1$
-
- // local toolbars (colour)
- public final String IMG_DLG_SYNC_INCOMING = "clcl16/incom_synch.gif"; //$NON-NLS-1$
- public final String IMG_DLG_SYNC_OUTGOING = "clcl16/outgo_synch.gif"; //$NON-NLS-1$
- public final String IMG_DLG_SYNC_CONFLICTING = "clcl16/conflict_synch.gif"; //$NON-NLS-1$
- public final String IMG_REFRESH = "clcl16/refresh.gif"; //$NON-NLS-1$
- public final String IMG_IGNORE_WHITESPACE = "clcl16/ignorews_edit.gif"; //$NON-NLS-1$
- public final String IMG_CONTENTS = "clcl16/contents.gif"; //$NON-NLS-1$
-
- // sync view modes
- public final String IMG_SYNC_MODE_CATCHUP = "clcl16/catchup_rls.gif"; //$NON-NLS-1$
- public final String IMG_SYNC_MODE_RELEASE = "clcl16/release_rls.gif"; //$NON-NLS-1$
- public final String IMG_SYNC_MODE_FREE = "clcl16/catchuprelease_rls.gif"; //$NON-NLS-1$
-
- // wizard banners
- public final String IMG_WIZBAN_SHARE = "wizban/share_wizban.gif"; //$NON-NLS-1$
- public final String IMG_WIZBAN_NEW_CONNECTION = "wizban/newconnect_wizban.gif"; //$NON-NLS-1$
- public final String IMG_PROJECTSET_IMPORT_BANNER = "wizban/import_projectset_wizban.gif"; //$NON-NLS-1$
- public final String IMG_PROJECTSET_EXPORT_BANNER = "wizban/export_projectset_wizban.gif"; //$NON-NLS-1$
-
- // preferences
- public final String PREF_ALWAYS_IN_INCOMING_OUTGOING = "pref_always_in_incoming_outgoing"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ConfigureProjectAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ConfigureProjectAction.java
deleted file mode 100644
index 0e0e4b9e7..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ConfigureProjectAction.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package org.eclipse.team.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-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.WizardDialog;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.internal.ui.ConfigureProjectWizard;
-import org.eclipse.team.internal.ui.Policy;
-
-/**
- * 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 {
- /*
- * 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 WizardDialog(getShell(), wizard);
- 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.getProvider(selectedProjects[0]) == null) return true;
- return false;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/DeconfigureProjectAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/DeconfigureProjectAction.java
deleted file mode 100644
index 89ac22e4b..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/DeconfigureProjectAction.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package org.eclipse.team.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-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.team.core.RepositoryProvider;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-/**
- * Action for deconfiguring a project. Deconfiguring involves removing
- * associated provider for the project.
- */
-public class DeconfigureProjectAction extends TeamAction {
- /*
- * Method declared on IActionDelegate.
- */
- public void run(IAction action) {
- run(new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- try {
- // should we use the id for the provider type and remove from the nature. Or would
- // this operation be provider specific?
- } catch (Exception e) {
- throw new InvocationTargetException(e);
- }
- }
- }, Policy.bind("DeconfigureProjectAction.deconfigureProject"), PROGRESS_BUSYCURSOR); //$NON-NLS-1$
- }
- /**
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() {
- IProject[] selectedProjects = getSelectedProjects();
- if (selectedProjects.length != 1) return false;
- if (RepositoryProvider.getProvider(selectedProjects[0]) != null) return false;
- return true;
- }
-} \ No newline at end of file
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 2504398bd..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java
+++ /dev/null
@@ -1,330 +0,0 @@
-package org.eclipse.team.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-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.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.jface.action.IAction;
-import org.eclipse.jface.dialogs.ErrorDialog;
-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.core.target.TargetManager;
-import org.eclipse.team.core.target.TargetProvider;
-import org.eclipse.team.internal.core.TeamPlugin;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-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 {
- // 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;
-
- /**
- * Returns the selected projects.
- *
- * @return the selected projects
- */
- protected IProject[] getSelectedProjects() {
- ArrayList projects = null;
- if (!selection.isEmpty()) {
- projects = new ArrayList();
- Iterator elements = ((IStructuredSelection) selection).iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- if (next instanceof IProject) {
- projects.add(next);
- continue;
- }
- if (next instanceof IAdaptable) {
- IAdaptable a = (IAdaptable) next;
- Object adapter = a.getAdapter(IResource.class);
- if (adapter instanceof IProject) {
- projects.add(adapter);
- continue;
- }
- }
- }
- }
- if (projects != null && !projects.isEmpty()) {
- IProject[] result = new IProject[projects.size()];
- projects.toArray(result);
- return result;
- }
- return new IProject[0];
- }
- /**
- * Returns the selected resources.
- *
- * @return the selected resources
- */
- protected IResource[] getSelectedResources() {
- ArrayList resources = null;
- if (!selection.isEmpty()) {
- resources = new ArrayList();
- Iterator elements = ((IStructuredSelection) selection).iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- if (next instanceof IResource) {
- resources.add(next);
- continue;
- }
- if (next instanceof IAdaptable) {
- IAdaptable a = (IAdaptable) next;
- Object adapter = a.getAdapter(IResource.class);
- if (adapter instanceof IResource) {
- resources.add(adapter);
- continue;
- }
- }
- }
- }
- if (resources != null && !resources.isEmpty()) {
- IResource[] result = new IResource[resources.size()];
- resources.toArray(result);
- return result;
- }
- return new IResource[0];
- }
-
- /**
- * Convenience method for getting the current shell.
- *
- * @return the shell
- */
- protected Shell getShell() {
- if (shell != null) {
- return shell;
- } else {
- return TeamUIPlugin.getPlugin().getWorkbench().getActiveWorkbenchWindow().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_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) {
- try {
- action.setEnabled(isEnabled());
- } catch (TeamException e) {
- action.setEnabled(false);
- // We should not open a dialog when determining menu enablements so log it instead
- TeamPlugin.log(e.getStatus());
- }
- }
- }
- }
- /*
- * Method declared on IObjectActionDelegate.
- */
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- this.shell = targetPart.getSite().getShell();
- }
- /**
- * 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) {
- IStatus status = null;
- boolean log = false;
- boolean dialog = false;
- if (exception instanceof TeamException) {
- status = ((TeamException)exception).getStatus();
- log = false;
- dialog = true;
- } else if (exception instanceof InvocationTargetException) {
- Throwable 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) {
- ErrorDialog.openError(getShell(), title, message, toShow);
- }
- if (log) {
- TeamUIPlugin.log(toShow);
- }
- }
- }
- /**
- * 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;
- }
-
- /**
- * Convenience method that maps the selected resources to their target providers.
- * The returned Hashtable has keys which are TargetProviders, and values
- * which are Lists of IResources that are shared with that provider.
- *
- * @return a hashtable mapping providers to their selected resources
- */
- protected Hashtable getTargetProviderMapping() throws TeamException {
- return getTargetProviderMapping(getSelectedResources());
- }
- /**
- * Convenience method that maps the given resources to their target providers.
- * The returned Hashtable has keys which are TargetProviders, and values
- * which are Lists of IResources that are shared with that provider.
- *
- * @return a hashtable mapping providers to their resources
- */
- protected Hashtable getTargetProviderMapping(IResource[] resources) throws TeamException {
- Hashtable result = new Hashtable();
- for (int i = 0; i < resources.length; i++) {
- TargetProvider provider = TargetManager.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;
- }
-} \ No newline at end of file
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 a5f9e08fa..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties
+++ /dev/null
@@ -1,232 +0,0 @@
-###############################################
-# Message catalog for org.eclipse.team.ui
-###############################################
-
-CatchupReleaseViewer.expand=&Expand All
-CatchupReleaseViewer.ignoreWhiteSpace=&Ignore White Space
-CatchupReleaseViewer.refreshAction=&Refresh With Remote
-CatchupReleaseViewer.showIncomingAction=Show Incoming
-CatchupReleaseViewer.showInNavigator=&Show in Navigator
-CatchupReleaseViewer.showOnlyConflictsAction=Show Only Conflicts
-CatchupReleaseViewer.showOutgoingAction=Show Outgoing
-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
-
-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.
-
-DeconfigureProjectAction.deconfigureProject=Deconfigure Project
-
-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 occured
-
-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
-
-TeamAction.internal=Internal error occured.
-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
-
-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=&Browse...
-ExportProjectSetMainPage.You_have_specified_a_folder_5=You have specified a folder
-
-ImportProjectSetMainPage.Project_Set_File_Name__2=&File name:
-ImportProjectSetMainPage.Browse_3=&Browse...
-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
-
-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
-
-ExportProjectSetMainPage.*.psf_2=*.psf
-ExportProjectSetMainPage.Project_Set_Files_3=Team Project Set Files
-
-ImportProjectSetMainPage.*.psf_1=*.psf
-ImportProjectSetMainPage.Project_Set_Files_2=Team Project Set Files
-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
-
-NatureToPropertyAction.label=Convert Nature
-
-###############################################
-# Target Management Messages
-###############################################
-
-TargetSiteCreationWizard.windowTitleProject=Target a Site
-TargetSiteCreationWizard.windowTitleNoProject=New Site
-TargetSiteCreationWizard.label=Create a site connection
-TargetSiteCreationWizard.description=Select the type of site you want to target.
-
-TargetSiteCreationWizard.mappingPageTitle=Specify the location on the site
-TargetSiteCreationWizard.siteSelectionPage=Select or create a site
-
-SiteSelectionPage.description=Select an existing site or create a new site where you want to upload your resources to.
-SiteSelectionPage.label=Select an existing site or create a new one:
-SiteSelectionPage.useExisting=&Use Existing Site
-SiteSelectionPage.createNew=&Create a new Site
-SiteSelectionPage.disconnectTarget=&Disconnect from Site
-
-GetAsProject.thisResourceExists=The resource ''{0}'' already exists in the workspace. Overwrite?
-GetAsProject.thisExternalFileExists=The folder ''{0}'' exists in the local file system. Overwrite?
-GetAsProject.confirmOverwrite=Confirm Overwrite
-GetAsProject.taskName1=Downloading ''{0}''
-GetAsProject.taskNameN=Downloading {0} folders
-GetAsProject.errorCreatingProject=Error creating project: {0}
-GetAsProject.errorGettingResources=Error getting resources
-
-GetAs.checkoutFailed=Problems encountered receiving the remote folder
-GetAs.enterProjectTitle=Downloading ''{0}'' As...
-GetAs.taskname=Downloading ''{0}'' as ''{1}''
-
-Error=Error
-
-CreateNewFolderAction.errorCreatingFolder=Error creating the remote folder.
-CreateNewFolderAction.title=New Remote Folder
-CreateNewFolderAction.message=Enter the name for the new remote folder:
-CreateNewFolderAction.newFolderName=New Folder
-
-GetAction.title=Download
-GetAction.working=Downloading from ''{0}''...
-
-PutAction.title=Upload
-PutAction.working=Uploading to ''{0}''...
-
-SiteExplorerView.addSiteAction=Target &Site
-SiteExplorerView.addSiteActionTooltip=Add a Site
-SiteExplorerView.newFolderAction=Fo&lder...
-SiteExplorerView.newMenu=&New
-SiteExplorerView.Name_1=Name
-SiteExplorerView.Size_2=Size
-SiteExplorerView.Modified_3=Modified
-SiteExplorerView.URL_4=URL
-SiteExplorerView.mappedProjects={0} is mapped to {1}
-SiteExplorerView.projectsAlreadyMapped=The selected sites are being used by projects in your workspace. You must disconnect the projects from the Sites before discarding them.
-SiteExplorerView.unmapProjectsAndDisconnect=Disconnect projects from these sites then discard the sites
-SiteExplorerView.unmapDialogTitle=Warning
-
-CreateNewFolderAction.creatingFolder=Creating Folder
-CreateNewFolderAction.suggestedNameProgress=Retrieving existing folder names...
-CreateNewFolderAction.suggestedNameConcat={0}_{1}
-
-SiteExplorerView.promptForDeletingSites=Are you sure you want to discard {0} site(s)?
-SiteExplorerView.promptForDeletingSitesTitle=Confirm Discarding Sites
-
-SiteExplorerViewLabelProvider.fileSize={0} KB
-
-MappingSelectionPage.description=Specify the location on the site where you want to target your resources.
-MappingSelectionPage.label=Select the site or a folder:
-MappingSelectionPage.newFolderLabel=&Create Folder...
-MappingSelectionPage.mappingTitle=Select the location on the site
-
-ConfigureTargetWizardQuestion_2=Question
-ConfigureTargetWizardError_6=Error
-ConfigureTargetWizardError_mapping_the_project_with_this_site_7=Error mapping the project with this site
-ConfigureTargetWizardURL_doesn__t_exist_on_the_server_8=URL doesn\'t exist on the server
-ConfigureTargetWizardValidating_connection_to_Site..._9=Validating connection to Site...
-ConfigureTargetWizardConnection_Error_10=Connection Error
-ConfigureTargetWizard.alreadyMapped=''{0}'' is already targetted to ''{1}''. Are you sure you want to change this?
-ConfigureTargetWizard.errorOccurred=An error occured connecting to ''{0}''.\n\nCode: {1}\nMessage: {2}\n\nDo you still want to keep this target?
-ConfigureTargetWizard.errorUnmappingProject=An error occured trying to disconnect this project.
-
-GetAction.Exception_getting_provider_2=Exception getting provider
-GetAction.confirmFileOverwrite=You have local changes which you are about to overwrite. Do you wish to continue?
-GetAction.confirmFileOverwriteTitle=Confirm Overwrite
-
-
-GetSyncAction.Getting..._1=Downloading...
-PutAction.Exception_getting_provider_2=Exception getting provider
-PutSyncAction.Putting..._1=Uploading...
-
-TargetCatchupReleaseViewer.Get_1=&Download
-TargetCatchupReleaseViewer.Put_2=&Upload
-
-SiteSelectionPage.siteLabelCurrentWithMapping={0} (currently as {1})
-SiteSelectionPage.siteLabelCurrent={0} (current)
-
-UploadAction.Exception_getting_provider=Exception getting provider
-UploadAction.working=Uploading to ''{0}''...
-UploadAction.noDirtyTitle=No Dirty Resources Found
-UploadAction.noDirtyMessage=There were no dirty resources found to upload.
-UploadAction.confirmDeletionTitle=Confirm Deletion
-UploadAction.confirmFileDeletionMessage=File ''{0}'' has been deleted locally. Do you want to delete it remotely?
-UploadAction.problemMessage=Problems occurred uploading.
-
-
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/CatchupReleaseViewer.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/CatchupReleaseViewer.java
deleted file mode 100644
index 93bb21abb..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/CatchupReleaseViewer.java
+++ /dev/null
@@ -1,657 +0,0 @@
-package org.eclipse.team.internal.ui.sync;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Iterator;
-
-import org.eclipse.compare.BufferedContent;
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.CompareEditorInput;
-import org.eclipse.compare.IEditableContent;
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.compare.NavigationAction;
-import org.eclipse.compare.internal.CompareUIPlugin;
-import org.eclipse.compare.structuremergeviewer.DiffContainer;
-import org.eclipse.compare.structuremergeviewer.DiffElement;
-import org.eclipse.compare.structuremergeviewer.DiffTreeViewer;
-import org.eclipse.compare.structuremergeviewer.Differencer;
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IResource;
-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.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.team.core.sync.ILocalSyncElement;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.UIConstants;
-import org.eclipse.team.ui.TeamImages;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.internal.WorkbenchPlugin;
-import org.eclipse.ui.views.navigator.ResourceNavigator;
-
-/**
- * <b>Note:</b> This class/interface is part of an interim API that is still under
- * development and expected to change significantly before reaching stability.
- * It is being made available at this early stage to solicit feedback from pioneering
- * adopters on the understanding that any code that uses this API will almost
- * certainly be broken (repeatedly) as the API evolves.
- *
- * This viewer adds a custom filter and some merge actions.
- * Note this is a layer breaker and needs to be refactored. Viewers should
- * not contain references to workbench actions. Actions should be contributed
- * by the view.
- */
-public abstract class CatchupReleaseViewer extends DiffTreeViewer implements ISelectionChangedListener {
-
- class ShowInNavigatorAction extends Action implements ISelectionChangedListener {
- IViewSite viewSite;
- public ShowInNavigatorAction(IViewSite viewSite, String title) {
- super(title, null);
- this.viewSite = viewSite;
- }
- public void run() {
- showSelectionInNavigator(viewSite);
- }
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection selection = (IStructuredSelection)event.getSelection();
- if (selection.size() != 1) {
- setEnabled(false);
- return;
- }
- ITeamNode node = (ITeamNode)selection.getFirstElement();
- setEnabled(node.getResource().isAccessible());
- }
- };
-
- /**
- * This filter hides all empty categories tree nodes.
- */
- class CategoryFilter extends ViewerFilter {
- static final int SHOW_INCOMING = 1;
- static final int SHOW_OUTGOING = 2;
- static final int SHOW_CONFLICTS = 4;
- static final int SHOW_PSEUDO_CONFLICTS = 8;
-
- private int showMask = 0;
-
- CategoryFilter(int showMask) {
- // Mask for all categories to show
- this.showMask = showMask;
- }
- int getMask() {
- return showMask;
- }
- void setMask(int mask) {
- this.showMask = mask;
- }
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- // If this element has visible children, always show it.
- // This is not great -- O(n^2) filtering
- if (hasFilteredChildren(element)) {
- return true;
- }
- if (element instanceof ITeamNode) {
- // Filter out pseudo conflicts if requested
- int kind = ((ITeamNode)element).getKind();
- if ((showMask & SHOW_PSEUDO_CONFLICTS) == 0 && (kind & IRemoteSyncElement.PSEUDO_CONFLICT) != 0) {
- return false;
- }
- int change = ((ITeamNode)element).getKind() & IRemoteSyncElement.CHANGE_MASK;
- int direction = ((ITeamNode)element).getChangeDirection();
- switch (direction) {
- case ITeamNode.INCOMING:
- return (showMask & SHOW_INCOMING) != 0;
- case ITeamNode.OUTGOING:
- return (showMask & SHOW_OUTGOING) != 0;
- case Differencer.CONFLICTING:
- return (showMask & SHOW_CONFLICTS) != 0;
- default:
- return change != 0;
- }
- }
- // No children are visible, and this folder has no changes, so don't show it.
- return false;
- }
- public boolean isFilterProperty(Object element, String property) {
- return property.equals(PROP_KIND);
- }
- }
-
- class FilterAction extends Action {
- /**
- * Must subclass constructor to make it accessible to container class
- */
- FilterAction(String title, ImageDescriptor image) {
- super(title, image);
- }
- public void run() {
- updateFilters();
- }
- }
- class SyncSorter extends ViewerSorter {
- public int compare(Viewer viewer, Object e1, Object e2) {
- boolean oneIsFile = e1 instanceof TeamFile;
- boolean twoIsFile = e2 instanceof TeamFile;
- if (oneIsFile != twoIsFile) {
- return oneIsFile ? 1 : -1;
- }
- return super.compare(viewer, e1, e2);
- }
- }
-
- class RemoveFromTreeAction extends Action {
- public RemoveFromTreeAction(String title, ImageDescriptor image) {
- super(title, image);
- }
- public void run() {
- ISelection s = getSelection();
- if (!(s instanceof IStructuredSelection) || s.isEmpty()) {
- return;
- }
- // mark all selected nodes as in sync
- for (Iterator it = ((IStructuredSelection)s).iterator(); it.hasNext();) {
- Object element = it.next();
- setAllChildrenInSync((IDiffElement)element);
- }
- refresh();
- }
- public void update() {
- // Update action enablement
- setEnabled(!getSelection().isEmpty());
- }
- }
- class ExpandAllAction extends Action {
- public ExpandAllAction(String title, ImageDescriptor image) {
- super(title, image);
- }
- public void run() {
- expandSelection();
- }
- public void update() {
- setEnabled(!getSelection().isEmpty());
- }
- }
-
- // The current sync mode
- private int syncMode = SyncView.SYNC_NONE;
-
- // Actions
- private FilterAction showIncoming;
- private FilterAction showOutgoing;
- private FilterAction showOnlyConflicts;
- private Action refresh;
- private ExpandAllAction expandAll;
- private RemoveFromTreeAction removeFromTree;
- private ShowInNavigatorAction showInNavigator;
- private Action ignoreWhiteSpace;
- private Action toggleGranularity;
-
- private NavigationAction showPrevious;
- private NavigationAction showNext;
-
- // Property constant for diff mode kind
- static final String PROP_KIND = "team.ui.PropKind"; //$NON-NLS-1$
-
- private Action copyAllRightToLeft;
-
- private boolean compareFileContents = false;
-
- /**
- * Creates a new catchup/release viewer.
- */
- protected CatchupReleaseViewer(Composite parent, SyncCompareInput model) {
- super(parent, model.getCompareConfiguration());
- setSorter(new SyncSorter());
- initializeActions(model);
- }
-
- /**
- * Contributes actions to the provided toolbar
- */
- void contributeToActionBars(IActionBars actionBars) {
- IToolBarManager toolBar = actionBars.getToolBarManager();
-
- toolBar.add(new Separator());
- toolBar.add(showOnlyConflicts);
-
- toolBar.add(new Separator());
- toolBar.add(showNext);
- toolBar.add(showPrevious);
-
- // Drop down menu
- IMenuManager menu = actionBars.getMenuManager();
- if (syncMode == SyncView.SYNC_BOTH) {
- menu.add(showIncoming);
- menu.add(showOutgoing);
- }
- menu.add(toggleGranularity);
- menu.add(ignoreWhiteSpace);
- menu.add(refresh);
- }
-
- /**
- * Contributes actions to the popup menu.
- */
- protected void fillContextMenu(IMenuManager manager) {
- expandAll.update();
- manager.add(expandAll);
- removeFromTree.update();
- manager.add(removeFromTree);
- if (showInNavigator != null) {
- manager.add(showInNavigator);
- }
- if (syncMode == SyncView.SYNC_COMPARE) {
- manager.add(copyAllRightToLeft);
- }
- }
-
- /**
- * Expands to infinity all items in the selection.
- */
- protected void expandSelection() {
- ISelection selection = getSelection();
- if (selection instanceof IStructuredSelection) {
- Iterator elements = ((IStructuredSelection)selection).iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- expandToLevel(next, ALL_LEVELS);
- }
- }
- }
-
- protected int getSyncMode() {
- return syncMode;
- }
-
- /**
- * Returns true if the given element has filtered children, and false otherwise.
- */
- protected boolean hasFilteredChildren(Object element) {
- return getFilteredChildren(element).length > 0;
- }
-
- /**
- * Creates the actions for this viewer.
- */
- private void initializeActions(final SyncCompareInput diffModel) {
- // Mask actions
- ImageDescriptor image = TeamImages.getImageDescriptor(UIConstants.IMG_DLG_SYNC_INCOMING);
- showIncoming = new FilterAction(Policy.bind("CatchupReleaseViewer.showIncomingAction"), image); //$NON-NLS-1$
- showIncoming.setToolTipText(Policy.bind("CatchupReleaseViewer.showIncomingAction")); //$NON-NLS-1$
-
- image = TeamImages.getImageDescriptor(UIConstants.IMG_DLG_SYNC_OUTGOING);
- showOutgoing = new FilterAction(Policy.bind("CatchupReleaseViewer.showOutgoingAction"), image); //$NON-NLS-1$
- showOutgoing.setToolTipText(Policy.bind("CatchupReleaseViewer.showOutgoingAction")); //$NON-NLS-1$
-
- image = TeamImages.getImageDescriptor(UIConstants.IMG_DLG_SYNC_CONFLICTING);
-
- //show only conflicts is not a HideAction because it doesnt flip bits, it sets an exact mask
- showOnlyConflicts = new FilterAction(Policy.bind("CatchupReleaseViewer.showOnlyConflictsAction"), image); //$NON-NLS-1$
- showOnlyConflicts.setToolTipText(Policy.bind("CatchupReleaseViewer.showOnlyConflictsAction")); //$NON-NLS-1$
-
- //refresh action
- image = TeamImages.getImageDescriptor(UIConstants.IMG_REFRESH);
- refresh = new Action(Policy.bind("CatchupReleaseViewer.refreshAction"), image) { //$NON-NLS-1$
- public void run() {
- diffModel.refresh();
- }
- };
- refresh.setToolTipText(Policy.bind("CatchupReleaseViewer.refreshAction")); //$NON-NLS-1$
-
- // Expand action
- expandAll = new ExpandAllAction(Policy.bind("CatchupReleaseViewer.expand"), null); //$NON-NLS-1$
-
- // Toggle granularity
- image = TeamImages.getImageDescriptor(UIConstants.IMG_CONTENTS);
- toggleGranularity = new Action(Policy.bind("CatchupReleaseViewer.Compare_File_Contents_1"), image) { //$NON-NLS-1$
- public void run() {
- compareFileContents = isChecked();
- diffModel.setSyncGranularity(compareFileContents ? ILocalSyncElement.GRANULARITY_CONTENTS : ILocalSyncElement.GRANULARITY_TIMESTAMP);
- updateFilters();
- }
- };
- compareFileContents = diffModel.getSyncGranularity() != IRemoteSyncElement.GRANULARITY_TIMESTAMP;
- toggleGranularity.setChecked(compareFileContents);
-
- removeFromTree = new RemoveFromTreeAction(Policy.bind("CatchupReleaseViewer.removeFromView"), null); //$NON-NLS-1$
-
- copyAllRightToLeft = new Action(Policy.bind("CatchupReleaseViewer.copyAllRightToLeft"), null) { //$NON-NLS-1$
- public void run() {
- ISelection s = getSelection();
- if (!(s instanceof IStructuredSelection) || s.isEmpty()) {
- return;
- }
- for (Iterator it = ((IStructuredSelection)s).iterator(); it.hasNext();) {
- final Object element = it.next();
- if(element instanceof DiffElement) {
- try {
- new ProgressMonitorDialog(getTree().getShell()).run(false, false, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- try {
- ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- try {
- monitor.beginTask(Policy.bind("CatchupReleaseViewer.Copying_right_contents_into_workspace_2"), 100); //$NON-NLS-1$
- copyAllRightToLeft((DiffElement)element, Policy.subMonitorFor(monitor, 100));
- } finally {
- monitor.done();
- }
- }
- }, monitor);
- } catch(CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch(InvocationTargetException e) {
- ErrorDialog.openError(WorkbenchPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell(), Policy.bind("CatchupReleaseViewer.errorCopyAllRightToLeft"), null, null); //$NON-NLS-1$
- } catch(InterruptedException e) {
- }
- }
- }
- refresh();
- }
- public boolean isEnabled() {
- ISelection s = getSelection();
- if (!(s instanceof IStructuredSelection) || s.isEmpty()) {
- return false;
- }
- return ((IStructuredSelection)s).size() == 1;
- }
- };
-
- // Show in navigator
- if (diffModel.getViewSite() != null) {
- showInNavigator = new ShowInNavigatorAction(diffModel.getViewSite(), Policy.bind("CatchupReleaseViewer.showInNavigator")); //$NON-NLS-1$
- addSelectionChangedListener(showInNavigator);
- }
-
- // Ignore white space
- image = TeamImages.getImageDescriptor(UIConstants.IMG_IGNORE_WHITESPACE);
- ignoreWhiteSpace = new Action(Policy.bind("CatchupReleaseViewer.ignoreWhiteSpace"), image) { //$NON-NLS-1$
- public void run() {
- diffModel.setIgnoreWhitespace(isChecked());
- }
- };
- ignoreWhiteSpace.setId("team.ignoreWhiteSpace"); //$NON-NLS-1$
- boolean ignore = CompareUIPlugin.getDefault().getPreferenceStore().getBoolean(CompareConfiguration.IGNORE_WHITESPACE);
- ignoreWhiteSpace.setChecked(ignore);
-
- // Show next and previous change
- showNext = new NavigationAction(true);
- showPrevious = new NavigationAction(false);
- showNext.setCompareEditorInput(diffModel);
- showPrevious.setCompareEditorInput(diffModel);
-
- // Add a selection listener to set the left label
- addSelectionChangedListener(this);
-
- // Add a double-click listener for expanding/contracting
- getTree().addListener(SWT.MouseDoubleClick, new Listener() {
- public void handleEvent(Event e) {
- mouseDoubleClicked(e);
- }
- });
-
- // Add an F5 listener for refresh
- getTree().addKeyListener(new KeyAdapter() {
- public void keyPressed(KeyEvent e) {
- if (e.keyCode == SWT.F5) {
- diffModel.refresh();
- }
- }
- });
-
- // Set an initial filter -- show all changes
- showIncoming.setChecked(true);
- showOutgoing.setChecked(true);
- showOnlyConflicts.setChecked(false);
- setFilters(CategoryFilter.SHOW_INCOMING| CategoryFilter.SHOW_CONFLICTS | CategoryFilter.SHOW_OUTGOING);
- }
-
- /**
- * Method setAllChildrenInSync.
- * @param iDiffElement
- */
- private void setAllChildrenInSync(IDiffElement element) {
- if(element instanceof DiffContainer) {
- DiffContainer container = (DiffContainer)element;
- IDiffElement[] children = container.getChildren();
- for (int i = 0; i < children.length; i++) {
- setAllChildrenInSync(children[i]);
- }
- }
- ((DiffElement)element).setKind(IRemoteSyncElement.IN_SYNC);
- }
-
- protected void copyAllRightToLeft(IDiffElement element, IProgressMonitor monitor) throws CoreException {
- if(element instanceof DiffContainer) {
- DiffContainer container = (DiffContainer)element;
- IDiffElement[] children = container.getChildren();
- for (int i = 0; i < children.length; i++) {
- copyAllRightToLeft(children[i], monitor);
- }
- } else if(element instanceof TeamFile) {
- TeamFile file = (TeamFile)element;
- try {
- monitor = Policy.monitorFor(monitor);
- monitor.beginTask(null, 1);
- file.setProgressMonitor(Policy.subMonitorFor(monitor, 1));
- if(file.getKind() != IRemoteSyncElement.IN_SYNC) {
- if(file.getRight() == null || file.getLeft() == null) {
- file.copy(false /* right to left */);
- }
- ITypedElement te = file.getLeft();
- ITypedElement rte = file.getRight();
- if(te instanceof IEditableContent) {
- IEditableContent editable = (IEditableContent)te;
- if(editable.isEditable()) {
- if(rte instanceof BufferedContent) {
- editable.setContent(((BufferedContent)rte).getContent());
- }
- }
- }
- }
- file.setProgressMonitor(null);
- } finally {
- monitor.done();
- }
- }
- }
-
- /*
- * Method declared on ContentViewer.
- */
- protected void inputChanged(Object input, Object oldInput) {
- super.inputChanged(input, oldInput);
- // Update the refresh action
- if (refresh != null) {
- Tree tree = getTree();
- if (tree != null) {
- refresh.setEnabled(input != null);
- }
- }
- }
-
- /**
- * Shows the selected resource(s) in the resource navigator.
- */
- private void showSelectionInNavigator(IViewSite viewSite) {
- ISelection selection = getSelection();
- if (!(selection instanceof IStructuredSelection)) {
- return;
- }
- // Create a selection of IResource objects
- Object[] selected = ((IStructuredSelection)selection).toArray();
- IResource[] resources = new IResource[selected.length];
- for (int i = 0; i < selected.length; i++) {
- resources[i] = ((ITeamNode)selected[i]).getResource();
- }
- ISelection resourceSelection = new StructuredSelection(resources);
-
- // Show the resource selection in the navigator
- try {
- IViewPart part = viewSite.getPage().showView(IPageLayout.ID_RES_NAV);
- if (part instanceof ResourceNavigator) {
- ((ResourceNavigator)part).selectReveal(resourceSelection);
- }
- } catch (PartInitException e) {
- TeamUIPlugin.log(e.getStatus());
- }
- }
-
- /**
- * The mouse has been double-clicked in the tree, perform appropriate
- * behaviour.
- */
- private void mouseDoubleClicked(Event e) {
- // Only act on single selection
- ISelection selection = getSelection();
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection structured = (IStructuredSelection)selection;
- if (structured.size() == 1) {
- Object first = structured.getFirstElement();
- if (first instanceof IDiffContainer) {
- // Try to expand/contract
- setExpandedState(first, !getExpandedState(first));
- }
- }
- }
- }
-
- /**
- * Notifies that the selection has changed.
- *
- * @param event event object describing the change
- */
- public void selectionChanged(SelectionChangedEvent event) {
- ISelection selection = event.getSelection();
- if (!selection.isEmpty() && selection instanceof IStructuredSelection) {
- IStructuredSelection structured = (IStructuredSelection)selection;
- Object selected = structured.getFirstElement();
- if (selected instanceof TeamFile) {
- updateLabels(((TeamFile)selected).getMergeResource());
- }
- }
- }
-
- /**
- * Subclasses may override to provide different labels for the compare configuration.
- */
- protected void updateLabels(MergeResource resource) {
- resource.setLabels(getCompareConfiguration());
- }
-
- /**
- * Set the filter mask to be the exact mask specified.
- */
- private void setFilters(int maskToHide) {
- ViewerFilter[] filters = getFilters();
- if (filters != null) {
- for (int i = 0; i < filters.length; i++) {
- if (filters[i] instanceof CategoryFilter) {
- CategoryFilter filter = (CategoryFilter)filters[i];
- // Set the exact match to be applied on the filter
- filter.setMask(maskToHide);
- refresh();
- return;
- }
- }
- }
- // No category filter found -- add one
- addFilter(new CategoryFilter(maskToHide));
- }
-
- /**
- * The sync mode has changed. Update the filters.
- */
- public void syncModeChanged(int mode) {
- this.syncMode = mode;
- updateFilters();
- }
-
- /**
- * Sets the viewer filtering based on the current state
- * of the filter actions.
- */
- void updateFilters() {
- //do nothing if viewer is disposed
- Control control = getControl();
- if (control == null || control.isDisposed())
- return;
-
- //always show conflicts
- int filters = CategoryFilter.SHOW_CONFLICTS;
-
- //determine what other filters to apply based on current action states
- switch (syncMode) {
- case SyncView.SYNC_INCOMING:
- case SyncView.SYNC_MERGE:
- if (!showOnlyConflicts.isChecked()) {
- filters |= CategoryFilter.SHOW_INCOMING;
- }
- break;
- case SyncView.SYNC_OUTGOING:
- if (!showOnlyConflicts.isChecked()) {
- filters |= CategoryFilter.SHOW_OUTGOING;
- }
- break;
- case SyncView.SYNC_BOTH:
- boolean conflictsOnly = showOnlyConflicts.isChecked();
- //if showing only conflicts, don't allow these actions to happen
- showIncoming.setEnabled(!conflictsOnly);
- showOutgoing.setEnabled(!conflictsOnly);
- if (!conflictsOnly) {
- if (showIncoming.isChecked()) {
- filters |= CategoryFilter.SHOW_INCOMING;
- }
- if (showOutgoing.isChecked()) {
- filters |= CategoryFilter.SHOW_OUTGOING;
- }
- }
- break;
- }
-
- //determine whether to show pseudo conflicts
- if (!compareFileContents) {
- filters |= CategoryFilter.SHOW_PSEUDO_CONFLICTS;
- }
- setFilters(filters);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/ChangedTeamContainer.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/ChangedTeamContainer.java
deleted file mode 100644
index 3a6fa098f..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/ChangedTeamContainer.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package org.eclipse.team.internal.ui.sync;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.compare.structuremergeviewer.Differencer;
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-
-/**
- * <b>Note:</b> This class/interface is part of an interim API that is still under
- * development and expected to change significantly before reaching stability.
- * It is being made available at this early stage to solicit feedback from pioneering
- * adopters on the understanding that any code that uses this API will almost
- * certainly be broken (repeatedly) as the API evolves.
- *
- * A node in a sync tree that represents a changed folder
- * (incoming/outgoing creation or deletion).
- */
-public class ChangedTeamContainer extends UnchangedTeamContainer {
- private MergeResource mergeResource;
-
- /**
- * ChangedTeamContainer constructor
- */
- public ChangedTeamContainer(IDiffContainer parent, MergeResource resource, int description) {
- super(parent, resource.getResource(), description);
- this.mergeResource = resource;
- }
-
- /*
- * Method declared on ITeamNode.
- */
- public int getChangeDirection() {
- return getKind() & Differencer.DIRECTION_MASK;
- }
-
- public int getChangeType() {
- return getKind() & Differencer.CHANGE_TYPE_MASK;
- }
-
- public String getName() {
- return mergeResource.getName();
- }
-
- /**
- * Returns the team resource managed by this object.
- */
- public MergeResource getMergeResource() {
- return mergeResource;
- }
-
- /*
- * Method declared on IDiffContainer
- */
- public void removeToRoot(IDiffElement child) {
- // Don't want to remove empty changed containers
- remove(child);
- }
-
- /**
- * For debugging purposes only.
- */
- public String toString() {
- return "ChangedTeamContainer(" + getResource().getName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public void makeInSync() {
- setKind(Differencer.NO_CHANGE);
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/ITeamNode.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/ITeamNode.java
deleted file mode 100644
index 0d438994b..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/ITeamNode.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package org.eclipse.team.internal.ui.sync;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.compare.structuremergeviewer.Differencer;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IResource;
-
-/**
- * <b>Note:</b> This class/interface is part of an interim API that is still under
- * development and expected to change significantly before reaching stability.
- * It is being made available at this early stage to solicit feedback from pioneering
- * adopters on the understanding that any code that uses this API will almost
- * certainly be broken (repeatedly) as the API evolves.
- *
- * Interface for a sync node that responds to team commands.
- */
-public interface ITeamNode extends IDiffElement {
- // Possible values for the change direction
- static final int INCOMING = Differencer.RIGHT;
- static final int OUTGOING = Differencer.LEFT;
- static final int CONFLICTING = Differencer.CONFLICTING;
- static final int NO_CHANGE = Differencer.NO_CHANGE;
-
- /**
- * Returns the change direction for this resource. One of:
- * INCOMING, OUTGOING, CONFLICTING, NO_CHANGE.
- */
- public int getChangeDirection();
-
- /**
- * Returns the type of change for this resource. One of:
- * CHANGE, DELETION, ADDITION
- */
- public int getChangeType();
-
- /**
- * Returns the core resource represented by this node.
- */
- public IResource getResource();
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/MergeResource.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/MergeResource.java
deleted file mode 100644
index 47dda8a70..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/MergeResource.java
+++ /dev/null
@@ -1,160 +0,0 @@
-package org.eclipse.team.internal.ui.sync;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.io.InputStream;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteResource;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.internal.ui.Policy;
-
-/**
- * <b>Note:</b> This class/interface is part of an interim API that is still under
- * development and expected to change significantly before reaching stability.
- * It is being made available at this early stage to solicit feedback from pioneering
- * adopters on the understanding that any code that uses this API will almost
- * certainly be broken (repeatedly) as the API evolves.
- *
- * Encapsulates information about a resource that requires
- * contact with the Team API.
- */
-public class MergeResource {
- private IRemoteSyncElement syncTree;
-
- /**
- * Creates a new merge resource based on the given sync information.
- */
- public MergeResource(IRemoteSyncElement syncTree) {
- this.syncTree = syncTree;
- }
-
- /**
- * Returns an InputStream for the base revision of this incoming resource.
- */
- public InputStream getBaseRevision() throws CoreException {
- IRemoteResource remote = syncTree.getBase();
- if (remote != null && !remote.isContainer()) {
- try {
- return remote.getContents(new NullProgressMonitor());
- } catch (TeamException exception) {
- // The remote resource has gone.
- return null;
- }
- }
- return null;
- }
-
- public String getExtension() {
- if (syncTree.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 an InputStream for the latest repository version of this incoming resource.
- */
- public InputStream getLatestRevision() throws CoreException {
- IRemoteResource remote = syncTree.getRemote();
- try {
- return remote.getContents(new NullProgressMonitor());
- } catch (TeamException e) {
- throw new CoreException(e.getStatus());
- }
- }
-
- /**
- * Returns an InputStream for the local resource.
- */
- public InputStream getLocalStream() throws CoreException {
- IResource left = syncTree.getLocal();
- if (left == null) return null;
- if (left.exists() && left.getType() == IResource.FILE) {
- return ((IFile)left).getContents(true);
- }
- return null;
- }
-
- public String getName() {
- return syncTree.getName();
- }
-
- /*
- * @see IMergeResource#getResource.
- */
- public IResource getResource() {
- return syncTree.getLocal();
- }
-
- public IRemoteSyncElement getSyncElement() {
- return syncTree;
- }
-
- /**
- * Returns true if this merge resource has a base resource,
- * and false otherwise.
- */
- public boolean hasBaseRevision() {
- return syncTree.getBase() != null;
- }
-
- /**
- * Returns true if this merge resource has a latest revision,
- * and false otherwise.
- */
- public boolean hasLatestRevision() {
- return syncTree.getRemote() != null;
- }
-
- /**
- * Is this a leaf node, i.e. a file?
- */
- public boolean isLeaf() {
- return !syncTree.isContainer();
- }
-
- /**
- * Updates the given compare configuration with appropriate left, right
- * and ancestor labels for this resource.
- */
- public void setLabels(CompareConfiguration config) {
- String name = getName();
- config.setLeftLabel(Policy.bind("MergeResource.workspaceFile", name)); //$NON-NLS-1$
-
-
- IRemoteResource remote = syncTree.getRemote();
- if (remote != null) {
- config.setRightLabel(Policy.bind("MergeResource.repositoryFile", name)); //$NON-NLS-1$
- // config.setRightLabel(TeamUIPlugin.getResourceString("MergeResource.repositoryFile", new Object[] {name, remote.getVersionName()} ));
- } else {
- config.setRightLabel(Policy.bind("MergeResource.noRepositoryFile")); //$NON-NLS-1$
- }
-
- IRemoteResource base = syncTree.getBase();
- if (base != null) {
- config.setAncestorLabel(Policy.bind("MergeResource.commonFile", name)); //$NON-NLS-1$
- // config.setAncestorLabel(TeamUIPlugin.getResourceString("MergeResource.commonFile", new Object[] {name, common.getVersionName()} ));
- } else {
- config.setAncestorLabel(Policy.bind("MergeResource.noCommonFile")); //$NON-NLS-1$
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/SyncCompareInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/SyncCompareInput.java
deleted file mode 100644
index e94e1fe1d..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/SyncCompareInput.java
+++ /dev/null
@@ -1,468 +0,0 @@
-package org.eclipse.team.internal.ui.sync;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.CompareEditorInput;
-import org.eclipse.compare.internal.CompareUIPlugin;
-import org.eclipse.compare.structuremergeviewer.DiffContainer;
-import org.eclipse.compare.structuremergeviewer.DiffNode;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener;
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-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.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.IStatusLineManager;
-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.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Composite;
-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.sync.ILocalSyncElement;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.ui.IViewSite;
-
-/**
- * <b>Note:</b> This class/interface is part of an interim API that is still under
- * development and expected to change significantly before reaching stability.
- * It is being made available at this early stage to solicit feedback from pioneering
- * adopters on the understanding that any code that uses this API will almost
- * certainly be broken (repeatedly) as the API evolves.
- *
- * Performs a catchup or release operation on an array of resources.
- */
-public abstract class SyncCompareInput extends CompareEditorInput {
- private IRemoteSyncElement[] trees;
- private CatchupReleaseViewer catchupReleaseViewer;
- private DiffNode diffRoot;
- private Shell shell;
- private IViewSite viewSite;
- private int granularity;
-
- private ICompareInputChangeListener listener = new ICompareInputChangeListener() {
- public void compareInputChanged(ICompareInput source) {
- SyncCompareInput.this.compareInputChanged(source);
- }
- };
-
- /**
- * Subclasses may override but must call super.
- */
- protected void compareInputChanged(ICompareInput source) {
- catchupReleaseViewer.update(source, new String[] {CatchupReleaseViewer.PROP_KIND});
- updateStatusLine();
- }
-
- /**
- * Creates a new catchup or release operation.
- */
- public SyncCompareInput(int granularity) {
- super(new CompareConfiguration());
- privateSetSyncGranularity(granularity);
- }
-
- /**
- * Creates a new catchup or release operation.
- */
- public SyncCompareInput() {
- this(ILocalSyncElement.GRANULARITY_TIMESTAMP);
- }
-
- protected abstract IRemoteSyncElement[] createSyncElements(IProgressMonitor monitor) throws TeamException;
-
- /*
- * @see CompareEditorInput#createContents
- */
- public Control createContents(Composite parent) {
- Control result = super.createContents(parent);
- initialSelectionAndExpansionState();
- return result;
- }
-
- /**
- * Subclasses must create and return a new CatchupReleaseViewer, and set the viewer
- * using setViewer().
- */
- public abstract Viewer createDiffViewer(Composite parent);
-
- /**
- * Returns the root node of the diff tree.
- */
- public DiffNode getDiffRoot() {
- return diffRoot;
- }
-
- /**
- * Returns the first diff element that is still unresolved in the
- * subtree rooted at the given root element.
- * Returns null if everything is resolved.
- */
- private IDiffElement getFirstChange(IDiffElement root) {
- if (root instanceof ITeamNode) {
- ITeamNode node = (ITeamNode)root;
- if (node instanceof TeamFile) {
- return node;
- }
- }
- if (root instanceof IDiffContainer) {
- IDiffElement[] children = ((IDiffContainer)root).getChildren();
- IDiffElement result = null;
- for (int i = 0; i < children.length; i++) {
- result = getFirstChange(children[i]);
- if (result != null) {
- return result;
- }
- }
- }
- return null;
- }
-
- protected Shell getShell() {
- return shell;
- }
-
- /**
- * Returns the name of this operation.
- * It is dipslayed in the CompareEditor's title bar.
- */
- public String getTitle() {
- return Policy.bind("SyncCompareInput.synchronize"); //$NON-NLS-1$
- }
-
- /**
- * Returns the compare viewer;
- */
- public CatchupReleaseViewer getViewer() {
- return catchupReleaseViewer;
- }
-
- /**
- * Returns the view site, or null if this is a merge.
- */
- public IViewSite getViewSite() {
- return viewSite;
- }
-
- /**
- * Returns true if the model has incoming or conflicting changes.
- */
- boolean hasIncomingChanges() {
- if (diffRoot == null) {
- return false;
- }
- SyncSet set = new SyncSet(new StructuredSelection(diffRoot.getChildren()));
- return set.hasIncomingChanges() || set.hasConflicts();
- }
-
- /**
- * Set an appropriate initial selection and expansion state.
- */
- private void initialSelectionAndExpansionState() {
- // Select the next change
- IDiffElement next = getFirstChange(diffRoot);
- if (next != null) {
- catchupReleaseViewer.setSelection(new StructuredSelection(next), true);
- } else {
- catchupReleaseViewer.collapseAll();
- catchupReleaseViewer.setSelection(new StructuredSelection());
- }
- }
-
- /**
- * Performs a compare on the given selection.
- * This method is called before the CompareEditor has been opened.
- * If the result of the diff is empty (or an error has occured)
- * no CompareEditor is opened but an Alert is shown.
- */
- public Object prepareInput(final IProgressMonitor pm) throws InterruptedException, InvocationTargetException {
- if (pm.isCanceled()) {
- throw new InterruptedException();
- }
-
- try {
- pm.beginTask(Policy.bind("SyncCompareInput.taskTitle"), 100); //$NON-NLS-1$
-
- // Estimate 70% of the time is creating the sync elements
- this.trees = createSyncElements(Policy.subMonitorFor(pm, 70));
- setMessage(null);
- if (trees.length == 0) {
- return null;
- }
- final InterruptedException[] exceptions = new InterruptedException[1];
-
- IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- // collect changes and build the diff tree
- diffRoot = new DiffNode(0);
- try {
- doServerDelta(monitor);
- } catch (InterruptedException e) {
- exceptions[0] = e;
- }
- }
- };
- if (pm.isCanceled()) {
- throw new InterruptedException();
- }
- // Estimate 30% of the time is doing the server delta
- ResourcesPlugin.getWorkspace().run(runnable, Policy.subMonitorFor(pm, 30));
- if (exceptions[0] != null) throw exceptions[0];
- if (pm.isCanceled()) {
- throw new InterruptedException();
- }
-
- if (!diffRoot.hasChildren()) {
- diffRoot = null;
- }
-
- updateStatusLine();
-
- return diffRoot;
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
-
- void doServerDelta(IProgressMonitor pm) throws InterruptedException {
- pm.beginTask(null, trees.length * 1000);
- pm.setTaskName(Policy.bind("SyncCompareInput.taskTitle")); //$NON-NLS-1$
- for (int i = 0; i < trees.length; i++) {
- IRemoteSyncElement tree = trees[i];
- IProgressMonitor monitor = Policy.subMonitorFor(pm, 1000);
- monitor.beginTask(null, 1000);
- IDiffElement localRoot = collectResourceChanges(null, tree, monitor);
- monitor.done();
- makeParents(localRoot);
- }
- }
-
- /*
- * This method expects to be past a monitor that has already had it's beginTask invoked
- * and has enough ticks to allow 1 unit of work per resource in the tree and an additional
- * unit for each folder.
- */
- protected IDiffElement collectResourceChanges(IDiffContainer parent, IRemoteSyncElement tree, IProgressMonitor pm) {
- int type = tree.getSyncKind(getSyncGranularity(), Policy.subMonitorFor(pm, 1));
- MergeResource mergeResource = new MergeResource(tree);
-
- if (tree.isContainer()) {
- IDiffContainer element = new ChangedTeamContainer(parent, mergeResource, type);
- try {
- ILocalSyncElement[] children = tree.members(Policy.subMonitorFor(pm, 1));
- for (int i = 0; i < children.length; i++) {
- collectResourceChanges(element, (IRemoteSyncElement)children[i], pm);
- }
- } catch (TeamException e) {
- TeamUIPlugin.log(e.getStatus());
- }
- return element;
- } else {
- TeamFile file = new TeamFile(parent, mergeResource, type, shell);
- file.addCompareInputChangeListener(listener);
- return file;
- }
- }
-
- public int getSyncGranularity() {
- return granularity;
- }
-
- public void setSyncGranularity(int granularity) {
- privateSetSyncGranularity(granularity);
- refresh();
- }
-
- private void privateSetSyncGranularity(int granularity) {
- this.granularity = granularity;
- if (granularity != IRemoteSyncElement.GRANULARITY_TIMESTAMP) {
- if (isIgnoreWhitespace()) {
- this.granularity = IRemoteSyncElement.GRANULARITY_CONTENTS_IGNORE_WHITESPACE;
- } else {
- this.granularity = IRemoteSyncElement.GRANULARITY_CONTENTS;
- }
- }
- }
-
- public void setIgnoreWhitespace(boolean ignore) {
- // Set the ignore whitespace
- Boolean value = ignore ? Boolean.TRUE : Boolean.FALSE;
- getCompareConfiguration().setProperty(CompareConfiguration.IGNORE_WHITESPACE, value);
- // Set the granularity (which queries the ignore whitespace setting)
- privateSetSyncGranularity(getSyncGranularity());
- // Refresh if the granularity is file contents
- if (granularity != IRemoteSyncElement.GRANULARITY_TIMESTAMP) {
- refresh();
- }
- }
-
- public boolean isIgnoreWhitespace() {
- Object o = getCompareConfiguration().getProperty(CompareConfiguration.IGNORE_WHITESPACE);
- if (o instanceof Boolean) {
- return ((Boolean)o).booleanValue();
- }
- return CompareUIPlugin.getDefault().getPreferenceStore().getBoolean(CompareConfiguration.IGNORE_WHITESPACE);
- }
-
- /**
- * Builds a DiffFolder tree under the given root for the given resource.
- */
- private DiffContainer buildPath(DiffContainer root, IContainer resource) {
- DiffContainer parent = root;
- if (resource.getType() == IResource.ROOT) {
- return root;
- }
- if (resource.getType() != IResource.PROJECT) {
- parent = buildPath(root, resource.getParent());
- }
-
- DiffContainer c = (DiffContainer)parent.findChild(resource.getName());
- if (c == null) {
- c = new UnchangedTeamContainer(parent, resource);
- }
- return c;
- }
-
- void makeParents(IDiffElement element) {
- IContainer parent = ((ITeamNode)element).getResource().getParent();
- DiffContainer container = buildPath(diffRoot, parent);
- container.add(element);
- }
-
- /**
- * Performs a refresh, with progress and cancelation.
- */
- public void refresh() {
- final Object[] input = new Object[1];
- IRunnableWithProgress op = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- input[0] = prepareInput(monitor);
- }
- };
- try {
- run(op, Policy.bind("SyncCompareInput.refresh")); //$NON-NLS-1$
- } catch (InterruptedException e) {
- return;
- }
-
- catchupReleaseViewer.setInput(input[0]);
- if (input[0] == null) {
- MessageDialog.openInformation(shell, Policy.bind("nothingToSynchronize"), Policy.bind("SyncCompareInput.nothingText")); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- protected void run(IRunnableWithProgress op, String problemMessage) throws InterruptedException {
- ProgressMonitorDialog dialog = new ProgressMonitorDialog(shell);
- try {
- dialog.run(true, true, op);
- } catch (InvocationTargetException e) {
- Throwable throwable = e.getTargetException();
- IStatus error = null;
- if (throwable instanceof TeamException) {
- error = ((TeamException)throwable).getStatus();
- } else if (throwable instanceof CoreException) {
- error = ((CoreException)throwable).getStatus();
- } else {
- error = new Status(IStatus.ERROR, TeamUIPlugin.ID, 1, Policy.bind("simpleInternal") , throwable); //$NON-NLS-1$
- }
- ErrorDialog.openError(shell, problemMessage, null, error);
- TeamUIPlugin.log(error);
- }
- }
-
- public void setViewSite(IViewSite viewSite) {
- this.viewSite = viewSite;
- this.shell = viewSite.getShell();
- }
-
- public void setViewer(CatchupReleaseViewer viewer) {
- this.catchupReleaseViewer = viewer;
- }
-
- /**
- * Updates the status line.
- */
- public void updateStatusLine() {
- if (viewSite != null && !shell.isDisposed()) {
- Runnable update = new Runnable() {
- public void run() {
- if (!shell.isDisposed()) {
- IStatusLineManager statusLine = viewSite.getActionBars().getStatusLineManager();
- if (diffRoot == null) {
- statusLine.setMessage(null);
- statusLine.setErrorMessage(null);
- return;
- }
- SyncSet set = getSyncSet(new StructuredSelection(diffRoot.getChildren()));
- if (set.hasConflicts()) {
- statusLine.setMessage(null);
- statusLine.setErrorMessage(set.getStatusLineMessage());
- } else {
- statusLine.setErrorMessage(null);
- statusLine.setMessage(set.getStatusLineMessage());
- }
- viewSite.getActionBars().updateActionBars();
- }
- }
- };
- // Post or run the update
- if (shell.getDisplay() != Display.getCurrent()) {
- shell.getDisplay().asyncExec(update);
- } else {
- update.run();
- }
- }
- }
-
- protected SyncSet getSyncSet(IStructuredSelection selection) {
- return new SyncSet(selection);
- }
- public boolean saveIfNecessary() {
- if (! isSaveNeeded()) return true;
-
- final boolean[] result = new boolean[] { false };
- getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- try {
- result[0] = MessageDialog.openQuestion(getShell(), Policy.bind("SyncView.saveTitle"),//$NON-NLS-1$
- Policy.bind("SyncView.saveMessage"));//$NON-NLS-1$
- if (result[0]) {
- ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- saveChanges(monitor);
- }
- }, new NullProgressMonitor());
- }
- } catch (CoreException e) {
- IStatus status = e.getStatus();
- ErrorDialog.openError(getShell(), status.getMessage(), Policy.bind("SyncView.errorSaving"), status);//$NON-NLS-1$
- result[0] = false;
- }
- }
- });
- return result[0];
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/SyncSet.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/SyncSet.java
deleted file mode 100644
index 36e161abd..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/SyncSet.java
+++ /dev/null
@@ -1,282 +0,0 @@
-package org.eclipse.team.internal.ui.sync;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-
-import org.eclipse.compare.structuremergeviewer.Differencer;
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.internal.ui.Policy;
-
-/**
- * <b>Note:</b> This class/interface is part of an interim API that is still under
- * development and expected to change significantly before reaching stability.
- * It is being made available at this early stage to solicit feedback from pioneering
- * adopters on the understanding that any code that uses this API will almost
- * certainly be broken (repeatedly) as the API evolves.
- *
- * This class contains a set of resources that are slated to be
- * synchronized. It performs various operations on the
- * set in preparation for catchup/release.
- */
-public class SyncSet {
- private HashSet set;
-
- /**
- * Creates a new sync set on the nodes in the given selection.
- */
- public SyncSet(IStructuredSelection nodeSelection) {
- this.set = new HashSet(nodeSelection.size() + 1);
- collectNodes(nodeSelection);
- }
-
- /**
- * Collects all nodes to which this action will apply. This means
- * all nodes in the selection, plus all their children.
- */
- private void collectNodes(IStructuredSelection selection) {
- Object[] nodes = selection.toArray();
- for (int i = 0; i < nodes.length; i++) {
- recursivelyAdd((ITeamNode)nodes[i]);
- }
- }
-
- /**
- * Adds all parent creations for the given node to the sync set.
- */
- private void collectParentCreations(ITeamNode node) {
- IDiffElement parent = node.getParent();
- if (parent != null && parent instanceof ITeamNode) {
- if (parent.getKind() != IRemoteSyncElement.IN_SYNC) {
- set.add(parent);
- collectParentCreations((ITeamNode)parent);
- }
- }
- }
-
- /**
- * Returns all nodes in the set that have changes
- */
- public ITeamNode[] getChangedNodes() {
- ArrayList nodeList = new ArrayList(set.size());
- for (Iterator it = set.iterator(); it.hasNext();) {
- ITeamNode node = (ITeamNode)it.next();
- int dir = node.getChangeDirection();
- // We assume changed nodes of the wrong type have been culled
- // during set creation.
- if (dir != Differencer.NO_CHANGE) {
- nodeList.add(node);
- }
- }
- ITeamNode[] nodes = new ITeamNode[nodeList.size()];
- nodeList.toArray(nodes);
- return nodes;
- }
-
- /**
- * Returns the resources from all the nodes in this set.
- */
- public IResource[] getResources() {
- ITeamNode[] changed = getChangedNodes();
- IResource[] resources = new IResource[changed.length];
- for (int i = 0; i < changed.length; i++) {
- resources[i] = changed[i].getResource();
- }
- return resources;
- }
-
- /**
- * Returns a message for the status line describing this sync set.
- */
- public String getStatusLineMessage() {
- int incoming = 0;
- int outgoing = 0;
- int conflicts = 0;
- for (Iterator it = set.iterator(); it.hasNext();) {
- ITeamNode next = (ITeamNode)it.next();
- switch (next.getChangeDirection()) {
- case IRemoteSyncElement.INCOMING:
- incoming++;
- break;
- case IRemoteSyncElement.OUTGOING:
- outgoing++;
- break;
- case IRemoteSyncElement.CONFLICTING:
- conflicts++;
- break;
- }
- }
- StringBuffer result = new StringBuffer();
-
- if (conflicts == 0) {
- result.append(Policy.bind("SyncSet.noConflicts")); //$NON-NLS-1$
- } else {
- result.append(Policy.bind("SyncSet.conflicts", new Object[] {Integer.toString(conflicts)} )); //$NON-NLS-1$
- }
- if (incoming == 0) {
- result.append(Policy.bind("SyncSet.noIncomings")); //$NON-NLS-1$
- } else {
- result.append(Policy.bind("SyncSet.incomings", new Object[] {Integer.toString(incoming)} )); //$NON-NLS-1$
- }
- if (outgoing == 0) {
- result.append(Policy.bind("SyncSet.noOutgoings")); //$NON-NLS-1$
- } else {
- result.append(Policy.bind("SyncSet.outgoings", new Object[] {Integer.toString(outgoing)} )); //$NON-NLS-1$
- }
- return result.toString();
- }
-
- /**
- * Returns true if there are any conflicting nodes in the set, and
- * false otherwise.
- */
- public boolean hasConflicts() {
- for (Iterator it = set.iterator(); it.hasNext();) {
- if (((ITeamNode)it.next()).getChangeDirection() == IRemoteSyncElement.CONFLICTING) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Returns true if this sync set has incoming changes.
- * Note that conflicts are not considered to be incoming changes.
- */
- public boolean hasIncomingChanges() {
- for (Iterator it = set.iterator(); it.hasNext();) {
- if (((ITeamNode)it.next()).getChangeDirection() == IRemoteSyncElement.INCOMING) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Returns true if this sync set has outgoing changes.
- * Note that conflicts are not considered to be outgoing changes.
- */
- public boolean hasOutgoingChanges() {
- for (Iterator it = set.iterator(); it.hasNext();) {
- if (((ITeamNode)it.next()).getChangeDirection() == IRemoteSyncElement.OUTGOING) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Returns true if this sync set has auto-mergeable conflicts.
- */
- public boolean hasAutoMergeableConflicts() {
- for (Iterator it = set.iterator(); it.hasNext();) {
- ITeamNode node = (ITeamNode)it.next();
- if ((node.getKind() & IRemoteSyncElement.AUTOMERGE_CONFLICT) != 0) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Adds the given node, plus all its children, to the given set.
- */
- private void recursivelyAdd(ITeamNode node) {
- // Add the node and recurse
- if (set.add(node)) {
- if (node instanceof IDiffContainer) {
- IDiffElement[] children = ((IDiffContainer)node).getChildren();
- for (int i = 0; i < children.length; i++) {
- if (children[i] instanceof ITeamNode) {
- recursivelyAdd((ITeamNode)children[i]);
- }
- }
- }
- // Add any created parents (can't release or load a
- // resource creation without including new parents)
- collectParentCreations(node);
- }
- }
-
- /**
- * Removes all conflicting nodes from this set.
- */
- public void removeConflictingNodes() {
- for (Iterator it = set.iterator(); it.hasNext();) {
- ITeamNode node = (ITeamNode)it.next();
- if (node.getChangeDirection() == IRemoteSyncElement.CONFLICTING) {
- it.remove();
- }
- }
- }
- /**
- * Removes all outgoing nodes from this set.
- */
- public void removeOutgoingNodes() {
- for (Iterator it = set.iterator(); it.hasNext();) {
- ITeamNode node = (ITeamNode)it.next();
- if (node.getChangeDirection() == IRemoteSyncElement.OUTGOING) {
- it.remove();
- }
- }
- }
- /**
- * Removes all incoming nodes from this set.
- */
- public void removeIncomingNodes() {
- for (Iterator it = set.iterator(); it.hasNext();) {
- ITeamNode node = (ITeamNode)it.next();
- if (node.getChangeDirection() == IRemoteSyncElement.INCOMING) {
- it.remove();
- }
- }
- }
- /**
- * Removes all nodes from this set that are not auto-mergeable conflicts
- */
- public void removeNonMergeableNodes() {
- for (Iterator it = set.iterator(); it.hasNext();) {
- ITeamNode node = (ITeamNode)it.next();
- if ((node.getKind() & IRemoteSyncElement.MANUAL_CONFLICT) != 0) {
- it.remove();
- } else if (node.getChangeDirection() != ITeamNode.CONFLICTING) {
- it.remove();
- }
- }
- }
-
- /**
- * Removes all nodes that aren't applicable for the direction.
- */
- public void removeNonApplicableNodes(int direction) {
- for (Iterator it = set.iterator(); it.hasNext();) {
- ITeamNode node = (ITeamNode)it.next();
- int nodeDirection = node.getKind() & IRemoteSyncElement.DIRECTION_MASK;
- if (nodeDirection != IRemoteSyncElement.CONFLICTING) {
- if (nodeDirection != direction) {
- it.remove();
- }
- }
- }
- }
-
- /**
- * Remove the given node from the sync set
- */
- public void remove(ITeamNode node) {
- set.remove(node);
- }
-
- protected HashSet getSyncSet() {
- return set;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/SyncView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/SyncView.java
deleted file mode 100644
index 9df988b7c..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/SyncView.java
+++ /dev/null
@@ -1,399 +0,0 @@
-package org.eclipse.team.internal.ui.sync;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.NavigationAction;
-import org.eclipse.compare.structuremergeviewer.DiffNode;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-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.jface.viewers.TreeViewer;
-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.swt.widgets.Label;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.UIConstants;
-import org.eclipse.team.ui.TeamImages;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IPartListener;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.ViewPart;
-
-/**
- * <b>Note:</b> This class/interface is part of an interim API that is still under
- * development and expected to change significantly before reaching stability.
- * It is being made available at this early stage to solicit feedback from pioneering
- * adopters on the understanding that any code that uses this API will almost
- * certainly be broken (repeatedly) as the API evolves.
- *
- * This class provides a view for performing synchronizations
- * between the local workspace and a repository.
- */
-public class SyncView extends ViewPart {
- public static final String VIEW_ID = "org.eclipse.team.ui.sync.SyncView"; //$NON-NLS-1$
- private SyncCompareInput input;
- private TreeViewer viewer;
- private Composite top;
-
- // The possible sync modes
- public static final int SYNC_NONE = 0;
- public static final int SYNC_INCOMING = 1;
- public static final int SYNC_OUTGOING = 2;
- public static final int SYNC_BOTH = 3;
- public static final int SYNC_MERGE = 4;
- public static final int SYNC_COMPARE = 5;
-
- // Titles cached for efficiency
- private final String CATCHUP_TITLE = Policy.bind("SyncView.incomingModeTitle"); //$NON-NLS-1$
- private final String RELEASE_TITLE = Policy.bind("SyncView.outgoingModeTitle"); //$NON-NLS-1$
- private final String FREE_TITLE = Policy.bind("SyncView.freeModeTitle"); //$NON-NLS-1$
-
- private int currentSyncMode = SYNC_NONE;
-
- /**
- * Action for toggling the sync mode.
- */
- class SyncModeAction extends Action {
- // The sync mode that this action enables
- private int syncMode;
- public SyncModeAction(String title, ImageDescriptor image, int mode) {
- super(title, image);
- this.syncMode = mode;
- }
- public void run() {
- SyncView.this.setSyncMode(syncMode);
- }
- }
-
- private SyncModeAction incomingMode;
- private SyncModeAction outgoingMode;
- private SyncModeAction freeMode;
-
- private class PartListener implements IPartListener {
- public void partActivated(IWorkbenchPart part) {
- }
- public void partBroughtToTop(IWorkbenchPart part) {
- }
- public void partClosed(IWorkbenchPart part) {
- }
- public void partDeactivated(IWorkbenchPart part) {
- if (part == SyncView.this && input != null) {
- input.saveIfNecessary();
- }
- }
- public void partOpened(IWorkbenchPart part) {
- }
- }
-
- private IPartListener partListener;
-
- /**
- * Creates a new view.
- */
- public SyncView() {
- super();
- }
-
- /*
- * @see IWorkbenchPart#createPartControl
- */
- public void createPartControl(Composite parent) {
- top = new Composite(parent, SWT.NONE);
-
- //XXX Set the control data to be this part, so the compare
- //frames that will eventually live in this widget hierarchy
- //have some way to access the action bars for hooking global
- //actions. See corresponding XXX comment in CompareEditor#findActionBars
- top.setData(this);
-
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- top.setLayout(layout);
- top.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- showDefaultContents();
-
- initializeSyncModes();
- // add part listener
- partListener = new PartListener();
- getViewSite().getWorkbenchWindow().getPartService().addPartListener(partListener);
- }
-
- public void dispose() {
- // remove part listener
- if (partListener != null) {
- getViewSite().getWorkbenchWindow().getPartService().removePartListener(partListener);
- partListener = null;
- }
- super.dispose();
- }
-
- /**
- * Makes the sync view visible in the active perspective. If there
- * isn't a sync view registered <code>null</code> is returned.
- * Otherwise the opened view part is returned.
- */
- public static SyncView findInActivePerspective() {
- try {
- IViewPart part = TeamUIPlugin.getActivePage().findView(VIEW_ID);
- if (part == null) {
- part = TeamUIPlugin.getActivePage().showView(VIEW_ID);
- }
- return (SyncView)part;
- } catch (PartInitException pe) {
- return null;
- }
- }
-
- /**
- * Sets up the sync modes and the actions for switching between them.
- */
- private void initializeSyncModes() {
- // Create the actions
- incomingMode = new SyncModeAction(
- Policy.bind("SyncView.incomingModeAction"), //$NON-NLS-1$
- TeamImages.getImageDescriptor(UIConstants.IMG_SYNC_MODE_CATCHUP),
- SYNC_INCOMING);
- incomingMode.setToolTipText(Policy.bind("SyncView.incomingModeToolTip")); //$NON-NLS-1$
- incomingMode.setChecked(false);
-
- outgoingMode = new SyncModeAction(
- Policy.bind("SyncView.outgoingModeAction"), //$NON-NLS-1$
- TeamImages.getImageDescriptor(UIConstants.IMG_SYNC_MODE_RELEASE),
- SYNC_OUTGOING);
- outgoingMode.setToolTipText(Policy.bind("SyncView.outgoingModeToolTip")); //$NON-NLS-1$
- outgoingMode.setChecked(false);
-
- freeMode = new SyncModeAction(
- Policy.bind("SyncView.freeModeAction"), //$NON-NLS-1$
- TeamImages.getImageDescriptor(UIConstants.IMG_SYNC_MODE_FREE),
- SYNC_BOTH);
- freeMode.setToolTipText(Policy.bind("SyncView.freeModeToolTip")); //$NON-NLS-1$
- freeMode.setChecked(false);
- }
-
- private boolean isEmpty(DiffNode node) {
- if (node == null) return true;
- if (node.getKind() != 0) return false;
- IDiffElement[] children = node.getChildren();
- for (int i = 0; i < children.length; i++) {
- if (!isEmpty(children[i])) return false;
- }
- return true;
- }
- private boolean isEmpty(IDiffElement element) {
- if (element.getKind() != 0) return false;
- if (element instanceof DiffNode) {
- IDiffElement[] children = ((DiffNode)element).getChildren();
- for (int i = 0; i < children.length; i++) {
- if (!isEmpty(children[i])) return false;
- }
- }
- return true;
- }
-
- /**
- * Runs an operation and handles progress and exceptions. Returns true
- * if the operation was successful, and false if there were errors or
- * the user canceled.
- */
- private boolean run(IRunnableWithProgress op) {
- ProgressMonitorDialog dialog = new ProgressMonitorDialog(getSite().getShell());
- try {
- dialog.run(true, true, op);
- return true;
- } catch (InvocationTargetException e) {
- Throwable throwable = e.getTargetException();
- IStatus error = null;
- if (throwable instanceof TeamException) {
- error = ((TeamException)throwable).getStatus();
- } else if (throwable instanceof CoreException) {
- error = ((CoreException)throwable).getStatus();
- } else {
- error = new Status(IStatus.ERROR, TeamUIPlugin.ID, 1, Policy.bind("simpleInternal"), throwable); //$NON-NLS-1$
- }
- ErrorDialog.openError(getSite().getShell(), Policy.bind("SyncView.unableSynchronize"), null, error); //$NON-NLS-1$
- TeamUIPlugin.log(error);
- } catch (InterruptedException e) {
- }
- return false;
- }
-
- /**
- * Asks the part to take focus within the workbench.
- */
- public void setFocus() {
- if (top != null && !top.isDisposed()) {
- top.setFocus();
- }
- }
-
- /**
- * Activates the given sync mode.
- */
- void setSyncMode(int mode) {
- // Implement radio button behaviour
- switch (mode) {
- case SYNC_INCOMING:
- incomingMode.setChecked(true);
- outgoingMode.setChecked(false);
- freeMode.setChecked(false);
- setTitle(CATCHUP_TITLE);
- break;
- case SYNC_OUTGOING:
- outgoingMode.setChecked(true);
- incomingMode.setChecked(false);
- freeMode.setChecked(false);
- setTitle(RELEASE_TITLE);
- break;
- case SYNC_BOTH:
- freeMode.setChecked(true);
- outgoingMode.setChecked(false);
- incomingMode.setChecked(false);
- setTitle(FREE_TITLE);
- break;
- }
- // Only update actions if there is valid input
- if (input != null && input.getDiffRoot() != null && mode != currentSyncMode) {
- currentSyncMode = mode;
- input.getViewer().syncModeChanged(mode);
- updateActions();
- }
- }
-
- /**
- * Shows default contents for the view if there is nothing to synchronize.
- */
- private void showDefaultContents() {
- Label label = new Label(top, SWT.WRAP);
- label.setLayoutData(new GridData(GridData.FILL_BOTH));
- label.setText(Policy.bind("SyncView.text")); //$NON-NLS-1$
- }
-
- /**
- * Shows synchronization information for the given resources in the sync view.
- */
- public void showSync(SyncCompareInput input) {
- IActionBars actionBars = getViewSite().getActionBars();
- actionBars.updateActionBars();
-
- input.setViewSite(getViewSite());
- this.input = input;
- currentSyncMode = SYNC_NONE;
-
- // Remove old viewer
- Control[] oldChildren = top.getChildren();
- if (oldChildren != null) {
- for (int i = 0; i < oldChildren.length; i++) {
- oldChildren[i].dispose();
- }
- }
- // Remove actions from toolbar
- IActionBars bars = getViewSite().getActionBars();
- bars.getToolBarManager().removeAll();
- bars.getToolBarManager().update(false);
- bars.getMenuManager().removeAll();
- bars.getMenuManager().update();
- bars.updateActionBars();
-
- // Display the default contents while running the diff
- showDefaultContents();
- top.layout();
-
- // Run the diff and stop if cancel or error occurred.
- if (!run(input)) return;
-
- // Check for problem message
- if (input.getMessage() != null) {
- MessageDialog.openInformation(getSite().getShell(), Policy.bind("SyncView.unableSynchronize"), input.getMessage()); //$NON-NLS-1$
- return;
- }
-
- // Check for empty comparison
- if (isEmpty(input.getDiffRoot())) {
- MessageDialog.openInformation(getSite().getShell(), Policy.bind("nothingToSynchronize"), Policy.bind("SyncView.same")); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
-
- // Remove the default contents
- oldChildren = top.getChildren();
- if (oldChildren != null) {
- for (int i = 0; i < oldChildren.length; i++) {
- oldChildren[i].dispose();
- }
- }
-
- // Show the result
- Control control = input.createContents(top);
- control.setLayoutData(new GridData(GridData.FILL_BOTH));
- /*TreeViewer viewer = input.getViewer();
- if (viewer != null) {
- Control viewerControl = viewer.getControl();
- if (viewerControl != null && !viewerControl.isDisposed()) {
- WorkbenchHelp.setHelp(viewerControl, new ViewContextComputer(this, ITeamHelpContextIds.SYNC_VIEW));
- }
- }*/
-
- top.layout();
-
- // Set the sync mode depending on user preference
- if (TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(UIConstants.PREF_ALWAYS_IN_INCOMING_OUTGOING)) {
- freeMode.run();
- } else {
- if (input.hasIncomingChanges()) {
- incomingMode.run();
- } else {
- outgoingMode.run();
- }
- }
- // Reveal if fast view
- try {
- TeamUIPlugin.getActivePage().showView(VIEW_ID);
- } catch (PartInitException e) {
- TeamUIPlugin.log(e.getStatus());
- }
- }
-
- /**
- * Updates the actions for this view's action bar.
- */
- private void updateActions() {
- IActionBars bars = getViewSite().getActionBars();
- IToolBarManager toolBar = bars.getToolBarManager();
- IMenuManager menu = bars.getMenuManager();
- toolBar.removeAll();
- menu.removeAll();
-
- toolBar.add(incomingMode);
- toolBar.add(outgoingMode);
- toolBar.add(freeMode);
- input.getViewer().contributeToActionBars(bars);
-
- toolBar.update(false);
- menu.update(false);
- bars.updateActionBars();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/TeamFile.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/TeamFile.java
deleted file mode 100644
index 605c04e25..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/TeamFile.java
+++ /dev/null
@@ -1,369 +0,0 @@
-package org.eclipse.team.internal.ui.sync;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.CompareUI;
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.compare.structuremergeviewer.DiffElement;
-import org.eclipse.compare.structuremergeviewer.Differencer;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener;
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.util.Assert;
-import org.eclipse.jface.util.ListenerList;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.internal.core.TeamPlugin;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.ui.internal.WorkbenchPlugin;
-
-/**
- * <b>Note:</b> This class/interface is part of an interim API that is still under
- * development and expected to change significantly before reaching stability.
- * It is being made available at this early stage to solicit feedback from pioneering
- * adopters on the understanding that any code that uses this API will almost
- * certainly be broken (repeatedly) as the API evolves.
- *
- * A sync node for a version-controlled file, where the left
- * side is the local file, the right side is the remote file,
- * and the ancestor is the common file.
- */
-public class TeamFile extends DiffElement implements ICompareInput, ITeamNode {
-
- private MergeResource mergeResource;
-
- private Shell shell;
- private ListenerList listeners;
-
- private TypedBufferedContent localByteContents;
- private TypedBufferedContent commonByteContents;
- private TypedBufferedContent remoteByteContents;
-
- boolean hasBeenSaved = false;
-
- private IProgressMonitor monitor;
-
- /**
- * Creates a new file node.
- */
- public TeamFile(IDiffContainer parent, MergeResource res, int changeType, Shell shell) {
- super(parent, changeType);
- Assert.isNotNull(res);
- this.mergeResource = res;
- this.shell = shell;
-
- commonByteContents = new TypedBufferedContent(this, false) {
- public InputStream createStream() throws CoreException {
- return mergeResource.getBaseRevision();
- }
- };
- remoteByteContents = new TypedBufferedContent(this, false) {
- protected InputStream createStream() throws CoreException {
- return mergeResource.getLatestRevision();
- }
- };
-
- if(getResource().exists()) {
- localByteContents = getLocalTypedContent();
- } else {
- localByteContents = null;
- }
- }
-
- public void addCompareInputChangeListener(ICompareInputChangeListener l) {
- if (listeners == null) {
- listeners = new ListenerList();
- }
- listeners.add(l);
- }
-
- /*
- * @see ICompareInput#copy(boolean)
- */
- public void copy(boolean leftToRight) {
- if (leftToRight) return;
- ITypedElement right = getRight();
- ITypedElement left = getLeft();
- try {
- if (left == null) {
- // Addition
- saveChanges(new ByteArrayInputStream(new byte[0]));
- localByteContents = getLocalTypedContent();
- } else {
- // deletion
- saveChanges(null);
- localByteContents = null;
- }
- } catch(CoreException e) {
- TeamPlugin.log(e.getStatus());
- }
- }
-
- public boolean equals(Object other) {
- if (other != null && other.getClass() == getClass()) {
- TeamFile file = (TeamFile) other;
- return mergeResource.equals(file.mergeResource);
- }
- return super.equals(other);
- }
-
- /*
- * @see ICompareInput#getAncestor
- */
- public ITypedElement getAncestor() {
- if (mergeResource.hasBaseRevision()) {
- return commonByteContents;
- }
- return null;
- }
-
- /*
- * Method declared on ITeamNode.
- */
- public int getChangeDirection() {
- return getKind() & Differencer.DIRECTION_MASK;
- }
-
- /*
- * @see ITeamNode#getChangeType()
- */
- public int getChangeType() {
- return getKind() & Differencer.CHANGE_TYPE_MASK;
- }
-
- /*
- * @see ITypedInput#getType
- */
- public Image getImage() {
- return CompareUI.getImage(getType());
- }
-
- /*
- * @see ICompareInput#getLeft
- */
- public ITypedElement getLeft() {
- return localByteContents;
- }
-
- /*
- * @see ITypedInput#getName
- */
- public String getName() {
- if(hasBeenSaved) {
- return Policy.bind("TeamFile.modified", mergeResource.getName()); //$NON-NLS-1$
- } else {
- return mergeResource.getName();
- }
- }
-
- /*
- * @see ICompareInput#getRight
- */
- public ITypedElement getRight() {
- if (mergeResource.hasLatestRevision()) {
- return remoteByteContents;
- } else {
- return null;
- }
- }
-
- /*
- * @see ITypedInput#getType
- */
- public String getType() {
- return mergeResource.getExtension();
- }
-
- /*
- * @see ICompareInput#removeCompareInputChangeListener(ICompareInputChangeListener)
- */
- public void removeCompareInputChangeListener(ICompareInputChangeListener listener) {
- if (listeners != null) {
- listeners.remove(listener);
- }
- }
-
- /*
- * @see Object
- */
- public int hashCode() {
- return mergeResource.hashCode();
- }
-
- /**
- * Returns the team resource managed by this object.
- * Guaranteed to be non-null.
- */
- public MergeResource getMergeResource() {
- return mergeResource;
- }
-
- /**
- * Returns the core resource managed by this object.
- * Guaranteed to be non-null.
- */
- public IResource getResource() {
- return mergeResource.getResource();
- }
-
- /**
- * For debugging purposes only.
- */
- public String toString() {
- return "TeamFile(" + mergeResource.getName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- protected TypedBufferedContent getLocalTypedContent() {
- // don't allow editing of outgoing deletion content. To revert from the deletion the
- // user should use the appropriate sync view action.
- boolean outgoingDeletion = getChangeDirection() == IRemoteSyncElement.OUTGOING && getChangeType() == IRemoteSyncElement.DELETION;
- final String name = getName();
- return new TypedBufferedContent(this, !outgoingDeletion) {
- protected InputStream createStream() throws CoreException {
- return mergeResource.getLocalStream();
- }
- public void setContent(byte[] contents) {
- try {
- if(contents==null) {
- saveChanges(new ByteArrayInputStream(new byte[0]));
- } else {
- saveChanges(new ByteArrayInputStream(contents));
- }
- } catch(CoreException e) {
- ErrorDialog.openError(WorkbenchPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell(), Policy.bind("TeamFile.saveChanges", name), null, e.getStatus()); //$NON-NLS-1$
- }
- fireContentChanged();
- }
- public ITypedElement replace(ITypedElement child, ITypedElement other) {
- return null;
- }
- };
- }
-
- /**
- * The local resource has beed modified (i.e. merged).
- */
- public void merged() {
- // calculate the new sync state based on the type of change that was merged. This
- // logic cannot be in the IRemoteSyncElement because there is no way to update the
- // base before calling getSyncKind() again.
- if(getChangeDirection()==INCOMING) {
- switch(getChangeType()) {
- case Differencer.ADDITION:
- case Differencer.CHANGE:
- setKind(OUTGOING | Differencer.CHANGE);
- break;
- case Differencer.DELETION:
- setKind(CONFLICTING | Differencer.CHANGE);
- }
- } else {
- setKind(OUTGOING | (getKind() & Differencer.CHANGE_TYPE_MASK));
- }
- hasBeenSaved = false;
- }
-
- public void setProgressMonitor(IProgressMonitor monitor) {
- this.monitor = monitor;
- }
-
- private void saveChanges(final InputStream is) throws CoreException {
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- IFile file = (IFile) getResource();
- if (is != null) {
- if (!file.exists()) {
- createParents(getParent(), getResource().getParent());
- file.create(is, false, monitor);
- } else {
- file.setContents(is, false, true, monitor);
- }
- } else {
- file.delete(false, true, monitor);
- deleteParents(getParent(), getResource().getParent());
- }
- hasBeenSaved = true;
-
- // update the UI with the sync state change.
- fireThreeWayInputChange();
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- }
-
- private void createParents(IDiffContainer parentNode, IContainer parentFolder) throws CoreException {
- if(!parentFolder.exists() && parentFolder.getType() != IResource.PROJECT) {
- createParents(parentNode.getParent(), parentFolder.getParent());
- ((IFolder)parentFolder).create(false /* force */, true, null);
- if(parentNode instanceof ChangedTeamContainer) {
- ((ChangedTeamContainer)parentNode).setKind(IRemoteSyncElement.IN_SYNC);
- }
- }
- }
-
- private void deleteParents(IDiffContainer parentNode, IContainer parentFolder) throws CoreException {
- if(parentFolder.members().length == 0 && parentFolder.getType() != IResource.PROJECT) {
- IContainer parent = parentFolder.getParent();
- parentFolder.delete(false, null);
- if(parentNode instanceof ChangedTeamContainer) {
- ((ChangedTeamContainer)parentNode).setKind(IRemoteSyncElement.IN_SYNC);
- }
- deleteParents(parentNode.getParent(), parent);
- }
- }
-
- private void run(IRunnableWithProgress runnable) throws CoreException {
- try {
- if(monitor == null) {
- new ProgressMonitorDialog(shell).run(false, false, runnable);
- } else {
- runnable.run(monitor);
- }
- } catch (InvocationTargetException e) {
- if (e.getTargetException() instanceof CoreException) {
- throw (CoreException)e.getTargetException();
- } else {
- throw new CoreException(new Status(IStatus.ERROR, TeamUIPlugin.ID, 0, Policy.bind("simpleInternal"), e.getTargetException())); //$NON-NLS-1$
- }
- } catch (InterruptedException e) {
- // Ignore
- }
- }
-
- private void fireThreeWayInputChange() {
- if (listeners != null) {
- Object[] listenerArray = listeners.getListeners();
- // Iterate backwards so that the model gets updated last
- // it might want to remove the node completely, which might
- // upset other listeners.
- for (int i = listenerArray.length; --i >= 0;)
- ((ICompareInputChangeListener) listenerArray[i]).compareInputChanged(this);
- }
- }
-
- public boolean hasBeenSaved() {
- return hasBeenSaved;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/TypedBufferedContent.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/TypedBufferedContent.java
deleted file mode 100644
index 6c739f918..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/TypedBufferedContent.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.eclipse.team.internal.ui.sync;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.compare.BufferedContent;
-import org.eclipse.compare.IEditableContent;
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * <b>Note:</b> This class/interface is part of an interim API that is still under
- * development and expected to change significantly before reaching stability.
- * It is being made available at this early stage to solicit feedback from pioneering
- * adopters on the understanding that any code that uses this API will almost
- * certainly be broken (repeatedly) as the API evolves.
- *
- * A content buffer for resources on a server.
- */
-abstract class TypedBufferedContent extends BufferedContent implements ITypedElement, IEditableContent {
- private ITeamNode node;
- private boolean editable;
-
- /**
- * Creates a new content buffer for the given team node.
- */
- TypedBufferedContent(ITeamNode node, boolean editable) {
- this.node = node;
- this.editable = editable;
- }
-
- public Image getImage() {
- return node.getImage();
- }
-
- public String getName() {
- return node.getName();
- }
-
- public String getType() {
- return node.getType();
- }
-
- /**
- * 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 editable;
- }
-
- /**
- * 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;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/UnchangedTeamContainer.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/UnchangedTeamContainer.java
deleted file mode 100644
index 39ab24651..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/UnchangedTeamContainer.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package org.eclipse.team.internal.ui.sync;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.compare.CompareUI;
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.compare.ResourceNode;
-import org.eclipse.compare.structuremergeviewer.DiffNode;
-import org.eclipse.compare.structuremergeviewer.Differencer;
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * <b>Note:</b> This class/interface is part of an interim API that is still under
- * development and expected to change significantly before reaching stability.
- * It is being made available at this early stage to solicit feedback from pioneering
- * adopters on the understanding that any code that uses this API will almost
- * certainly be broken (repeatedly) as the API evolves.
- *
- * A node in a diff tree that represents a folder with no changes
- * to itself, it is only a placeholder for changes in its children.
- */
-public class UnchangedTeamContainer extends DiffNode implements ITeamNode {
- private IResource resource;
-
- public UnchangedTeamContainer(IDiffContainer parent, IResource resource) {
- this(parent, resource, Differencer.NO_CHANGE);
- }
-
- public UnchangedTeamContainer(IDiffContainer parent, IResource resource, int description) {
- super(parent, description);
- setLeft(new ResourceNode(resource));
- this.resource = resource;
- }
-
- /*
- * Method declared on ITeamNode
- */
- public int getChangeDirection() {
- return ITeamNode.NO_CHANGE;
- }
-
- /*
- * @see ITeamNode#getChangeType()
- */
- public int getChangeType() {
- return ITeamNode.NO_CHANGE;
- }
-
- public Image getImage() {
- return CompareUI.getImage(getType());
- }
-
- public String getName() {
- return resource.getName();
- }
-
- /**
- * Returns the resource underlying this diff node.
- */
- public IResource getResource() {
- return resource;
- }
-
- public String getType() {
- return ITypedElement.FOLDER_TYPE;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/ConfigureTargetWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/ConfigureTargetWizard.java
deleted file mode 100644
index 347153e46..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/ConfigureTargetWizard.java
+++ /dev/null
@@ -1,401 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui.target;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IPluginRegistry;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.wizard.IWizardContainer;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.target.IRemoteTargetResource;
-import org.eclipse.team.core.target.Site;
-import org.eclipse.team.core.target.TargetManager;
-import org.eclipse.team.core.target.TargetProvider;
-import org.eclipse.team.internal.ui.ConfigurationWizardElement;
-import org.eclipse.team.internal.ui.ConfigureProjectWizardMainPage;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.UIConstants;
-import org.eclipse.team.ui.IConfigurationWizard;
-import org.eclipse.team.ui.TeamImages;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.internal.model.AdaptableList;
-
-public class ConfigureTargetWizard extends Wizard implements IConfigurationWizard {
- protected IWorkbench workbench;
- protected IProject project;
- protected IConfigurationWizard wizard;
-
- protected ConfigureProjectWizardMainPage mainPage;
- protected static MappingSelectionPage mappingPage;
-
- private String pluginId = UIConstants.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 ConfigureTargetWizard() {
- setNeedsProgressMonitor(true);
- setWindowTitle(getWizardWindowTitle()); //$NON-NLS-1$
- }
-
- public static final String MAPPING_PAGE_NAME = "mapping-page"; //$NON-NLS-1$
-
- protected SiteSelectionPage siteSelectionPage = null;
- /**
- * @see ConfigureProjectWizard#getExtensionPoint()
- */
- protected String getExtensionPoint() {
- return UIConstants.PT_TARGETCONFIG;
- }
-
- /**
- * @see ConfigureProjectWizard#getWizardDescription()
- */
- protected String getWizardDescription() {
- return Policy.bind("TargetSiteCreationWizard.description"); //$NON-NLS-1$
- }
-
- /**
- * @see ConfigureProjectWizard#getWizardLabel()
- */
- protected String getWizardLabel() {
- return Policy.bind("TargetSiteCreationWizard.label"); //$NON-NLS-1$
- }
-
- /**
- * @see ConfigureProjectWizard#getWizardWindowTitle()
- */
- protected String getWizardWindowTitle() {
- if(project != null) {
- return Policy.bind("TargetSiteCreationWizard.windowTitleProject"); //$NON-NLS-1$
- } else {
- return Policy.bind("TargetSiteCreationWizard.windowTitleNoProject"); //$NON-NLS-1$
- }
- }
-
- /*
- * @see Wizard#addPages
- */
- public void addPages() {
- Site[] sites = TargetManager.getSites();
- AdaptableList wizards = getAvailableWizards();
-
- if(sites.length > 0 && project != null) {
- TargetProvider provider = null;
- try {
- provider = TargetManager.getProvider(project);
- } catch (TeamException e) {
- TeamUIPlugin.log(e.getStatus());
- }
- siteSelectionPage = new SiteSelectionPage("site-selection-page", Policy.bind("TargetSiteCreationWizard.siteSelectionPage"), TeamImages.getImageDescriptor(UIConstants.IMG_WIZBAN_SHARE), provider); //$NON-NLS-1$ //$NON-NLS-2$
- addPage(siteSelectionPage);
- }
-
- if(project != null) {
- mappingPage = new MappingSelectionPage(ConfigureTargetWizard.MAPPING_PAGE_NAME, Policy.bind("MappingSelectionPage.mappingTitle"), TeamImages.getImageDescriptor(UIConstants.IMG_WIZBAN_SHARE)); //$NON-NLS-1$
- mappingPage.setWizard(this);
- }
-
- try {
- if(wizards.size() == 1) {
- ConfigurationWizardElement element = (ConfigurationWizardElement)wizards.getChildren()[0];
- 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]);
- }
- }
- } else {
- mainPage = new ConfigureProjectWizardMainPage("target-selection-page", getWizardLabel(), TeamImages.getImageDescriptor(UIConstants.IMG_WIZBAN_SHARE), wizards); //$NON-NLS-1$
- mainPage.setDescription(getWizardDescription());
- mainPage.setProject(project);
- mainPage.setWorkbench(workbench);
- addPage(mainPage);
- }
- } catch (CoreException e) {
- TeamUIPlugin.log(e.getStatus());
- return;
- }
- }
-
- public IWizardPage getNextPage(IWizardPage page) {
- if(page == siteSelectionPage) {
- if(siteSelectionPage.isDisconnect()) {
- return null;
- }
- if(siteSelectionPage.getSite() != null) {
- mappingPage.setSite(siteSelectionPage.getSite());
- mappingPage.setPreviousPage(page);
- return mappingPage;
- } else if(mainPage != null) {
- return mainPage;
- } else if(wizard != null) {
- return wizard.getStartingPage();
- }
- }
- if(wizard != null) {
- return wizard.getNextPage(page);
- }
- return super.getNextPage(page);
- }
-
- public static MappingSelectionPage getMappingPage() {
- return mappingPage;
- }
-
- public boolean canFinish() {
- // If we are on the first page, never allow finish unless the selected wizard has no pages.
- IWizardPage currentPage = getContainer().getCurrentPage();
- if (currentPage == mainPage) {
- if (mainPage.getSelectedWizard() != null && mainPage.getNextPage() == null) {
- return true;
- }
- return false;
- } else if(currentPage == siteSelectionPage) {
- if(siteSelectionPage.getSite() != null || siteSelectionPage.isDisconnect()) {
- return true;
- } else {
- return false;
- }
- }
-
- MappingSelectionPage mappingPage = getMappingPage();
- if(mappingPage != null && currentPage == mappingPage) {
- return mappingPage.isPageComplete();
- }
- if(wizard != null) {
- return wizard.canFinish();
- }
- return super.canFinish();
- }
-
- /*
- * @see Wizard#performFinish
- */
- public boolean performFinish() {
- // handles finish on site selection page and on mapping page
- IWizardPage currentPage = getContainer().getCurrentPage();
- if(currentPage == siteSelectionPage || currentPage == getMappingPage()) {
- Site site;
- if(currentPage == siteSelectionPage) {
- // if the user selected the disconnect option then disconnect
- // this project from the target
- if(siteSelectionPage.isDisconnect()) {
- try {
- TargetManager.unmap(project);
- } catch (TeamException e) {
- ErrorDialog.openError(getShell(), Policy.bind("Error"), Policy.bind("ConfigureTargetWizard.errorUnmappingProject"), e.getStatus()); //$NON-NLS-1$ //$NON-NLS-2$
- return false;
- }
- return true;
- }
- site = siteSelectionPage.getSite();
- } else {
- site = getMappingPage().getSite();
- }
- // a site has been selected on either the site selection page or the
- // mapping page. Use this site information to map the project to the
- // target.
- IPath path = Path.EMPTY;
- if(getMappingPage() != null) {
- path = getMappingPage().getMapping();
- }
- if(! setMapping(getContainer(), project, site, path))
- return false; //mapping failed so fail finish
- }
-
- // allow target wizard to finish
- if (wizard != null) {
- return wizard.performFinish();
- }
- return true;
- }
-
- public static boolean setMapping(IWizardContainer container, IProject project, Site site, IPath path) {
- if(validateSite(site, container)) {
- if(TargetManager.getSite(site.getType(), site.getURL()) == null) {
- TargetManager.addSite(site);
- }
- try {
- TargetProvider provider = TargetManager.getProvider(project);
- if(provider != null) {
- if(! MessageDialog.openQuestion(container.getShell(),
- Policy.bind("ConfigureTargetWizardQuestion_2"), //$NON-NLS-1$
- Policy.bind("ConfigureTargetWizard.alreadyMapped", project.getName(), provider.getURL().toExternalForm()))) { //$NON-NLS-1$
- return false;
- }
- TargetManager.unmap(project);
- }
- TargetManager.map(project, site, path);
- return true;
- } catch (TeamException e) {
- ErrorDialog.openError(container.getShell(), Policy.bind("ConfigureTargetWizardError_6"), Policy.bind("ConfigureTargetWizardError_mapping_the_project_with_this_site_7"), e.getStatus()); //$NON-NLS-1$ //$NON-NLS-2$
- return false;
- }
- } else {
- return false;
- }
- }
-
- public static boolean validateSite(final Site site, final IWizardContainer container) {
- final boolean[] valid = new boolean[] {true};
- final String[] message = new String[] {Policy.bind("ConfigureTargetWizardURL_doesn__t_exist_on_the_server_8")}; //$NON-NLS-1$
- final int[] code = new int[] {-1};
- try {
- container.run(true, false, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
-// try {
-// monitor.beginTask(Policy.bind("ConfigureTargetWizardValidating_connection_to_Site..._9"), monitor.UNKNOWN); //$NON-NLS-1$
-// IRemoteTargetResource remote = site.getRemoteResource();
-// valid[0] = remote.canBeReached(monitor);
- valid[0] = true;
-// } catch(TeamException e) {
-// message[0] = e.getStatus().getMessage();
-// code[0] = e.getStatus().getCode();
-// valid[0] = false;
-// } finally {
- monitor.done();
-// }
- }
- });
- } catch (InvocationTargetException e) {
- valid[0] = false;
- message[0] = e.getTargetException().getMessage();
- } catch (InterruptedException e) {
- return false;
- }
- if(! valid[0]) {
- if(! MessageDialog.openQuestion(container.getShell(),
- Policy.bind("ConfigureTargetWizardConnection_Error_10"), //$NON-NLS-1$
- Policy.bind("ConfigureTargetWizard.errorOccurred", new Object[] {site.getURL().toExternalForm(), new Integer(code[0]), message[0]}))) { //$NON-NLS-1$
- return false;
- }
- }
- return true;
- }
-
- /**
- * 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(TeamImages.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;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/CreateNewFolderAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/CreateNewFolderAction.java
deleted file mode 100644
index 4491494e5..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/CreateNewFolderAction.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui.target;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteResource;
-import org.eclipse.team.core.target.IRemoteTargetResource;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-
-/**
- * Action to create a new remote folder.
- */
-public class CreateNewFolderAction extends TargetAction {
-
- /**
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- return getSelectedRemoteFolders().length == 1;
- }
-
- /**
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- try {
- TeamUIPlugin.runWithProgressDialog(getShell(), true /* cancelable */, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- try {
- createDir(getShell(), getSelectedRemoteFolders()[0], new String());
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InvocationTargetException e) {
- handle(e, Policy.bind("Error"), Policy.bind("CreateNewFolderAction.errorCreatingFolder")); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (InterruptedException e) {
- }
- }
-
- /**
- * Throws a TeamException if one occured.
- * Returns null if the operation was cancelled or an exception occured
- */
- public static IRemoteTargetResource createDir(final Shell shell, final IRemoteTargetResource parent, final String defaultName) throws TeamException {
- final IRemoteTargetResource[] newFolder = new IRemoteTargetResource[] {null};
- try {
- TeamUIPlugin.runWithProgressDialog(shell, true, new IRunnableWithProgress() {
- public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- monitor.beginTask(Policy.bind("CreateNewFolderAction.creatingFolder"), IProgressMonitor.UNKNOWN); //$NON-NLS-1$
- final String[] folderName = new String[] {null};
- final String suggestedName = getSuggestedFolderName(parent, Policy.subMonitorFor(monitor, 0), defaultName);
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- InputDialog dialog = new InputDialog(shell,
- Policy.bind("CreateNewFolderAction.title"), //$NON-NLS-1$
- Policy.bind("CreateNewFolderAction.message"), //$NON-NLS-1$
- suggestedName,
- null);
- Policy.checkCanceled(monitor);
- if(dialog.open() == dialog.OK) {
- folderName[0] = dialog.getValue();
- }
- }
- });
- if(folderName[0] != null) {
- newFolder[0] = parent.getFolder(folderName[0]);
- newFolder[0].mkdirs(Policy.subMonitorFor(monitor, 0));
- }
- } catch(TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- });
- } catch(InvocationTargetException e) {
- if (e.getTargetException() instanceof TeamException) {
- throw (TeamException)e.getTargetException();
- }
- TeamUIPlugin.handle(e);
- } catch(InterruptedException e) {
- }
- return newFolder[0];
- }
-
- protected static String getSuggestedFolderName(IRemoteTargetResource parent, IProgressMonitor monitor, String defaultName) throws TeamException {
- IRemoteResource[] members;
- monitor.subTask(Policy.bind("CreateNewFolderAction.suggestedNameProgress")); //$NON-NLS-1$
- members = parent.members(monitor);
- ArrayList names = new ArrayList();
-
- String suggestedFolderName = defaultName;
-
- boolean nameUsed = false;
-
- for (int i = 0; i < members.length; i++) {
- String existingName = members[i].getName();
- names.add(existingName); // cache them for next round since faster
- if(existingName.equals(suggestedFolderName)) {
- nameUsed = true;
- }
- }
-
- if(!nameUsed)
- return suggestedFolderName;
-
- //Otherwise, keep proposing new names by incrementing a postfix name index until we find one not used
- int postfix = 1;
-
- String baseName = suggestedFolderName;
-
- do {
- nameUsed = false;
- for (int i = 0; i < members.length && !nameUsed; i++) {
- suggestedFolderName = Policy.bind("CreateNewFolderAction.suggestedNameConcat", baseName, String.valueOf(postfix)); //$NON-NLS-1$
- String existingName = (String) names.get(i);
-
- if(existingName.equals(suggestedFolderName)) {
- postfix = postfix + 1;
- nameUsed = true;
- }
- }
- } while(nameUsed);
- return suggestedFolderName;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/DiscardSiteAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/DiscardSiteAction.java
deleted file mode 100644
index a9ead7929..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/DiscardSiteAction.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui.target;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-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.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.target.Site;
-import org.eclipse.team.core.target.TargetManager;
-import org.eclipse.team.core.target.TargetProvider;
-import org.eclipse.team.internal.ui.DetailsDialog;
-import org.eclipse.team.internal.ui.Policy;
-
-/**
- * Discards a remembered Site from Target Management. Before a Site can be
- * discarded all resources using this site must be deconfigured. This action will
- * prompt the user if a Site cannot be discarded because of existing connections.
- */
-public class DiscardSiteAction extends TargetAction {
-
- private class AlreadyMappedDialog extends DetailsDialog {
- private IProject[] projects;
- private org.eclipse.swt.widgets.List detailsList;
- private Button unmap;
-
- public AlreadyMappedDialog(Shell shell, IProject[] projects) {
- super(shell, Policy.bind("SiteExplorerView.unmapDialogTitle")); //$NON-NLS-1$
- setImageKey(DLG_IMG_WARNING);
- this.projects = projects;
- }
-
- 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));
- composite.setFont(parent.getFont());
-
- 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);
-
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- TargetProvider target;
- try {
- target = TargetManager.getProvider(project);
- } catch (TeamException e) {
- continue;
- }
- detailsList.add(Policy.bind("SiteExplorerView.mappedProjects", project.getName(), target.getURL().toExternalForm())); //$NON-NLS-1$
- }
- return composite;
- }
-
- protected void createMainDialogArea(Composite composite) {
- Label label = new Label(composite, SWT.WRAP);
- label.setText(Policy.bind("SiteExplorerView.projectsAlreadyMapped")); //$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);
- label.setFont(composite.getFont());
-
- unmap = new Button(composite, SWT.CHECK);
- unmap.setText(Policy.bind("SiteExplorerView.unmapProjectsAndDisconnect")); //$NON-NLS-1$
- unmap.setSelection(false);
- unmap.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- updateEnablements();
- }
- });
- setPageComplete(false);
- updateEnablements();
- }
-
- protected void updateEnablements() {
- setPageComplete(unmap.getSelection());
- }
- }
-
- /**
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- return getSelectedSites().length > 0;
- }
-
- /**
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- deletedSelected();
- }
-
- private void deletedSelected() {
- try {
- Site[] sites = getSelectedSites();
- if(sites.length > 0) {
-
- // sites are already mapped, ask if they want to unmap projects first
- IProject[] mappedProjects = projectsMappedToSite(sites);
- if( mappedProjects.length > 0 ) {
- AlreadyMappedDialog dialog = new AlreadyMappedDialog(getShell(), mappedProjects);
- if(dialog.open() == dialog.OK) {
- for (int i = 0; i < mappedProjects.length; i++) {
- TargetManager.unmap(mappedProjects[i]);
- }
- } else {
- // nothing to do
- return;
- }
- } else {
- MessageDialog d = new MessageDialog(getShell(),
- Policy.bind("SiteExplorerView.promptForDeletingSitesTitle"), //$NON-NLS-1$
- null,
- Policy.bind("SiteExplorerView.promptForDeletingSites", new Integer(sites.length).toString()), //$NON-NLS-1$
- MessageDialog.QUESTION,
- new String[] {
- IDialogConstants.YES_LABEL,
- IDialogConstants.CANCEL_LABEL }, 0);
- if( d.open() != d.OK ) {
- return;
- }
- }
- // sites aren't mapped, just ask then delete them form the view
- // and from the target manager.
- for (int i = 0; i < sites.length; i++) {
- TargetManager.removeSite(sites[i]);
- }
- }
- } catch (TeamException e) {
- ErrorDialog.openError(getShell(),
- Policy.bind("Error"), //$NON-NLS-1$
- Policy.bind("CreateNewFolderAction.errorDeletingSites"), //$NON-NLS-1$
- e.getStatus());
- }
- }
-
- private IProject[] projectsMappedToSite(Site[] sites) throws TeamException {
- List mappedProjects = new ArrayList();
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- TargetProvider target = TargetManager.getProvider(project);
- for (int j = 0; j < sites.length; j++) {
- if(target != null && target.getSite().equals(sites[0])) {
- mappedProjects.add(project);
- }
- }
- }
- return (IProject[]) mappedProjects.toArray(new IProject[mappedProjects.size()]);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetAction.java
deleted file mode 100644
index 0e2577ed4..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetAction.java
+++ /dev/null
@@ -1,188 +0,0 @@
-package org.eclipse.team.internal.ui.target;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.IDialogConstants;
-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.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.target.TargetManager;
-import org.eclipse.team.core.target.TargetProvider;
-import org.eclipse.team.internal.core.InfiniteSubProgressMonitor;
-import org.eclipse.team.internal.core.TeamPlugin;
-import org.eclipse.team.internal.ui.DetailsDialog;
-import org.eclipse.team.internal.ui.IPromptCondition;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.PromptingDialog;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-/**
- * Action for getting the contents of the selected resources
- */
-public class GetAction extends TargetAction {
-
- private class OutgoingChangesDialog extends DetailsDialog {
- private IResource[] outgoingChanges;
- private org.eclipse.swt.widgets.List detailsList;
-
- public OutgoingChangesDialog(Shell shell, IResource[] outgoingChanges) {
- super(shell, Policy.bind("GetAction.confirmFileOverwriteTitle")); //$NON-NLS-1$
- setImageKey(DLG_IMG_QUESTION);
- this.outgoingChanges = outgoingChanges;
- }
-
- 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));
- composite.setFont(parent.getFont());
-
- 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);
-
- for (int i = 0; i < outgoingChanges.length; i++) {
- detailsList.add(outgoingChanges[i].getFullPath().toString()); //$NON-NLS-1$
- }
- return composite;
- }
-
- protected void createMainDialogArea(Composite parent) {
- Label label = new Label(parent, SWT.WRAP);
- label.setText(Policy.bind("GetAction.confirmFileOverwrite")); //$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);
- label.setFont(parent.getFont());
- setPageComplete(true);
- }
-
- protected void updateEnablements() {
- }
- }
-
- public void run(IAction action) {
- if(promptForOutgoingChanges()) {
- run(new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- try {
- Hashtable table = getTargetProviderMapping();
- Set keySet = table.keySet();
- monitor.beginTask(null, keySet.size() * 1000);
-
- // perform the get on each provider
- Iterator iterator = keySet.iterator();
- while (iterator.hasNext()) {
- TargetProvider provider = (TargetProvider)iterator.next();
- monitor.setTaskName(Policy.bind("GetAction.working", provider.getURL().toExternalForm())); //$NON-NLS-1$
- List list = (List)table.get(provider);
- IResource[] providerResources = (IResource[])list.toArray(new IResource[list.size()]);
- provider.get(providerResources, Policy.subInfiniteMonitorFor(monitor, 1000));
- }
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- }, Policy.bind("GetAction.title"), this.PROGRESS_DIALOG); //$NON-NLS-1$
- }
- }
-
- private boolean promptForOutgoingChanges() {
- try {
- // find any outgoing changes that will be overwritten and prompt
- Hashtable table = getTargetProviderMapping();
- Set keySet = table.keySet();
-
- Iterator iterator = keySet.iterator();
- List outgoingChanges = new ArrayList();
- while (iterator.hasNext()) {
- TargetProvider provider = (TargetProvider)iterator.next();
- List list = (List)table.get(provider);
- IResource[] providerResources = (IResource[])list.toArray(new IResource[list.size()]);
- outgoingChanges.addAll(Arrays.asList(findResourcesWithOutgoingChanges(providerResources)));
- }
- if(! outgoingChanges.isEmpty()) {
- final OutgoingChangesDialog dialog = new OutgoingChangesDialog(getShell(),
- (IResource[]) outgoingChanges.toArray(new IResource[outgoingChanges.size()]));
- final boolean okToContinue[] = {true};
- getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- if(dialog.open() != dialog.OK) {
- okToContinue[0] = false;
- }
- }
- });
- return okToContinue[0];
- }
- return true;
- } catch(CoreException e) {
- TeamUIPlugin.handle(e);
- } catch(TeamException e) {
- TeamUIPlugin.handle(e);
- }
- return false;
- }
-
- /**
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() {
- IResource[] resources = getSelectedResources();
- if (resources.length == 0) return false;
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- try {
- TargetProvider provider = TargetManager.getProvider(resource.getProject());
- if(provider == null)
- return false;
- if(! provider.canPut(resource))
- return false; //if one can't don't allow for any
- } catch (TeamException e) {
- TeamPlugin.log(IStatus.ERROR, Policy.bind("GetAction.Exception_getting_provider_2"), e); //$NON-NLS-1$
- return false;
- }
- }
- return true;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetAsAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetAsAction.java
deleted file mode 100644
index 6cc5fd870..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetAsAction.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui.target;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteResource;
-import org.eclipse.team.core.target.IRemoteTargetResource;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.PromptingDialog;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.NewProjectAction;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-import org.eclipse.ui.dialogs.ProjectLocationSelectionDialog;
-
-/**
- * Action to transfer a remote folder and it's contents into the workspace. If
- * the remote folder doesn't have a .project then the project creation wizard
- * is shown to configure a new project, otherwise the a prompt is shown to choose
- * the project name and location.
- *
- * @see GetAsProjectAction
- */
-public class GetAsAction extends GetAsProjectAction {
- public void run(IAction action) {
-
- final IRemoteTargetResource[] folders = getSelectedRemoteFolders();
- if (folders.length != 1) return;
- final IRemoteTargetResource remoteFolder = folders[0];
- final String remoteName = remoteFolder.getName();
-
- // Fetch the members of the folder to see if they contain a .project file.
- final boolean[] hasProjectMetaFile = new boolean[] { false };
- final boolean[] errorOccured = new boolean[] { false };
- run(new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- try {
- hasProjectMetaFile[0] = hasProjectMetaFile(remoteFolder, monitor);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- }
- }
- }, Policy.bind("GetAs.checkoutFailed"), this.PROGRESS_DIALOG); //$NON-NLS-1$
- if (errorOccured[0]) return;
-
- // Prompt outside a workspace runnable so that the project creation delta can be heard
- IProject newProject = null;
- if ( ! hasProjectMetaFile[0]) {
- newProject = getNewProject(remoteFolder.getName());
- if (newProject == null) return;
- }
-
- final IProject createdProject = newProject;
- run(new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- try {
- IProject project;
- if (hasProjectMetaFile[0]) {
- // Prompt for name
- final Shell shell = getShell();
- final int[] result = new int[] { Dialog.OK };
- project = ResourcesPlugin.getWorkspace().getRoot().getProject(remoteName);
- final ProjectLocationSelectionDialog dialog = new ProjectLocationSelectionDialog(shell, project);
- dialog.setTitle(Policy.bind("GetAs.enterProjectTitle", remoteName)); //$NON-NLS-1$
-
- shell.getDisplay().syncExec(new Runnable() {
- public void run() {
- result[0] = dialog.open();
- }
- });
- if (result[0] != Dialog.OK) return;
-
- Object[] destinationPaths = dialog.getResult();
- if (destinationPaths == null) return;
- String newName = (String) destinationPaths[0];
- IPath newLocation = new Path((String) destinationPaths[1]);
-
- // prompt if the project exists locally
- project = ResourcesPlugin.getWorkspace().getRoot().getProject(newName);
- PromptingDialog prompt = new PromptingDialog(getShell(), new IResource[] { project },
- getOverwriteLocalAndFileSystemPrompt(), Policy.bind("GetAsProject.confirmOverwrite"));//$NON-NLS-1$
- if (prompt.promptForMultiple().length == 0) return;
-
- monitor.beginTask(null, 100);
- monitor.setTaskName(Policy.bind("GetAs.taskname", remoteFolder.getName(), newName)); //$NON-NLS-1$
-
- // create the project
- try {
- if (newLocation.equals(Platform.getLocation())) {
- // create in default location
- project.create(Policy.subMonitorFor(monitor, 3));
- } else {
- // create in some other location
- IProjectDescription desc = ResourcesPlugin.getWorkspace().newProjectDescription(project.getName());
- desc.setLocation(newLocation);
- project.create(desc, Policy.subMonitorFor(monitor, 3));
- }
- project.open(Policy.subMonitorFor(monitor, 2));
- } catch (CoreException e) {
- throw new TeamException(e.getStatus());
- }
- } else {
- project = createdProject;
- monitor.beginTask(null, 95);
- monitor.setTaskName(Policy.bind("GetAs.taskname", remoteFolder.getName(), createdProject.getName())); //$NON-NLS-1$
- }
-
- get(project, remoteFolder, Policy.subInfiniteMonitorFor(monitor, 95));
-
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- }, Policy.bind("GetAs.checkoutFailed"), this.PROGRESS_DIALOG); //$NON-NLS-1$
- }
-
- /*
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- return getSelectedRemoteFolders().length == 1;
- }
-
- /**
- * Get a new project.
- *
- * The suggestedName is not currently used but is a desired capability.
- */
- private IProject getNewProject(String suggestedName) {
- NewProjectListener listener = new NewProjectListener();
- ResourcesPlugin.getWorkspace().addResourceChangeListener(listener, IResourceChangeEvent.POST_CHANGE);
- (new NewProjectAction(PlatformUI.getWorkbench().getActiveWorkbenchWindow())).run();
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(listener);
- return listener.getNewProject();
- }
-
- protected boolean hasProjectMetaFile(IRemoteTargetResource remote, IProgressMonitor monitor) throws TeamException {
- IRemoteResource[] children = remote.members(monitor);
- for (int i = 0; i < children.length; i++) {
- if(children[i].getName().equals(".project")) { //$NON-NLS-1$
- return true;
- }
- }
- return false;
- }
-
- class NewProjectListener implements IResourceChangeListener {
- private IProject newProject = null;
- /**
- * @see IResourceChangeListener#resourceChanged(IResourceChangeEvent)
- */
- public void resourceChanged(IResourceChangeEvent event) {
- IResourceDelta root = event.getDelta();
- IResourceDelta[] projectDeltas = root.getAffectedChildren();
- for (int i = 0; i < projectDeltas.length; i++) {
- IResourceDelta delta = projectDeltas[i];
- IResource resource = delta.getResource();
- if (delta.getKind() == IResourceDelta.ADDED) {
- newProject = (IProject)resource;
- }
- }
- }
- /**
- * Gets the newProject.
- * @return Returns a IProject
- */
- public IProject getNewProject() {
- return newProject;
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetAsProjectAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetAsProjectAction.java
deleted file mode 100644
index 81b1de0a2..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetAsProjectAction.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui.target;
-
-import java.io.File;
-import java.util.HashSet;
-import java.util.Set;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.target.IRemoteTargetResource;
-import org.eclipse.team.core.target.Site;
-import org.eclipse.team.core.target.TargetManager;
-import org.eclipse.team.core.target.TargetProvider;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.core.target.UrlUtil;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.PromptingDialog;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-
-/**
- * Action to transfer a remote folder and it's contents into the workspace. The
- * resulting project is named with the remote folder name and the kind of project
- * is determined by the remote .project file. If the remote folder doesn't not
- * contain a .project, then the project default simple type is used.
- *
- * @see GetAsAction
- */
-public class GetAsProjectAction extends TargetAction {
-
- public void run(IAction action) {
-
- final IRemoteTargetResource[] remoteFolders = getSelectedRemoteFolders();
-
- Set targetProjects = new HashSet();
- for (int i = 0; i < remoteFolders.length; i++) {
- String projectName = remoteFolders[i].getName();
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- targetProjects.add(project);
- }
- final IResource[] projects = (IResource[]) targetProjects.toArray(new IResource[targetProjects.size()]);
- PromptingDialog prompt = new PromptingDialog(getShell(), projects,
- getOverwriteLocalAndFileSystemPrompt(),
- Policy.bind("GetAsProject.confirmOverwrite"));//$NON-NLS-1$
-
- try {
- if (prompt.promptForMultiple().length != projects.length) return;
- } catch (InterruptedException e) {
- return;
- }
-
- try {
- TeamUIPlugin.runWithProgressDialog(getShell(), true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- monitor.beginTask(getTaskName(remoteFolders), remoteFolders.length * 100);
- monitor.setTaskName(getTaskName(remoteFolders));
- for (int i = 0; i < remoteFolders.length; i++) {
- IProject project = (IProject)projects[i];
- IRemoteTargetResource remote = remoteFolders[i];
- IProgressMonitor subMonitor = Policy.subInfiniteMonitorFor(monitor, 100);
- get(project, remote, subMonitor);
- }
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- });
- } catch (InvocationTargetException e) {
- handle(e, Policy.bind("Error"), Policy.bind("GetAsProject.errorGettingResources")); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (InterruptedException e) {
- return;
- }
- }
-
- /**
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- return getSelectedRemoteFolders().length > 0;
- }
-
- protected void get(IProject project, IRemoteTargetResource remote, IProgressMonitor monitor) throws TeamException {
- try {
- monitor.beginTask(null, 100);
- try {
- if(!project.exists()) {
- project.create(Policy.subMonitorFor(monitor, 5));
- }
- if(!project.isOpen()) {
- project.open(Policy.subMonitorFor(monitor, 5));
- }
- } catch (CoreException e) {
- ErrorDialog.openError(getShell(), Policy.bind("Error"), Policy.bind("GetAsProject.errorCreatingProject"), e.getStatus()); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
- Site site = remote.getSite();
- TargetProvider provider = TargetManager.getProvider(project);
- if(provider != null) {
- TargetManager.unmap(project);
- }
- TargetManager.map(project, site, UrlUtil.getTrailingPath(remote.getURL(), site.getURL()));
- provider = TargetManager.getProvider(project);
- provider.get(project, remote, Policy.subMonitorFor(monitor, 90));
- } finally {
- monitor.done();
- }
- }
-
- protected static String getTaskName(IRemoteTargetResource[] remoteFolders) {
- if (remoteFolders.length == 1) {
- IRemoteTargetResource folder = remoteFolders[0];
- return Policy.bind("GetAsProject.taskName1", folder.getURL().toExternalForm()); //$NON-NLS-1$
- }
- else {
- return Policy.bind("GetAsProject.taskNameN", new Integer(remoteFolders.length).toString()); //$NON-NLS-1$
- }
- }
-
- protected IPromptCondition getOverwriteLocalAndFileSystemPrompt() {
- return new IPromptCondition() {
- // prompt if resource in workspace exists or exists in local file system
- public boolean needsPrompt(IResource resource) {
- File localLocation = getFileLocation(resource);
- if(resource.exists() || localLocation.exists()) {
- return true;
- }
- return false;
- }
- public String promptMessage(IResource resource) {
- File localLocation = getFileLocation(resource);
- if(resource.exists()) {
- return Policy.bind("GetAsProject.thisResourceExists", resource.getName());//$NON-NLS-1$
- } else {
- return Policy.bind("GetAsProject.thisExternalFileExists", resource.getName());//$NON-NLS-1$
- }//$NON-NLS-1$
- }
- private File getFileLocation(IResource resource) {
- return new File(resource.getParent().getLocation().toFile(), resource.getName());
- }
- };
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetSyncAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetSyncAction.java
deleted file mode 100644
index 5b0bbf4ca..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/GetSyncAction.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui.target;
-
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.target.TargetProvider;
-import org.eclipse.team.internal.core.InfiniteSubProgressMonitor;
-import org.eclipse.team.internal.ui.IHelpContextIds;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.sync.ITeamNode;
-import org.eclipse.team.internal.ui.sync.SyncSet;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-public class GetSyncAction extends TargetSyncAction {
-
- public GetSyncAction(TargetSyncCompareInput model, ISelectionProvider sp, String label, Shell shell) {
- super(model, sp, label, shell);
- WorkbenchHelp.setHelp(this, IHelpContextIds.SYNC_GET_ACTION);
- }
-
- /**
- * @see TargetSyncAction#isEnabled(ITeamNode)
- */
- protected boolean isEnabled(ITeamNode node) {
- // Get action is enabled for any changed nodes.
- SyncSet set = new SyncSet(new StructuredSelection(node));
- return set.hasIncomingChanges() || set.hasConflicts();
- }
-
- /**
- * @see TargetSyncAction#removeNonApplicableNodes(SyncSet, int)
- */
- protected void removeNonApplicableNodes(SyncSet set, int syncMode) {
- set.removeOutgoingNodes();
- }
-
- /**
- * @see TargetSyncAction#run(SyncSet, IProgressMonitor)
- */
- protected SyncSet run(SyncSet syncSet, IProgressMonitor monitor) {
- try {
- ITeamNode[] changed = syncSet.getChangedNodes();
- if (changed.length == 0) {
- return syncSet;
- }
- List resources = new ArrayList();
- for (int i = 0; i < changed.length; i++) {
- resources.add(changed[i].getResource());
- }
- get((IResource[])resources.toArray(new IResource[resources.size()]), monitor);
- } catch (final TeamException e) {
- getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- ErrorDialog.openError(getShell(), null, null, e.getStatus());
- }
- });
- return null;
- }
- return syncSet;
- }
-
- /**
- * Put the given resources to their associated providers.
- *
- * @param resources the resources to commit
- * @param monitor the progress monitor
- */
- public void get(IResource[] resources, IProgressMonitor monitor) throws TeamException {
- monitor = Policy.monitorFor(monitor);
- try {
- Hashtable table = getTargetProviderMapping(resources);
- Set keySet = table.keySet();
- monitor.beginTask("", keySet.size() * 1000); //$NON-NLS-1$
- Iterator iterator = keySet.iterator();
- while (iterator.hasNext()) {
- IProgressMonitor subMonitor = new InfiniteSubProgressMonitor(monitor, 1000);
- TargetProvider provider = (TargetProvider)iterator.next();
- monitor.setTaskName(Policy.bind("GetAction.working", provider.getURL().toExternalForm())); //$NON-NLS-1$
- List list = (List)table.get(provider);
- IResource[] providerResources = (IResource[])list.toArray(new IResource[list.size()]);
- provider.get(providerResources, subMonitor);
- }
- } finally {
- monitor.done();
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/MappingSelectionPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/MappingSelectionPage.java
deleted file mode 100644
index 8d3865f9c..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/MappingSelectionPage.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui.target;
-
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.target.IRemoteTargetResource;
-import org.eclipse.team.core.target.Site;
-import org.eclipse.team.internal.core.target.UrlUtil;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-public class MappingSelectionPage extends TargetWizardPage {
- private IPath path = Path.EMPTY;
- private Site site;
- private TreeViewer viewer;
- private Text textPath;
-
- public MappingSelectionPage(String pageName, String title, ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- setDescription(Policy.bind("MappingSelectionPage.description")); //$NON-NLS-1$
- }
-
- public void setSite(Site site) {
- this.site = site;
- }
-
- public Site getSite() {
- return site;
- }
-
- public void createControl(Composite p) {
- Composite composite = createComposite(p, 1);
-
- createLabel(composite, Policy.bind("MappingSelectionPage.label")); //$NON-NLS-1$
-
- viewer = new TreeViewer(composite, SWT.BORDER | SWT.SINGLE);
-
- GridData data = new GridData (GridData.FILL_BOTH);
- viewer.getTree().setLayoutData(data);
- viewer.setContentProvider(new SiteLazyContentProvider());
- viewer.setLabelProvider(new WorkbenchLabelProvider());
- viewer.setSorter(new SiteViewSorter());
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- updateTextPath();
- }
- });
-
- // include only folders in view
- viewer.addFilter(new ViewerFilter() {
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- if(element instanceof RemoteResourceElement) {
- return ((RemoteResourceElement)element).getRemoteResource().isContainer();
- }
- return false;
- }
- });
-
- Button newFolderButton = new Button(composite, SWT.PUSH);
- newFolderButton.setText(Policy.bind("MappingSelectionPage.newFolderLabel")); //$NON-NLS-1$
- newFolderButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent (Event event) {
- Shell shell = getShell();
- try {
- // assume that only one folder is selected in the folder tree
- IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
- Object currentSelection = selection.getFirstElement();
- final IRemoteTargetResource selectedFolder = getSelectedRemoteFolder(selection);
- String defaultName = ((ConfigureTargetWizard) getWizard()).project.getName();
-
- IRemoteTargetResource newFolder = CreateNewFolderAction.createDir(getShell(), selectedFolder, defaultName);
- if (newFolder == null)
- return;
-
- RemoteResourceElement newFolderUIElement = new RemoteResourceElement(newFolder);
-
- ((RemoteResourceElement)currentSelection).setCachedChildren(null);
- viewer.refresh(currentSelection);
- viewer.setExpandedState(currentSelection, true);
- viewer.setSelection(new StructuredSelection(newFolderUIElement));
- } catch (TeamException e) {
- TeamUIPlugin.handle(e);
- return;
- }
- }
- });
- setViewerInput();
- setControl(composite);
- setPageComplete(true);
- }
-
- private IRemoteTargetResource getSelectedRemoteFolder(IStructuredSelection selection) {
- if (!selection.isEmpty()) {
- final List filesSelection = new ArrayList();
- Iterator it = selection.iterator();
- while(it.hasNext()) {
- Object o = it.next();
- if(o instanceof RemoteResourceElement) {
- return ((RemoteResourceElement)o).getRemoteResource();
- } else if(o instanceof SiteElement) {
- try {
- return ((SiteElement)o).getSite().getRemoteResource();
- } catch (TeamException e) {
- return null;
- }
- }
- }
- }
- return null;
- }
-
- /**
- * Method updateTextPath.
- */
- private void updateTextPath() {
- IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
- if (!selection.isEmpty()) {
- final List filesSelection = new ArrayList();
- Iterator it = selection.iterator();
- while(it.hasNext()) {
- Object o = it.next();
- if(o instanceof RemoteResourceElement) {
- RemoteResourceElement element = (RemoteResourceElement) o;
- URL remoteResourceURL;
- remoteResourceURL = element.getRemoteResource().getURL();
- this.path = UrlUtil.getTrailingPath(
- remoteResourceURL,
- this.site.getURL());
- return;
- }
- }
- }
- }
-
- public IPath getMapping() {
- return this.path;
- }
-
- /**
- * Attempt to set the viewer input.
- * Do nothing if we don't have enough info yet to set it.
- */
- private void setViewerInput() {
- if(this.site == null || viewer == null)
- return;
- viewer.setInput(new SiteRootsElement(new Site[] {site}, getContainer()));
- }
-
- /**
- * @see IDialogPage#setVisible(boolean)
- */
- public void setVisible(boolean visible) {
- if(visible) {
- setViewerInput();
- viewer.setSelection(new StructuredSelection(new SiteElement(site)));
- }
- super.setVisible(visible);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/PutAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/PutAction.java
deleted file mode 100644
index abaaf9880..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/PutAction.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package org.eclipse.team.internal.ui.target;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.target.TargetManager;
-import org.eclipse.team.core.target.TargetProvider;
-import org.eclipse.team.internal.core.*;
-import org.eclipse.team.internal.core.TeamPlugin;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-/**
- * Action for checking in the selected resources
- */
-public class PutAction extends TeamAction {
- /*
- * Method declared on IActionDelegate.
- */
- public void run(IAction action) {
- run(new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- try {
- Hashtable table = getTargetProviderMapping();
- Set keySet = table.keySet();
- monitor.beginTask("", keySet.size() * 1000); //$NON-NLS-1$
- Iterator iterator = keySet.iterator();
- while (iterator.hasNext()) {
- IProgressMonitor subMonitor = new InfiniteSubProgressMonitor(monitor, 1000);
- TargetProvider provider = (TargetProvider)iterator.next();
- monitor.setTaskName(Policy.bind("PutAction.working", provider.getURL().toExternalForm())); //$NON-NLS-1$
- List list = (List)table.get(provider);
- IResource[] providerResources = (IResource[])list.toArray(new IResource[list.size()]);
-
- provider.put(providerResources, subMonitor);
- }
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- }, Policy.bind("PutAction.title"), this.PROGRESS_DIALOG); //$NON-NLS-1$
- }
- /**
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() {
- IResource[] resources = getSelectedResources();
- if (resources.length == 0) return false;
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- try {
- TargetProvider provider = TargetManager.getProvider(resource.getProject());
- if(provider == null)
- return false;
- if(! provider.canGet(resource))
- return false; //if one can't don't allow for any
- } catch (TeamException e) {
- TeamPlugin.log(IStatus.ERROR, Policy.bind("PutAction.Exception_getting_provider_2"), e); //$NON-NLS-1$
- return false;
- }
- }
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/PutSyncAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/PutSyncAction.java
deleted file mode 100644
index 96d35d235..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/PutSyncAction.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui.target;
-
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.target.TargetProvider;
-import org.eclipse.team.internal.core.InfiniteSubProgressMonitor;
-import org.eclipse.team.internal.ui.IHelpContextIds;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.sync.ITeamNode;
-import org.eclipse.team.internal.ui.sync.SyncSet;
-import org.eclipse.team.internal.ui.sync.SyncView;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-public class PutSyncAction extends TargetSyncAction {
-
- public PutSyncAction(TargetSyncCompareInput model, ISelectionProvider sp, String label, Shell shell) {
- super(model, sp, label, shell);
- WorkbenchHelp.setHelp(this, IHelpContextIds.SYNC_PUT_ACTION);
- }
-
- /**
- * @see TargetSyncAction#isEnabled(ITeamNode)
- */
- protected boolean isEnabled(ITeamNode node) {
- // Put action is enabled for any changed nodes.
- return new SyncSet(new StructuredSelection(node)).getChangedNodes().length > 0;
- }
-
- /**
- * @see TargetSyncAction#removeNonApplicableNodes(SyncSet, int)
- */
- protected void removeNonApplicableNodes(SyncSet set, int syncMode) {
- if (syncMode == SyncView.SYNC_OUTGOING) {
- set.removeIncomingNodes();
- }
- }
-
- /**
- * @see TargetSyncAction#run(SyncSet, IProgressMonitor)
- */
- protected SyncSet run(SyncSet syncSet, IProgressMonitor monitor) {
- try {
- ITeamNode[] changed = syncSet.getChangedNodes();
- if (changed.length == 0) {
- return syncSet;
- }
- List resources = new ArrayList();
- for (int i = 0; i < changed.length; i++) {
- resources.add(changed[i].getResource());
- }
- put((IResource[])resources.toArray(new IResource[resources.size()]), monitor);
- } catch (final TeamException e) {
- getShell().getDisplay().syncExec(new Runnable() {
- public void run() {
- ErrorDialog.openError(getShell(), null, null, e.getStatus());
- }
- });
- return null;
- }
- return syncSet;
- }
-
- /**
- * Put the given resources to their associated providers.
- *
- * @param resources the resources to commit
- * @param monitor the progress monitor
- */
- public void put(IResource[] resources, IProgressMonitor monitor) throws TeamException {
- monitor = Policy.monitorFor(monitor);
- try {
- Hashtable table = getTargetProviderMapping(resources);
- Set keySet = table.keySet();
- monitor.beginTask("", keySet.size() * 1000); //$NON-NLS-1$
- Iterator iterator = keySet.iterator();
- while (iterator.hasNext()) {
- IProgressMonitor subMonitor = new InfiniteSubProgressMonitor(monitor, 1000);
- TargetProvider provider = (TargetProvider)iterator.next();
- monitor.setTaskName(Policy.bind("PutAction.working", provider.getURL().toExternalForm())); //$NON-NLS-1$
- List list = (List)table.get(provider);
- IResource[] providerResources = (IResource[])list.toArray(new IResource[list.size()]);
- provider.put(providerResources, subMonitor);
- }
- } finally {
- monitor.done();
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/RemoteResourceElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/RemoteResourceElement.java
deleted file mode 100644
index d7d474b71..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/RemoteResourceElement.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui.target;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.operation.ModalContext;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteResource;
-import org.eclipse.team.core.target.IRemoteTargetResource;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-/**
- * Used to show IRemoteTargetResource instances in the UI. In addition these elements
- * support caching of values returned from IRemoteTargetResource methods, as such these
- * instances aren't as much proxies as the underlying remote handles.
- * <p>
- * Implementation in progress: support for configuring these elements with a custom
- * progress monitor that can be the target of long running operations. This will
- * allow showing progress in wizards and in the SiteExplorerView when navigating
- * remote servers.</p>
- */
-public class RemoteResourceElement implements IWorkbenchAdapter, IAdaptable {
-
- // remote resource this element represents
- private IRemoteTargetResource remote;
-
- // cache for the remote values
- private IRemoteResource[] children = null;
- private int size = 0;
- private String lastModified = null;
-
- // context in which to perform long-running operations
- private IRunnableContext runContext;
-
- public RemoteResourceElement(IRemoteTargetResource remote) {
- this.remote = remote;
- }
-
- public RemoteResourceElement(IRemoteTargetResource remote, IRunnableContext runContext) {
- this(remote);
- this.runContext = runContext;
- }
-
- public IRemoteTargetResource getRemoteResource() {
- return remote;
- }
-
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) return this;
- return null;
- }
-
- public Object[] getChildren(Object o) {
- final Object[][] result = new Object[1][];
- try {
- IRunnableWithProgress runnable = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- // progress for fetching remote children is always unknown
- // let's not bother even trying to guess.
- monitor.beginTask(null, IProgressMonitor.UNKNOWN);
- if(children == null) {
- setCachedChildren(remote.members(Policy.subMonitorFor(monitor, 50)));
- }
- List remoteElements = new ArrayList();
- for (int i = 0; i < children.length; i++) {
- IRemoteTargetResource child = (IRemoteTargetResource)children[i];
- RemoteResourceElement element = new RemoteResourceElement(child, runContext);
-
- // cache size and last modified
- element.setLastModified(child.getLastModified(Policy.subMonitorFor(monitor, 25)));
- element.setSize(child.getSize(Policy.subMonitorFor(monitor, 25)));
- remoteElements.add(element);
- }
- result[0] = (RemoteResourceElement[])remoteElements.toArray(new RemoteResourceElement[remoteElements.size()]);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- };
-
- if(runContext == null) {
- TeamUIPlugin.runWithProgress(null, true /*cancelable*/, runnable);
- } else {
- runContext.run(true, true, runnable);
- }
- } catch (InterruptedException e) {
- return new Object[0];
- } catch (InvocationTargetException e) {
- TeamUIPlugin.handle(e.getTargetException());
- return new Object[0];
- }
- return result[0];
- }
-
- public ImageDescriptor getImageDescriptor(Object object) {
- if(remote.isContainer()) {
- return PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
- } else {
- return PlatformUI.getWorkbench().getEditorRegistry().getImageDescriptor(remote.getName());
- }
- }
-
- public String getLabel(Object o) {
- // would be nice to display more than just the name (e.g. timestamp, size...)
- return remote.getName();
- }
-
- public Object getParent(Object o) {
- return null;
- }
-
- public int hashCode() {
- return getRemoteResource().hashCode();
- }
-
- public boolean equals(Object obj) {
- if(this == obj)
- return true;
- if(!(obj instanceof RemoteResourceElement))
- return false;
- return ((RemoteResourceElement)obj).getRemoteResource().equals(getRemoteResource());
- }
-
- public void clearChildren() {
- children = null;
- }
-
- public IRemoteResource[] getCachedChildren() {
- return children;
- }
-
- public void setCachedChildren(IRemoteResource[] children) {
- this.children = children;
- }
-
- protected void setRemoteResource(IRemoteTargetResource remote) {
- this.remote = remote;
- }
-
- public String getLastModified() {
- return lastModified;
- }
-
- public int getSize() {
- return size;
- }
-
- public void setLastModified(String lastModified) {
- this.lastModified = lastModified;
- }
-
- public void setSize(int size) {
- this.size = size;
- }
-
- public String getName() {
- return remote.getName();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteElement.java
deleted file mode 100644
index 84d27d820..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteElement.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui.target;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.target.IRemoteTargetResource;
-import org.eclipse.team.core.target.Site;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.ISharedImages;
-import org.eclipse.team.ui.TeamImages;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-/**
- * Used to show Site instances in the UI. Sites are really just remote
- * resources but are shown with a different icon and label.
- *
- * @see RemoteResourceElement
- */
-public class SiteElement extends RemoteResourceElement {
- private Site site;
-
- public SiteElement(Site site) {
- super(null);
- this.site = site;
- }
-
- public SiteElement(Site site, IRunnableContext runContext) {
- super(null, runContext);
- this.site = site;
- }
-
- public Site getSite() {
- return site;
- }
-
- public int hashCode() {
- return site.hashCode();
- }
-
- public ImageDescriptor getImageDescriptor(Object object) {
- return TeamImages.getImageDescriptor(ISharedImages.IMG_SITE_ELEMENT);
- }
-
- public String getLabel(Object o) {
- return getSite().getDisplayName();
- }
-
- public Object getParent(Object o) {
- return null;
- }
-
- public boolean equals(Object obj) {
- if(this == obj)
- return true;
- if(!(obj instanceof SiteElement))
- return false;
- Site otherSite = ((SiteElement)obj).getSite();
- return getSite().equals(otherSite);
- }
- /**
- * @see IWorkbenchAdapter#getChildren(Object)
- */
- public Object[] getChildren(Object o) {
- try {
- setRemoteResource(site.getRemoteResource());
- } catch (TeamException e) {
- TeamUIPlugin.handle(e);
- return new Object[0];
- }
- return super.getChildren(this);
- }
- /**
- * @see RemoteResourceElement#getRemoteResource()
- */
- public IRemoteTargetResource getRemoteResource() {
- try {
- return site.getRemoteResource();
- } catch (TeamException e) {
- TeamUIPlugin.handle(e);
- return null;
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteExplorerView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteExplorerView.java
deleted file mode 100644
index 01b6b1dbf..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteExplorerView.java
+++ /dev/null
@@ -1,534 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui.target;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.target.IRemoteTargetResource;
-import org.eclipse.team.core.target.ISiteListener;
-import org.eclipse.team.core.target.Site;
-import org.eclipse.team.core.target.TargetManager;
-import org.eclipse.team.internal.ui.IHelpContextIds;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.ISharedImages;
-import org.eclipse.team.ui.TeamImages;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.ui.internal.WorkbenchImages;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.part.ViewPart;
-
-/**
- * Is a view that allows browsing remote target sites. It is modeled after
- * a file explorer: a tree of folders is show with a table of the folder's
- * contents.
- * <p>
- * Progress is shown in the main workbench window's status line progress
- * monitor.</p>
- *
- * @see Site
- * @see IRemoteTargetResource
- */
-public class SiteExplorerView extends ViewPart implements ISiteListener {
-
- public static final String VIEW_ID = "org.eclipse.team.ui.target.SiteExplorerView"; //$NON-NLS-1$
-
- // The tree viewer showing the folders and sites
- private TreeViewer folderTree;
-
- // The table view that shows the resources in the currently selected folder
- // from the folders tree.
- private TableViewer folderContentsTable;
-
- // The root
- private SiteRootsElement root;
-
- // Embedded progress monitor part used to display progress when contacting the server
- // Note: this feature is not enabled yet and is still under construction
- private IProgressMonitor progressMonitorPart;
-
- // The view's actions
- private Action addSiteAction;
- private Action newFolderAction;
- private Action deleteAction;
-
- /**
- * Sorter for the folderContents table
- */
- class FolderListingSorter extends ViewerSorter {
- private boolean reversed = false;
- private int columnNumber;
-
- public static final int NAME = 0;
- public static final int SIZE = 1;
- public static final int MODIFIED = 2;
-
- // column headings: "Name" "Size" "Modified"
- private int[][] SORT_ORDERS_BY_COLUMN = {
- {NAME}, /* name */
- {SIZE, NAME}, /* size */
- {MODIFIED, NAME, SIZE}, /* modified */
- };
-
- public FolderListingSorter(int columnNumber) {
- this.columnNumber = columnNumber;
- }
-
- public int compare(Viewer viewer, Object o1, Object o2) {
- RemoteResourceElement e1 = (RemoteResourceElement)o1;
- RemoteResourceElement e2 = (RemoteResourceElement)o2;
- int[] columnSortOrder = SORT_ORDERS_BY_COLUMN[columnNumber];
- int result = 0;
- for (int i = 0; i < columnSortOrder.length; ++i) {
- result = compareColumnValue(columnSortOrder[i], e1, e2);
- if (result != 0)
- break;
- }
- if (reversed)
- result = -result;
- return result;
- }
-
- int compareColumnValue(int columnNumber, RemoteResourceElement e1, RemoteResourceElement e2) {
- IRemoteTargetResource r1 = e1.getRemoteResource();
- IRemoteTargetResource r2 = e2.getRemoteResource();
- switch (columnNumber) {
- case NAME:
- if (r1.isContainer() && r2.isContainer())
- return compareNames(r1, r2);
- else if (r1.isContainer())
- return -1;
- else if (r2.isContainer())
- return 1;
- return compareNames(r1, r2);
- case SIZE:
- return new Integer(e1.getSize()).compareTo(new Integer(e2.getSize()));
- case MODIFIED:
- return getCollator().compare(e1.getLastModified(), e2.getLastModified());
- default:
- return 0;
- }
- }
-
- protected int compareNames(IRemoteTargetResource resource1, IRemoteTargetResource resource2) {
- return resource1.getName().compareTo(resource2.getName());
- }
-
- /**
- * Returns the number of the column by which this is sorting.
- */
- public int getColumnNumber() {
- return columnNumber;
- }
-
- /**
- * Returns true for descending, or false
- * for ascending sorting order.
- */
- public boolean isReversed() {
- return reversed;
- }
-
- /**
- * Sets the sorting order.
- */
- public void setReversed(boolean newReversed) {
- reversed = newReversed;
- }
- }
-
- /**
- * @see IWorkbenchPart#createPartControl(Composite)
- */
- public void createPartControl(Composite top) {
- Composite p = new Composite(top, SWT.NULL);
- GridData data = new GridData (GridData.FILL_BOTH);
- p.setLayoutData(data);
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 3;
- gridLayout.marginHeight = 0;
- gridLayout.marginWidth = 0;
- p.setLayout (gridLayout);
-
- SashForm sash = new SashForm(p, SWT.HORIZONTAL);
- data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = 3;
- sash.setLayoutData(data);
-
- folderTree = new TreeViewer(sash, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
- folderTree.setContentProvider(new SiteLazyContentProvider());
- folderTree.setLabelProvider(new WorkbenchLabelProvider());
-
- folderTree.setSorter(new SiteViewSorter());
- folderTree.getControl().addKeyListener(new KeyAdapter() {
- public void keyPressed(KeyEvent event) {
- if (event.keyCode == SWT.F5) {
- RemoteResourceElement[] selectedFolders = getSelectedRemoteFolder((IStructuredSelection)folderTree.getSelection());
- if(selectedFolders.length == 1) {
- selectedFolders[0].setCachedChildren(null);
- folderTree.refresh(selectedFolders[0]);
- updateFileTable(selectedFolders[0]);
- }
- }
- }
- });
-
- folderTree.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection selection = (IStructuredSelection)folderTree.getSelection();
- final RemoteResourceElement[] remoteFolders = getSelectedRemoteFolder(selection);
- if(remoteFolders.length == 1) {
- updateFileTable(remoteFolders[0]);
- }
- }
- });
-
- folderTree.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent e) {
- IStructuredSelection selection = (IStructuredSelection)folderTree.getSelection();
- if(selection.size() == 1) {
- expandInTreeCurrentSelection(selection, true /*toggle expanded*/);
- }
- }
- });
-
- folderTree.setSorter(new ViewerSorter() {
- public int compare(Viewer viewer, Object e1, Object e2) {
- String name1 = ""; //$NON-NLS-1$
- String name2 = ""; //$NON-NLS-1$
- if(e1 instanceof RemoteResourceElement) {
- name1 = ((RemoteResourceElement)e1).getRemoteResource().getName();
- } else if(e1 instanceof SiteElement) {
- name1 = ((SiteElement)e1).getSite().getURL().toExternalForm();
- }
- if(e2 instanceof RemoteResourceElement) {
- name2 = ((RemoteResourceElement)e2).getRemoteResource().getName();
- } else if(e2 instanceof SiteElement) {
- name2 = ((SiteElement)e2).getSite().getURL().toExternalForm();
- }
-
- return getCollator().compare(name1, name2);
- }
- });
-
- // show only folders in tree
- folderTree.addFilter(new ViewerFilter() {
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- if(element instanceof RemoteResourceElement) {
- return ((RemoteResourceElement)element).getRemoteResource().isContainer();
- }
- return false;
- }
- });
-
- Table table = new Table(sash, SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
- TableLayout layout = new TableLayout();
- table.setLayout(layout);
- table.setHeaderVisible(true);
-
- TableColumn tableColumn = new TableColumn(table, SWT.NULL);
- tableColumn.setText(Policy.bind("SiteExplorerView.Name_1")); //$NON-NLS-1$
- tableColumn.addSelectionListener(getColumnListener());
- layout.addColumnData(new ColumnWeightData(30, true));
-
- tableColumn = new TableColumn(table, SWT.NULL);
- tableColumn.setText(Policy.bind("SiteExplorerView.Size_2")); //$NON-NLS-1$
- tableColumn.setAlignment(SWT.RIGHT);
- tableColumn.addSelectionListener(getColumnListener());
- layout.addColumnData(new ColumnWeightData(10, true));
-
- tableColumn = new TableColumn(table, SWT.NULL);
- tableColumn.setText(Policy.bind("SiteExplorerView.Modified_3")); //$NON-NLS-1$
- tableColumn.addSelectionListener(getColumnListener());
- layout.addColumnData(new ColumnWeightData(30, true));
-
- tableColumn = new TableColumn(table, SWT.NULL);
- tableColumn.setText(Policy.bind("SiteExplorerView.URL_4")); //$NON-NLS-1$
- layout.addColumnData(new ColumnWeightData(30, true));
-
- folderContentsTable = new TableViewer(table);
- folderContentsTable.setContentProvider(new SiteLazyContentProvider());
- folderContentsTable.setLabelProvider(new SiteExplorerViewLabelProvider());
-
- folderContentsTable.getControl().addKeyListener(new KeyAdapter() {
- public void keyPressed(KeyEvent event) {
- if (event.keyCode == SWT.F5) {
- RemoteResourceElement folder = (RemoteResourceElement)folderContentsTable.getInput();
- if(folder != null) {
- folder.setCachedChildren(null);
- folderContentsTable.refresh();
- }
- }
- }
- });
-
- folderContentsTable.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent e) {
- IStructuredSelection selection = (IStructuredSelection)folderContentsTable.getSelection();
- if(selection.size() == 1) {
- final RemoteResourceElement[] remoteFolders = getSelectedRemoteFolder(selection);
- if(remoteFolders.length == 1) {
- IStructuredSelection treeSelection = (IStructuredSelection)folderTree.getSelection();
- expandInTreeCurrentSelection(treeSelection, false /*don't toggle*/);
- folderTree.setSelection(new StructuredSelection(remoteFolders[0]));
- }
- }
- }
- });
- FolderListingSorter sorter = new FolderListingSorter(FolderListingSorter.NAME);
- sorter.setReversed(false);
- folderContentsTable.setSorter(sorter);
-
- sash.setWeights(new int[] {33, 67});
-
- TargetManager.addSiteListener(this);
-
- root = new SiteRootsElement(getViewSite().getWorkbenchWindow());
- initalizeActions();
- folderTree.setInput(root);
-
- // F1 Help
- WorkbenchHelp.setHelp(folderTree.getControl(), IHelpContextIds.SITE_EXPLORER_VIEW);
- }
-
- private Shell getShell() {
- return folderTree.getTree().getShell();
- }
-
- private RemoteResourceElement[] getSelectedRemoteFolder(IStructuredSelection selection) {
- if (!selection.isEmpty()) {
- final List folders = new ArrayList();
- Iterator it = selection.iterator();
- while(it.hasNext()) {
- Object o = it.next();
- if(o instanceof RemoteResourceElement) {
- folders.add(o);
- }
- }
- return (RemoteResourceElement[]) folders.toArray(new RemoteResourceElement[folders.size()]);
- }
- return new RemoteResourceElement[0];
- }
-
- private void expandInTreeCurrentSelection(IStructuredSelection selection, boolean toggle) {
- if (!selection.isEmpty()) {
- Iterator it = selection.iterator();
- while(it.hasNext()) {
- Object element = it.next();
- if(toggle) {
- folderTree.setExpandedState(element, !folderTree.getExpandedState(element));
- } else {
- folderTree.setExpandedState(element, true);
- }
- }
- }
- }
-
- /**
- * Method updateFileTable.
- */
- private void updateFileTable(RemoteResourceElement remoteFolder) {
- if(remoteFolder != null && !remoteFolder.equals(folderContentsTable.getInput())) {
- folderContentsTable.setInput(remoteFolder);
- }
- }
-
- private void initalizeActions() {
- final Shell shell = folderContentsTable.getTable().getShell();
- // Create actions
-
- // Refresh (toolbar)
- addSiteAction = new Action(Policy.bind("SiteExplorerView.addSiteAction"), TeamImages.getImageDescriptor(ISharedImages.IMG_SITE_ELEMENT)) { //$NON-NLS-1$
- public void run() {
- ConfigureTargetWizard wizard = new ConfigureTargetWizard();
- wizard.init(null, null);
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.open();
- }
- };
- addSiteAction.setToolTipText(Policy.bind("SiteExplorerView.addSiteActionTooltip")); //$NON-NLS-1$
-
- newFolderAction = new Action(Policy.bind("SiteExplorerView.newFolderAction"), WorkbenchImages.getImageDescriptor(org.eclipse.ui.ISharedImages.IMG_OBJ_FOLDER)) { //$NON-NLS-1$
- public void run() {
- final Shell shell = folderTree.getTree().getShell();
- try {
- // assume that only one folder is selected in the folder tree, this
- // is enforced by isEnable() method for this action
- IStructuredSelection selection = (IStructuredSelection)folderTree.getSelection();
- Object currentSelection = selection.getFirstElement();
-
- RemoteResourceElement selectedFolder;
- if(!selection.isEmpty()) {
- selectedFolder = getSelectedRemoteFolder(selection)[0];
- } else {
- selectedFolder = (RemoteResourceElement)folderContentsTable.getInput();
- }
-
- IRemoteTargetResource newFolder = CreateNewFolderAction.createDir(shell, selectedFolder.getRemoteResource(), Policy.bind("CreateNewFolderAction.newFolderName")); //$NON-NLS-1$
- if (newFolder == null)
- return;
-
- // force a refresh
- selectedFolder.setCachedChildren(null);
-
- // select the newly added folder
- RemoteResourceElement newFolderUIElement = new RemoteResourceElement(newFolder);
- folderTree.refresh(currentSelection);
- expandInTreeCurrentSelection(new StructuredSelection(currentSelection), false);
- folderTree.setSelection(new StructuredSelection(newFolderUIElement));
- } catch (TeamException e) {
- TeamUIPlugin.handle(e);
- return;
- }
- }
- public boolean isEnabled() {
- return folderContentsTable.getInput() != null ||
- getSelectedRemoteFolder((IStructuredSelection)folderTree.getSelection()).length == 1;
- }
- };
-
- IActionBars bars = getViewSite().getActionBars();
- IToolBarManager tbm = bars.getToolBarManager();
- tbm.add(addSiteAction);
- tbm.update(false);
-
-
- MenuManager treeMgr = new MenuManager();
- MenuManager tableMgr = new MenuManager();
- Tree tree = folderTree.getTree();
- Table table = folderContentsTable.getTable();
- Menu treeMenu = treeMgr.createContextMenu(tree);
- Menu tableMenu = tableMgr.createContextMenu(table);
- IMenuListener menuListener = new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- // Misc additions
- MenuManager sub = new MenuManager(Policy.bind("SiteExplorerView.newMenu"), IWorkbenchActionConstants.GROUP_ADD); //$NON-NLS-1$
- sub.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- manager.add(sub);
- manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- sub.add(addSiteAction);
- sub.add(newFolderAction);
- }
- };
- treeMgr.addMenuListener(menuListener);
- treeMgr.setRemoveAllWhenShown(true);
- tableMgr.addMenuListener(menuListener);
- tableMgr.setRemoveAllWhenShown(true);
- tree.setMenu(treeMenu);
- table.setMenu(tableMenu);
- getSite().registerContextMenu(tableMgr, folderContentsTable);
- getSite().registerContextMenu(treeMgr, folderTree);
- }
-
- /**
- * Add the new site to the viewer and make it the current selection.
- *
- * @see ISiteListener#siteAdded(Site)
- */
- public void siteAdded(Site site) {
- SiteElement element = new SiteElement(site, getViewSite().getWorkbenchWindow());
- folderTree.add(root, element);
- folderTree.setSelection(new StructuredSelection(element));
- }
-
- /**
- * Remote the site from the viewer and select the next site in the
- * tree.
- *
- * @see ISiteListener#siteRemoved(Site)
- */
- public void siteRemoved(Site site) {
- folderTree.remove(new SiteElement(site));
- selectNextObjectInTreeViewer();
- }
-
- private void selectNextObjectInTreeViewer() {
- Object[] items = folderTree.getVisibleExpandedElements();
- if(items.length > 0) {
- folderTree.setSelection(new StructuredSelection(items[0]));
- } else {
- folderContentsTable.setInput(null);
- }
- }
-
- /**
- * Adds the listener that sets the sorter.
- */
- private SelectionListener getColumnListener() {
- /**
- * This class handles selections of the column headers.
- * Selection of the column header will cause resorting
- * of the shown tasks using that column's sorter.
- * Repeated selection of the header will toggle
- * sorting order (ascending versus descending).
- */
- return new SelectionAdapter() {
- /**
- * Handles the case of user selecting the
- * header area.
- * <p>If the column has not been selected previously,
- * it will set the sorter of that column to be
- * the current tasklist sorter. Repeated
- * presses on the same column header will
- * toggle sorting order (ascending/descending).
- */
- public void widgetSelected(SelectionEvent e) {
- // column selected - need to sort
- // only allow sorting on name for now
- int column = folderContentsTable.getTable().indexOf((TableColumn) e.widget);
- if(column == FolderListingSorter.NAME) {
- FolderListingSorter oldSorter = (FolderListingSorter)folderContentsTable.getSorter();
- if (oldSorter != null && column == oldSorter.getColumnNumber()) {
- oldSorter.setReversed(!oldSorter.isReversed());
- folderContentsTable.refresh();
- } else {
- folderContentsTable.setSorter(new FolderListingSorter(column));
- }
- }
- }
- };
- }
-
- /**
- * @see IWorkbenchPart#setFocus()
- */
- public void setFocus() {
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteExplorerViewLabelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteExplorerViewLabelProvider.java
deleted file mode 100644
index 54a8e01db..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteExplorerViewLabelProvider.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui.target;
-
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-public class SiteExplorerViewLabelProvider extends WorkbenchLabelProvider implements ITableLabelProvider {
-
- public Image getColumnImage(Object element, int columnIndex) {
- if (columnIndex == 0) {
- return super.getImage(element);
- }
- return null;
- }
- public String getColumnText(Object element, int columnIndex) {
- switch (columnIndex) {
- case 0 :
- return super.getText(element);
- case 1 :
- if(element instanceof RemoteResourceElement) {
- RemoteResourceElement remote = ((RemoteResourceElement)element);
- if(remote.getRemoteResource().isContainer()) {
- return ""; //$NON-NLS-1$
- }
- int size = remote.getSize();
- int sizeKb = size / 1000;
- if(sizeKb == 0 && size % 1000 > 0) {
- sizeKb = 1;
- }
- return Policy.bind("SiteExplorerViewLabelProvider.fileSize", new Integer(sizeKb).toString()); //$NON-NLS-1$
- }
- case 2 :
- if(element instanceof RemoteResourceElement) {
- return ((RemoteResourceElement)element).getLastModified();
- }
- case 3 :
- if(element instanceof RemoteResourceElement) {
- return ((RemoteResourceElement)element).getRemoteResource().getURL().toExternalForm();
- }
- }
- return ""; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteLazyContentProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteLazyContentProvider.java
deleted file mode 100644
index 9a4bae17c..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteLazyContentProvider.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui.target;
-
-import org.eclipse.ui.model.WorkbenchContentProvider;
-
-public class SiteLazyContentProvider extends WorkbenchContentProvider {
-
- public boolean hasChildren(Object element) {
- if (element == null) {
- return false;
- }
- // the + box will always appear, but then disappear
- // if not needed after you first click on it.
- return true; // just always return true to avoid going to server
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteRootsElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteRootsElement.java
deleted file mode 100644
index 6e166ee77..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteRootsElement.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui.target;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.target.Site;
-import org.eclipse.team.core.target.TargetManager;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-/**
- * Used to show all Sites defined in the workbench.
- */
-public class SiteRootsElement implements IWorkbenchAdapter, IAdaptable {
- private Site[] sites = null;
-
- // progress monitoring support
- private IRunnableContext runContext;
-
- public SiteRootsElement(Site[] sites, IRunnableContext runContext) {
- this.sites = sites;
- this.runContext = runContext;
- }
-
- public SiteRootsElement(IRunnableContext runContext) {
- this(null, runContext);
- }
-
- public ImageDescriptor getImageDescriptor(Object object) {
- return null;
- }
-
- public Object[] getChildren(Object o) {
- Site[] childSites;
- if(sites == null) {
- childSites = TargetManager.getSites();
- } else {
- childSites = sites;
- }
- SiteElement[] siteElements = new SiteElement[childSites.length];
- for (int i = 0; i < childSites.length; i++) {
- siteElements[i] = new SiteElement(childSites[i], runContext);
- }
- return siteElements;
- }
-
- public String getLabel(Object o) {
- return null;
- }
-
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) return this;
- return null;
- }
-
- public Object getParent(Object o) {
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteSelectionPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteSelectionPage.java
deleted file mode 100644
index 999dbeb02..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteSelectionPage.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui.target;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.team.core.target.Site;
-import org.eclipse.team.core.target.TargetManager;
-import org.eclipse.team.core.target.TargetProvider;
-import org.eclipse.team.internal.core.target.UrlUtil;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-/**
- * Wizard page that allows selecting an existing target provider site
- * or to create a new site.
- */
-public class SiteSelectionPage extends TargetWizardPage {
- private TableViewer table;
- private Button useExistingRepo;
- private Button useNewRepo;
- private Button disconnectTarget;
- private Site site;
- private TargetProvider currentProvider;
-
- private boolean disconnect = false;
-
- public SiteSelectionPage(String pageName, String title, ImageDescriptor titleImage, TargetProvider currentProvider) {
- super(pageName, title, titleImage);
- setDescription(Policy.bind("SiteSelectionPage.description")); //$NON-NLS-1$
- this.currentProvider = currentProvider;
- }
-
- protected TableViewer createTable(Composite parent) {
- Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION);
- table.setLayoutData(new GridData(GridData.FILL_BOTH));
- TableLayout layout = new TableLayout();
- layout.addColumnData(new ColumnWeightData(100, true));
- table.setLayout(layout);
- TableColumn col = new TableColumn(table, SWT.NONE);
- col.setResizable(true);
-
- return new TableViewer(table);
- }
-
- public void createControl(Composite parent) {
- Composite composite = createComposite(parent, 2);
-
- Label description = new Label(composite, SWT.WRAP);
- GridData data = new GridData();
- data.horizontalSpan = 2;
- data.widthHint = 350;
- description.setLayoutData(data);
- description.setText(Policy.bind("SiteSelectionPage.label")); //$NON-NLS-1$
-
- useExistingRepo = createRadioButton(composite, Policy.bind("SiteSelectionPage.useExisting"), 2); //$NON-NLS-1$
- table = createTable(composite);
- table.setContentProvider(new WorkbenchContentProvider());
- table.setLabelProvider(new WorkbenchLabelProvider() {
- protected String decorateText(String input, Object element) {
- if(currentProvider != null && element.equals(new SiteElement(currentProvider.getSite()))) {
- IPath mapping = UrlUtil.getTrailingPath(currentProvider.getURL(), currentProvider.getSite().getURL());
- if(mapping.isEmpty()) {
- return Policy.bind("SiteSelectionPage.siteLabelCurrent", super.decorateText(input, element)); //$NON-NLS-1$
- } else {
- return Policy.bind("SiteSelectionPage.siteLabelCurrentWithMapping", super.decorateText(input, element), mapping.toString()); //$NON-NLS-1$
- }
- }
- return super.decorateText(input, element);
- }
- });
-
- table.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- SiteElement siteElement = (SiteElement)((IStructuredSelection)table.getSelection()).getFirstElement();
- if(siteElement != null) {
- site = siteElement.getSite();
- setPageComplete(true);
- } else {
- setPageComplete(false);
- }
- }
- });
- useNewRepo = createRadioButton(composite, Policy.bind("SiteSelectionPage.createNew"), 2); //$NON-NLS-1$
-
- useExistingRepo.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- if (!useExistingRepo.getSelection()) {
- table.getTable().setEnabled(false);
- site = null;
- } else {
- table.getTable().setEnabled(true);
- SiteElement siteElement = (SiteElement)((IStructuredSelection)table.getSelection()).getFirstElement();
- if(siteElement != null) {
- site = siteElement.getSite();
- }
- }
- }
- });
-
- useNewRepo.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- SiteSelectionPage.this.setPageComplete(! useNewRepo.getSelection());
- }
- });
-
-
- if(currentProvider != null ) {
- disconnectTarget = createRadioButton(composite, Policy.bind("SiteSelectionPage.disconnectTarget"), 2); //$NON-NLS-1$
- disconnectTarget.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- disconnect = disconnectTarget.getSelection();
- SiteSelectionPage.this.setPageComplete(true);
- }
- });
- }
-
- setControl(composite);
- initializeValues();
- }
-
- /**
- * Initializes states of the controls.
- */
- private void initializeValues() {
- Site[] sites = TargetManager.getSites();
- table.setInput(new SiteRootsElement(null /* no progress monitoring required */));
- if (sites.length == 0) {
- useNewRepo.setSelection(true);
- } else {
- useExistingRepo.setSelection(true);
- if(currentProvider != null) {
- table.setSelection(new StructuredSelection(new SiteElement(currentProvider.getSite())));
- } else {
- table.setSelection(new StructuredSelection(new SiteElement(sites[0])));
- }
- }
- }
-
- public Site getSite() {
- return site;
- }
-
- public boolean isDisconnect() {
- return disconnect;
- }
-
- /**
- * @see org.eclipse.jface.wizard.IWizardPage#canFlipToNextPage()
- */
- public boolean canFlipToNextPage() {
- if(isDisconnect()) {
- return false;
- } else {
- return true;
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteViewSorter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteViewSorter.java
deleted file mode 100644
index b2fa166c5..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SiteViewSorter.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui.target;
-
-import java.net.URL;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.team.core.target.Site;
-
-public class SiteViewSorter extends ViewerSorter {
-
- public int category(Object element) {
- if (element instanceof Site) {
- return ((Site)element).getType().hashCode();
- }
- return 0;
- }
-
- public int compare(Viewer viewer, Object o1, Object o2) {
- int cat1 = category(o1);
- int cat2 = category(o2);
- if (cat1 != cat2) return cat1 - cat2;
-
- if (o1 instanceof Site && o2 instanceof Site) {
- URL site1 = ((Site)o1).getURL();
- URL site2 = ((Site)o2).getURL();
- return site1.toExternalForm().compareTo(site2.toExternalForm());
- }
- return super.compare(viewer, o1, o2);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SyncAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SyncAction.java
deleted file mode 100644
index 75248aa8b..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SyncAction.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package org.eclipse.team.internal.ui.target;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.core.target.TargetManager;
-import org.eclipse.team.core.target.TargetProvider;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-import org.eclipse.team.internal.ui.sync.SyncCompareInput;
-import org.eclipse.team.internal.ui.sync.SyncView;
-import org.eclipse.ui.PartInitException;
-
-/**
- * Action for catchup/release in popup menus.
- */
-public class SyncAction extends TeamAction {
-
- public void run(IAction action) {
- IResource[] resources = getSelectedResources();
- SyncView view = (SyncView)TeamUIPlugin.getActivePage().findView(SyncView.VIEW_ID);
- if (view == null) {
- view = SyncView.findInActivePerspective();
- }
- if (view != null) {
- try {
- TeamUIPlugin.getActivePage().showView(SyncView.VIEW_ID);
- } catch (PartInitException e) {
- TeamUIPlugin.log(e.getStatus());
- }
- view.showSync(getCompareInput(resources));
- }
- }
-
- protected boolean isEnabled() throws TeamException {
- IResource[] resources = getSelectedResources();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (!resource.isAccessible()) return false;
- TargetProvider provider = TargetManager.getProvider(resource.getProject());
- if(provider == null) return false;
- }
- return true;
- }
-
- protected SyncCompareInput getCompareInput(IResource[] resources) {
- return new TargetSyncCompareInput(resources, IRemoteSyncElement.GRANULARITY_TIMESTAMP);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetAction.java
deleted file mode 100644
index e1dfb10b3..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetAction.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui.target;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceVisitor;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.target.IRemoteTargetResource;
-import org.eclipse.team.core.target.Site;
-import org.eclipse.team.core.target.TargetManager;
-import org.eclipse.team.core.target.TargetProvider;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-
-public abstract class TargetAction extends TeamAction {
- /**
- * Get selected remote target folders
- */
- protected IRemoteTargetResource[] getSelectedRemoteFolders() {
- ArrayList resources = null;
- if (!selection.isEmpty()) {
- resources = new ArrayList();
- Iterator elements = ((IStructuredSelection) selection).iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- IRemoteTargetResource remote = null;
- if (next instanceof RemoteResourceElement) {
- remote = ((RemoteResourceElement)next).getRemoteResource();
- } else if(next instanceof SiteElement) {
- try {
- remote = ((SiteElement)next).getSite().getRemoteResource();
- } catch (TeamException e) {
- TeamUIPlugin.handle(e);
- return new IRemoteTargetResource[0];
- }
- }
- if(remote != null && remote.isContainer()) {
- resources.add(remote);
- continue;
- }
- }
- }
- if (resources != null && !resources.isEmpty()) {
- return (IRemoteTargetResource[])resources.toArray(new IRemoteTargetResource[resources.size()]);
- }
- return new IRemoteTargetResource[0];
- }
-
- /**
- * Get selected remote target folders
- */
- protected Site[] getSelectedSites() {
- ArrayList sites = new ArrayList();;
- if (!selection.isEmpty()) {
- Iterator elements = ((IStructuredSelection) selection).iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- IRemoteTargetResource remote = null;
- if (next instanceof SiteElement) {
- sites.add(((SiteElement)next).getSite());
- }
- }
- }
- return (Site[])sites.toArray(new Site[sites.size()]);
- }
-
- protected IResource[] findResourcesWithOutgoingChanges(IResource[] resources) throws TeamException, CoreException {
- // Collect the dirty resource
- final List dirtyResources = new ArrayList();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- final TargetProvider provider = TargetManager.getProvider(resource.getProject());
- resource.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- if (resource.getType() == IResource.FILE) {
- if (provider.isDirty(resource) || ! provider.hasBase(resource)) {
- dirtyResources.add(resource);
- }
- } else {
- // Check for outgoing folder deletions?
- }
- return true;
- }
- }, IResource.DEPTH_INFINITE, true /* include phantoms */);
- }
- return (IResource[]) dirtyResources.toArray(new IResource[dirtyResources.size()]);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetCatchupReleaseViewer.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetCatchupReleaseViewer.java
deleted file mode 100644
index c7937729b..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetCatchupReleaseViewer.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui.target;
-
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ui.IHelpContextIds;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.sync.CatchupReleaseViewer;
-import org.eclipse.team.internal.ui.sync.SyncView;
-import org.eclipse.ui.help.WorkbenchHelp;
-public class TargetCatchupReleaseViewer extends CatchupReleaseViewer {
- private GetSyncAction getAction;
- private PutSyncAction putAction;
-
- public TargetCatchupReleaseViewer(Composite parent, TargetSyncCompareInput input) {
- super(parent, input);
- initializeActions(input);
- // set F1 help
- WorkbenchHelp.setHelp(this.getControl(), IHelpContextIds.CATCHUP_RELEASE_VIEWER);
- }
-
- /**
- * Creates the actions for this viewer.
- */
- private void initializeActions(final TargetSyncCompareInput diffModel) {
- Shell shell = getControl().getShell();
- getAction = new GetSyncAction(diffModel, this, Policy.bind("TargetCatchupReleaseViewer.Get_1"), shell); //$NON-NLS-1$
- putAction = new PutSyncAction(diffModel, this, Policy.bind("TargetCatchupReleaseViewer.Put_2"), shell); //$NON-NLS-1$
- }
- protected void fillContextMenu(IMenuManager manager) {
- super.fillContextMenu(manager);
- manager.add(new Separator());
- switch (getSyncMode()) {
- case SyncView.SYNC_INCOMING:
- getAction.update(SyncView.SYNC_INCOMING);
- manager.add(getAction);
- break;
- case SyncView.SYNC_OUTGOING:
- putAction.update(SyncView.SYNC_INCOMING);
- manager.add(putAction);
- break;
- case SyncView.SYNC_BOTH:
- getAction.update(SyncView.SYNC_INCOMING);
- manager.add(getAction);
- putAction.update(SyncView.SYNC_INCOMING);
- manager.add(putAction);
- break;
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetProjectAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetProjectAction.java
deleted file mode 100644
index f548370c6..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetProjectAction.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui.target;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.target.TargetManager;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.core.TeamPlugin;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-
-public class TargetProjectAction extends TeamAction {
- /*
- * 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];
- ConfigureTargetWizard wizard = new ConfigureTargetWizard();
- wizard.init(null, project);
- WizardDialog dialog = new WizardDialog(getShell(), wizard);
- dialog.open();
- } catch (Exception e) {
- throw new InvocationTargetException(e);
- }
- }
- }, Policy.bind("ConfigureTargetAction.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;
-/* try {
- if (TargetManager.getProvider(selectedProjects[0]) == null) return true;
- } catch (TeamException e) {
- TeamPlugin.log(IStatus.ERROR, "Exception getting provider", e);
- return false;
- }
- return false;
-*/
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetSyncAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetSyncAction.java
deleted file mode 100644
index b7d087967..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetSyncAction.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui.target;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Set;
-import java.lang.reflect.InvocationTargetException;
-
-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.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.target.TargetManager;
-import org.eclipse.team.core.target.TargetProvider;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-import org.eclipse.team.internal.ui.sync.ChangedTeamContainer;
-import org.eclipse.team.internal.ui.sync.ITeamNode;
-import org.eclipse.team.internal.ui.sync.SyncSet;
-import org.eclipse.team.internal.ui.sync.UnchangedTeamContainer;
-
-public abstract class TargetSyncAction extends Action {
- private TargetSyncCompareInput diffModel;
- private ISelectionProvider selectionProvider;
-
- protected int syncMode;
- private Shell shell;
-
- /**
- * Creates a TargetSyncAction which works on selection and doesn't commit changes.
- */
- public TargetSyncAction(TargetSyncCompareInput model, ISelectionProvider sp, String label, Shell shell) {
- super(label);
- this.diffModel = model;
- this.selectionProvider = sp;
- this.shell = shell;
- }
-
- protected Shell getShell() {
- return shell;
- }
-
- protected TargetSyncCompareInput getDiffModel() {
- return diffModel;
- }
-
- /**
- * Returns true if at least one node can perform the specified action.
- */
- private boolean isEnabled(Object[] nodes) {
- for (int i = 0; i < nodes.length; i++) {
- if (nodes[i] instanceof ITeamNode) {
- ITeamNode node = (ITeamNode)nodes[i];
- if (isEnabled(node)) {
- return true;
- }
- } else {
- if (nodes[i] instanceof IDiffContainer)
- if (isEnabled(((IDiffContainer)nodes[i]).getChildren()))
- return true;
- }
- }
- return false;
- }
-
- protected abstract boolean isEnabled(ITeamNode node);
-
- /**
- * Perform the sychronization operation.
- */
- public void run() {
- ISelection s = selectionProvider.getSelection();
- if (!(s instanceof IStructuredSelection) || s.isEmpty()) {
- return;
- }
- final SyncSet set = new SyncSet((IStructuredSelection)s);
- removeNonApplicableNodes(set, syncMode);
- final SyncSet[] result = new SyncSet[1];
- WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- result[0] = TargetSyncAction.this.run(set, monitor);
- }
- };
- try {
- run(op, Policy.bind("MergeAction.problemsDuringSync")); //$NON-NLS-1$
- } catch (InterruptedException e) {
- }
- if (result[0] != null) {
- // all returned nodes that have a changed sync kind are assumed
- // to have been operated on and will be removed from the diff tree.
- removeNodes(result[0].getChangedNodes());
-
- // any node that claims that it's IN_SYNC will be automatically
- // filtered from the diff tree - see DiffElement.setKind().
- diffModel.updateView();
- }
- }
-
- protected abstract void removeNonApplicableNodes(SyncSet set, int syncMode);
-
- /**
- * The given nodes have been synchronized. Remove them from
- * the sync set.
- *
- * For folders that are outgoing deletions, we may need to leave the
- * folder as is or adjust the sync kind depending on the sync kind of
- * the folder's children.
- *
- * @see CVSSyncCompareInput#collectResourceChanges(IDiffContainer, IRemoteSyncElement, IProgressMonitor)
- */
- private void removeNodes(final ITeamNode[] nodes) {
- // Update the model
- Set outgoingFolderDeletions = new HashSet();
- for (int i = 0; i < nodes.length; i++) {
- if (nodes[i].getClass() == UnchangedTeamContainer.class) {
- // Unchanged containers get removed automatically when all
- // children are removed
- continue;
- }
- if (nodes[i].getClass() == ChangedTeamContainer.class) {
- // If this node still has children, convert to an
- // unchanged container, then it will disappear when
- // all children have been removed.
- ChangedTeamContainer container = (ChangedTeamContainer)nodes[i];
- IDiffElement[] children = container.getChildren();
- if (children.length > 0) {
- IDiffContainer parent = container.getParent();
- UnchangedTeamContainer unchanged = new UnchangedTeamContainer(parent, container.getResource());
- for (int j = 0; j < children.length; j++) {
- unchanged.add(children[j]);
- }
- parent.removeToRoot(container);
- continue;
- }
- // No children, it will get removed below.
- }
- nodes[i].getParent().removeToRoot(nodes[i]);
- }
- }
-
- /**
- * Updates the action with the latest selection, setting enablement
- * as necessary.
- */
- public void update(int syncMode) {
- this.syncMode = syncMode;
- IStructuredSelection selection = (IStructuredSelection)selectionProvider.getSelection();
- setEnabled(isEnabled(selection.toArray()));
- }
-
- /**
- * Subclasses must implement this method, which performs action-specific code.
- *
- * It may return the sync set which was passed in, or null.
- */
- protected abstract SyncSet run(SyncSet syncSet, IProgressMonitor monitor);
-
- /**
- * Helper method to run a runnable in a progress monitor dialog, and display any errors.
- */
- protected void run(IRunnableWithProgress op, String problemMessage) throws InterruptedException {
- ProgressMonitorDialog dialog = new ProgressMonitorDialog(getShell());
- try {
- dialog.run(true, true, op);
- } catch (InvocationTargetException e) {
- Throwable throwable = e.getTargetException();
- IStatus error = null;
- if (throwable instanceof CoreException) {
- error = ((CoreException)throwable).getStatus();
- } else {
- error = new Status(IStatus.ERROR, TeamUIPlugin.ID, 1, Policy.bind("simpleInternal") , throwable); //$NON-NLS-1$
- }
- ErrorDialog.openError(shell, problemMessage, error.getMessage(), error);
- TeamUIPlugin.log(error);
- }
- }
-
- /**
- * Helper method. Check if a save is necessary. If it is, prompt the user to save.
- * Return true if all necessary saves have been performed, false otherwise.
- */
- protected boolean saveIfNecessary() {
- return getDiffModel().saveIfNecessary();
- }
-
- /**
- * Convenience method that maps the given resources to their target providers.
- * The returned Hashtable has keys which are TargetProviders, and values
- * which are Lists of IResources that are shared with that provider.
- *
- * @return a hashtable mapping providers to their resources
- */
- protected Hashtable getTargetProviderMapping(IResource[] resources) throws TeamException {
- Hashtable result = new Hashtable();
- for (int i = 0; i < resources.length; i++) {
- TargetProvider provider = TargetManager.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;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetSyncCompareInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetSyncCompareInput.java
deleted file mode 100644
index fbc1d55ac..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetSyncCompareInput.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui.target;
-
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.core.target.ITargetRunnable;
-import org.eclipse.team.core.target.TargetManager;
-import org.eclipse.team.core.target.TargetProvider;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.sync.CatchupReleaseViewer;
-import org.eclipse.team.internal.ui.sync.SyncCompareInput;
-
-public class TargetSyncCompareInput extends SyncCompareInput {
-
- private IResource[] resources;
-
- protected TargetSyncCompareInput(IResource[] resources, int granularity) {
- super(granularity);
- this.resources = resources;
- }
-
- /**
- * @see SyncCompareInput#createSyncElements(IProgressMonitor)
- */
- protected IRemoteSyncElement[] createSyncElements(IProgressMonitor monitor) throws TeamException {
- monitor = Policy.monitorFor(monitor);
- try {
- monitor.beginTask(null, resources.length);
- IRemoteSyncElement[] elements = new IRemoteSyncElement[resources.length];
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- TargetProvider provider = TargetManager.getProvider(resource.getProject());
- elements[i] = provider.getRemoteSyncElement(resource);
- monitor.worked(1);
- }
- return elements;
- } finally {
- monitor.done();
- }
- }
-
- /**
- * @see CompareEditorInput#createDiffViewer(Composite)
- */
- public Viewer createDiffViewer(Composite parent) {
- CatchupReleaseViewer viewer = new TargetCatchupReleaseViewer(parent, this);
- setViewer(viewer);
- return viewer;
- }
-
- protected void updateView() {
- // Update the view
- if (getDiffRoot().hasChildren()) {
- getViewer().refresh();
- } else {
- getViewer().setInput(null);
- }
-
- // Update the status line
- updateStatusLine();
- }
-
- /**
- * @see SyncCompareInput#collectResourceChanges(IDiffContainer, IRemoteSyncElement, IProgressMonitor)
- */
- protected IDiffElement collectResourceChanges(
- final IDiffContainer parent,
- final IRemoteSyncElement tree,
- IProgressMonitor pm) {
-
- final IDiffElement[] result = new IDiffElement[] {null};
- try {
- TargetProvider provider = TargetManager.getProvider(tree.getLocal().getProject());
- provider.run(new ITargetRunnable() {
- public void run(IProgressMonitor monitor) throws TeamException {
- result[0] = TargetSyncCompareInput.super.collectResourceChanges(parent, tree, monitor);
- }
- }, pm);
- } catch (TeamException e) {
- TeamUIPlugin.log(e.getStatus());
- }
- return result[0];
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetWizardPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetWizardPage.java
deleted file mode 100644
index d6326bfa5..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/TargetWizardPage.java
+++ /dev/null
@@ -1,195 +0,0 @@
-package org.eclipse.team.internal.ui.target;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-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.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-
-/*
- * Common superclass for wizard pages. Provides convenience methods
- * for widget creation.
- */
-public abstract class TargetWizardPage extends WizardPage {
-
- private static final int COMBO_HISTORY_LENGTH = 5;
-
- /*
- * WizardPage constructor comment.
- * @param pageName the name of the page
- */
- public TargetWizardPage(String pageName) {
- super(pageName);
- }
-
- /*
- * WizardPage constructor comment.
- * @param pageName the name of the page
- * @param title the title of the page
- * @param titleImage the image for the page
- */
- public TargetWizardPage(String pageName, String title, org.eclipse.jface.resource.ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- }
-
- 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;
- }
-
- /*
- * Creates a 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
- */
- protected Button createCheckBox(Composite group, String label) {
- Button button = new Button(group, SWT.CHECK | SWT.LEFT);
- button.setText(label);
- GridData data = new GridData();
- data.horizontalSpan = 2;
- button.setLayoutData(data);
- return button;
- }
-
- /*
- * Utility method that creates a combo box
- *
- * @param parent the parent for the new label
- * @return the new widget
- */
- protected Combo createCombo(Composite parent) {
- Combo combo = new Combo(parent, SWT.READ_ONLY);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
- combo.setLayoutData(data);
- return combo;
- }
-
- /*
- * 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) {
- Label label = new Label(parent, SWT.LEFT);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = 1;
- data.horizontalAlignment = GridData.FILL;
- 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;
- }
-
- /*
- * Adds an entry to a history, while taking care of duplicate history items
- * and excessively long histories. The assumption is made that all histories
- * should be of length <code>ConfigurationWizardMainPage.COMBO_HISTORY_LENGTH</code>.
- *
- * @param history the current history
- * @param newEntry the entry to add to the history
- * @return the history with the new entry appended
- */
- protected String[] addToHistory(String[] history, String newEntry) {
- ArrayList l = new ArrayList(Arrays.asList(history));
- addToHistory(l, newEntry);
- String[] r = new String[l.size()];
- l.toArray(r);
- return r;
- }
-
- /*
- * Adds an entry to a history, while taking care of duplicate history items
- * and excessively long histories. The assumption is made that all histories
- * should be of length <code>ConfigurationWizardMainPage.COMBO_HISTORY_LENGTH</code>.
- *
- * @param history the current history
- * @param newEntry the entry to add to the history
- */
- protected void addToHistory(List history, String newEntry) {
- history.remove(newEntry);
- history.add(0,newEntry);
-
- // since only one new item was added, we can be over the limit
- // by at most one item
- if (history.size() > COMBO_HISTORY_LENGTH)
- history.remove(COMBO_HISTORY_LENGTH);
- }
-
- /*
- * Utility method to create an editable combo box
- *
- * @param parent the parent of the combo box
- * @return the created combo
- */
- protected Combo createEditableCombo(Composite parent) {
- Combo combo = new Combo(parent, SWT.NULL);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
- combo.setLayoutData(data);
- return combo;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/UploadAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/UploadAction.java
deleted file mode 100644
index 6e28cb595..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/UploadAction.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.internal.ui.target;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.target.TargetManager;
-import org.eclipse.team.core.target.TargetProvider;
-import org.eclipse.team.internal.core.InfiniteSubProgressMonitor;
-import org.eclipse.team.internal.core.TeamPlugin;
-import org.eclipse.team.internal.ui.IPromptCondition;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.PromptingDialog;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-
-public class UploadAction extends TargetAction {
-
- /**
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() throws TeamException {
- IResource[] resources = getSelectedResources();
- if (resources.length == 0) return false;
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- try {
- TargetProvider provider = TargetManager.getProvider(resource.getProject());
- if(provider == null)
- return false;
- if(! provider.canPut(resource))
- return false; //if one can't don't allow for any
- // Don't want to go though the resources deeply to see if there are dirty children
- } catch (TeamException e) {
- TeamPlugin.log(IStatus.ERROR, Policy.bind("UploadAction.Exception_getting_provider"), e); //$NON-NLS-1$
- return false;
- }
- }
- return true;
- }
-
- /**
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- run(new WorkspaceModifyOperation() {
- public void execute(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
- try {
- Hashtable table = getTargetProviderMapping();
- Set keySet = table.keySet();
- monitor.beginTask("", keySet.size() * 1000); //$NON-NLS-1$
- Iterator iterator = keySet.iterator();
- while (iterator.hasNext()) {
- IProgressMonitor subMonitor = new InfiniteSubProgressMonitor(monitor, 1024);
- final TargetProvider provider = (TargetProvider)iterator.next();
- subMonitor.setTaskName(Policy.bind("UploadAction.working", provider.getURL().toExternalForm())); //$NON-NLS-1$
-
- IResource[] providerResources = (IResource[])((List)table.get(provider)).toArray(new IResource[0]);
- IResource[] outgoingChanges = findResourcesWithOutgoingChanges(providerResources);
- if (outgoingChanges.length == 0) {
- getShell().getDisplay().syncExec(
- new Runnable() {
- public void run() {
- MessageDialog.openInformation(getShell(),
- Policy.bind("UploadAction.noDirtyTitle"), //$NON-NLS-1$
- Policy.bind("UploadAction.noDirtyMessage")); //$NON-NLS-1$
- }
- });
- return;
- };
-
- // Prompt for any outgoing deletions
- PromptingDialog prompt = new PromptingDialog(
- getShell(),
- outgoingChanges,
- new IPromptCondition() {
- public boolean needsPrompt(IResource resource) {
- return ! resource.exists();
- }
- public String promptMessage(IResource resource) {
- return Policy.bind("UploadAction.confirmFileDeletionMessage", resource.getFullPath().toString()); //$NON-NLS-1$
- }
- },
- Policy.bind("UploadAction.confirmDeletionTitle"));//$NON-NLS-1$
-
- // Put the resources that were selected
- provider.put(prompt.promptForMultiple(), subMonitor);
- }
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- }, Policy.bind("UploadAction.problemMessage"), this.PROGRESS_DIALOG); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizard.java
deleted file mode 100644
index fcd51bfbc..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizard.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package org.eclipse.team.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.ui.IWorkbench;
-
-/**
- * IConfigurationWizard defines the interface that users of the extension
- * point org.eclipse.team.ui.configurationWizards must implement.
- */
-public interface IConfigurationWizard extends IWizard {
- /**
- * Initializes this creation wizard using the passed workbench and
- * object selection.
- * <p>
- * This method is called after the no argument constructor and
- * before other methods are called.
- * </p>
- *
- * @param workbench the current workbench
- * @param project the selected project
- */
- void init(IWorkbench workbench, IProject project);
-}
-
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java
deleted file mode 100644
index c66bf3331..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package org.eclipse.team.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.resource.ImageDescriptor;
-
-/**
- * Images that are available for providers to re-use. They include
- * common overlays and wizard images. A provider can use their own
- * custom images, these shared images are only available for
- * convenience.
- */
-public interface ISharedImages {
- public final String IMG_DIRTY_OVR = "ovr/dirty_ov.gif"; //$NON-NLS-1$
- public final String IMG_CHECKEDIN_OVR = "ovr/checkedin_ov.gif"; //$NON-NLS-1$
- public final String IMG_CHECKEDOUT_OVR = "ovr/checkedout_ov.gif"; //$NON-NLS-1$
-
- public final String IMG_SITE_VIEW = "cview16/site_view.gif"; //$NON-NLS-1$
- public final String IMG_SITE_ELEMENT = "clcl16/site_element.gif"; //$NON-NLS-1$
-}
-
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamImages.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamImages.java
deleted file mode 100644
index 707a3ebee..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamImages.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.ui;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Hashtable;
-
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IPluginDescriptor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.UIConstants;
-
-/**
- * TeamImages provides convenience methods for accessing shared images
- * provided by the org.eclipse.team.ui plug-in.
- */
-public class TeamImages {
- private static Hashtable imageDescriptors = new Hashtable(20);
-
- static {
- initializeImages();
- }
- /**
- * 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(String id, URL baseURL) {
- URL url = null;
- try {
- url = new URL(baseURL, UIConstants.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) {
- 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.
- */
- private static void initializeImages() {
- URL baseURL = TeamUIPlugin.getPlugin().getDescriptor().getInstallURL();
-
- // View decoration overlays
- createImageDescriptor(ISharedImages.IMG_DIRTY_OVR, baseURL);
- createImageDescriptor(ISharedImages.IMG_CHECKEDIN_OVR, baseURL);
- createImageDescriptor(ISharedImages.IMG_CHECKEDOUT_OVR, baseURL);
-
- // Target Management Icons
- createImageDescriptor(ISharedImages.IMG_SITE_VIEW, baseURL);
- createImageDescriptor(ISharedImages.IMG_SITE_ELEMENT, baseURL);
-
- // Sync View Icons
- createImageDescriptor(UIConstants.IMG_DLG_SYNC_INCOMING, baseURL);
- createImageDescriptor(UIConstants.IMG_DLG_SYNC_OUTGOING, baseURL);
- createImageDescriptor(UIConstants.IMG_DLG_SYNC_CONFLICTING, baseURL);
- createImageDescriptor(UIConstants.IMG_REFRESH, baseURL);
- createImageDescriptor(UIConstants.IMG_IGNORE_WHITESPACE, baseURL);
- createImageDescriptor(UIConstants.IMG_SYNC_MODE_CATCHUP, baseURL);
- createImageDescriptor(UIConstants.IMG_SYNC_MODE_RELEASE, baseURL);
- createImageDescriptor(UIConstants.IMG_SYNC_MODE_FREE, baseURL);
- createImageDescriptor(UIConstants.IMG_WIZBAN_SHARE, baseURL);
- createImageDescriptor(UIConstants.IMG_WIZBAN_NEW_CONNECTION, baseURL);
- createImageDescriptor(UIConstants.IMG_CONTENTS, baseURL);
-
- // Wizard banners
- createImageDescriptor(UIConstants.IMG_PROJECTSET_IMPORT_BANNER, baseURL);
- createImageDescriptor(UIConstants.IMG_PROJECTSET_EXPORT_BANNER, baseURL);
-
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java
deleted file mode 100644
index 00d9d5767..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.ui;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-
-/**
- * TeamUI contains public API for generic UI-based Team functionality
- */
-public class TeamUI {
- // property change types
- public static String GLOBAL_IGNORES_CHANGED = "global_ignores_changed"; //$NON-NLS-1$
-
- /**
- * Register for changes made to Team properties.
- *
- * @param listener the listener to add
- */
- public static void addPropertyChangeListener(IPropertyChangeListener listener) {
- TeamUIPlugin.getPlugin().addPropertyChangeListener(listener);
- }
-
- /**
- * Deregister as a Team property changes.
- *
- * @param listener the listener to remove
- */
- public static void removePropertyChangeListener(IPropertyChangeListener listener) {
- TeamUIPlugin.getPlugin().removePropertyChangeListener(listener);
- }
-}
diff --git a/tests/org.eclipse.team.tests.core/.classpath b/tests/org.eclipse.team.tests.core/.classpath
deleted file mode 100644
index f652b1282..000000000
--- a/tests/org.eclipse.team.tests.core/.classpath
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/"/>
- <classpathentry kind="src" path="/org.apache.xerces"/>
- <classpathentry kind="src" path="/org.eclipse.core.tests.harness"/>
- <classpathentry kind="src" path="/org.eclipse.core.resources"/>
- <classpathentry kind="src" path="/org.eclipse.team.core"/>
- <classpathentry kind="src" path="/org.eclipse.team.ui"/>
- <classpathentry kind="src" path="/org.eclipse.compare"/>
- <classpathentry kind="src" path="/org.eclipse.ui"/>
- <classpathentry kind="src" path="/org.junit"/>
- <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
- <classpathentry kind="src" path="/org.eclipse.core.boot"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/org.eclipse.team.tests.core/.cvsignore b/tests/org.eclipse.team.tests.core/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/tests/org.eclipse.team.tests.core/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/tests/org.eclipse.team.tests.core/.project b/tests/org.eclipse.team.tests.core/.project
deleted file mode 100644
index 9eec2c422..000000000
--- a/tests/org.eclipse.team.tests.core/.project
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.team.tests.core</name>
- <comment></comment>
- <projects>
- <project>org.apache.xerces</project>
- <project>org.eclipse.compare</project>
- <project>org.eclipse.core.boot</project>
- <project>org.eclipse.core.resources</project>
- <project>org.eclipse.core.runtime</project>
- <project>org.eclipse.core.tests.harness</project>
- <project>org.eclipse.team.core</project>
- <project>org.eclipse.team.ui</project>
- <project>org.eclipse.ui</project>
- <project>org.junit</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.team.cvs.core.cvsnature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.team.tests.core/about.html b/tests/org.eclipse.team.tests.core/about.html
deleted file mode 100644
index 768324e89..000000000
--- a/tests/org.eclipse.team.tests.core/about.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<html>
-<head>
-<title>About</title>
-<style type="text/css">
-p, table, td, th { font-family: arial, helvetica, geneva; font-size: 10pt}
-pre { font-family: "Courier New", Courier, mono; font-size: 10pt}
-h2 { font-family: arial, helvetica, geneva; font-size: 18pt; font-weight: bold ; line-height: 14px}
-code { font-family: "Courier New", Courier, mono; font-size: 10pt}
-sup { font-family: arial,helvetica,geneva; font-size: 10px}
-h3 { font-family: arial, helvetica, geneva; font-size: 14pt; font-weight: bold}
-li { font-family: arial, helvetica, geneva; font-size: 10pt}
-h1 { font-family: arial, helvetica, geneva; font-size: 28px; font-weight: bold}
-body { font-family: arial, helvetica, geneva; font-size: 10pt; clip: rect( ); margin-top: 5mm; margin-left: 3mm}
-</style>
-</head>
-<body lang="EN-US" link="blue" vlink="purple">
-<table border="0" cellspacing="5" cellpadding="2" width="100%" >
- <tr>
- <td align="LEFT" valign="TOP" colspan="2" bgcolor="#0080C0"><b><font color="#FFFFFF">About This Content</font></b></td>
- </tr>
- <tr>
- <td>
-<p>11th December, 2001</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in &quot;Content&quot;. Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-<a href="http://www.eclipse.org/legal/cpl-v05.html">Common Public License Version 0.5</a> &quot;CPL&quot;. For purposes of the CPL, &quot;Program&quot; will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL &quot;Other License&quot;, any modifications, enhancements and/or
-other code and/or documentation &quot;Modifications&quot; uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-</td></tr></table>
-</body>
-</html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.core/build.properties b/tests/org.eclipse.team.tests.core/build.properties
deleted file mode 100644
index ca2eedbd3..000000000
--- a/tests/org.eclipse.team.tests.core/build.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-source.teamtests.jar=src/
-bin.includes=about.html,plugin.xml,*.jar,test.xml \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.core/ftp.properties b/tests/org.eclipse.team.tests.core/ftp.properties
deleted file mode 100644
index 0043b8eb1..000000000
--- a/tests/org.eclipse.team.tests.core/ftp.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-target=org.eclipse.team.ftp
-test_dir=target
-location=ftp://ftp.server/path
-username=username
-password=password
-proxyURL=proxyURLIfThereIsOne
-connectionTimeout=6000
-passive=true \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.core/plugin.xml b/tests/org.eclipse.team.tests.core/plugin.xml
deleted file mode 100644
index a559a6ba3..000000000
--- a/tests/org.eclipse.team.tests.core/plugin.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin
- id="org.eclipse.team.tests.core"
- name="Eclipse Team Core Tests"
- version="2.0.0"
- provider-name="Eclipse.org"
- class="">
-
- <runtime>
- <library name="teamtests.jar">
- <export name="*"/>
- </library>
- </runtime>
- <requires>
- <import plugin="org.apache.xerces"/>
- <import plugin="org.eclipse.core.tests.harness"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.core.boot"/>
- <import plugin="org.eclipse.team.core"/>
- <import plugin="org.eclipse.team.cvs.core"/>
- <import plugin="org.eclipse.team.ui"/>
- <import plugin="org.eclipse.team.cvs.ui"/>
- <import plugin="org.eclipse.compare"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.junit"/>
- </requires>
-
-
- <extension
- point="org.eclipse.core.tests.harness.tests">
- <test
- id="team.all">
- <run
- class="org.eclipse.team.tests.core.RepositoryProviderTests">
- </run>
- </test>
- </extension>
- <extension
- point="org.eclipse.core.tests.harness.tests">
- <test
- id="target.all">
- <run
- class="org.eclipse.team.tests.core.TargetProviderTests">
- </run>
- </test>
- </extension>
- <extension
- point="org.eclipse.core.tests.harness.tests">
- <test
- id="team.ftp">
- <run
- class="org.eclipse.team.tests.ftp.ClientTest">
- </run>
- </test>
- </extension>
-
-
- <extension
- id="bic-provider"
- name="Bic Provider"
- point="org.eclipse.core.resources.natures">
- <runtime>
- <run
- class="org.eclipse.team.tests.core.RepositoryProviderBic">
- </run>
- </runtime>
- <one-of-nature
- id="org.eclipse.team.repository-provider">
- </one-of-nature>
- </extension>
- <extension
- id="naish-provider"
- name="Naish Provider"
- point="org.eclipse.core.resources.natures">
- <runtime>
- <run
- class="org.eclipse.team.tests.core.RepositoryProviderNaish">
- </run>
- </runtime>
- <one-of-nature
- id="org.eclipse.team.repository-provider">
- </one-of-nature>
- </extension>
- <extension
- id="other"
- name="Bad Set Provider"
- point="org.eclipse.core.resources.natures">
- <runtime>
- <run
- class="org.eclipse.team.tests.core.RepositoryProviderOtherSport">
- </run>
- </runtime>
- <one-of-nature
- id="some set">
- </one-of-nature>
- </extension>
-
- <extension
- id="testapplication"
- point="org.eclipse.core.runtime.applications">
- <application>
- <run
- class="org.eclipse.team.tests.ftp.TestApplication">
- </run>
- </application>
- </extension>
-
-</plugin>
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/AllTargetTests.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/AllTargetTests.java
deleted file mode 100644
index f93f74a9f..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/AllTargetTests.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.tests.core;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.core.tests.harness.EclipseWorkspaceTest;
-
-public class AllTargetTests extends EclipseWorkspaceTest {
-
- /**
- * Constructor for AllTargetTests.
- */
- public AllTargetTests() {
- super();
- }
-
- /**
- * Constructor for AllTargetTests.
- * @param name
- */
- public AllTargetTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite();
- suite.addTest(TargetProviderTests.suite());
- suite.addTest(RemoteResourceTests.suite());
- suite.addTest(SyncElementTest.suite());
- return new TargetTestSetup(suite);
- }
-}
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/AllTeamTests.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/AllTeamTests.java
deleted file mode 100644
index befe86577..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/AllTeamTests.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.tests.core;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.core.tests.harness.EclipseWorkspaceTest;
-
-public class AllTeamTests extends EclipseWorkspaceTest {
-
- /**
- * Constructor for CVSClientTest.
- */
- public AllTeamTests() {
- super();
- }
-
- /**
- * Constructor for CVSClientTest.
- * @param name
- */
- public AllTeamTests(String name) {
- super(name);
- }
-
- /*
- * ORDER IS IMPORTANT: Run compatibility and resource tests before any other!!!
- */
- public static Test suite() {
- TestSuite suite = new TestSuite();
- suite.addTest(RepositoryProviderTests.suite());
- suite.addTest(StreamTests.suite());
- return suite;
- }
-}
-
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RemoteResourceTests.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RemoteResourceTests.java
deleted file mode 100644
index 43f096875..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RemoteResourceTests.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.tests.core;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteResource;
-import org.eclipse.team.core.target.TargetProvider;
-
-/**
- * A set of test cases for org.eclipse.team.core.sync.IRemoteResource
- */
-public class RemoteResourceTests extends TeamTest {
- public RemoteResourceTests() {
- super();
- }
- public RemoteResourceTests(String name) {
- super(name);
- }
- public static Test suite() {
- TestSuite suite = new TestSuite(RemoteResourceTests.class);
- return new TargetTestSetup(suite);
- }
-
- protected IProject createAndPut(String projectPrefix, String[] resourceNames) throws CoreException, TeamException {
- IProject project = getUniqueTestProject(projectPrefix);
- IResource[] resources = buildResources(project, resourceNames, false);
- TargetProvider target = createProvider(project);
- target.put(resources, null);
- return project;
- }
-
- public void testGetName() throws CoreException, TeamException {
- IProject project = createAndPut("getname", new String[] { "file1.txt", "folder1/", "folder1/b.txt" });
- TargetProvider target = getProvider(project);
- IRemoteResource remote = target.getRemoteResource();
- assertEquals(project.getName(), remote.getName());
- }
- public void testIsContainerSuccess() throws CoreException, TeamException {
- IProject project = getUniqueTestProject("iscontainer");
- IResource[] resources = buildResources(project, new String[] { "file1.txt", "folder1/", "folder1/b.txt" }, false);
- TargetProvider target = createProvider(project);
- target.put(resources, null);
- IRemoteResource remote = target.getRemoteResource();
- assertTrue(remote.isContainer());
- }
- public void testIsContainerFail() throws CoreException, TeamException {
- IProject project = createAndPut("iscontainer", new String[] { "file1.txt", "folder1/", "folder1/b.txt" });
- TargetProvider target = getProvider(project);
- IRemoteResource remote = target.getRemoteResourceFor(project.getFile("file1.txt"));
- assertTrue(!remote.isContainer());
- }
- public void testGetContents() throws CoreException, TeamException {
- IProject project = createAndPut("getname", new String[] { "file1.txt", "folder1/", "folder1/b.txt" });
- TargetProvider target = getProvider(project);
- IRemoteResource remote = target.getRemoteResourceFor(project.getFile("file1.txt"));
- InputStream jin = remote.getContents(DEFAULT_MONITOR);
- try {
- while (jin.available() > 0) {
- jin.read();
- }
- } catch (IOException e) {
- System.out.flush();
- e.printStackTrace(System.err);
- fail("Couldn't read from the input stream.");
- }
- }
- public void testMembers() throws CoreException, TeamException {
- IProject project = createAndPut("getname", new String[] { "file1.txt", "folder1/", "folder1/b.txt" });
- TargetProvider target = getProvider(project);
- IRemoteResource remote = target.getRemoteResource();
- IRemoteResource[] altResources = remote.members(DEFAULT_MONITOR);
- for (int i = 0; i < altResources.length; i++) {
- assertEquals(altResources[i], project.findMember(altResources[i].getName()));
- }
- }
- /**
- * @see TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- properties=TargetTestSetup.properties;
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderBic.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderBic.java
deleted file mode 100644
index 72355c9d2..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderBic.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.tests.core;
-
-import org.eclipse.core.resources.IFileModificationValidator;
-import org.eclipse.core.resources.team.IMoveDeleteHook;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.team.core.RepositoryProvider;
-
-public class RepositoryProviderBic extends RepositoryProvider {
-
- final public static String NATURE_ID = "org.eclipse.team.tests.core.bic-provider";
-
- private IMoveDeleteHook mdh;
- private IFileModificationValidator mv;
-
- /*
- * @see RepositoryProvider#configureProject()
- */
- public void configureProject() throws CoreException {
- }
-
- /*
- * @see RepositoryProvider#getID()
- */
- public String getID() {
- return NATURE_ID;
- }
- /*
- * @see IProjectNature#deconfigure()
- */
- public void deconfigure() throws CoreException {
- }
-
- /*
- * @see RepositoryProvider#getFileModificationValidator()
- */
- public IFileModificationValidator getFileModificationValidator() {
- return mv;
- }
-
- /*
- * @see RepositoryProvider#getMoveDeleteHook()
- */
- public IMoveDeleteHook getMoveDeleteHook() {
- return mdh;
- }
-
- public void setModificationValidator(IFileModificationValidator mv) {
- this.mv = mv;
- }
-
- public void setMoveDeleteHook(IMoveDeleteHook mdh) {
- this.mdh = mdh;
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderNaish.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderNaish.java
deleted file mode 100644
index fca87fb4c..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderNaish.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.tests.core;
-
-import org.eclipse.core.resources.IFileModificationValidator;
-import org.eclipse.core.resources.team.IMoveDeleteHook;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.team.core.RepositoryProvider;
-
-public class RepositoryProviderNaish extends RepositoryProvider {
-
- final public static String NATURE_ID = "org.eclipse.team.tests.core.naish-provider";
- private IMoveDeleteHook mdh;
- private IFileModificationValidator mv;
- /*
- * @see RepositoryProvider#configureProject()
- */
- public void configureProject() throws CoreException {
- }
-
- /*
- * @see RepositoryProvider#getID()
- */
- public String getID() {
- return NATURE_ID;
- }
- /*
- * @see IProjectNature#deconfigure()
- */
- public void deconfigure() throws CoreException {
- }
-
- public void setModificationValidator(IFileModificationValidator mv) {
- this.mv = mv;
- }
-
- public void setMoveDeleteHook(IMoveDeleteHook mdh) {
- this.mdh = mdh;
- }
- /*
- * @see RepositoryProvider#getFileModificationValidator()
- */
- public IFileModificationValidator getFileModificationValidator() {
- return mv;
- }
-
- /*
- * @see RepositoryProvider#getMoveDeleteHook()
- */
- public IMoveDeleteHook getMoveDeleteHook() {
- return mdh;
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderOtherSport.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderOtherSport.java
deleted file mode 100644
index ac3c119bb..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderOtherSport.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.tests.core;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.team.core.RepositoryProvider;
-
-public class RepositoryProviderOtherSport extends RepositoryProvider {
-
- final public static String NATURE_ID = "org.eclipse.team.tests.core.other";
-
- /*
- * @see RepositoryProvider#configureProject()
- */
- public void configureProject() throws CoreException {
- }
-
- /*
- * @see RepositoryProvider#getID()
- */
- public String getID() {
- return NATURE_ID;
- }
- /*
- * @see IProjectNature#deconfigure()
- */
- public void deconfigure() throws CoreException {
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderTests.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderTests.java
deleted file mode 100644
index c1f9dc7ee..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderTests.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.tests.core;
-
-import java.io.ByteArrayInputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFileModificationValidator;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.team.IMoveDeleteHook;
-import org.eclipse.core.resources.team.IResourceTree;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.core.TeamException;
-
-public class RepositoryProviderTests extends TeamTest {
- public RepositoryProviderTests() {
- super();
- }
-
- public RepositoryProviderTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(RepositoryProviderTests.class);
- return new TestSetup(suite);
- //return new testSetup(new RepositoryProviderTests("test"));
- }
-
- public void testProvidersRegistered() throws CoreException, TeamException {
- List repoProviderIds = new ArrayList(Arrays.asList(RepositoryProvider.getAllProviderTypeIds()));
- assertEquals(true, repoProviderIds.contains(RepositoryProviderBic.NATURE_ID));
- assertEquals(true, repoProviderIds.contains(RepositoryProviderNaish.NATURE_ID));
- assertEquals(false, repoProviderIds.contains(RepositoryProviderOtherSport.NATURE_ID));
- }
-
- public void testGetProviderGeneric() throws CoreException, TeamException {
- IProject project = getUniqueTestProject("testGetProviderGeneric1");
- IProject project2 = getUniqueTestProject("testGetProviderGeneric2");
-
- // test that adding a non-team nature will not return a provider
- Team.addNatureToProject(project, RepositoryProviderOtherSport.NATURE_ID, null);
- assertTrue(RepositoryProvider.getProvider(project) == null);
-
- // adding a valid team provider should be fine
- Team.addNatureToProject(project, RepositoryProviderBic.NATURE_ID, null);
- Team.addNatureToProject(project2, RepositoryProviderNaish.NATURE_ID, null);
- RepositoryProvider provider1 = RepositoryProvider.getProvider(project);
- RepositoryProvider provider2 = RepositoryProvider.getProvider(project2);
- assertTrue(provider1 != null && provider1.getID().equals(RepositoryProviderBic.NATURE_ID));
- assertTrue(provider2 != null && provider2.getID().equals(RepositoryProviderNaish.NATURE_ID));
- assertTrue(provider1.getProject().equals(project) && provider2.getProject().equals(project2));
-
- // adding another provider should be prohibited by core
- try {
- Team.addNatureToProject(project, RepositoryProviderNaish.NATURE_ID, null);
- fail("cannot add two team providers to the same project");
- } catch(TeamException e) {
- provider1 = RepositoryProvider.getProvider(project);
- assertTrue(provider1 != null && provider1.getID().equals(RepositoryProviderBic.NATURE_ID));
- }
-
- // adding another non-team provider should be ok but should not be returned as a provider
- Team.addNatureToProject(project2, RepositoryProviderOtherSport.NATURE_ID, null);
- provider2 = RepositoryProvider.getProvider(project2);
- assertTrue(provider2 != null && provider2.getID().equals(RepositoryProviderNaish.NATURE_ID));
-
- // closed or non-existant projects cannot be associated with a provider
- IProject closedProject = getUniqueTestProject("testGetProviderGenericClosed");
- IProject nonExistantProject = ResourcesPlugin.getWorkspace().getRoot().getProject("nonExistant");
- closedProject.close(null);
- assertTrue(RepositoryProvider.getProvider(closedProject) == null);
- assertTrue(RepositoryProvider.getProvider(nonExistantProject) == null);
-
- // removing the nature removes the provider association
- Team.removeNatureFromProject(project, RepositoryProviderBic.NATURE_ID, null);
- Team.removeNatureFromProject(project2, RepositoryProviderNaish.NATURE_ID, null);
- assertTrue(RepositoryProvider.getProvider(project)==null);
- assertTrue(RepositoryProvider.getProvider(project2)==null);
- }
-
- public void testGetProviderById() throws CoreException, TeamException {
- IProject project1 = getUniqueTestProject("testGetProviderById_1");
- IProject project2 = getUniqueTestProject("testGetProviderById_2");
-
- // test that adding a non-team nature will not return a provider
- Team.addNatureToProject(project1, RepositoryProviderOtherSport.NATURE_ID, null);
- assertTrue(RepositoryProvider.getProvider(project1, RepositoryProviderOtherSport.NATURE_ID) == null);
-
- // adding a valid team provider should be fine
- Team.addNatureToProject(project1, RepositoryProviderBic.NATURE_ID, null);
- Team.addNatureToProject(project2, RepositoryProviderNaish.NATURE_ID, null);
- assertTrue(RepositoryProvider.getProvider(project1, RepositoryProviderBic.NATURE_ID)!=null);
- assertTrue(RepositoryProvider.getProvider(project2, RepositoryProviderNaish.NATURE_ID)!=null);
-
- // adding another provider should be prohibited by core
- try {
- Team.addNatureToProject(project1, RepositoryProviderNaish.NATURE_ID, null);
- fail("cannot add two team providers to the same project");
- } catch(TeamException e) {
- assertTrue(RepositoryProvider.getProvider(project1, RepositoryProviderBic.NATURE_ID)!=null);
- }
-
- // closed or non-existant projects cannot be associated with a provider
- IProject closedProject = getUniqueTestProject("testGetProviderGenericClosed");
- IProject nonExistantProject = ResourcesPlugin.getWorkspace().getRoot().getProject("nonExistant");
- closedProject.close(null);
- assertTrue(RepositoryProvider.getProvider(closedProject, "id") == null);
- assertTrue(RepositoryProvider.getProvider(nonExistantProject, "id") == null);
-
- // removing the nature removes the provider association
- Team.removeNatureFromProject(project1, RepositoryProviderBic.NATURE_ID, null);
- Team.removeNatureFromProject(project2, RepositoryProviderNaish.NATURE_ID, null);
- assertTrue(RepositoryProvider.getProvider(project1, RepositoryProviderBic.NATURE_ID)==null);
- assertTrue(RepositoryProvider.getProvider(project2, RepositoryProviderNaish.NATURE_ID)==null);
- }
-
- public void testFileModificationValidator() throws CoreException, TeamException {
- IProject project = getUniqueTestProject("testFileModificationValidator");
-
- // adding a valid team provider should be fine
- Team.addNatureToProject(project, RepositoryProviderBic.NATURE_ID, null);
- RepositoryProviderBic bicProvider = (RepositoryProviderBic)RepositoryProvider.getProvider(project, RepositoryProviderBic.NATURE_ID);
- assertTrue(bicProvider!=null);
-
- // test that validator gets called by team core dispatching
- final boolean[] called = new boolean[] {false};
- bicProvider.setModificationValidator(new IFileModificationValidator() {
- // can't test validate edit here because it is only called from editors
- public IStatus validateEdit(IFile[] files, Object context) {
- return null;
- }
- public IStatus validateSave(IFile file) {
- called[0] = true;
- return getTeamTestStatus(IStatus.OK);
- }
- });
- IFile file = project.getFile("test.txt");
- file.create(new ByteArrayInputStream("test".getBytes()), true, null);
- file.setContents(new ByteArrayInputStream("test2".getBytes()), true, false, null);
- assertTrue(called[0] == true);
-
- // test that validator can veto a setContents
- called[0] = false;
- bicProvider.setModificationValidator(new IFileModificationValidator() {
- // can't test validate edit here because it is only called from editors
- public IStatus validateEdit(IFile[] files, Object context) {
- return null;
- }
- public IStatus validateSave(IFile file) {
- called[0] = true;
- return getTeamTestStatus(IStatus.ERROR);
- }
- });
- try {
- file.setContents(new ByteArrayInputStream("test3".getBytes()), true, false, null);
- fail("validate hook should veto this setContents");
- } catch(CoreException e) {
- assertTrue(called[0] == true);
- }
-
- // test that default validator allows the modification
- bicProvider.setModificationValidator(null);
- file.setContents(new ByteArrayInputStream("test4".getBytes()), true, false, null);
- }
-
- public void testMoveDeleteHook() throws CoreException, TeamException {
- final IProject project = getUniqueTestProject("testMoveDeleteHook");
-
- // adding a valid team provider should be fine
- Team.addNatureToProject(project, RepositoryProviderBic.NATURE_ID, null);
- RepositoryProviderBic bicProvider = (RepositoryProviderBic)RepositoryProvider.getProvider(project, RepositoryProviderBic.NATURE_ID);
- assertTrue(bicProvider!=null);
-
- // only testing that dispatching works, resources plugin is testing the rest of the API
- final boolean[] called = new boolean[] {false, false, false, false, false, false};
- IMoveDeleteHook hook = new IMoveDeleteHook() {
- public boolean deleteFile(IResourceTree tree, IFile file, int updateFlags, IProgressMonitor monitor) {
- called[0] = true;
- return false;
- }
- public boolean deleteFolder(IResourceTree tree, IFolder folder, int updateFlags, IProgressMonitor monitor) {
- called[1] = true;
- return false;
- }
- public boolean deleteProject(IResourceTree tree, IProject project, int updateFlags, IProgressMonitor monitor) {
- called[2] = true;
- return false;
- }
- public boolean moveFile(IResourceTree tree, IFile source, IFile destination, int updateFlags, IProgressMonitor monitor) {
- called[3] = true;
- return false;
- }
- public boolean moveFolder(IResourceTree tree, IFolder source, IFolder destination, int updateFlags, IProgressMonitor monitor) {
- called[4] = true;
- return false;
- }
- public boolean moveProject(IResourceTree tree, IProject source, IProjectDescription description, int updateFlags, IProgressMonitor monitor) {
- called[5] = true;
- return false;
- }
- };
- bicProvider.setMoveDeleteHook(hook);
-
- IResource[] resources = buildResources(project, new String[] {"deleteFile.txt", "moveFile.txt", "deletedFolder/", "moveFolder/"});
- ensureExistsInWorkspace(resources, true);
- resources[0].delete(false, null);
- resources[1].move(resources[1].getFullPath().removeLastSegments(1).append("movedFile_NEW"), false, null);
- resources[2].delete(false, null);
- resources[3].move(resources[3].getFullPath().removeLastSegments(1).append("movedFolder"), false, null);
- // moving using the description allows the moved project to have natures ids or origination
- IProjectDescription desc = project.getDescription();
- desc.setName("movedProject");
- project.move(desc, false, null);
- IProject newProject = ResourcesPlugin.getWorkspace().getRoot().getProject("movedProject");
- bicProvider = (RepositoryProviderBic)RepositoryProvider.getProvider(newProject);
- bicProvider.setMoveDeleteHook(hook);
- newProject.delete(true, null);
- for (int i = 0; i < called.length; i++) {
- assertTrue(called[i]);
- }
- }
-
- public void testMoveDeleteHookBetweenProjects() throws CoreException, TeamException {
- final IProject projectA = getUniqueTestProject("testMoveDeleteHookBetweenProjects_A");
- final IProject projectB = getUniqueTestProject("testMoveDeleteHookBetweenProjects_B");
- final IProject projectC = getUniqueTestProject("testMoveDeleteHookBetweenProjects_C");
-
- // adding a valid team provider should be fine
- Team.addNatureToProject(projectA, RepositoryProviderBic.NATURE_ID, null);
- final RepositoryProviderBic bicProvider = (RepositoryProviderBic)RepositoryProvider.getProvider(projectA, RepositoryProviderBic.NATURE_ID);
- Team.addNatureToProject(projectB, RepositoryProviderNaish.NATURE_ID, null);
- final RepositoryProviderNaish naishProvider = (RepositoryProviderNaish)RepositoryProvider.getProvider(projectB, RepositoryProviderNaish.NATURE_ID);
- assertTrue(bicProvider!=null && naishProvider!=null);
-
- // only testing that dispatching works, resources plugin is testing the rest of the API
- final boolean[] calledProjectA = new boolean[] {false, false};
- bicProvider.setMoveDeleteHook(new IMoveDeleteHook() {
- public boolean deleteFile(IResourceTree tree, IFile file, int updateFlags, IProgressMonitor monitor) {
- return false;
- }
- public boolean deleteFolder(IResourceTree tree, IFolder folder, int updateFlags, IProgressMonitor monitor) {
- return false;
- }
- public boolean deleteProject(IResourceTree tree, IProject project, int updateFlags, IProgressMonitor monitor) {
- return false;
- }
- public boolean moveFile(IResourceTree tree, IFile source, IFile destination, int updateFlags, IProgressMonitor monitor) {
- assertTrue(bicProvider.getProject().equals(source.getProject()));
- calledProjectA[0] = true;
- return false;
- }
- public boolean moveFolder(IResourceTree tree, IFolder source, IFolder destination, int updateFlags, IProgressMonitor monitor) {
- assertTrue(bicProvider.getProject().equals(source.getProject()));
- calledProjectA[1] = true;
- return false;
- }
- public boolean moveProject(IResourceTree tree, IProject source, IProjectDescription description, int updateFlags, IProgressMonitor monitor) {
- return false;
- }
- });
-
- final boolean[] calledProjectB = new boolean[] {false, false};
- naishProvider.setMoveDeleteHook(new IMoveDeleteHook() {
- public boolean deleteFile(IResourceTree tree, IFile file, int updateFlags, IProgressMonitor monitor) {
- return false;
- }
- public boolean deleteFolder(IResourceTree tree, IFolder folder, int updateFlags, IProgressMonitor monitor) {
- return false;
- }
- public boolean deleteProject(IResourceTree tree, IProject project, int updateFlags, IProgressMonitor monitor) {
- return false;
- }
- public boolean moveFile(IResourceTree tree, IFile source, IFile destination, int updateFlags, IProgressMonitor monitor) {
- assertTrue(bicProvider.getProject().equals(destination.getProject()));
- calledProjectB[0] = true;
- return false;
- }
- public boolean moveFolder(IResourceTree tree, IFolder source, IFolder destination, int updateFlags, IProgressMonitor monitor) {
- assertTrue(bicProvider.getProject().equals(destination.getProject()));
- calledProjectB[1] = true;
- return false;
- }
- public boolean moveProject(IResourceTree tree, IProject source, IProjectDescription description, int updateFlags, IProgressMonitor monitor) {
- return false;
- }
- });
-
- // test that moving files/folders between two projects with providers calls the destination
- IResource[] resources = buildResources(projectA, new String[] {"moveFile.txt", "moveFolder/"});
- ensureExistsInWorkspace(resources, true);
- resources[0].move(projectB.getFullPath().append("moveFile_new.txt"), false, null);
- resources[1].move(projectB.getFullPath().append("movedFolder"), false, null);
- for (int i = 0; i < calledProjectA.length; i++) {
- assertTrue(calledProjectA[i] && calledProjectB[i]==false);
- }
-
- // test that moving files/folders from a project with a provider to a project without a provider calls the
- // hooks for the source
- calledProjectA[0] = false; calledProjectA[1] = false;
- calledProjectB[0] = false; calledProjectB[1] = false;
- resources = buildResources(projectA, new String[] {"anotherMovedFiled.txt", "anotherMovedFolder/"});
- ensureExistsInWorkspace(resources, true);
- resources[0].move(projectC.getFullPath().append("moveFileOther_new.txt"), false, null);
- resources[1].move(projectC.getFullPath().append("movedFolderOther"), false, null);
- for (int i = 0; i < calledProjectA.length; i++) {
- assertTrue(calledProjectA[i] && calledProjectB[i]==false);
- }
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/StreamTests.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/StreamTests.java
deleted file mode 100644
index b423aebe3..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/StreamTests.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.tests.core;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import org.eclipse.team.internal.core.streams.CRLFtoLFInputStream;
-import org.eclipse.team.internal.core.streams.LFtoCRLFInputStream;
-
-public class StreamTests extends TestCase {
- private static final byte[] EMPTY_SEQ = new byte[] { };
- private static final byte[] LF_SEQ = new byte[] { '\n' };
- private static final byte[] CRLF_SEQ = new byte[] { '\r', '\n' };
-
- public StreamTests(String name) {
- super(name);
- }
-
- public static Test suite() {
- return new TestSuite(StreamTests.class);
- }
-
- public void testCRLFtoLFInputStream() throws IOException {
- testCRLFtoLFTranslation("", "");
- testCRLFtoLFTranslation("a", "a");
- testCRLFtoLFTranslation("abc", "abc");
- testCRLFtoLFTranslation("\n", "\n");
- testCRLFtoLFTranslation("\r", "\r");
- testCRLFtoLFTranslation("\r\n", "\n");
- testCRLFtoLFTranslation("x\r\r\n\rx", "x\r\n\rx");
- testCRLFtoLFTranslation("The \r\n quick brown \n fox \r\n\n\r\r\n jumped \n\n over \r\n the \n lazy dog.\r\n",
- "The \n quick brown \n fox \n\n\r\n jumped \n\n over \n the \n lazy dog.\n");
- }
-
- private void testCRLFtoLFTranslation(String pre, String post) throws IOException {
- ByteArrayInputStream bin = new ByteArrayInputStream(pre.getBytes());
- InputStream in = new CRLFtoLFInputStream(bin);
- InputStream inExpected = new ByteArrayInputStream(post.getBytes());
- assertStreamEquals(inExpected, in);
- }
-
- public void testLFtoCRLFInputStream() throws IOException {
- testLFtoCRLFTranslation("", "");
- testLFtoCRLFTranslation("a", "a");
- testLFtoCRLFTranslation("abc", "abc");
- testLFtoCRLFTranslation("\n", "\r\n");
- testLFtoCRLFTranslation("\r", "\r");
- testLFtoCRLFTranslation("\r\n", "\r\r\n");
- testLFtoCRLFTranslation("x\r\r\n\rx", "x\r\r\r\n\rx");
- testLFtoCRLFTranslation("The \r\n quick brown \n fox \r\n\n\r\r\n jumped \n\n over \r\n the \n lazy dog.\r\n",
- "The \r\r\n quick brown \r\n fox \r\r\n\r\n\r\r\r\n jumped \r\n\r\n over \r\r\n the \r\n lazy dog.\r\r\n");
- }
-
- private void testLFtoCRLFTranslation(String pre, String post) throws IOException {
- ByteArrayInputStream bin = new ByteArrayInputStream(pre.getBytes());
- InputStream in = new LFtoCRLFInputStream(bin);
- InputStream inExpected = new ByteArrayInputStream(post.getBytes());
- assertStreamEquals(inExpected, in);
- }
-
- private void assertStreamEquals(InputStream in1, InputStream in2) throws IOException {
- try {
- for (;;) {
- int byte1 = in1.read();
- int byte2 = in2.read();
- assertEquals("Streams not equal", byte1, byte2);
- if (byte1 == -1) break;
- }
- } finally {
- in1.close();
- in2.close();
- }
- }
-}
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/SyncElementTest.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/SyncElementTest.java
deleted file mode 100644
index ea3779427..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/SyncElementTest.java
+++ /dev/null
@@ -1,707 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.tests.core;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-
-import junit.framework.AssertionFailedError;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.ILocalSyncElement;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.core.sync.RemoteSyncElement;
-import org.eclipse.team.core.target.TargetManager;
-import org.eclipse.team.core.target.TargetProvider;
-import org.eclipse.team.internal.core.target.UrlUtil;
-
-public class SyncElementTest extends TeamTest {
- /*
- * Constructor for SyncElementTest.
- */
- public SyncElementTest() {
- super();
- }
-
- /*
- * Constructor for SyncElementTest.
- * @param name
- */
- public SyncElementTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(SyncElementTest.class);
- return new TargetTestSetup(suite);
- //return new CVSTestSetup(new SyncElementTest("testAdditionConflicts"));
- }
- /*
- * Get the child in the sync tree
- */
- protected ILocalSyncElement getChild(ILocalSyncElement tree, IPath path) throws TeamException {
- if (path.segmentCount() == 0)
- return tree;
- ILocalSyncElement[] children = tree.members(DEFAULT_MONITOR);
- for (int i = 0; i < children.length; i++) {
- if (children[i].getName().equals(path.segment(0)))
- return getChild(children[i], path.removeFirstSegments(1));
- }
- assertTrue("Child " + path.toString() + " does not exist", false);
- return null;
- }
-
- /*
- * Assert that the specified resources in the tree have the specified sync kind
- * Ignore conflict types if they are not specified in the assert statement
- */
- public void assertSyncEquals(String message, ILocalSyncElement tree, String[] resources, int[] syncKinds, int granularity)
- throws TeamException {
- assertTrue(resources.length == syncKinds.length);
- for (int i = 0; i < resources.length; i++) {
- int conflictTypeMask = 0x0F; // ignore manual and auto merge sync types for now.
- ILocalSyncElement child = getChild(tree, new Path(resources[i]));
- int kind = child.getSyncKind(granularity, DEFAULT_MONITOR) & conflictTypeMask;
- int kindOther = syncKinds[i] & conflictTypeMask;
- assertTrue(
- message
- + ": improper sync state for "
- + resources[i]
- + " expected "
- + RemoteSyncElement.kindToString(kindOther)
- + " but was "
- + RemoteSyncElement.kindToString(kind),
- kind == kindOther);
- }
- }
-
- public void assertSyncEquals(String message, ILocalSyncElement tree, String[] resources, int[] syncKinds) throws TeamException {
- assertSyncEquals(message, tree, resources, syncKinds, ILocalSyncElement.GRANULARITY_TIMESTAMP);
- }
-
- /*
- * Assert that the named resources have no local resource or sync info
- */
- public void assertDeleted(String message, IRemoteSyncElement tree, String[] resources) throws CoreException, TeamException {
- for (int i = 0; i < resources.length; i++) {
- try {
- getChild(tree, new Path(resources[i]));
- } catch (AssertionFailedError e) {
- break;
- }
- assertTrue(message + ": resource " + resources[i] + " still exists in some form", false);
- }
- }
-
- IRemoteSyncElement getRemoteSyncTree(IProject project, IProgressMonitor monitor) throws TeamException {
- return getProvider(project).getRemoteSyncElement(project);
- }
- protected IProject checkoutCopy(IProject project, String postfix) throws CoreException,TeamException {
- TargetProvider provider = getProvider(project);
- IProject result = getUniqueTestProject(project.getName()+postfix);
- TargetManager.map(result, provider.getSite(), UrlUtil.getTrailingPath(provider.getURL(), provider.getSite().getURL()));
- TargetProvider target = TargetManager.getProvider(result);
- target.get(new IResource[] { result }, null);
- return result;
- }
- protected void getResourcesFromTarget(IProject project, String[] resourceNames)throws TeamException,CoreException {
- TargetProvider provider=getProvider(project);
- IResource[] resources=getResources(project,resourceNames);
- provider.get(resources,null);
- }
- protected void putResourcesOntoTarget(IProject project, String[] resourceNames)throws TeamException,CoreException {
- TargetProvider provider=getProvider(project);
- IResource[] resources=getResources(project,resourceNames);
- provider.put(resources,null);
- }
- /**
- * Add the resources to an existing container and optionally upload them to the remote server
- */
- public IResource[] addResources(IProject container, String[] hierarchy, boolean checkin) throws CoreException, TeamException {
- IResource[] newResources = buildResources(container, hierarchy, false);
- if (checkin) getProvider(container).put(newResources, DEFAULT_MONITOR);
- return newResources;
- }
- /**
- * Delete the resources from an existing container and optionally add the changes to the remote server
- */
- public IResource[] deleteResources(IProject container, String[] hierarchy, boolean checkin) throws CoreException, TeamException {
- IResource[] resources = getResources(container, hierarchy);
- for (int i = 0; i < resources.length; i++) {
- resources[0].delete(true, null);
- }
- if (checkin) getProvider(container).put(resources, DEFAULT_MONITOR);
- return resources;
- }
- /*
- * Perform a simple test that checks for the different types of incoming changes
- */
- public void testIncomingChanges() throws TeamException, CoreException, IOException {
- // Create a test project
- IProject project = createAndPut("testIncomingChanges", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt" });
-
- // Checkout and modify a copy
- IProject copy = checkoutCopy(project, "-copy");
- IFile file = copy.getFile("folder1/a.txt");
- sleep(1500); // Wait so that timestamp of modified file differs from original
- file.setContents(new ByteArrayInputStream("This will be different".getBytes()), false, false, null);
- addResources(copy, new String[] { "folder2/folder3/add.txt" }, false);
- deleteResources(copy, new String[] { "folder1/b.txt" }, false);
- sleep(1500); // Wait so that timestamp of modified file differs from original
- putResourcesOntoTarget(copy,new String[] { "folder1/a.txt","folder2/folder3/add.txt","folder1/b.txt" });
-
- // Get the sync tree for the project
- IRemoteSyncElement tree = getRemoteSyncTree(project, DEFAULT_MONITOR);
- assertSyncEquals(
- "testIncomingChanges",
- tree,
- new String[] {
- "file1.txt",
- "folder1/",
- "folder1/a.txt",
- "folder1/b.txt",
- "folder2/",
- "folder2/folder3/",
- "folder2/folder3/add.txt" },
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.INCOMING | IRemoteSyncElement.CHANGE,
- IRemoteSyncElement.INCOMING | IRemoteSyncElement.DELETION,
- IRemoteSyncElement.INCOMING | IRemoteSyncElement.ADDITION,
- IRemoteSyncElement.INCOMING | IRemoteSyncElement.ADDITION,
- IRemoteSyncElement.INCOMING | IRemoteSyncElement.ADDITION });
-
- // Verify that we are in sync (except for "folder1/b.txt", which was deleted)
- getResourcesFromTarget(project,
- new String[] {
- "file1.txt",
- "folder1/",
- "folder1/a.txt",
- "folder1/b.txt",
- "folder2/",
- "folder2/folder3/",
- "folder2/folder3/add.txt" });
- tree = getRemoteSyncTree(project, DEFAULT_MONITOR);
- assertSyncEquals(
- "testIncomingChanges",
- tree,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder2/", "folder2/folder3/", "folder2/folder3/add.txt" },
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC });
-
- // Ensure "folder1/b.txt" was deleted
- assertDeleted("testIncomingChanges", tree, new String[] { "folder1/b.txt" });
-
- // Verify that the copy equals the original
- assertEquals(project, copy);
- }
-
- /*
- * Perform a simple test that checks for the different types of outgoing changes
- */
- public void testOutgoingChanges() throws TeamException, CoreException {
- // Create a test project (which commits it as well)
- IProject project = createAndPut("testIncomingChanges", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt" });
-
- // Make some modifications
- IFile file = project.getFile("folder1/a.txt");
- sleep(1500); // Wait so that timestamp of modified file differs from original
- file.setContents(getRandomContents(), false, false, null);
- addResources(project, new String[] { "folder2/folder3/add.txt" }, false);
- deleteResources(project, new String[] { "folder1/b.txt" }, false);
-
- // Get the sync tree for the project
- IRemoteSyncElement tree = getRemoteSyncTree(project, DEFAULT_MONITOR);
- assertSyncEquals(
- "testOutgoingChanges",
- tree,
- new String[] {
- "file1.txt",
- "folder1/",
- "folder1/a.txt",
- "folder1/b.txt",
- "folder2/",
- "folder2/folder3/",
- "folder2/folder3/add.txt" },
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.CHANGE,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.DELETION,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.ADDITION,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.ADDITION,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.ADDITION });
-
- // Commit the changes
- putResourcesOntoTarget(project, new String[] { "folder1/a.txt", "folder1/b.txt", "folder2/folder3/add.txt" });
-
- // Ensure we're in sync
- tree = getRemoteSyncTree(project, DEFAULT_MONITOR);
- assertSyncEquals(
- "testOutgoingChanges",
- tree,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder2/", "folder2/folder3/", "folder2/folder3/add.txt" },
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC });
-
- // Ensure deleted resource "folder1/b.txt" no longer exists
- assertDeleted("testOutgoingChanges", tree, new String[] { "folder1/b.txt" });
- }
-
- /*
- * Test simple file conflicts
- */
- public void testFileConflict() throws TeamException, CoreException, IOException {
- // Create a test project (which commits it as well)
- IProject project = createAndPut("testFileConflict", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt" });
-
- // Checkout a copy and make some modifications
- IProject copy = checkoutCopy(project, "-copy");
- IFile file = copy.getFile("file1.txt");
- sleep(1500); // Wait so that timestamp of modified file differs from original
- appendText(file, "prefix\n", true);
- file = copy.getFile("folder1/a.txt");
- file.setContents(new ByteArrayInputStream("Use a custom string to avoid intermitant errors!".getBytes()), false, false, null);
- getProvider(copy).put(new IResource[] { copy }, DEFAULT_MONITOR);
-
- // Make the same modifications to the original (We need to test both M and C!!!)
- file = project.getFile("file1.txt");
- sleep(1500); // Wait so that timestamp of modified file differs from original
- appendText(file, "\npostfix", false); // This will test merges (M)
- file = project.getFile("folder1/a.txt");
- sleep(1500); // Wait so that timestamp of modified file differs from original
- file.setContents(getRandomContents(), false, false, null); // This will test conflicts (C)
-
- // Get the sync tree for the project
- IRemoteSyncElement tree = getRemoteSyncTree(project, DEFAULT_MONITOR);
- assertSyncEquals(
- "testFileConflict",
- tree,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt" },
- new int[] {
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE });
-
- // Catch up to the file1.txt conflict using UPDATE with ignoreLocalChanges
- getResourcesFromTarget(project, new String[] { "file1.txt" });
- tree = getRemoteSyncTree(project, DEFAULT_MONITOR);
- assertSyncEquals(
- "testFileConflict",
- tree,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt" },
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE });
-
- // Release the folder1/a.txt conflict uploading
- getProvider(project).put(new IResource[] { project.getFile("folder1/a.txt")}, DEFAULT_MONITOR);
- tree = getRemoteSyncTree(project, DEFAULT_MONITOR);
- assertSyncEquals(
- "testFileConflict",
- tree,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt" },
- new int[] { IRemoteSyncElement.IN_SYNC, IRemoteSyncElement.IN_SYNC, IRemoteSyncElement.IN_SYNC });
- }
-
- /*
- * Test conflicts involving additions
- */
- public void testAdditionConflicts() throws TeamException, CoreException {
- // CASE 1: The user adds (using CVS add) a remotely added file
- // (a) catchup is simply get?
- // (b) release must do a merge
- // CASE 2: The user adds (but not using cvs add) a remotely added file
- // (a) catchup is simply get?
- // (b) release must do a merge
- // CASE 3: The user adds a remotely added then deleted file
- // catchup is not applicable
- // release is normal
-
- // Create a test project (which commits it as well) and add an uncommited resource
- IProject project = createAndPut("testAdditionConflicts", new String[] { "file.txt" });
- addResources(project, new String[] { "add1a.txt", "add1b.txt" }, false);
- addResources(project, new String[] { "add3.txt" }, false);
- buildResources(project, new String[] { "add2a.txt", "add2b.txt" }, false); //useless code!???
-
- // Checkout a copy, add the same resource and commit
- IProject copy = checkoutCopy(project, "-copy");
- addResources(copy, new String[] { "add1a.txt", "add1b.txt", "add2a.txt", "add2b.txt", "add3.txt" }, true);
- deleteResources(copy, new String[] { "add3.txt" }, true);
-
- // Get the sync tree for the project
- IRemoteSyncElement tree = getRemoteSyncTree(project, DEFAULT_MONITOR);
- assertSyncEquals(
- "testAdditionConflicts",
- tree,
- new String[] { "file.txt", "add1a.txt", "add1b.txt", "add2a.txt", "add2b.txt", "add3.txt" },
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.ADDITION });
-
- getProvider(project).put(
- new IResource[] { project.getFile("add1b.txt"), project.getFile("add2b.txt"), project.getFile("add3.txt")},
- DEFAULT_MONITOR);
- tree = getRemoteSyncTree(project, DEFAULT_MONITOR);
- assertSyncEquals(
- "testAdditionConflicts",
- tree,
- new String[] { "file.txt", "add1b.txt", "add2b.txt", "add3.txt" },
- new int[] { IRemoteSyncElement.IN_SYNC, IRemoteSyncElement.IN_SYNC, IRemoteSyncElement.IN_SYNC, IRemoteSyncElement.IN_SYNC });
-
- IFile file = project.getFile("add1a.txt");
- file.delete(false, DEFAULT_MONITOR);
- file = project.getFile("add2a.txt");
- file.delete(false, DEFAULT_MONITOR);
- getResourcesFromTarget(project, new String[] { "add1a.txt","add2a.txt" });//This replaces the chunk commented out below:
- /*getProvider(project).update(
- new IResource[] { project.getFile("add1a.txt"), project.getFile("add2a.txt")},
- new Command.LocalOption[] { Command.DO_NOT_RECURSE },
- null,
- true, //createBackups
- DEFAULT_MONITOR
- );*/
- tree = getRemoteSyncTree(project, DEFAULT_MONITOR);
- assertSyncEquals(
- "testAdditionConflicts",
- tree,
- new String[] { "add1a.txt", "add2a.txt" },
- new int[] { IRemoteSyncElement.IN_SYNC, IRemoteSyncElement.IN_SYNC });
- }
-
- /*
- * Test conflicts involving deletions
- */
- public void testDeletionConflicts() throws TeamException, CoreException {
-
- // CASE 1: The user deletes a remotely modified file
- // (a) catchup must do an update
- // (b) release must do a merge
- // CASE 2: The user deletes (and removes) a remotely modified file
- // (a) catchup must do an unmanage and update
- // (b) release must do a merge
- // CASE 3: The user modified a remotely deleted file
- // (a) catchup must do an unmanage and local delete
- // (b) release must do a merge
- // CASE 4: The user deletes a remotely deleted file
- // (a) catchup can update (or unmanage?)
- // (b) release must unmanage
- // CASE 5: The user deletes (and removes) a remotely deleted file
- // (a) catchup can update (or unmanage?)
- // (b) release must unmanage
-
- // Perform the test case for case A first
-
- // Create a test project (which commits it as well) and delete the resource without committing
- IProject project =
- createAndPut(
- "testDeletionConflictsA",
- new String[] { "delete1.txt", "delete2.txt", "delete3.txt", "delete4.txt", "delete5.txt" });
- IFile file = project.getFile("delete1.txt");
- file.delete(false, DEFAULT_MONITOR);
- deleteResources(project, new String[] { "delete2.txt" }, false);
- file = project.getFile("delete3.txt");
- sleep(1500); // Wait so that timestamp of modified file differs from original
- file.setContents(new ByteArrayInputStream("unique text for delete3.txt".getBytes()), false, false, null);
- file = project.getFile("delete4.txt");
- file.delete(false, DEFAULT_MONITOR);
- deleteResources(project, new String[] { "delete5.txt" }, false);
-
- // Checkout a copy and commit the deletion
- IProject copy = checkoutCopy(project, "-copy");
- file = copy.getFile("delete1.txt");
- sleep(1500); // Wait so that timestamp of modified file differs from original
- file.setContents(new ByteArrayInputStream("unique text for delete1.txt".getBytes()), false, false, null);
- file = copy.getFile("delete2.txt");
- sleep(1500); // Wait so that timestamp of modified file differs from original
- file.setContents(new ByteArrayInputStream("unique text for delete2.txt".getBytes()), false, false, null);
- deleteResources(copy, new String[] { "delete3.txt", "delete4.txt", "delete5.txt" }, false);
- getProvider(copy).put(new IResource[] { copy }, DEFAULT_MONITOR);
-
- // Get the sync tree for the project
- IRemoteSyncElement tree = getRemoteSyncTree(project, DEFAULT_MONITOR);
- assertSyncEquals(
- "testDeletionConflictsA",
- tree,
- new String[] { "delete1.txt", "delete2.txt", "delete3.txt", "delete4.txt", "delete5.txt" },
- new int[] {
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE | IRemoteSyncElement.PSEUDO_CONFLICT,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE | IRemoteSyncElement.PSEUDO_CONFLICT });
-
- // Catch up to remote changes.
-
- project.getFile("delete3.txt").delete(false, DEFAULT_MONITOR);
-
- tree = getRemoteSyncTree(project, DEFAULT_MONITOR);
- assertSyncEquals(
- "testDeletionConflictsA",
- tree,
- new String[] { "delete1.txt", "delete2.txt" },
- new int[] {
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE | IRemoteSyncElement.PSEUDO_CONFLICT,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE | IRemoteSyncElement.PSEUDO_CONFLICT });
- assertDeleted("testDeletionConflictsA", tree, new String[] { "delete3.txt", "delete4.txt", "delete5.txt" });
-
- // Now redo the test case for case B
-
- // Create a test project (which commits it as well) and delete the resource without committing
- project =
- createAndPut(
- "testDeletionConflictsB",
- new String[] { "delete1.txt", "delete2.txt", "delete3.txt", "delete4.txt", "delete5.txt" });
- file = project.getFile("delete1.txt");
- file.delete(false, DEFAULT_MONITOR);
- deleteResources(project, new String[] { "delete2.txt" }, false);
- file = project.getFile("delete3.txt");
- sleep(1500); // Wait so that timestamp of modified file differs from original
- file.setContents(getRandomContents(), false, false, null);
- file = project.getFile("delete4.txt");
- file.delete(false, DEFAULT_MONITOR);
- deleteResources(project, new String[] { "delete5.txt" }, false);
-
- // Checkout a copy and commit the deletion
- copy = checkoutCopy(project, "-copy");
- file = copy.getFile("delete1.txt");
- sleep(1500); // Wait so that timestamp of modified file differs from original
- file.setContents(getRandomContents(), false, false, null);
- file = copy.getFile("delete2.txt");
- sleep(1500); // Wait so that timestamp of modified file differs from original
- file.setContents(getRandomContents(), false, false, null);
- deleteResources(copy, new String[] { "delete3.txt", "delete4.txt", "delete5.txt" }, false);
- getProvider(copy).put(new IResource[] { copy }, DEFAULT_MONITOR);
-
- // Get the sync tree for the project
- tree = getRemoteSyncTree(project, DEFAULT_MONITOR);
- assertSyncEquals(
- "testDeletionConflictsB",
- tree,
- new String[] { "delete1.txt", "delete2.txt", "delete3.txt", "delete4.txt", "delete5.txt" },
- new int[] {
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC });
-
- // Release the resources
-
- putResourcesOntoTarget(project, new String[] { "delete1.txt", "delete2.txt", "delete3.txt", "delete4.txt", "delete5.txt" });
- tree = getRemoteSyncTree(project, DEFAULT_MONITOR);
- assertSyncEquals("testDeletionConflictsB", tree, new String[] { "delete3.txt" }, new int[] { IRemoteSyncElement.IN_SYNC });
- assertDeleted("testDeletionConflictsB", tree, new String[] { "delete1.txt", "delete2.txt", "delete4.txt", "delete5.txt" });
- }
-
- /*
- * Test that a deleted file can still be deleted through the team provider
- */
- public void testOutgoingDeletion() throws TeamException, CoreException {
-
- // Create a test project (which commits it as well)
- IProject project = createAndPut("testOutgoingDeletion", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt" });
-
- // Delete a file
- IFile file = project.getFile("folder1/b.txt");
- file.delete(true, DEFAULT_MONITOR); // WARNING: As of 2002/03/05, this is equivalent to a cvs remove
-
- // Get the sync tree for the project
- IRemoteSyncElement tree = getRemoteSyncTree(project, DEFAULT_MONITOR);
- assertSyncEquals(
- "testOutgoingDeletion",
- tree,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt" },
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.DELETION });
-
- // Commit the deletion
- getProvider(file.getProject()).put(new IResource[] { file }, DEFAULT_MONITOR);
-
- // Get the sync tree again for the project and ensure others aren't effected
- tree = getRemoteSyncTree(project, DEFAULT_MONITOR);
- assertSyncEquals(
- "testOutgoingDeletion",
- tree,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt" },
- new int[] { IRemoteSyncElement.IN_SYNC, IRemoteSyncElement.IN_SYNC, IRemoteSyncElement.IN_SYNC });
-
- // Assert that deletion no longer appears in remote tree
- assertDeleted("testOutgoingDeletion", tree, new String[] { "folder1/b.txt" });
- }
-
- /*
- * Test catching up to an incoming addition
- */
- public void testIncomingAddition() throws TeamException, CoreException {
- // Create a test project
- IProject project = createAndPut("testIncomingAddition", new String[] { "file1.txt", "folder1/", "folder1/a.txt" });
-
- // Checkout and modify a copy
- IProject copy = checkoutCopy(project, "-copy");
- addResources(copy, new String[] { "folder1/add.txt" }, true);
-
- // Get the sync tree for the project
- IRemoteSyncElement tree = getRemoteSyncTree(project, DEFAULT_MONITOR);
- assertSyncEquals(
- "testIncomingAddition",
- tree,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/add.txt" },
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.INCOMING | IRemoteSyncElement.ADDITION });
-
- // Get the resource from the tree
- ILocalSyncElement element = getChild(tree, new Path("folder1/add.txt"));
-
- // Catch up to the addition by updating
- getResourcesFromTarget(project, new String[] { "folder1/add.txt" });
-
- // Get the sync tree again for the project and ensure the added resource is in sync
- tree = getRemoteSyncTree(project, DEFAULT_MONITOR);
- assertSyncEquals(
- "testIncomingAddition",
- tree,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/add.txt" },
- new int[] { IRemoteSyncElement.IN_SYNC, IRemoteSyncElement.IN_SYNC, IRemoteSyncElement.IN_SYNC, IRemoteSyncElement.IN_SYNC });
- }
-
- /*
- * Test changes using a granularity of contents
- */
- public void testGranularityContents() throws TeamException, CoreException, IOException {
- // Create a test project (which commits it as well)
- IProject project =
- createAndPut("testGranularityContents", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt" });
-
- // Checkout a copy and make some modifications
- IProject copy = checkoutCopy(project, "-copy");
- IFile file = copy.getFile("file1.txt");
- sleep(1500); // Wait so that timestamp of modified file differs from original
- appendText(file, "a", true);
- file = copy.getFile("folder1/a.txt");
- file.setContents(getRandomContents(), false, false, null);
- putResourcesOntoTarget(copy, new String[] { "file1.txt","folder1/a.txt" });
-
- // Make the same modifications to the original
- file = project.getFile("file1.txt");
- sleep(1500); // Wait so that timestamp of modified file differs from original
- appendText(file, "a", false);
- file = project.getFile("folder1/a.txt");
- file.setContents(new ByteArrayInputStream("unique text".getBytes()), false, false, null);
-
- // Get the sync tree for the project
- IRemoteSyncElement tree = getRemoteSyncTree(project, DEFAULT_MONITOR);
- assertSyncEquals(
- "testGranularityContents",
- tree,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt" },
- new int[] {
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE | IRemoteSyncElement.PSEUDO_CONFLICT,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE },
- IRemoteSyncElement.GRANULARITY_CONTENTS);
- }
-
- public void testRenameProject() throws TeamException, CoreException, IOException {
- String[] resourceNames = new String[] { "changed.txt", "folder1/", "folder1/a.txt" };
- int[] inSync = new int[] { IRemoteSyncElement.IN_SYNC, IRemoteSyncElement.IN_SYNC, IRemoteSyncElement.IN_SYNC };
- IProject project = createAndPut("testRenameProject", new String[] { "changed.txt", "folder1/", "folder1/a.txt" });
-
- IRemoteSyncElement tree = getRemoteSyncTree(project, DEFAULT_MONITOR);
- assertSyncEquals("sync should be in sync", tree, resourceNames, inSync);
- IProjectDescription desc = project.getDescription();
- String newName = project.getName() + "_renamed";
- desc.setName(newName);
- project.move(desc, false, null);
- project = ResourcesPlugin.getWorkspace().getRoot().getProject(newName);
- assertTrue(project.exists());
- tree = getRemoteSyncTree(project, DEFAULT_MONITOR);
- assertSyncEquals("sync should be in sync", tree, resourceNames, inSync);
- }
-
- public void testFolderDeletion() throws TeamException, CoreException {
-
- IProject project =
- createAndPut(
- "testFolderDeletion",
- new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/folder2/file.txt" });
-
- // Delete a folder and ensure that the file is managed but doesn't exist
- project.getFolder("folder1").delete(false, false, null);
-
- // The folders and files should show up as outgoing deletions
- IRemoteSyncElement tree = getRemoteSyncTree(project, DEFAULT_MONITOR);
- assertSyncEquals(
- "testFolderDeletion sync check",
- tree,
- new String[] { "folder1", "folder1/a.txt", "folder1/folder2", "folder1/folder2/file.txt" },
- new int[] {
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.DELETION,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.DELETION,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.DELETION,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.DELETION });
-
- // commit folder1/a.txt
- putResourcesOntoTarget(project, new String[] { "folder1/a.txt" });
-
- // Resync and verify that above file is gone and others remain the same
- tree = getRemoteSyncTree(project, DEFAULT_MONITOR);
- assertSyncEquals(
- "testFolderDeletion sync check",
- tree,
- new String[] { "folder1", "folder1/folder2", "folder1/folder2/file.txt" },
- new int[] {
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.DELETION,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.DELETION,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.DELETION });
- assertDeleted("testFolderDeletion", tree, new String[] { "folder1/a.txt" });
-
- // Commit folder1/folder2/file.txt
- putResourcesOntoTarget(project, new String[] { "folder1/", "folder1/folder2/", "folder1/folder2/file.txt" });
-
- // Resync and verify that all are deleted
- tree = getRemoteSyncTree(project, DEFAULT_MONITOR);
- assertDeleted("testFolderDeletion", tree, new String[] { "folder1", "folder1/folder2", "folder1/folder2/file.txt" });
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TargetProviderTests.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TargetProviderTests.java
deleted file mode 100644
index 951f63e92..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TargetProviderTests.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.tests.core;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.target.TargetManager;
-import org.eclipse.team.core.target.TargetProvider;
-import org.eclipse.team.internal.core.target.UrlUtil;
-
-/**
- * A set of test cases for org.eclipse.team.core.target.TargetProvider
- */
-public class TargetProviderTests extends TeamTest {
-
-
- public TargetProviderTests() {
- super();
- }
- public TargetProviderTests(String name) {
- super(name);
- }
- public static Test suite() {
- TestSuite suite = new TestSuite(TargetProviderTests.class);
- return new TargetTestSetup(suite);
- //return new TargetTestSetup(new TargetProviderTests("testPutAndGet"));
- }
- /**
- * Tests the link between the target & the site for consistency.
- * @throws CoreException
- * @throws TeamException
- */
- public void testProjectMapping() throws CoreException, TeamException {
- IProject project = getUniqueTestProject("projectmapping");
- TargetProvider target = createProvider(project);
- assertTrue(getSite().equals(target.getSite()));
- TargetManager.unmap(project);
- assertNull(TargetManager.getProvider(project));
- }
- /**
- * Tests the getURL() method on TargetProvider.
- * @throws CoreException
- * @throws TeamException
- */
- public void testUrlRetrieval() throws CoreException, TeamException, MalformedURLException {
- IProject project = getNamedTestProject("urlretrieval");
- TargetManager.map(project, getSite(), new Path(properties.getProperty("test_dir")));
- TargetProvider target = TargetManager.getProvider(project);
- String goodurl = UrlUtil.concat(properties.getProperty("location"), new Path(properties.getProperty("test_dir"))).toString();
- assertEquals(goodurl, target.getURL().toString());
- }
- /**
- * Verifies that the get() and put() methods on the TargetProvider works as expected.
- * @throws CoreException
- * @throws TeamException
- */
- public void testPutAndGet() throws CoreException, TeamException {
- // test put
- IProject project = getUniqueTestProject("get");
- IResource[] resources = buildResources(project, new String[] { "file1.txt", "folder1/", "folder1/b.txt" }, false);
- TargetProvider target = createProvider(project);
- target.put(resources, DEFAULT_MONITOR);
- assertLocalEqualsRemote(project);
- // test get on a new project
- project.delete(true, true, DEFAULT_MONITOR);
- project.create(DEFAULT_MONITOR);
- project.open(DEFAULT_MONITOR);
- target = createProvider(project);
- target.get(new IResource[] { project }, DEFAULT_MONITOR);
- assertLocalEqualsRemote(project);
- }
- /**
- * Verifies that canGet() and canPut() returns accurate values.
- * @throws CoreException
- * @throws TeamException
- */
- public void testCanGetAndCanPut() throws CoreException, TeamException {
- IProject project = getUniqueTestProject("canget");
- IResource[] resources = buildResources(project, new String[] { "file1.txt", "folder1/", "folder1/b.txt" }, false);
- TargetProvider target = createProvider(project);
- for (int i = 0; i < resources.length; i++) {
- assertTrue(target.canPut(resources[i]));
- }
- target.put(resources, DEFAULT_MONITOR);
- project.delete(true, true, DEFAULT_MONITOR);
- project.create(DEFAULT_MONITOR);
- project.open(DEFAULT_MONITOR);
- target = createProvider(project);
- for (int i = 0; i < resources.length; i++) {
- assertTrue(target.canGet(resources[i]));
- }
- target.get(new IResource[] { project }, null);
- }
- /**
- * Tests bahavior of isOutOfDate() for correctness
- * @throws CoreException
- * @throws TeamException
- */
- public void testIsOutOfDate() throws CoreException, TeamException {
- IProject project = getUniqueTestProject("outdated");
- IResource[] resources = buildResources(project, new String[] { "file1.txt", "folder1/", "folder1/b.txt" }, false);
- TargetProvider target = createProvider(project);
- target.put(resources, null);
- sleep(1501);
- IProject dupeProject = getUniqueTestProject("outdated");
- IResource[] freshResources = buildResources(dupeProject, new String[] { "file1.txt", "folder1/", "folder1/b.txt" }, false);
- TargetManager.map(dupeProject, getSite(), new Path(properties.getProperty("test_dir")).append(project.getName()));
- TargetProvider dupeTarget = TargetManager.getProvider(dupeProject);
- dupeTarget.put(freshResources, null);
- for (int i = 0; i < resources.length; i++) {
- if (resources[i].getType() == IResource.FILE)
- assertTrue(target.isOutOfDate(resources[i], DEFAULT_PROGRESS_MONITOR));
- }
- }
- /**
- * Tests bahavior of isDirty() for correctness
- * @throws CoreException
- * @throws TeamException
- */
- public void testIsDirty() throws CoreException, TeamException {
- IProject project = getUniqueTestProject("dirty");
- IResource[] resources = buildResources(project, new String[] { "file1.txt", "folder1/", "folder1/b.txt" }, false);
- TargetProvider target = createProvider(project);
- target.put(resources, null);
- sleep(1501);
- resources = buildResources(project, new String[] { "file1.txt", "folder1/", "folder1/b.txt" }, false);
- for (int i = 0; i < resources.length; i++) {
- if (resources[i].getType()==IResource.FILE) assertTrue(resources[i].getName(),target.isDirty(resources[i]));
- }
- }
- public void testOverwrite() throws CoreException, TeamException {
- IProject project = getUniqueTestProject("overwrite");
- IResource[] resources = buildResources(project, new String[] { "file1.txt", "folder1/", "folder1/b.txt" }, false);
- TargetProvider target = createProvider(project);
- target.put(resources, null);
- //Create resources with the same names but different content & upload them in the same spot:
- resources = buildResources(project, new String[] { "file1.txt", "folder1/", "folder1/b.txt" }, false);
- target.put(resources, null);
-
- IProject dupeProject = getUniqueTestProject("overwrite");
- TargetManager.map(dupeProject, getSite(), new Path(properties.getProperty("test_dir")).append(project.getName()));
- IResource[] freshResources = buildEmptyResources(project, new String[] { "file1.txt", "folder1/", "folder1/b.txt" }, false);
- TargetProvider dupeTarget = TargetManager.getProvider(dupeProject);
- dupeTarget.get(new IResource[] { dupeProject }, null);
- for (int i = 0; i < resources.length; i++) {
- assertEquals(resources[i],freshResources[i]);
- }
- }
- public void testIsDirtyWhenDeleted() throws CoreException, TeamException {
- IProject project = getUniqueTestProject("dirty");
- IResource[] resources = buildResources(project, new String[] { "file1.txt", "folder1/", "folder1/b.txt" }, false);
- TargetProvider target = createProvider(project);
- target.put(resources, null);
- for (int i = 0; i < resources.length; i++) {
- resources[i].delete(true, null);
- }
- sleep(1501);
- resources = buildResources(project, new String[] { "file1.txt", "folder1/", "folder1/b.txt" }, false);
- for (int i = 0; i < resources.length; i++) {
- if (resources[i].getType()==IResource.FILE) assertTrue(resources[i].getName(),target.isDirty(resources[i]));
- }
- }
- public void testIsOutOfDateWhenDeleted() throws CoreException, TeamException {
- IProject project = getUniqueTestProject("outdated");
- IResource[] resources = buildResources(project, new String[] { "file1.txt", "folder1/", "folder1/b.txt" }, false);
- TargetProvider target = createProvider(project);
- target.put(resources, null);
- for (int i = 0; i < resources.length; i++) {
- resources[i].delete(true, null);
- }
- sleep(1501);
- IProject dupeProject = getUniqueTestProject("outdated");
- IResource[] freshResources = buildResources(dupeProject, new String[] { "file1.txt", "folder1/", "folder1/b.txt" }, false);
- TargetManager.map(dupeProject, getSite(), new Path(properties.getProperty("test_dir")).append(project.getName()));
- TargetProvider dupeTarget = TargetManager.getProvider(dupeProject);
- dupeTarget.put(freshResources, null);
- for (int i = 0; i < resources.length; i++) {
- if (resources[i].getType() == IResource.FILE)
- assertTrue(target.isOutOfDate(resources[i], DEFAULT_PROGRESS_MONITOR));
- }
- }
- public void testPutWithPhantoms() throws CoreException, TeamException {
- IProject project = getUniqueTestProject("put");
- IResource[] resources = buildEmptyResources(project, new String[] { "file1.txt", "folder1/", "folder1/b.txt" }, false);
- TargetProvider target = createProvider(project);
- target.put(resources, null);
- for (int i = 0; i < resources.length; i++) {
- resources[i].delete(true, null);
- }
- try {
- target.put(resources, null);
- for (int i = 0; i < resources.length; i++) {
- assertTrue(!target.getRemoteResourceFor(resources[i]).exists(null));
- }
- } catch (TeamException e) {} catch (RuntimeException e) {
- fail("Putting files that don't exist locally should delete them remotely");
- }
- }
- public void testGetWithPhantoms() throws CoreException, TeamException {
- IProject project = getUniqueTestProject("get");
- String[] testFileNames=new String[] { "file1.txt", "folder1/", "folder1/b.txt" };
- IResource[] resources = buildResources(project, testFileNames, false);
- TargetProvider target = createProvider(project);
- try {
- target.get(new IResource[] { project }, null);
- IResource[] phantoms=getResources(project,testFileNames);
- for (int i = 0; i < phantoms.length; i++) {
- assertTrue(!project.getFile(testFileNames[i]).exists());
- }
- } catch (TeamException e) {
- fail("Getting files that don't exist remotely should delete them locally");
- }
- }
- /**
- * @see TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- properties=TargetTestSetup.properties;
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TargetTestSetup.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TargetTestSetup.java
deleted file mode 100644
index ef7083526..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TargetTestSetup.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.tests.core;
-
-import java.io.*;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.*;
-
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteResource;
-import org.eclipse.team.core.target.*;
-
-/**
- * A set of test cases for org.eclipse.team.core.sync.IRemoteResource
- */
-public class TargetTestSetup extends TestSetup {
-
- public static Properties properties;
- static {
- loadProperties();
- }
-
- public static void loadProperties() {
- properties = new Properties();
- String propertiesFile = System.getProperty("eclipse.target.properties");
- if (propertiesFile == null)
- return;
- File file = new File(propertiesFile);
- if (file.isDirectory())
- file = new File(file, "target.properties");
- try {
- BufferedReader reader = new BufferedReader(new FileReader(file));
- try {
- for (String line;(line = reader.readLine()) != null;) {
- int sep = line.indexOf("=");
- String property = line.substring(0, sep).trim();
- String value = line.substring(sep + 1).trim();
- properties.setProperty(property, value);
- }
- } finally {
- reader.close();
- }
- } catch (Exception e) {
- System.err.println("Could not read repository properties file: " + file.getAbsolutePath());
- }
- }
-
- public TargetTestSetup(Test test) {
- super(test);
- }
- /**
- * Retrieves the Site object that the TargetProvider is contained in.
- * @return Site
- */
- Site getSite() {
- try {
- URL url = new URL(properties.getProperty("location"));
- return TargetManager.getSite(properties.getProperty("target"), url);
- } catch (MalformedURLException e) {
- return null;
- }
- }
- /**
- * @see TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- Site location;
- ISiteFactory factory = TargetManager.getSiteFactory(properties.getProperty("target"));
- assertNotNull(factory);
- Site[] locations = TargetManager.getSites();
-
- if (locations.length == 0) {
- Site l = factory.newSite(properties);
- TargetManager.addSite(l);
- }
- location = getSite();
- TargetProvider target = location.newProvider(new Path(properties.getProperty("test_dir")));
- assertNotNull(target);
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TeamTest.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TeamTest.java
deleted file mode 100644
index f7478e93f..000000000
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TeamTest.java
+++ /dev/null
@@ -1,302 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.tests.core;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Properties;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.tests.harness.EclipseWorkspaceTest;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteResource;
-import org.eclipse.team.core.target.IRemoteTargetResource;
-import org.eclipse.team.core.target.Site;
-import org.eclipse.team.core.target.TargetManager;
-import org.eclipse.team.core.target.TargetProvider;
-
-public class TeamTest extends EclipseWorkspaceTest {
- protected static IProgressMonitor DEFAULT_MONITOR = new NullProgressMonitor();
- protected static final IProgressMonitor DEFAULT_PROGRESS_MONITOR = new NullProgressMonitor();
-
- Properties properties;
-
- public TeamTest() {
- super();
- }
- public TeamTest(String name) {
- super(name);
- }
- /**
- * @see TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- properties = TargetTestSetup.properties;
- }
- protected IProject getNamedTestProject(String name) throws CoreException {
- IProject target = getWorkspace().getRoot().getProject(name);
- if (!target.exists()) {
- target.create(null);
- target.open(null);
- }
- assertExistsInFileSystem(target);
- return target;
- }
-
- protected IProject getUniqueTestProject(String prefix) throws CoreException {
- // manage and share with the default stream create by this class
- return getNamedTestProject(prefix + "-" + Long.toString(System.currentTimeMillis()));
- }
-
- protected IStatus getTeamTestStatus(int severity) {
- return new Status(severity, "org.eclipse.team.tests.core", 0, "team status", null);
- }
- /**
- * Retrieves the Site object that the TargetProvider is contained in.
- * @return Site
- */
- Site getSite() {
- try {
- URL url = new URL(properties.getProperty("location"));
- return TargetManager.getSite(properties.getProperty("target"), url);
- } catch (MalformedURLException e) {
- return null;
- }
- }
- /**
- * Creates filesystem 'resources' with the given names and fills them with random text.
- * @param container An object that can hold the newly created resources.
- * @param hierarchy A list of files & folder names to use as resources
- * @param includeContainer A flag that controls whether the container is included in the list of resources.
- * @return IResource[] An array of resources filled with variable amounts of random text
- * @throws CoreException
- */
- public IResource[] buildResources(IContainer container, String[] hierarchy, boolean includeContainer) throws CoreException {
- List resources = new ArrayList(hierarchy.length + 1);
- if (includeContainer)
- resources.add(container);
- resources.addAll(Arrays.asList(buildResources(container, hierarchy)));
- IResource[] result = (IResource[]) resources.toArray(new IResource[resources.size()]);
- ensureExistsInWorkspace(result, true);
- for (int i = 0; i < result.length; i++) {
- if (result[i].getType() == IResource.FILE) // 3786 bytes is the average size of Eclipse Java files!
- ((IFile) result[i]).setContents(getRandomContents(100), true, false, null);
- }
- return result;
- }
- public IResource[] buildEmptyResources(IContainer container, String[] hierarchy, boolean includeContainer) throws CoreException {
- List resources = new ArrayList(hierarchy.length + 1);
- resources.addAll(Arrays.asList(buildResources(container, hierarchy)));
- if (includeContainer)
- resources.add(container);
- IResource[] result = (IResource[]) resources.toArray(new IResource[resources.size()]);
- ensureExistsInWorkspace(result, true);
- return result;
- }
- /**
- * Creates an InputStream filled with random text in excess of a specified minimum.
- * @param sizeAtLeast The minimum number of chars to fill the input stream with.
- * @return InputStream The input stream containing random text.
- */
- protected static InputStream getRandomContents(int sizeAtLeast) {
- StringBuffer randomStuff = new StringBuffer(sizeAtLeast + 100);
- while (randomStuff.length() < sizeAtLeast) {
- randomStuff.append(getRandomSnippet());
- }
- return new ByteArrayInputStream(randomStuff.toString().getBytes());
- }
- /**
- * Produces a random chunk of text from a finite collection of pre-written phrases.
- * @return String Some random words.
- */
- public static String getRandomSnippet() {
- switch ((int) Math.round(Math.random() * 10)) {
- case 0 :
- return "este e' o meu conteudo (portuguese)";
- case 1 :
- return "Dann brauchen wir aber auch einen deutschen Satz!";
- case 2 :
- return "I'll be back";
- case 3 :
- return "don't worry, be happy";
- case 4 :
- return "there is no imagination for more sentences";
- case 5 :
- return "customize yours";
- case 6 :
- return "foo";
- case 7 :
- return "bar";
- case 8 :
- return "foobar";
- case 9 :
- return "case 9";
- default :
- return "these are my contents";
- }
- }
- public TargetProvider createProvider(IProject project) throws TeamException {
- // Ensure the remote folder exists
- IRemoteTargetResource remote = getSite().getRemoteResource().getFolder(
- new Path(properties.getProperty("test_dir")).append(project.getName()).toString());
- if (! remote.exists(null)) {
- remote.mkdirs(null);
- }
- TargetManager.map(project, getSite(), new Path(properties.getProperty("test_dir")).append(project.getName()));
- TargetProvider target = getProvider(project);
- return target;
- }
-
- public TargetProvider getProvider(IProject project) throws TeamException {
- return TargetManager.getProvider(project);
- }
-
- public void sleep(int ms) {
- try {
- Thread.currentThread().sleep(ms);
- } catch (InterruptedException e) {
- System.err.println("Testing was rudely interrupted.");
- }
- }
- void assertLocalEqualsRemote(IProject project) throws CoreException, TeamException {
- IProject newProject = getNamedTestProject("equals");
- TargetProvider target = TargetManager.getProvider(project);
- IResource[] localResources = project.members();
- for (int i = 0; i < localResources.length; i++) {
- assertEquals(target.getRemoteResourceFor(localResources[i]), localResources[i]);
- }
- }
- // Assert that the two containers have equal contents
- protected void assertEquals(IRemoteResource container1, IResource container2) throws CoreException, TeamException {
- if (container2.getType() == IResource.FILE) {
- // Ignore .project file
- if (container2.getName().equals(".project"))
- return;
- assertTrue(compareContent(container1.getContents(DEFAULT_MONITOR), ((IFile) container2).getContents()));
- } else {
- IRemoteResource[] remoteResources = container1.members(DEFAULT_MONITOR);
- IResource[] localResources = ((IFolder) container2).members();
- for (int i = 0; i < localResources.length; i++) {
- assertEquals(remoteResources[i], localResources[i]);
- }
- }
- }
- protected IProject createAndPut(String projectPrefix, String[] resourceNames) throws CoreException, TeamException {
- IProject project = getUniqueTestProject(projectPrefix);
- IResource[] resources = buildResources(project, resourceNames, false);
- TargetProvider target = createProvider(project);
- target.put(resources, DEFAULT_MONITOR);
- return project;
- }
-
- public void appendText(IResource resource, String text, boolean prepend) throws CoreException, IOException {
- IFile file = (IFile) resource;
- InputStream in = file.getContents();
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- try {
- if (prepend) {
- bos.write(text.getBytes());
- }
- int i;
- while ((i = in.read()) != -1) {
- bos.write(i);
- }
- if (!prepend) {
- bos.write(text.getBytes());
- }
- } finally {
- in.close();
- }
- file.setContents(new ByteArrayInputStream(bos.toByteArray()), false, false, DEFAULT_MONITOR);
- }
- /*
- * Get the resources for the given resource names
- */
- public IResource[] getResources(IContainer container, String[] hierarchy) throws CoreException {
- IResource[] resources = new IResource[hierarchy.length];
- for (int i=0;i<resources.length;i++) {
- resources[i] = container.findMember(hierarchy[i]);
- if (resources[i] == null) {
- resources[i] = buildResources(container, new String[] {hierarchy[i]})[0];
- }
- }
- return resources;
- }
-
- // Assert that the two containers have equal contents
- protected void assertEquals(IContainer container1, IContainer container2) throws CoreException {
- assertEquals(container1.getName(), container2.getName());
- List members1 = new ArrayList();
- members1.addAll(Arrays.asList(container1.members()));
-
- List members2 = new ArrayList();
- members2.addAll(Arrays.asList(container2.members()));
-
- assertTrue(members1.size() == members2.size());
- for (int i=0;i<members1.size();i++) {
- IResource member1 = (IResource)members1.get(i);
- IResource member2 = container2.findMember(member1.getName());
- assertNotNull(member2);
- assertEquals(member1, member2);
- }
- }
-
- // Assert that the two files have equal contents
- protected void assertEquals(IFile file1, IFile file2) throws CoreException {
- assertEquals(file1.getName(), file2.getName());
- assertTrue(compareContent(file1.getContents(), file2.getContents()));
- }
-
- // Assert that the two projects have equal contents ignoreing the project name
- // and the .vcm_meta file
- protected void assertEquals(IProject container1, IProject container2) throws CoreException {
- List members1 = new ArrayList();
- members1.addAll(Arrays.asList(container1.members()));
- members1.remove(container1.findMember(".project"));
-
- List members2 = new ArrayList();
- members2.addAll(Arrays.asList(container2.members()));
- members2.remove(container2.findMember(".project"));
-
- assertTrue("Number of children differs for " + container1.getFullPath(), members1.size() == members2.size());
- for (int i=0;i<members1.size();i++) {
- IResource member1 = (IResource)members1.get(i);
- IResource member2 = container2.findMember(member1.getName());
- assertNotNull(member2);
- assertEquals(member1, member2);
- }
- }
- protected void assertEquals(IResource resource1, IResource resource2) throws CoreException {
- assertEquals(resource1.getType(), resource2.getType());
- if (resource1.getType() == IResource.FILE)
- assertEquals((IFile)resource1, (IFile)resource2);
- else
- assertEquals((IContainer)resource1, (IContainer)resource2);
- }
-}
diff --git a/tests/org.eclipse.team.tests.core/test.xml b/tests/org.eclipse.team.tests.core/test.xml
deleted file mode 100644
index 571b67f29..000000000
--- a/tests/org.eclipse.team.tests.core/test.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="Team Automated Tests" default="run" basedir=".">
-
- <!-- The property ${eclipse-home} should be passed into this script -->
-
- <!-- sets the properties eclipse-home, and library-file -->
- <property name="eclipse-home" value="${basedir}/../../"/>
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/>
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp/>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
- <property name="location" value="${eclipse-home}/team_test_workspace"/>
- <delete dir="${location}" quiet="true"/>
-
- <!-- Session Test ** Team Core ** -->
- <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${location}"/>
- <property name="plugin-name" value="org.eclipse.team.tests.core"/>
- <property name="classname" value="org.eclipse.team.tests.core.AllTeamTests"/>
- </ant>
-
- </target>
-
- <!-- This target holds code to cleanup the testing environment after the tests -->
- <!-- have been run. You can use this to delete temporary files that are created. -->
- <target name="cleanup">
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen after all -->
- <!-- the tests have been run should go here. -->
- <target name="run" depends="init,suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml"/>
- <property name="output-file" value="org.eclipse.team.tests.core.xml"/>
- </ant>
- </target>
-
-</project>
diff --git a/tests/org.eclipse.team.tests.core/webdav.properties b/tests/org.eclipse.team.tests.core/webdav.properties
deleted file mode 100644
index d3b3d31ee..000000000
--- a/tests/org.eclipse.team.tests.core/webdav.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-target=org.eclipse.team.webdav
-test_dir=target
-location=http://web.dav.server/path
-httpClient.username=username
-httpClient.password=password
-httpClient.proxyURL=proxyURLIfThereIsOne
-httpClient.connectionTimeout=6000 \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/.classpath b/tests/org.eclipse.team.tests.cvs.core/.classpath
deleted file mode 100644
index dfa75e672..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/.classpath
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/"/>
- <classpathentry kind="src" path="/org.apache.xerces"/>
- <classpathentry kind="src" path="/org.eclipse.core.tests.harness"/>
- <classpathentry kind="src" path="/org.eclipse.core.resources"/>
- <classpathentry kind="src" path="/org.eclipse.team.core"/>
- <classpathentry kind="src" path="/org.eclipse.team.cvs.core"/>
- <classpathentry kind="src" path="/org.eclipse.team.ui"/>
- <classpathentry kind="src" path="/org.eclipse.team.cvs.ui"/>
- <classpathentry kind="src" path="/org.eclipse.compare"/>
- <classpathentry kind="src" path="/org.eclipse.ui"/>
- <classpathentry kind="src" path="/org.junit"/>
- <classpathentry kind="src" path="/org.eclipse.team.tests.core"/>
- <classpathentry kind="src" path="/org.eclipse.core.runtime"/>
- <classpathentry kind="src" path="/org.eclipse.core.boot"/>
- <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
- <classpathentry kind="src" path="/org.eclipse.swt"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/org.eclipse.team.tests.cvs.core/.cvsignore b/tests/org.eclipse.team.tests.cvs.core/.cvsignore
deleted file mode 100644
index c5e82d745..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/.project b/tests/org.eclipse.team.tests.cvs.core/.project
deleted file mode 100644
index 73288dbba..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/.project
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.team.tests.cvs.core</name>
- <comment></comment>
- <projects>
- <project>org.apache.xerces</project>
- <project>org.eclipse.compare</project>
- <project>org.eclipse.core.boot</project>
- <project>org.eclipse.core.resources</project>
- <project>org.eclipse.core.runtime</project>
- <project>org.eclipse.core.tests.harness</project>
- <project>org.eclipse.swt</project>
- <project>org.eclipse.team.core</project>
- <project>org.eclipse.team.cvs.core</project>
- <project>org.eclipse.team.cvs.ui</project>
- <project>org.eclipse.team.tests.core</project>
- <project>org.eclipse.team.ui</project>
- <project>org.eclipse.ui</project>
- <project>org.junit</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.team.cvs.core.cvsnature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.team.tests.cvs.core/about.html b/tests/org.eclipse.team.tests.cvs.core/about.html
deleted file mode 100644
index 441774f92..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/about.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<html>
-<head>
-<title>About</title>
-<style type="text/css">
-p, table, td, th { font-family: arial, helvetica, geneva; font-size: 10pt}
-pre { font-family: "Courier New", Courier, mono; font-size: 10pt}
-h2 { font-family: arial, helvetica, geneva; font-size: 18pt; font-weight: bold ; line-height: 14px}
-code { font-family: "Courier New", Courier, mono; font-size: 10pt}
-sup { font-family: arial,helvetica,geneva; font-size: 10px}
-h3 { font-family: arial, helvetica, geneva; font-size: 14pt; font-weight: bold}
-li { font-family: arial, helvetica, geneva; font-size: 10pt}
-h1 { font-family: arial, helvetica, geneva; font-size: 28px; font-weight: bold}
-body { font-family: arial, helvetica, geneva; font-size: 10pt; clip: rect( ); margin-top: 5mm; margin-left: 3mm}
-</style>
-</head>
-<body lang="EN-US" link="blue" vlink="purple">
-<table border="0" cellspacing="5" cellpadding="2" width="100%" >
- <tr>
- <td align="LEFT" valign="TOP" colspan="2" bgcolor="#0080C0"><b><font color="#FFFFFF">About This Content</font></b></td>
- </tr>
- <tr>
- <td>
-<p>11th December, 2001</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in &quot;Content&quot;. Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-<a href="http://www.eclipse.org/legal/cpl-v05.html">Common Public License Version 0.5</a> &quot;CPL&quot;. For purposes of the CPL, &quot;Program&quot; will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL &quot;Other License&quot;, any modifications, enhancements and/or
-other code and/or documentation &quot;Modifications&quot; uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-</td></tr></table>
-</body>
-</html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/benchmark/readme.txt b/tests/org.eclipse.team.tests.cvs.core/benchmark/readme.txt
deleted file mode 100644
index 6f64e0e00..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/benchmark/readme.txt
+++ /dev/null
@@ -1,180 +0,0 @@
-README Benchmark Tests
-======================
-
-This plugin provides automated benchmark tests and related support
-programs to locate regressions or improvements between different versions
-of the CVS Team Provider.
-
-For now, all of the tests are targeted towards typical UI workflows.
-This need not be the case. Should it be necessary, benchmark tests can
-easily be written for lower level core components as well.
-
-
-
-Deploying the Tests
-===================
-
-1. If you have a pre-built plugin available, then you do not need to rebuild
- the org.eclipse.team.* plugins. Otherwise you must build these as usual,
- but you do not need to create a JAR file. Having all of the compiled
- classes in the 'bin' directory of each plugin is sufficient.
-
-2. Checkout the matching version of the org.eclipse.team.tests.cvs.core source
- for your org.eclipse.team.* plugins. Ensure all dependencies have been
- satisfied. Compile as usual.
-
-3. Checkout and compile org.eclipse.core.tests.harness.
-
-4. On the target machine, install a matching version of Eclipse in a dedicated
- test directory. Also install a suitable JRE for the platform into that
- directory (should always choose the same one).
-
- If you are using Windows, then copy the "teamui_benchmark.bat" script to the
- directory. For other platforms, you will need to cook up your own script.
- You will probably want to change the definition of the "ROOT" variable and
- other options before running the tests.
-
- Copy the template "repository.properties" file to the test directory. Fill it in.
-
- Replace the existing org.eclipse.team.* plugins in the eclipse/plugins
- directory with the new ones. Also install org.eclipse.core.tests.harness
- there. In the typical case, this just means copying or exporting the projects
- directly from the workspace where you compiled them to the new location.
-
- The test directory structure should look like this:
- + mytestdirectory/
- - teamui_benchmark.bat
- - repository.properties
- + jre/
- ... a suitable java runtime ...
- + eclipse/
- - install/
- - readme/
- - splash/
- - buildmanifest.properties
- - startup.jar
- + plugins/
- - org.eclipse.core.tests.harness/
- - org.eclipse.team.core/
- - org.eclipse.team.ui/
- - org.eclipse.team.cvs.core/
- - org.eclipse.team.cvs.ui/
- - org.eclipse.team.tests.core/
- - org.eclipse.team.tests.cvs.core/
- - org.junit/
- ... and all of the other required Eclipse plugins ...
-
-5. From a command shell, run the script. Grab a coffee.
-
-
-
-Running or Debugging the Tests from within Eclipse
-==================================================
-
-1. Checkout and compile the necessary projects (see above).
-
-2. Using the PDE launcher, run the "org.eclipse.team.tests.cvs.core.harness"
- application with the following arguments:
-
- VM Arguments:
- -Declipse.cvs.properties=<location of your repository.properties file>
-
- Program arguments:
- -test <suite> : id of suite to run (must be plugged into extension point)
- [see plugin.xml file for the list of available tests]
- -log <file> : specify a file for logging
- -nolog : do not write a log file
- -repeat <n> : number of iterations to run
- -ignorefirst : ignore (do not record) results from first iteration
- -purge : purge all projects from the workspace before each iteration
- <anything else> : passed verbatim to the org.eclipse.ui.workbench application
-
-
-
-Inspecting the Output
-=====================
-
-1. Checkout and compile the org.eclipse.team.tests.cvs.core project.
-
-2. Note that the log formatting tools require org.apache.xerces to be on the
- classpath when they are run. They do not require any other Eclipse
- components, however.
-
-3. Run any of the following Java programs:
-
- org.eclipse.team.tests.ccvs.ui.logformatter.PrintSummaryMain
- ------------------------------------------------------------
-
- Synopsis:
- Prints a summary of the output of all runs contained in a particular
- XML log file. It is not possible to average runs in multiple log files
- at once without merging the files together on disk. [Strip the closing
- tag of the first file, and the opening tag of the second file, then
- append the second file to the first]
-
- Program arguments:
- <log> : the path of the log file to print
- -out <file> : specify an output file, otherwise sends to stdout
- -csv : writes the data in comma separated values format
- -raw : prints a raw dump without collating or averaging results
-
-
- org.eclipse.team.tests.ccvs.ui.logformatter.PrintDiffMain
- ---------------------------------------------------------
-
- Synopsis:
- Prints the difference between the average of all runs contained
- in one XML log file (the newer one) and the average of all runs
- contained in another XML log file (the older one). This makes it
- possible to locate regressions or improvements between versions.
-
- Program arguments:
- <newer log> : the path of the "newer" log file
- <older log> : the path of the "older" log file
- -out <file> : specify an output file, otherwise sends to stdout
- -csv : writes the data in comma separated values format
- -t <thresh> : specify the minimum non-negligible absolute % change
- -i : ignore negligible changes in results [filter them out]
-
-
- org.eclipse.team.tests.ccvs.ui.logformatter.LogFormatterUIMain
- ---------------------------------------------------------
-
- Synopsis:
- Provides a GUI frontend to the log formatting tools. To run this,
- you must ensure that the SWT DLL is on the java library path.
-
-
-
-What is Being Logged
-====================
-
-At the present date the following information is logged for each test run:
- - current time
- - current SDK build number
- - for JUnit test cases:
- - test name
- - fully qualified class name
- - for groups of benchmark tasks:
- - name
- - for benchmark tasks:
- - name
- - elapsed time
- - for exceptions and errors:
- - type of error (warning, error, failure)
- - error message
- - stack trace, if applicable
- - printout of IStatus contents, if applicable
-
-
-
-NOTES
-=====
-
-Exceptions and errors are not reported through the log formatting tools yet
-since it is difficult to determine automatically which benchmark tasks are
-affected (directly or indirectly) by the error. For this reason, you should
-MANUALLY INSPECT the generated XML log files and search for elements with
-the name "abort". Since running the test cases is time consuming, it
-may be better to trim out any affected cases from the log rather than to run
-the whole suite over once again.
diff --git a/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_02_26.integration.all.xml b/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_02_26.integration.all.xml
deleted file mode 100644
index f5e8da229..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_02_26.integration.all.xml
+++ /dev/null
@@ -1,6027 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<log timestamp="01/Mar/2002 15:35:24" sdkbuild="20020226">
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="16221"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="61422"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5367"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18236"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10725"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="18825"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9834"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18957"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6039"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="23454"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="8001"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="25236"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5297"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5718"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4597"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1833"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5077"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1973"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5147"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1963"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4877"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2854"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4712"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2253"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4766"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4947"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="581"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4687"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4987"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4877"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1142"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4577"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4286"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1662"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1722"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1012"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7174"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="360"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1903"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="260"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3194"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1112"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1972"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2013"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1232"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1242"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="400"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="832"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="901"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1121"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4697"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3605"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="35922"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="7361"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5437"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3005"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5639"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2323"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="12849"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6369"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5348"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4266"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5167"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2404"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6339"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6088"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5438"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3742"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2603"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4797"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4527"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5698"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="19189"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="16654"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="267841"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="54836"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="31911"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9243"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="27680"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="8152"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="42611"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2123"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26728"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1683"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="27019"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="11853"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="26783"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="9934"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="28531"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="41088"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="26799"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="24823"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="13650"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="31375"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="28209"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="32381"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="16013"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="61878"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5441"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18217"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10933"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="18867"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9604"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="19047"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6008"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="23544"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7771"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="25477"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5298"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5638"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4686"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1823"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5178"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2003"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5208"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1973"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4987"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2754"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4697"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2253"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4667"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4717"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="611"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4486"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4857"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="752"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5067"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1141"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4577"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4276"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1873"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="952"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7450"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="260"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3284"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1092"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1695"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1983"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1241"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="801"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="922"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1122"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4626"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3666"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="36091"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="7542"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5468"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3105"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5688"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1943"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11466"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6239"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5387"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4166"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5378"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2544"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6259"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6209"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5428"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3765"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2504"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4787"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4556"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5718"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="18807"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="16895"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="275863"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="54629"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="30604"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9092"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26327"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="8112"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="47008"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2042"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26899"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1662"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="27009"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="11814"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="26508"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="10104"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="28064"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="41940"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="26625"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="24546"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="13439"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="31708"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="28331"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="32177"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="16213"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="61383"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5518"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18107"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10926"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="18717"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9363"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="19025"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6139"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="23455"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7761"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="25056"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5624"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5708"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4487"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1832"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5297"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1953"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4967"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1953"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4607"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2854"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4596"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2264"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4576"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5028"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="550"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4577"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="781"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5027"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="671"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4968"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1141"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4535"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4186"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1222"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1883"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1259"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="942"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7491"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="410"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1803"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="260"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3104"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1862"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2013"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1232"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="841"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="921"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1112"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4686"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3636"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="36032"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="7451"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5358"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2954"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5588"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2073"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="12108"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6279"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5277"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4156"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5278"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2454"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6520"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5988"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5438"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4056"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2433"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4807"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4496"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5688"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="18727"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="16604"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="277001"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="54932"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="29342"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9364"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26524"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="8082"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="42573"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2063"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26832"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1682"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="27062"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="12538"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="27009"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="9874"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="28388"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="41239"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="26940"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="25086"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="13510"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="31443"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="28330"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="32858"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="16401"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="61600"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5167"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18236"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10795"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="18707"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9183"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="19098"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5979"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="23534"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7751"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="25493"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5327"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5688"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4617"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1803"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5295"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2063"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5638"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1963"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4797"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2834"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4727"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2263"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4817"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4637"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="601"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4446"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5128"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4877"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1041"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4476"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="651"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4256"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1171"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1102"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2013"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1021"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="992"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7651"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1913"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="260"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3084"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1862"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1943"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1282"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="430"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="861"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1112"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4646"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3725"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="35763"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="7691"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5307"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3125"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5568"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1903"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="16341"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6078"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5317"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4357"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="6078"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2414"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6609"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6069"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5388"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3765"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2391"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4797"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4816"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5788"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="19347"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="16614"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="276274"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="55511"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="29107"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9113"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26418"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="8141"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="41845"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2042"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="27336"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1662"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="27079"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="11817"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="27215"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="10054"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="28199"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="41084"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="27169"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="24648"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="13970"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="31746"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="28422"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="32233"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="15824"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="61333"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5458"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18226"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11396"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="19010"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9383"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="19010"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6489"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="23353"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7835"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="25056"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5228"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5688"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4637"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1822"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5177"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2083"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5147"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2013"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4637"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2754"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4768"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2263"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4648"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4847"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="611"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4557"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5017"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="711"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4872"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4586"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4226"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1863"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1251"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="972"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7751"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1942"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="271"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3055"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1191"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2033"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1261"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1423"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="410"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="821"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="941"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1092"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4577"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3615"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="35531"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="7640"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5338"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3044"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5559"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2133"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="12819"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="620"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6079"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5308"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4156"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5468"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2363"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6389"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5919"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5297"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3845"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2483"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4797"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4727"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5778"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="18735"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="16794"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="274659"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="54602"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="29688"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9153"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26368"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="8092"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="46032"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2043"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="27008"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1662"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="26788"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="11907"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="26514"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="9844"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="28020"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="41551"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="26618"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="24454"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="13544"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="31125"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="28398"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="32581"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="15971"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="61589"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5498"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18216"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11157"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="18787"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9724"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18967"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5998"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="23279"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7771"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="25136"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5568"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5678"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4637"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1833"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5097"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2183"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5175"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1963"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4897"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2844"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4607"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2233"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4887"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4586"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="581"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4587"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4767"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4877"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1041"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4577"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="631"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4216"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1843"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1091"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="922"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7801"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2023"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="271"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2975"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1291"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1782"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2276"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1371"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1242"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="831"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="902"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1092"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4577"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3687"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="36031"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="7405"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5428"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3055"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5728"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2113"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="12378"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6399"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5248"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4166"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5377"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2304"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6500"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6108"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5508"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3816"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2684"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4787"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5087"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5679"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="18897"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="16554"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="273155"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="54258"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="29472"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9153"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26378"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="8176"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="43873"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2063"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="27182"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1672"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="27129"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="11897"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="26973"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="10132"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="28561"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="40892"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="26855"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="24675"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="14221"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="31199"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="28291"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="32907"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="16294"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="61574"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5168"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18130"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11196"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="18746"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9444"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18997"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6138"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="23564"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7811"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="25417"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5217"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5719"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4647"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1813"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5207"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1993"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4927"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1963"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5398"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2854"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4607"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2243"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4697"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4777"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="591"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4586"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4867"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="661"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5158"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4467"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4346"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1072"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1892"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="991"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="410"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1793"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="270"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3314"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1192"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1632"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2023"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1242"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="831"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="901"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1081"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4686"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3735"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="35777"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="7260"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5467"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2975"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5898"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1913"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="13900"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6489"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5438"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4176"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5358"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2554"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6239"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6009"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5408"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3826"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2663"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4807"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4536"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5698"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="19188"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="16584"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="271816"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="54534"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="29112"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9273"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26477"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="8150"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="43313"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2083"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26698"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1663"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="26799"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="12106"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="26528"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="9794"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="28387"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="41280"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="26888"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="24869"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="13449"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="30916"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="28311"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="32407"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="16163"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="61373"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5278"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18203"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11326"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="18657"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10405"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="19054"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6089"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="23474"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7691"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="25396"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5207"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5628"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4597"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1833"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5027"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2093"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5127"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1963"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5098"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2864"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4696"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2234"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4707"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4746"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="591"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4517"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="751"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4967"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4947"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1132"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4576"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4246"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1332"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="720"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1892"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="922"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="991"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7942"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1923"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="270"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3188"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2023"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1082"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1241"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="921"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="901"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1112"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4547"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3645"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="36104"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="7330"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5498"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3064"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5588"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1973"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="12648"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6077"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5378"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4176"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5357"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2334"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6720"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5969"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5387"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3776"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2423"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4797"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4877"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5759"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="18817"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="16980"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="275423"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="54065"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="30004"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9331"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26668"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="8112"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="42638"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2083"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="28111"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1662"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="27177"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="11715"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="26428"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="10024"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="28133"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="41498"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="26658"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="24546"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="13654"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="31576"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="28466"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="32437"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="16299"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="61604"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5258"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18271"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10935"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="18912"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9063"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="19117"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6169"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="23393"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7626"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="25427"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5318"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5688"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4727"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1842"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5358"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1963"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4867"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1963"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4797"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2844"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4791"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2273"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4628"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4667"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="591"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4486"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4687"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5678"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1142"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4476"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4426"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1563"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1201"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1863"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1051"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="982"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9363"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="280"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1331"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3065"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1092"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1813"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2333"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1262"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="831"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1071"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4666"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3766"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="35972"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="7410"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5398"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3044"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5799"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1963"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="12448"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6340"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5348"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4176"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5478"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2313"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6469"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6019"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5397"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4523"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3155"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5698"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5048"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6019"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="18735"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="16634"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="274940"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="54349"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="30464"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10043"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26187"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="8392"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="42380"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2073"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="27248"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1713"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="27420"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="11927"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="26706"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="9874"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="28531"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="42284"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="26869"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="24629"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="13470"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="31755"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="28401"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="32336"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="16134"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="61968"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5297"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18257"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11113"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="18747"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9593"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="19108"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6109"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="23866"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7744"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="25316"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5548"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5719"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4746"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1760"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5188"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2093"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5137"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1993"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5147"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2864"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4607"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2253"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4647"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4666"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="611"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4907"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4887"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4867"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1142"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4577"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4266"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1072"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="712"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1092"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2193"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1191"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1022"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11373"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1932"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="261"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2974"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1132"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1582"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2023"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1232"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="460"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="832"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1181"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1122"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4587"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3685"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="35682"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="7311"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5328"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2864"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5999"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2012"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="14141"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6629"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5307"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3972"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5197"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2364"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6570"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6139"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5588"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3775"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2704"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4837"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4547"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5826"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="19205"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="16634"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="275210"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="54323"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="29562"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9133"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26498"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="8071"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="43133"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2083"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26927"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1663"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="27510"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="12246"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="26628"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="9864"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="28117"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="41109"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="27043"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="24926"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="13489"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="31511"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="28396"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="32487"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="16284"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="61600"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5278"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18296"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11186"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="18777"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10405"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18954"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5969"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="23364"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7691"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="25752"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5267"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5678"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4867"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1823"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5226"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2083"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4847"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2283"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4777"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2844"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4606"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2264"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4607"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4767"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="580"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4507"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="751"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5006"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4887"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4476"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4306"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1872"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7751"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1813"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="290"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3485"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1583"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1912"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1242"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="400"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="821"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1122"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4617"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3655"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="36547"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="7441"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5608"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3045"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5507"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2173"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="16604"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="610"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6209"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5257"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4096"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5638"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2334"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6560"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5948"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5388"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3755"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2424"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4787"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4857"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5748"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="19478"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="16581"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="276868"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="54378"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="29308"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9253"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26478"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="8122"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="46595"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2123"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="27310"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1672"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="27331"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="11867"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="26718"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="9769"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="28530"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="41232"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="26918"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="24715"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="13770"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="31395"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="28608"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="32304"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="16373"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="62119"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5458"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="18517"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10755"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="18616"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9664"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="19043"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5989"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="23598"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="8121"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="25257"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5438"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5588"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4546"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1803"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5198"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1972"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5449"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1973"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4797"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2854"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4707"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2263"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4687"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4737"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="561"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4576"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4890"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5277"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1042"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4577"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="630"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4296"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="771"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1082"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1852"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10284"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1923"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="260"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2974"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1101"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1673"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2014"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1252"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="831"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="921"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1422"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4827"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3606"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="35641"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="7275"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5738"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3005"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5648"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2003"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="12237"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6429"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5187"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4166"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5388"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2313"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="6654"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="6118"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5809"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3875"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2414"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4817"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4586"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="5779"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="19148"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="16574"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="271635"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="54669"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="29392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9124"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26598"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="8231"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="45686"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2103"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="26959"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1672"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="27720"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="11807"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="26733"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="9814"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="28692"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="41231"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="27069"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="24841"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="14647"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="31704"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="28632"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="32818"/>
- </task>
- </group>
- </group>
- </case>
-</log>
diff --git a/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_03_19.integration.all.xml b/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_03_19.integration.all.xml
deleted file mode 100644
index d783a1f6d..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_03_19.integration.all.xml
+++ /dev/null
@@ -1,4577 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<log timestamp="20/Mar/2002 14:30:14" sdkbuild="20020319">
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2674"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="15162"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2193"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4426"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4817"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4967"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3875"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5361"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1923"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9303"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1793"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="7831"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1483"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1882"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1623"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="881"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="731"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1683"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1703"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1241"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="992"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="831"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1222"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="290"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1423"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="390"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1663"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="520"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1291"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="701"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1302"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2313"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1201"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1012"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9444"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="941"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2173"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="831"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1232"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2694"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1312"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1422"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1852"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="961"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32442"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="10405"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1552"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2834"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1693"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7561"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2524"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1762"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2384"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1642"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1002"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2114"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2904"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1683"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="4146"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1562"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2073"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4436"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3525"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2301"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="207531"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="72365"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3666"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3224"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4135"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="20872"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4086"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4096"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2844"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3986"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1081"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4687"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4306"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4387"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2543"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="26942"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11076"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="10675"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="14451"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2894"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="14922"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4476"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4697"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4706"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3666"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5714"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1783"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9473"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1842"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="7521"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1613"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1882"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1301"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="782"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1742"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="841"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="931"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="801"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1622"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="541"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="360"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1753"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="591"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1132"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2314"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6169"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="480"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="361"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2526"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2734"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="861"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1402"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1041"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1502"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1782"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="932"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32715"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="10425"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2744"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7931"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2503"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2393"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1543"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="981"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2085"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2904"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1493"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1692"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="4206"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2023"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4477"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3936"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2207"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="217383"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="72154"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3605"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3245"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4216"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="22829"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4046"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3945"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2845"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4176"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4747"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4176"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3946"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2513"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="26406"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11908"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="10646"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="14140"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2754"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="14862"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4256"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5147"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4708"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3795"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5057"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1922"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9544"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="7881"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1903"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1703"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="831"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1542"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1533"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="620"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1542"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1011"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1542"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="792"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="551"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1232"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1533"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="380"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1553"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="510"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="421"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="561"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2633"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1071"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6465"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="500"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2093"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2674"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="781"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1712"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1052"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1522"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1743"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32568"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="10375"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2744"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1603"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1181"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7921"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2844"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1923"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2350"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1552"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2264"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2844"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1703"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="4186"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2003"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4827"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3639"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2243"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="218974"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="72604"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3835"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3415"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4218"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1141"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="21791"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3956"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4136"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2794"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4035"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4637"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4266"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3936"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2583"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="26569"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="12047"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="10655"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="14561"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2734"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="15001"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1952"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4667"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5348"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4797"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4126"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5127"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2033"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9694"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1833"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="7581"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1632"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2033"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="841"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1552"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="711"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1452"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1260"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="961"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="821"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1493"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="540"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1131"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="370"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1663"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="510"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1102"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="591"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1042"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2323"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1042"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="8072"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="460"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1483"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2233"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="841"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2744"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="932"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1452"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="420"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1482"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1857"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32217"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="10675"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1602"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2724"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1723"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1161"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="8519"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2423"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1772"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2303"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2333"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2854"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1633"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1732"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="4116"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1532"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2043"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4477"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3295"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="216834"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="74733"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3615"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3595"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4086"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="20910"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3996"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3895"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2794"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4136"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1070"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4687"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4246"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4457"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2583"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="27639"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="10986"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="10670"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="14561"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2734"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="15342"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1862"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4327"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4497"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4717"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4546"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5138"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2263"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9644"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="7776"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1643"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1802"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="772"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1643"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1612"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="651"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1732"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="981"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="541"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="972"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="390"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1663"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="490"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1091"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="581"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2324"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="971"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7210"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2144"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1181"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="822"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2703"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1692"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="992"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1422"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1603"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1021"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32727"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="10355"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1497"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2674"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1753"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7851"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2724"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1713"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2343"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1663"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="921"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2283"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3105"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1663"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="4156"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1562"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2033"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4396"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3255"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2143"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="216621"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="72830"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3786"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3394"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4065"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="22031"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4086"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4053"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2824"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3986"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1532"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4286"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4166"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3725"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2624"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="27980"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="10964"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11216"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="14601"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2774"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="15325"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1792"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4246"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4757"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5237"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3525"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4867"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1912"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9744"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2022"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="7712"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1582"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2033"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="841"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1803"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="591"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="941"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1723"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="541"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="290"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1543"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="510"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1201"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="411"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="681"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1302"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1182"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1081"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2363"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1161"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="982"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6940"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1091"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2183"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3124"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="735"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1402"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1082"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1452"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1742"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="911"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32577"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="10385"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2694"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1632"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="8242"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2854"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1663"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2443"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1663"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2373"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2915"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1673"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="4176"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1505"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2013"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4476"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3154"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="218973"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="73744"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3745"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3415"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4446"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1162"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="22942"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4075"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3956"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2874"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4647"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4556"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4226"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3876"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2524"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="28050"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11036"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="10905"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="14733"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2604"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="15522"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4166"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4927"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5087"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3465"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4920"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9684"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1752"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="7581"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1803"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1703"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="851"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1703"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="630"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1422"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="541"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="371"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="581"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1051"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2334"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="991"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6569"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1061"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2184"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="852"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2714"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1342"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1432"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="991"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32618"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="10425"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2604"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2263"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1162"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7812"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2574"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1783"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2313"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1593"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2122"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2804"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1602"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1672"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="4096"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1562"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1983"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4366"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3014"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2201"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="221419"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="77876"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3786"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3775"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4466"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1271"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="20630"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="410"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4026"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4086"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2854"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4367"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1151"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4727"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4186"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4254"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2554"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="28561"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11056"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11366"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="14371"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2724"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="14981"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2073"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4226"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5257"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4807"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4166"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5829"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2273"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10025"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="7801"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1643"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1802"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1602"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="841"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="771"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1642"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="621"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="951"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="822"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1407"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="510"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1111"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="291"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="370"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1091"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="601"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2314"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="981"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6719"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2624"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1102"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2744"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1362"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1042"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1412"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1678"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="982"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32917"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="10345"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1542"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3255"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1793"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1191"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="13009"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2423"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1712"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2394"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1712"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="942"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2313"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2744"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1552"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1683"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="4647"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1993"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4286"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3736"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="3795"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="220088"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="74941"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4266"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3124"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4237"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1141"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="21802"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4166"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="3866"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2834"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4397"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1101"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4447"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4176"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3945"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2704"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="29052"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11037"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11217"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="14561"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2584"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="15588"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2002"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4186"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4827"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5177"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3776"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5227"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9829"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1812"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="7481"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1642"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1892"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1583"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="851"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1562"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3335"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1483"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1311"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1201"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="932"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1633"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="530"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1221"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="301"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="301"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1342"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1231"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="630"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1042"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2303"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="992"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7861"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1091"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2123"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1061"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="851"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1270"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2774"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="901"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1402"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="390"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1602"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1472"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1732"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="32609"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="10367"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2724"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1613"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1171"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="7921"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2353"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2283"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2293"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="942"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2273"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2784"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1622"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1703"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="4133"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1552"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1983"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4296"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3575"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2143"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="222856"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="74203"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3635"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3795"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4176"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="23106"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="410"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4176"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4036"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3375"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4266"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1162"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4466"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="4216"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="3955"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2524"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="28879"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="11617"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="10605"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="14991"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2704"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="14631"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4226"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5498"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="5065"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3465"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5438"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9394"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1842"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="7431"/>
- </task>
- </group>
- </group>
- </case>
-</log>
diff --git a/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_04_24.milestone5.all.xml b/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_04_24.milestone5.all.xml
deleted file mode 100644
index 04fd66137..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_04_24.milestone5.all.xml
+++ /dev/null
@@ -1,12053 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<log timestamp="24/Apr/2002 15:53:15" sdkbuild="20020416">
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2564"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3625"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2744"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3806"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6019"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4547"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4536"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2784"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2564"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5638"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1902"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="962"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="621"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1922"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="751"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="430"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="400"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1702"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="421"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="601"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1524"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1141"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1673"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="941"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10094"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1782"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1302"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1131"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1161"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1072"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="912"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1672"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="922"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10177"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5118"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1603"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1061"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10034"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2764"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1663"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2183"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2177"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1222"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3024"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3304"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2163"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="81915"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="36993"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4817"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4467"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1087"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="18637"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4847"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="361"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4327"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4937"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5047"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2383"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4436"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1953"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2924"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6800"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6431"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7511"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2564"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3675"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2644"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3505"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6109"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4797"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4837"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2592"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2303"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5749"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1922"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="962"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="430"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1993"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="571"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1993"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1488"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1993"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="430"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1463"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1793"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2183"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="590"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="410"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="591"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1227"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="571"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1453"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1251"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1692"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="871"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10234"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1081"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1142"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1012"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1632"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10315"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5207"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1572"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1012"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10295"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3118"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2123"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1572"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2344"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1192"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1161"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3145"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3205"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="83384"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="37044"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4347"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4797"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="981"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="18497"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4977"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4316"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1503"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4721"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1483"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4977"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2434"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4486"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1933"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2604"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6930"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6619"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7451"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2424"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3625"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2674"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3565"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6168"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4363"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4526"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3085"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1292"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2473"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5899"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1833"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1061"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2052"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="611"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1922"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1882"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="431"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="315"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1833"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="360"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="761"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="952"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1652"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="771"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10312"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1763"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1192"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1131"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1051"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="230"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="390"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="751"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1001"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1602"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="1022"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10535"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5113"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2223"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1162"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10577"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3024"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="291"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2043"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1652"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2454"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1622"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1232"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3135"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3224"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="82936"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="37477"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4577"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4486"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="992"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="18468"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="470"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5017"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="355"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4356"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4507"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5218"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2674"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4436"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1933"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2954"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6920"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7784"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7310"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2604"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3435"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2814"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3505"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6208"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1493"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4697"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4446"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2844"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1553"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2403"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5668"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1832"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="972"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1872"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="661"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2033"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="550"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1543"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="711"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1872"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="812"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="430"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1642"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="390"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1692"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="411"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="811"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="581"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1141"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="550"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1692"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="872"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10445"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1782"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1092"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1021"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1182"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1232"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1141"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="991"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="961"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="270"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="971"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1583"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10205"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5197"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2314"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1191"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10325"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3355"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2032"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1583"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2353"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2474"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1582"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2103"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1332"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3105"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3355"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2183"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="81434"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="36983"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4457"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1081"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5168"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="971"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="23705"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4727"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4467"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1542"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4917"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5368"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2473"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4537"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2003"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2864"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7311"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6529"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7271"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2513"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3525"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2964"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3725"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6019"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1292"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5217"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4787"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2614"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2283"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5598"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2299"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="661"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2294"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="480"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1793"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="640"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1882"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1715"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="390"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="540"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="771"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1241"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1081"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="530"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1663"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="921"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="8633"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1773"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="360"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1023"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1181"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1022"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="240"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="942"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1532"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="941"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10065"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5207"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1872"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1693"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2143"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="8502"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3054"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2063"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1662"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2143"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2424"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2223"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1342"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3114"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3005"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2163"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="85754"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="37565"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4817"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2313"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4657"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="921"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="24043"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="470"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4566"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4216"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1603"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5117"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5217"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2684"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4948"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2423"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3595"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6823"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9404"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7361"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2554"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3936"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2513"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3716"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5699"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4767"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4486"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2864"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2594"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5798"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1843"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2063"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="811"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="430"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1703"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="400"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1902"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="421"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="411"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1112"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="591"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="500"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1673"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="8462"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1201"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1231"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1072"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="260"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="781"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="991"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1792"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="882"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9894"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5117"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2213"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="972"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9263"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3256"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="460"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1563"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2423"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2514"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1602"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2203"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1332"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3134"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3284"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="77276"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38450"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4256"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1662"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4316"/>
- </task>
- <task name="Sync View Update action">
- <abort type="warning" message="Encountered error dialog with title: Problem Occurred">
- </abort>
- <result elapsed="8483"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="23183"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4276"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4528"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5047"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4917"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2493"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4917"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1883"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2814"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7471"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6720"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7070"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2673"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3526"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2643"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3656"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5939"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5248"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4296"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2864"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2393"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5678"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1862"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="962"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="651"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1903"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2043"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="541"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2194"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="731"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="431"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1742"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2013"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="400"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="812"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1101"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="560"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1135"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1702"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="851"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="8412"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1713"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="300"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="992"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1241"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1032"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="220"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="961"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="932"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10167"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5178"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="991"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9093"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3304"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1672"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2243"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1453"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2524"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2103"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1513"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3145"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3495"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2123"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="83951"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="37704"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4957"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1692"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4740"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1022"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="22382"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4697"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="360"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4366"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4366"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5288"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2454"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5227"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1943"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2534"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6950"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8482"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7260"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2764"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3635"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2703"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3796"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6360"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1261"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4637"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4517"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2874"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2494"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6249"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2033"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1061"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2073"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1892"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1763"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="651"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="711"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="431"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1802"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="411"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2363"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1378"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="621"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1092"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1652"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="932"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11056"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1793"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1424"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1002"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1221"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="991"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="260"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1482"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1562"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10315"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5198"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1972"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1570"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2043"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1111"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10755"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3114"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2694"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1572"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2343"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1523"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2674"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2203"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1242"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1221"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3135"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3295"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="82859"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="37092"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4567"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4567"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="22386"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4707"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4386"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5028"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5118"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3184"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4437"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1832"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2544"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7010"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7083"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7150"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2593"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3545"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2593"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3616"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6540"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1151"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5267"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4567"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2704"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1281"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2473"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5761"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2013"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="922"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1933"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="591"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2023"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1823"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="530"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1992"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="421"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="301"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1692"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="621"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1321"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="621"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1663"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11426"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="301"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1221"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1292"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1222"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1041"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="697"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1001"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1602"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10295"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5087"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1081"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11156"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="430"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2739"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2063"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1582"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2914"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1332"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1052"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1452"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3135"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3185"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="86872"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="37017"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4627"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4747"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="22663"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4396"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4437"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5328"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1452"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5708"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2273"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4537"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1892"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2563"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6930"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6700"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7271"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2604"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3525"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2772"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3555"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6790"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4507"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4917"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2854"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2304"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6379"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1823"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1873"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1903"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1773"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="561"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="771"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="671"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1913"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="566"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="311"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1792"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="341"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1993"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="441"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="581"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1111"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="570"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1673"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="871"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11707"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1923"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="951"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1192"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="971"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1062"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="220"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="951"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1642"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9984"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5178"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1762"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2043"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11377"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="390"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2834"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2273"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2263"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1593"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1332"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1211"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3165"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3505"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2153"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="77430"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="36673"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4327"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1291"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4998"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="881"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="22983"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4587"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4537"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4326"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1713"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5468"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2715"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4757"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1943"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2603"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7000"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6530"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7401"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2764"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3625"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2544"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3685"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6540"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4492"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4777"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2844"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2504"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6159"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1913"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1041"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1873"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="590"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="781"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1542"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="751"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="440"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="390"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1911"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="301"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1933"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="530"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1251"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="620"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="902"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="12064"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="290"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1170"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1082"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1061"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1012"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1802"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9754"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5160"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2303"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1041"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11416"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2914"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2885"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1572"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2253"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1552"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2594"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1602"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1331"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1061"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1532"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3154"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3475"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2163"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="83943"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="36912"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4617"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4576"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="962"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="20821"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5218"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="360"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4286"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4536"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5137"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2484"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4767"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1932"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2463"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6846"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8732"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7300"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2534"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3515"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2774"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3515"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6610"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4697"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4416"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2879"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1963"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2383"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5438"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2063"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1912"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2043"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="651"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1948"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1903"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="431"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="361"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1682"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="361"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1933"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="300"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="731"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1161"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="991"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1052"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="972"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11346"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1472"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1292"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1932"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1562"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1102"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="971"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="301"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="991"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1612"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10095"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5177"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1913"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2243"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="10936"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3445"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1553"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2384"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2043"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1342"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1542"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3154"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3215"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2203"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="79820"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="36618"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4597"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4446"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1022"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="23138"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4597"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4486"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5338"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5117"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2584"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4556"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1853"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2694"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6940"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8783"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7230"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2503"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3425"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2995"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3455"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6690"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4587"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4436"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2694"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3115"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5658"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1862"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="952"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1873"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="631"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2344"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2013"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2063"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="771"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="431"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1752"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2193"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="401"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="721"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="601"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="520"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1142"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1683"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="871"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6680"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2693"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="301"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1131"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1221"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1201"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="972"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="290"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="640"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="991"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1613"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9954"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5128"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1932"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1573"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2263"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9123"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3595"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2062"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1503"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2313"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2373"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2204"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1321"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1151"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1442"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3055"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3415"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="83238"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="36995"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4396"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5538"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="931"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="21781"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4707"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4613"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5638"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4877"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2714"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4647"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1963"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2534"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7611"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6450"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7145"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2703"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3646"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2807"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3735"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6930"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4477"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4656"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2694"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1452"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2404"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6099"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1852"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1052"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2303"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="550"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="651"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="421"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="311"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1812"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="411"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="591"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="601"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="540"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1042"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1662"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="932"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6597"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2654"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="290"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="992"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="971"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="981"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="300"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1031"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1642"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10164"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5138"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2013"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2223"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1022"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="9313"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3886"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2203"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1653"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1651"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2514"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1202"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1483"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3124"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3415"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2117"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="82778"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="37043"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4507"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1392"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4927"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="841"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="20739"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4447"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1181"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4326"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1603"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4827"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1532"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5148"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2583"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4536"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2003"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2644"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6920"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6659"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8021"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2604"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3425"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2443"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3876"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6498"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4577"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4827"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2694"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1452"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2304"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="6409"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1923"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1793"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="631"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1933"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="437"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1812"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="431"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2033"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="510"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1062"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1662"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="872"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="12017"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1752"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="341"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1292"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1332"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1092"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1181"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1002"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="270"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1002"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1772"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="882"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10091"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5247"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2373"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="971"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11086"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3816"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2263"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1673"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2243"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1532"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2834"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1623"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2172"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1261"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1211"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1542"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3125"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3465"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2143"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="85400"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38275"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4718"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1553"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4837"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="21242"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4666"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5277"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1623"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4516"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1432"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5193"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2614"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4657"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2133"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3525"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6900"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9053"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7381"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2794"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3625"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2804"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3746"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6435"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1452"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4747"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4467"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2904"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1452"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2404"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5508"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2063"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="791"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1998"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="631"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="600"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="691"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1882"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2076"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="430"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="420"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1713"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="390"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1892"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1603"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="711"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1161"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="590"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="922"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1662"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="912"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11917"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1752"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1101"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1192"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1021"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1052"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="210"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="921"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1652"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="932"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9980"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5097"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2514"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1162"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11016"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="390"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3535"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2424"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2914"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1452"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2103"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1332"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3174"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2864"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2103"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="86353"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="37765"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4577"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4427"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="981"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="21221"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="420"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4646"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4416"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4626"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4962"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2494"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4727"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1862"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2614"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6844"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7221"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8312"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2764"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3425"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2774"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3635"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6589"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1423"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4406"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4416"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2794"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1241"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2413"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5398"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1962"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="742"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="591"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="701"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="430"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1843"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="371"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="571"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1562"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="551"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1682"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="12107"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1652"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1161"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="982"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1181"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1081"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="982"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="991"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1593"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="931"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10481"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5058"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1972"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1593"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1082"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11486"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3786"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1582"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2244"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2334"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2041"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1312"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1191"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1482"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3255"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2914"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="87017"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38426"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4263"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1612"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4847"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="921"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="21350"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5648"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4316"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4727"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1452"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5273"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2574"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4546"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1913"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2654"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6900"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6469"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7141"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2604"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3415"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2874"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3655"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6783"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4206"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4527"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2664"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2403"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5558"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2033"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1052"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2073"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="631"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2072"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1873"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="621"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="650"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1982"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="431"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="301"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1813"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="400"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2184"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="570"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="421"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1292"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="610"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1472"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="901"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="12588"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="410"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1753"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="300"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1349"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1151"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1072"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1211"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1002"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1041"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="962"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1712"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="901"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10437"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5107"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2124"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1201"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11146"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="430"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3786"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="290"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2434"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2393"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1632"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2199"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1292"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1201"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3065"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2884"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="86620"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38155"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4759"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4887"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="942"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="21531"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5488"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="360"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4326"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4527"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5252"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2564"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4536"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1983"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2494"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6940"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8853"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7301"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2544"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3425"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2514"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3835"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6669"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4587"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4817"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2744"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1552"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2423"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5608"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1843"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="791"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="430"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1902"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="531"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1913"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1888"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="430"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1523"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1683"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1493"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="671"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="631"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="932"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="12918"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1653"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="330"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1121"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="992"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1262"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1241"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1192"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="951"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="311"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="961"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1692"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="831"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10365"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5097"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="981"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11677"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4036"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1992"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1583"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2681"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1722"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1872"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1282"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1562"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3164"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3755"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="84818"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="37264"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4536"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1533"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6048"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1062"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="29856"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4426"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="371"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4296"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5418"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2504"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4977"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2574"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4547"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2023"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2814"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6960"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6339"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7117"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2634"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3435"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2634"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3524"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6660"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4386"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4427"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2854"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2424"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5257"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1803"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1168"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2063"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2363"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2183"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="601"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1873"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1862"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="441"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1783"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2274"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="691"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1241"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1662"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="912"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="13379"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="360"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1081"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="941"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="301"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="380"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="971"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1683"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10094"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5208"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2123"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="18246"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3213"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="301"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2634"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1572"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2153"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2523"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2173"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1272"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="841"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1162"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1453"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="4146"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3104"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2104"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="86283"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="37226"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6048"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4517"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="931"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="21661"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5558"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="408"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4277"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1281"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4566"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1532"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4890"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2504"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4526"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1893"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2574"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6960"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="9884"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7161"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2643"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3427"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2664"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3475"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6890"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4386"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4537"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2704"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2303"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5628"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="851"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1873"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="290"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2223"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="621"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="661"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="640"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="470"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1813"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="400"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1892"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="321"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="651"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1141"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="570"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1132"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="801"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11356"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2964"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="300"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1002"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1192"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1021"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="271"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="360"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="972"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1662"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="9784"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5187"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2063"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2183"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="15672"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2734"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2183"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2253"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1542"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2383"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2103"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1252"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1192"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3135"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3475"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2163"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="88852"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38703"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4557"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4827"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="27958"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4476"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4377"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5498"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5168"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2273"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4757"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1853"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2604"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7610"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7040"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7280"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2434"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3635"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2975"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3645"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6890"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4416"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4416"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2784"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2345"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5658"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1943"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="962"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1852"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1813"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2063"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="551"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1712"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1913"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="440"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1803"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2022"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="641"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1483"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="661"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="520"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1663"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="881"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11487"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="390"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2914"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="290"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1312"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1007"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1332"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1131"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1112"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="250"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="951"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1692"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10104"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5148"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1942"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1643"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2393"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="15392"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="361"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2904"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2033"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2343"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1492"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1322"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1192"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3114"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2924"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2033"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="84497"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="38375"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4727"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4637"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="931"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="27961"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4447"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4376"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1512"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5729"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1522"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4988"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2293"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4647"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1892"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2764"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7090"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8041"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="8422"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2464"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3625"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2754"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3646"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6889"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4617"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4620"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2834"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1362"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2503"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5508"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2453"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="957"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="650"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2073"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="661"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1952"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1433"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="751"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1792"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1873"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="431"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1882"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="311"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="751"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="621"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1121"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="510"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1673"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="901"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="11541"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="400"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2955"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1222"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1311"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1061"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1182"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1092"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1021"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="271"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1002"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1562"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="932"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="10081"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5197"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1502"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2243"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1081"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="15742"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3035"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1572"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2313"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2504"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2223"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1252"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="2854"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3035"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2974"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2023"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="90482"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="37553"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5738"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1472"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="5047"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1092"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="27540"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4476"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="5498"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1731"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="7230"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="2574"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5128"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2734"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4627"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1952"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="2733"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="6940"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7681"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7270"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2464"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="3435"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2983"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3505"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="6880"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1403"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4287"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="4736"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2884"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2514"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="5598"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2013"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2073"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1723"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="581"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="771"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1463"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1922"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="431"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1692"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="351"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Repository action">
- <result elapsed="561"/>
- </task>
- <task name="Nothing to Commit">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="571"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1513"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1151"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1673"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="18297"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="360"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1402"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1422"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2484"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1032"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="260"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="992"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="872"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="16704"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="5188"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="1912"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1523"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1081"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="15572"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="420"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="3034"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="320"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2123"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1593"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="2343"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1542"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2384"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1592"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="2013"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="3095"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="1542"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="1462"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="3871"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="2904"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Repository action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="92536"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="37614"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4446"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1542"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4477"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="27782"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Repository action">
- <result elapsed="4447"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="370"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4526"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="1603"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Repository action">
- <result elapsed="4526"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1683"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="5118"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="2313"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Repository action">
- <result elapsed="4901"/>
- </task>
- <task name="Sync View Update action">
- <result elapsed="1873"/>
- </task>
- </group>
- </group>
- <group name="tag project">
- <task name="CVS Tag action">
- <result elapsed="3084"/>
- </task>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7501"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7982"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Remote action">
- <result elapsed="7140"/>
- </task>
- </group>
- </group>
- </case>
-</log>
diff --git a/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_04_25.integration.commandline.xml b/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_04_25.integration.commandline.xml
deleted file mode 100644
index 30732a995..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_04_25.integration.commandline.xml
+++ /dev/null
@@ -1,1731 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<log timestamp="25/Apr/2002 20:33:05" sdkbuild="20020425">
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1503"/>
- </task>
- <task name="checkout module">
- <result elapsed="250"/>
- </task>
- <task name="add folders">
- <result elapsed="29011"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3159"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25647"/>
- </task>
- <task name="commit module">
- <result elapsed="19908"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="321"/>
- </task>
- <task name="checkout module">
- <result elapsed="380"/>
- </task>
- <task name="add folders">
- <result elapsed="12708"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="401"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3395"/>
- </task>
- <task name="commit module">
- <result elapsed="17435"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4136"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2434"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="86209"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="62141"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="37433"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37614"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1492"/>
- </task>
- <task name="checkout module">
- <result elapsed="251"/>
- </task>
- <task name="add folders">
- <result elapsed="28808"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3124"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25427"/>
- </task>
- <task name="commit module">
- <result elapsed="19192"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="250"/>
- </task>
- <task name="checkout module">
- <result elapsed="691"/>
- </task>
- <task name="add folders">
- <result elapsed="12057"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="1352"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="4076"/>
- </task>
- <task name="commit module">
- <result elapsed="18221"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4286"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2403"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="86083"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="57382"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36864"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="38094"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1422"/>
- </task>
- <task name="checkout module">
- <result elapsed="250"/>
- </task>
- <task name="add folders">
- <result elapsed="29182"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3185"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25236"/>
- </task>
- <task name="commit module">
- <result elapsed="21721"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="842"/>
- </task>
- <task name="checkout module">
- <result elapsed="400"/>
- </task>
- <task name="add folders">
- <result elapsed="12600"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="731"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3615"/>
- </task>
- <task name="commit module">
- <result elapsed="25166"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4086"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2344"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="87421"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="60794"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36242"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37632"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1462"/>
- </task>
- <task name="checkout module">
- <result elapsed="250"/>
- </task>
- <task name="add folders">
- <result elapsed="28100"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3094"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25277"/>
- </task>
- <task name="commit module">
- <result elapsed="19776"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="641"/>
- </task>
- <task name="checkout module">
- <result elapsed="451"/>
- </task>
- <task name="add folders">
- <result elapsed="13430"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="560"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3806"/>
- </task>
- <task name="commit module">
- <result elapsed="17292"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4216"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2593"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="83964"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="57667"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36996"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37213"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1513"/>
- </task>
- <task name="checkout module">
- <result elapsed="240"/>
- </task>
- <task name="add folders">
- <result elapsed="29112"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3115"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="26306"/>
- </task>
- <task name="commit module">
- <result elapsed="21380"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="200"/>
- </task>
- <task name="checkout module">
- <result elapsed="691"/>
- </task>
- <task name="add folders">
- <result elapsed="13094"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="340"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3585"/>
- </task>
- <task name="commit module">
- <result elapsed="26669"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4246"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2343"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="85953"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="61323"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36492"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="38175"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1362"/>
- </task>
- <task name="checkout module">
- <result elapsed="251"/>
- </task>
- <task name="add folders">
- <result elapsed="29763"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3135"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="26157"/>
- </task>
- <task name="commit module">
- <result elapsed="20744"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="541"/>
- </task>
- <task name="checkout module">
- <result elapsed="681"/>
- </task>
- <task name="add folders">
- <result elapsed="11817"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="381"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3965"/>
- </task>
- <task name="commit module">
- <result elapsed="17216"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3965"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2603"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="87050"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="56480"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="37263"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37655"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1523"/>
- </task>
- <task name="checkout module">
- <result elapsed="250"/>
- </task>
- <task name="add folders">
- <result elapsed="29382"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3184"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25348"/>
- </task>
- <task name="commit module">
- <result elapsed="18837"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="1292"/>
- </task>
- <task name="checkout module">
- <result elapsed="381"/>
- </task>
- <task name="add folders">
- <result elapsed="13809"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="331"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3905"/>
- </task>
- <task name="commit module">
- <result elapsed="26509"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4116"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2394"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="82816"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="56078"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="37504"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37912"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1412"/>
- </task>
- <task name="checkout module">
- <result elapsed="261"/>
- </task>
- <task name="add folders">
- <result elapsed="29293"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3245"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25456"/>
- </task>
- <task name="commit module">
- <result elapsed="18880"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="701"/>
- </task>
- <task name="checkout module">
- <result elapsed="530"/>
- </task>
- <task name="add folders">
- <result elapsed="11998"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="661"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3875"/>
- </task>
- <task name="commit module">
- <result elapsed="18697"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3856"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2794"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="87661"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="62389"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="35718"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37504"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1412"/>
- </task>
- <task name="checkout module">
- <result elapsed="251"/>
- </task>
- <task name="add folders">
- <result elapsed="28010"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3155"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25533"/>
- </task>
- <task name="commit module">
- <result elapsed="20830"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="561"/>
- </task>
- <task name="checkout module">
- <result elapsed="691"/>
- </task>
- <task name="add folders">
- <result elapsed="11613"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="1011"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="4166"/>
- </task>
- <task name="commit module">
- <result elapsed="18908"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3876"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2424"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="86023"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="57220"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36663"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37844"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1412"/>
- </task>
- <task name="checkout module">
- <result elapsed="250"/>
- </task>
- <task name="add folders">
- <result elapsed="29696"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3144"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25957"/>
- </task>
- <task name="commit module">
- <result elapsed="21113"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="190"/>
- </task>
- <task name="checkout module">
- <result elapsed="420"/>
- </task>
- <task name="add folders">
- <result elapsed="12858"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="641"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3666"/>
- </task>
- <task name="commit module">
- <result elapsed="24375"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3716"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2283"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="86743"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="56769"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36062"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="38656"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1412"/>
- </task>
- <task name="checkout module">
- <result elapsed="260"/>
- </task>
- <task name="add folders">
- <result elapsed="28751"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3335"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="26335"/>
- </task>
- <task name="commit module">
- <result elapsed="23264"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="471"/>
- </task>
- <task name="checkout module">
- <result elapsed="480"/>
- </task>
- <task name="add folders">
- <result elapsed="11929"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="561"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3854"/>
- </task>
- <task name="commit module">
- <result elapsed="19448"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4086"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2493"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="85859"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="55258"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="37294"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37560"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1442"/>
- </task>
- <task name="checkout module">
- <result elapsed="260"/>
- </task>
- <task name="add folders">
- <result elapsed="29233"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3125"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25356"/>
- </task>
- <task name="commit module">
- <result elapsed="19052"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="551"/>
- </task>
- <task name="checkout module">
- <result elapsed="691"/>
- </task>
- <task name="add folders">
- <result elapsed="13169"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="230"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3685"/>
- </task>
- <task name="commit module">
- <result elapsed="24356"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4136"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2373"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="85132"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="57800"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36543"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37964"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1482"/>
- </task>
- <task name="checkout module">
- <result elapsed="250"/>
- </task>
- <task name="add folders">
- <result elapsed="29012"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3155"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25481"/>
- </task>
- <task name="commit module">
- <result elapsed="19498"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="751"/>
- </task>
- <task name="checkout module">
- <result elapsed="791"/>
- </task>
- <task name="add folders">
- <result elapsed="11296"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="711"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3841"/>
- </task>
- <task name="commit module">
- <result elapsed="18166"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3925"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2393"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="87924"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="58657"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36144"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="38401"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1483"/>
- </task>
- <task name="checkout module">
- <result elapsed="260"/>
- </task>
- <task name="add folders">
- <result elapsed="29456"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3615"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25426"/>
- </task>
- <task name="commit module">
- <result elapsed="19729"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="520"/>
- </task>
- <task name="checkout module">
- <result elapsed="761"/>
- </task>
- <task name="add folders">
- <result elapsed="12498"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="381"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3405"/>
- </task>
- <task name="commit module">
- <result elapsed="17715"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3850"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2423"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="88090"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="56919"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36640"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37484"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1412"/>
- </task>
- <task name="checkout module">
- <result elapsed="241"/>
- </task>
- <task name="add folders">
- <result elapsed="29282"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3184"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25812"/>
- </task>
- <task name="commit module">
- <result elapsed="22623"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="380"/>
- </task>
- <task name="checkout module">
- <result elapsed="391"/>
- </task>
- <task name="add folders">
- <result elapsed="12468"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="210"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="4367"/>
- </task>
- <task name="commit module">
- <result elapsed="25881"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4196"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2524"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="90149"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="58906"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="35802"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="38389"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1472"/>
- </task>
- <task name="checkout module">
- <result elapsed="250"/>
- </task>
- <task name="add folders">
- <result elapsed="28564"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3325"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25226"/>
- </task>
- <task name="commit module">
- <result elapsed="19796"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="711"/>
- </task>
- <task name="checkout module">
- <result elapsed="391"/>
- </task>
- <task name="add folders">
- <result elapsed="11988"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="851"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3905"/>
- </task>
- <task name="commit module">
- <result elapsed="17906"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3996"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2414"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="84735"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="57404"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="37424"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37714"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1482"/>
- </task>
- <task name="checkout module">
- <result elapsed="251"/>
- </task>
- <task name="add folders">
- <result elapsed="29493"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3134"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25513"/>
- </task>
- <task name="commit module">
- <result elapsed="19428"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="290"/>
- </task>
- <task name="checkout module">
- <result elapsed="391"/>
- </task>
- <task name="add folders">
- <result elapsed="11937"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="921"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3786"/>
- </task>
- <task name="commit module">
- <result elapsed="24500"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3956"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2173"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="88117"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="60098"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36352"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="39014"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1503"/>
- </task>
- <task name="checkout module">
- <result elapsed="250"/>
- </task>
- <task name="add folders">
- <result elapsed="29535"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3104"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="24655"/>
- </task>
- <task name="commit module">
- <result elapsed="19308"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="501"/>
- </task>
- <task name="checkout module">
- <result elapsed="751"/>
- </task>
- <task name="add folders">
- <result elapsed="13549"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="411"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3395"/>
- </task>
- <task name="commit module">
- <result elapsed="18306"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3946"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2514"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="89268"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="56708"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36704"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="36943"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1472"/>
- </task>
- <task name="checkout module">
- <result elapsed="250"/>
- </task>
- <task name="add folders">
- <result elapsed="30504"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3145"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25552"/>
- </task>
- <task name="commit module">
- <result elapsed="21220"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="250"/>
- </task>
- <task name="checkout module">
- <result elapsed="380"/>
- </task>
- <task name="add folders">
- <result elapsed="12227"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="1332"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3545"/>
- </task>
- <task name="commit module">
- <result elapsed="24931"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="4256"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2314"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="86129"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="57120"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36323"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37950"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1492"/>
- </task>
- <task name="checkout module">
- <result elapsed="251"/>
- </task>
- <task name="add folders">
- <result elapsed="28863"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3144"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="26088"/>
- </task>
- <task name="commit module">
- <result elapsed="20680"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="715"/>
- </task>
- <task name="checkout module">
- <result elapsed="480"/>
- </task>
- <task name="add folders">
- <result elapsed="12929"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="330"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3866"/>
- </task>
- <task name="commit module">
- <result elapsed="17765"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3635"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2563"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="85332"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="56362"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="37586"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37634"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1132"/>
- </task>
- <task name="checkout module">
- <result elapsed="261"/>
- </task>
- <task name="add folders">
- <result elapsed="29312"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3124"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25486"/>
- </task>
- <task name="commit module">
- <result elapsed="21034"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="370"/>
- </task>
- <task name="checkout module">
- <result elapsed="381"/>
- </task>
- <task name="add folders">
- <result elapsed="13489"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="331"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="4286"/>
- </task>
- <task name="commit module">
- <result elapsed="25614"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3705"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2554"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="84866"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="59926"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36064"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="38515"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1422"/>
- </task>
- <task name="checkout module">
- <result elapsed="260"/>
- </task>
- <task name="add folders">
- <result elapsed="29009"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3115"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="26278"/>
- </task>
- <task name="commit module">
- <result elapsed="20950"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="190"/>
- </task>
- <task name="checkout module">
- <result elapsed="391"/>
- </task>
- <task name="add folders">
- <result elapsed="11486"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="521"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="4817"/>
- </task>
- <task name="commit module">
- <result elapsed="17986"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3825"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2604"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="90460"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="57177"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36804"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="36994"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1452"/>
- </task>
- <task name="checkout module">
- <result elapsed="250"/>
- </task>
- <task name="add folders">
- <result elapsed="29242"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3135"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25231"/>
- </task>
- <task name="commit module">
- <result elapsed="23203"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="210"/>
- </task>
- <task name="checkout module">
- <result elapsed="400"/>
- </task>
- <task name="add folders">
- <result elapsed="13409"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="591"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3989"/>
- </task>
- <task name="commit module">
- <result elapsed="24556"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3886"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2183"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="84166"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="61291"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36792"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="38382"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests" name="testImportAddCommitCheckout">
- <group name="import/add/commit big project">
- <group name="command line client">
- <task name="import empty module">
- <result elapsed="1483"/>
- </task>
- <task name="checkout module">
- <result elapsed="260"/>
- </task>
- <task name="add folders">
- <result elapsed="28448"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="3095"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="25727"/>
- </task>
- <task name="commit module">
- <result elapsed="19569"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="import empty module">
- <result elapsed="581"/>
- </task>
- <task name="checkout module">
- <result elapsed="600"/>
- </task>
- <task name="add folders">
- <result elapsed="11907"/>
- </task>
- <task name="add files (Binary)">
- <result elapsed="1072"/>
- </task>
- <task name="add files (Text)">
- <result elapsed="3886"/>
- </task>
- <task name="commit module">
- <result elapsed="17685"/>
- </task>
- </group>
- <group name="user interface">
- <task name="set sharing, pop up sync viewer">
- <result elapsed="3855"/>
- </task>
- <task name="Synchronize with Repository action">
- <result elapsed="2404"/>
- </task>
- <task name="Sync View Commit action">
- <result elapsed="84858"/>
- </task>
- </group>
- </group>
- <group name="checkout big project">
- <group name="command line client">
- <task name="checkout module">
- <result elapsed="59224"/>
- </task>
- </group>
- <group name="eclipse client">
- <task name="checkout module">
- <result elapsed="36755"/>
- </task>
- </group>
- <group name="user interface">
- <task name="Repository View Checkout action">
- <result elapsed="37403"/>
- </task>
- </group>
- </group>
- </case>
-</log>
diff --git a/tests/org.eclipse.team.tests.cvs.core/benchmark/teamui_benchmark.bat b/tests/org.eclipse.team.tests.cvs.core/benchmark/teamui_benchmark.bat
deleted file mode 100644
index a2c69b959..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/benchmark/teamui_benchmark.bat
+++ /dev/null
@@ -1,38 +0,0 @@
-@echo off
-rem Team UI benchmark script
-rem Expects the following plugins to be installed:
-rem org.eclipse.core.tests.harness
-rem org.eclipse.team.core
-rem org.eclipse.team.cvs.core
-rem org.eclipse.team.cvs.ui
-rem org.eclipse.team.tests.core
-rem org.eclipse.team.tests.cvs.core
-rem org.eclipse.team.ui
-rem org.junit
-
-set ROOT=D:\PerformanceTesting
-
-set ECLIPSE=%ROOT%\eclipse
-set REPOSITORY_PROPERTIES=%ROOT%\repository.properties
-set TEST=cvsui.benchmark.all
-set LOG=%ROOT%\%TEST%.xml
-set REPEAT=6
-set IGNOREFIRST=-ignorefirst
-
-set PLUGINS=%ECLIPSE%\plugins
-set WORKSPACE=%ECLIPSE%\workspace
-set JRE=%ROOT%\jre
-set JAVA=%JRE%\bin\java.exe
-set HARNESS=org.eclipse.team.tests.cvs.core.harness
-
-set VMARGS=-Declipse.cvs.properties=%REPOSITORY_PROPERTIES%
-set PROGARGS=-dev bin -application %HARNESS% -test %TEST% -log %LOG% -purge -repeat %REPEAT% %IGNOREFIRST%
-
-pushd %ECLIPSE%
-echo Purging the workspace: %WORKSPACE%
-del /S /F /Q %WORKSPACE% >NUL:
-@echo on
-@echo Running Team UI benchmark test
-%JAVA% -cp startup.jar %VMARGS% org.eclipse.core.launcher.UIMain %PROGARGS%
-@echo off
-popd
diff --git a/tests/org.eclipse.team.tests.cvs.core/benchmark/vcm1.0/2002_02_26.integration.all.xml b/tests/org.eclipse.team.tests.cvs.core/benchmark/vcm1.0/2002_02_26.integration.all.xml
deleted file mode 100644
index 922e0ef30..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/benchmark/vcm1.0/2002_02_26.integration.all.xml
+++ /dev/null
@@ -1,10960 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<log timestamp="01/Mar/2002 19:54:44" sdkbuild="20020226">
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1873"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1873"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1802"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1512"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1792"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1012"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1081"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1612"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="631"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="381"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2694"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="550"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2253"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="351"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1962"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1530"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="281"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1092"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="350"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1632"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="471"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1161"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="291"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="611"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="841"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="862"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="822"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1593"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1081"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="751"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1290"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="611"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="160"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1221"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="892"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="2543"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="2133"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3726"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1161"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4356"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3284"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2274"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1151"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1942"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="661"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1162"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1863"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1812"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1422"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2063"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1072"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2103"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="901"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2042"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1042"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1483"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="520"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="771"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="390"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2173"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2443"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="341"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1251"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="291"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="371"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="600"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="481"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1067"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="281"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="711"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="822"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="570"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="881"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1082"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="731"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="681"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="611"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="170"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="731"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1111"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="2534"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="2203"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3785"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="952"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3706"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="630"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3134"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2043"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2173"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1623"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="821"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="701"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="981"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2033"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1553"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1912"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1482"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1683"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1041"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="931"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2273"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1022"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1553"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="540"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1011"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1483"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="410"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2734"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2073"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="371"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1792"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="300"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="962"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="330"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1111"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1593"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="500"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="510"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1231"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="291"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="570"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="861"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="661"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="962"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="842"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="630"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1693"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="861"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="922"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="861"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="792"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="852"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="530"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1111"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="2364"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="2114"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3495"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1101"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3545"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3205"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="410"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1191"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2504"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1703"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="621"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1052"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2113"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1793"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1643"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1512"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1992"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1052"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="881"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2273"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1092"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1563"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="530"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1149"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="400"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2273"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1902"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="381"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1843"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="301"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="350"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1161"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1612"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="471"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="330"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="651"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="851"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="538"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="430"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="922"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1161"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="982"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1061"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="651"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="801"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="591"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="190"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="701"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1151"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="2414"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="2108"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3345"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3765"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2944"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="400"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2376"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1142"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2314"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="932"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="721"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="781"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1141"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1712"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1792"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1382"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1782"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1472"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1753"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1001"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1623"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="540"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1072"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1472"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="421"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2163"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="371"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1952"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="300"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="360"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1146"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1472"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="441"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="381"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="671"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="941"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="651"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="912"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="771"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="831"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1613"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="600"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="812"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="691"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="751"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="631"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="350"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1272"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="2564"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="2003"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4084"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3505"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2974"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2193"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1978"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="661"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1071"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1843"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2854"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="12558"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="17485"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3875"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="801"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3696"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4367"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3976"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3705"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1192"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3965"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="751"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3545"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1181"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3435"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1191"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2704"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3094"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="4186"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1583"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1882"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1472"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2123"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1752"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="932"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="972"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="531"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="381"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2263"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2113"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="341"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1823"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="291"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="550"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="331"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="540"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="450"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1191"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="300"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="691"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="591"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="751"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1623"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="640"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="825"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1002"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="991"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="571"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="340"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="551"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1161"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="812"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="2283"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1993"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3315"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1131"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3355"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="570"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3154"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2173"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1092"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2153"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1972"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="872"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1285"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="661"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1853"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="3075"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="20199"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="16639"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3696"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3725"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4316"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="673"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3926"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="470"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3635"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3905"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3585"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1073"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3365"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1192"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2734"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3194"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="4036"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1552"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1863"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1572"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1773"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1061"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1963"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="915"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2224"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1131"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1652"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="541"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="892"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="421"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1973"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2123"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="390"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="451"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="350"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1131"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="451"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="290"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="691"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="841"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="912"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1623"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="992"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="941"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="832"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1042"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="581"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="310"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="611"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="911"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="2584"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1923"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4446"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3615"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1301"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3234"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2454"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1121"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2223"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1843"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1542"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="641"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1151"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1922"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1703"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1832"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1602"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1532"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1722"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="911"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1562"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="531"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1261"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="491"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2633"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="411"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2032"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="290"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1223"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="351"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="440"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1472"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="271"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="621"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="892"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="590"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1722"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1232"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="490"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="560"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="627"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="831"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="982"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="581"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="161"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="801"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1111"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="901"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="2474"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="2063"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4036"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1072"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3435"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1241"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2804"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2383"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2464"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="2213"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="852"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="661"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="861"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1873"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2925"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="12949"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="17124"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3755"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1012"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3425"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4036"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3936"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3695"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1182"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="4036"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="731"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3575"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3395"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1051"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2714"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2974"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="4186"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1923"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1432"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1953"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1742"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="901"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1142"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1545"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="500"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1051"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="411"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2304"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="580"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2163"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="391"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1603"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="430"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="280"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1052"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="330"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1562"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="481"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1095"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="270"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="520"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="902"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="701"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="871"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="580"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1553"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="530"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="928"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1011"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="782"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1061"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="611"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="681"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1221"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1042"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1843"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1963"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3935"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="982"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3485"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="550"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2844"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="400"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2073"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1812"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="611"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1432"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2334"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1081"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="8315"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="15482"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4016"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3435"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3695"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3705"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3736"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3885"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3556"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1071"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3201"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1032"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2875"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3095"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3765"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1282"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1782"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1372"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2184"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="991"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1001"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1012"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1562"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="501"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="580"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="381"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2043"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2263"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="370"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1913"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="410"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1043"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1021"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="341"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="471"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1352"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="270"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="551"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="821"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="571"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="851"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="901"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="871"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1753"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="540"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1201"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1002"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="500"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="201"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="670"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="580"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1112"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1723"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="2051"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3665"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3195"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="731"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2804"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2403"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2384"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1873"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1552"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="581"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1131"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1542"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="3364"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="17385"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="16744"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3615"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1042"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3274"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3945"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="852"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3765"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3807"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1211"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3776"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3345"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1062"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3435"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="881"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2611"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3295"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3606"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1633"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1141"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1812"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1462"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2063"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1933"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="912"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="521"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1162"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="411"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2784"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="600"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="370"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1793"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="280"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1082"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="520"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="340"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="441"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="290"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1131"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="2694"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1983"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3525"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="931"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3526"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="560"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1682"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2884"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="400"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2032"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1182"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2154"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1993"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="841"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1643"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="551"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="981"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1232"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2494"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="8101"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="19878"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3335"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3545"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="881"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4006"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3625"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3756"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1231"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3946"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3395"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="971"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3315"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="931"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2784"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2954"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3675"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1762"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1692"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1382"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1893"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2020"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="891"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2153"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1042"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="521"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1072"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1456"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="380"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2043"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2103"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="361"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1892"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="291"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="991"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="340"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="912"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="590"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="451"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="280"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="802"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="821"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="711"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="791"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="971"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1002"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="752"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1022"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="521"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="321"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="521"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1131"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1843"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1982"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3962"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3485"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="560"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2965"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="480"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2264"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2293"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1833"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="561"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1172"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1432"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2573"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="8402"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="17324"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4537"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3655"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4076"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3916"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="470"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3535"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3766"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="630"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3515"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3214"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="742"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2673"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3265"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3725"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1292"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1692"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1452"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1642"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="881"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="491"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1222"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="380"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2223"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="340"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1783"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="560"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1277"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="290"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1151"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="351"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1792"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="471"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="290"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="701"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="651"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="440"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="911"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1752"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="982"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="410"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="882"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="510"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="551"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="181"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="520"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="741"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1111"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="812"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1582"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="2023"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3946"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3315"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="590"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2975"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="420"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2303"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1162"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2143"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="600"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="731"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="591"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1101"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1372"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2704"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="17055"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="17114"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3736"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="941"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3655"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4176"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3905"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3605"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3825"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3385"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1072"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3415"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="761"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2704"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3245"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3605"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1322"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1762"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1372"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1553"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1703"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="911"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1151"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="490"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="951"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="411"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2313"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="491"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1703"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="480"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="280"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="972"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="330"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1092"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="461"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="291"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="701"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="841"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="591"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="674"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="901"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="862"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="520"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1713"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="390"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1162"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="671"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="551"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="180"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="591"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1171"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1803"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1943"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3735"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1001"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3214"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="771"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2714"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2043"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1141"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2233"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1792"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="561"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1132"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1963"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2564"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="12568"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="15813"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3936"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3635"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4204"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4156"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3665"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3916"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3401"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1212"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3295"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="931"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2694"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2875"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3675"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1842"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1082"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1732"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1442"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1042"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1722"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="921"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1022"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="841"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="510"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="410"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2123"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1942"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="341"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1903"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1473"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="280"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="321"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1492"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="471"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="280"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="631"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="842"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="570"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="961"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="892"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="882"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="550"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1643"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="560"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="982"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="570"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1041"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="922"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="570"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="621"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="550"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="511"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="561"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1091"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1743"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1962"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3135"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="971"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3618"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="560"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="731"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2734"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1191"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1922"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1852"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="802"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="601"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="751"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1562"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2444"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1072"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="16163"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="17325"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3615"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3485"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4216"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3896"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="460"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3675"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3605"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3605"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1062"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3305"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1032"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2653"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3095"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3705"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1702"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1342"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1852"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1392"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1642"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1022"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="901"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1912"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1142"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="491"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="610"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="401"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2424"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2103"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="351"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1341"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="271"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1021"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1562"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="351"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1151"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="441"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1432"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1112"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="300"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="791"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="681"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="391"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="902"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="731"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="510"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="781"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1052"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="520"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="731"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1121"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="832"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1602"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1923"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3876"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="921"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3455"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1372"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2904"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2153"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="781"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="951"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1041"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1712"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2614"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="8005"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="15863"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3826"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3895"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3966"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="771"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3665"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3575"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3826"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3475"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1112"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3365"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="851"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2714"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2984"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3835"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1512"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1692"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1422"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1822"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1012"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2239"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="891"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1101"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="511"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1171"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="390"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2273"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2243"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="340"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="580"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="300"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1202"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="340"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1021"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="471"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1151"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="281"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="701"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="871"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="661"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="931"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="871"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="911"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="791"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="982"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="751"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="941"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="541"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="290"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="570"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1963"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1912"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4086"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="981"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3535"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2984"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2363"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2253"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="709"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="2033"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="570"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1352"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1392"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2274"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1071"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="8182"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="16790"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3665"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="912"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3525"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="822"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4045"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4086"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3876"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1222"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3805"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3615"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1072"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3404"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="782"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2574"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3175"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="4056"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1463"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1372"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1732"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1483"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2173"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="892"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2213"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1182"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1563"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="490"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1242"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="401"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2764"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1962"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="491"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="600"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1232"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="280"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="931"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1222"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="320"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="481"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="495"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="270"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="711"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="871"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="962"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="891"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="951"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1673"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="540"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1292"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="781"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="951"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="681"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="510"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="271"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="480"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="852"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1733"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="2093"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4356"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="982"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3425"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="540"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3164"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="441"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1052"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2243"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1612"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="561"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1022"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1562"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2283"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1092"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="8455"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="16544"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3665"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="932"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3575"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3986"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3875"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3976"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="4106"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3636"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1091"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3625"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="821"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3255"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3144"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3515"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1872"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1182"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1752"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1442"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1901"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="992"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="901"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1412"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="631"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1052"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="611"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="400"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1993"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2183"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="370"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1602"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1312"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="270"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1092"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1662"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="451"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1332"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="490"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1121"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="261"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="661"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="681"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="390"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="901"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1148"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="971"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1532"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1182"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="430"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="731"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1181"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="530"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="951"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="501"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="230"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="511"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1091"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1930"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1883"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3515"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="872"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3195"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1572"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="521"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3275"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="390"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2284"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2134"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="620"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="2013"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="801"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1923"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="571"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="791"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1042"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1342"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="3215"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="17966"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="17415"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3725"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="972"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3716"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="620"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3995"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3946"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="481"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3706"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1231"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="4186"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3625"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1082"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3255"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="771"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2414"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2914"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="4176"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1562"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2013"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1042"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1852"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="902"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1002"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1362"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="511"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1102"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1071"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1321"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="411"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2744"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="570"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2153"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="330"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1833"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1452"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="351"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="921"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1282"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="340"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1302"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="451"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1212"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="270"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="661"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="832"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="611"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="981"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="887"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="992"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1652"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1513"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="952"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="641"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="781"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="861"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="561"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="290"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="491"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="571"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1091"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="741"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1883"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1893"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3635"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3395"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3115"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="450"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="812"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="551"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="861"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="972"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1442"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2484"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="8021"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="16192"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3595"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3656"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3975"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4376"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3606"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1191"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3945"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3646"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3295"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="791"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2674"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2866"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3445"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1502"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1292"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1883"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1382"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1823"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1061"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1662"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="841"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2053"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1431"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="481"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="972"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="460"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1722"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="421"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2103"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2203"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="351"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2003"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1442"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="281"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="961"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1002"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="330"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1462"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="451"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1343"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="270"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="530"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="992"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="621"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="741"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1062"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="761"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="852"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="500"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2023"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1582"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="421"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="801"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1021"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="702"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="581"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="200"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="762"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1703"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="2404"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4026"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="971"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3655"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1568"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2754"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="401"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2313"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="1863"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="2093"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="570"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="681"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1302"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1652"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2503"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="8103"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="16524"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3635"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="942"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3875"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4186"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3675"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="471"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3615"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1122"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3886"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3375"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3716"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="791"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2844"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3314"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="4056"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1683"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1782"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1862"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1352"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1870"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1032"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2604"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="881"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2134"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1412"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1752"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="501"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1031"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1342"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="401"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2073"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="580"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="330"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1813"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="410"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1272"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="300"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1061"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="541"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1122"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="310"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1151"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="471"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1262"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="500"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1211"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="431"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="801"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="881"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="621"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="410"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1101"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="942"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="872"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="490"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1172"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="581"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1632"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="841"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="972"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="781"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="691"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1012"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="520"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="331"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="610"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="581"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1151"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="811"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1878"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1962"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3565"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="991"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3175"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1592"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2854"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="400"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2234"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1151"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2313"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1983"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="571"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1242"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1612"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2764"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1032"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="8262"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="17798"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3726"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="911"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3556"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4086"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3826"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="451"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3605"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1202"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3816"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="621"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3485"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1051"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3385"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="881"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2724"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3205"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3565"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1723"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1702"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1463"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2083"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1031"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1682"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="882"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2123"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1132"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1482"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="511"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1803"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="421"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2123"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="550"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2018"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="361"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1833"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="271"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="881"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="561"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1252"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="331"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1092"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="530"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1522"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="470"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="511"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="280"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="801"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="871"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="891"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="942"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1192"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1102"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="510"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="461"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="851"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="991"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="989"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="550"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="631"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="961"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="521"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="281"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="671"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1232"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="721"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1873"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1903"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3545"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="961"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3365"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="560"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1152"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="651"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3405"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="400"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2133"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1152"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2193"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1853"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="811"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1493"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="570"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="777"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1102"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1442"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync100">
- <group name="synchronize 100 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1623"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1251"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1872"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="1332"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2384"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1041"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1783"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="941"/>
- </task>
- </group>
- </group>
- <group name="synchronize 100 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2163"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="941"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="501"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync10">
- <group name="synchronize 10 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1142"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="661"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1622"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="391"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2143"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="590"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="2353"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="371"/>
- </task>
- </group>
- </group>
- <group name="synchronize 10 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1672"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="431"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1422"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="281"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync1">
- <group name="synchronize 1 added file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1001"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1322"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="321"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 modified file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1082"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="510"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1402"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="470"/>
- </task>
- </group>
- </group>
- <group name="synchronize 1 removed file(s)">
- <group name="as outgoing changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1392"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="as incoming changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1132"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="280"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.SyncTests" name="testSync0">
- <group name="test sync with no changes">
- <task name="Synchronize with Stream action">
- <result elapsed="691"/>
- </task>
- <task name="Nothing to Release">
- <result elapsed="0"/>
- </task>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testTinyWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="801"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="871"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="701"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="381"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="971"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="851"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="761"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="571"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1878"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="641"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1382"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="411"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="962"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="991"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="951"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="531"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="661"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="711"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="952"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="490"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="361"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="540"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="631"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testSmallWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="1142"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="821"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="2383"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="1862"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3505"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1142"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3375"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="551"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="1632"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="601"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3155"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="460"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2404"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1081"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="2123"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="591"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1909"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="1653"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="571"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="721"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1142"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="1522"/>
- </task>
- </group>
- </group>
- </case>
- <case class="org.eclipse.vcm.tests.ui.benchmark.WorkflowTests" name="testBigWorkflow">
- <group name="test project sharing">
- <task name="Synchronize with Stream action (share project)">
- <result elapsed="2965"/>
- </task>
- </group>
- <group name="test initial project commit">
- <task name="Synchronize with Stream action">
- <result elapsed="1041"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="16794"/>
- </task>
- </group>
- <group name="test initial project checkout">
- <task name="Repository View Checkout action">
- <result elapsed="16263"/>
- </task>
- </group>
- <group name="test incoming and outgoing change scenarios">
- <group name="adding a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3595"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1091"/>
- </task>
- </group>
- <group name="catching up to a new component - localized additions and some changes">
- <task name="Synchronize with Stream action">
- <result elapsed="3715"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="631"/>
- </task>
- </group>
- <group name="fixing a bug - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4400"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="671"/>
- </task>
- </group>
- <group name="catching up to a bug fix - localized changes">
- <task name="Synchronize with Stream action">
- <result elapsed="4196"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="501"/>
- </task>
- </group>
- <group name="moving a package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="3715"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1252"/>
- </task>
- </group>
- <group name="catching up to a moved package - scattered changes, files moved">
- <task name="Synchronize with Stream action">
- <result elapsed="4186"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="802"/>
- </task>
- </group>
- <group name="big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3545"/>
- </task>
- <task name="Sync View Release action">
- <result elapsed="1091"/>
- </task>
- </group>
- <group name="catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions">
- <task name="Synchronize with Stream action">
- <result elapsed="3335"/>
- </task>
- <task name="Sync View Catchup action">
- <result elapsed="961"/>
- </task>
- </group>
- </group>
- <group name="test replace with remote contents scenarios">
- <group name="no local dirty files, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="2754"/>
- </task>
- </group>
- <group name="abandoning some local work, no remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3064"/>
- </task>
- </group>
- <group name="no local dirty files, many remote changes">
- <task name="Replace with Team Stream action">
- <result elapsed="3645"/>
- </task>
- </group>
- </group>
- </case>
-</log>
diff --git a/tests/org.eclipse.team.tests.cvs.core/benchmark/vcmui_benchmark.bat b/tests/org.eclipse.team.tests.cvs.core/benchmark/vcmui_benchmark.bat
deleted file mode 100644
index c92dab1f8..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/benchmark/vcmui_benchmark.bat
+++ /dev/null
@@ -1,43 +0,0 @@
-@echo off
-rem VCM UI benchmark script
-rem Expects the following plugins to be installed:
-rem org.eclipse.core.tests.harness
-rem org.eclipse.team.core
-rem org.eclipse.team.cvs.core
-rem org.eclipse.team.cvs.ui
-rem org.eclipse.team.tests.cvs.core
-rem org.eclipse.team.ui
-rem org.eclipse.vcm.core
-rem org.eclipse.vcm.core.cvs
-rem org.eclipse.vcm.tests.core
-rem org.eclipse.vcm.tests.ui
-rem org.eclipse.vcm.ui
-rem org.eclipse.vcm.ui.cvs
-rem org.junit
-
-set ROOT=D:\PerformanceTesting
-
-set ECLIPSE=%ROOT%\eclipse
-set REPOSITORY_PROPERTIES=%ROOT%\repository.properties
-set TEST=vcmui.benchmark.all
-set LOG=%ROOT%\%TEST%.xml
-set REPEAT=21
-set IGNOREFIRST=
-
-set PLUGINS=%ECLIPSE%\plugins
-set WORKSPACE=%ECLIPSE%\workspace
-set JRE=%ROOT%\jre
-set JAVA=%JRE%\bin\java.exe
-set HARNESS=org.eclipse.team.tests.cvs.core.harness
-
-set VMARGS=-Declipse.tests.vcm.properties=%REPOSITORY_PROPERTIES%
-set PROGARGS=-dev bin -application %HARNESS% -test %TEST% -log %LOG% -purge -repeat %REPEAT% %IGNOREFIRST%
-
-pushd %ECLIPSE%
-echo Purging the workspace: %WORKSPACE%
-del /S /F /Q %WORKSPACE% >NUL:
-@echo on
-@echo Running VCM UI benchmark test
-%JAVA% -cp startup.jar %VMARGS% org.eclipse.core.launcher.UIMain %PROGARGS%
-@echo off
-popd
diff --git a/tests/org.eclipse.team.tests.cvs.core/build.properties b/tests/org.eclipse.team.tests.cvs.core/build.properties
deleted file mode 100644
index eb53c7650..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/build.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-source.cvstests.jar=src/
-bin.includes=about.html,plugin.xml,*.jar,test.xml,repository.properties \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/plugin.xml b/tests/org.eclipse.team.tests.cvs.core/plugin.xml
deleted file mode 100644
index 56b746342..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/plugin.xml
+++ /dev/null
@@ -1,110 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin
- id="org.eclipse.team.tests.cvs.core"
- name="Eclipse CVS Tests Core"
- version="2.0.0"
- provider-name="Eclipse.org">
-
- <runtime>
- <library name="cvstests.jar">
- <export name="*"/>
- </library>
- </runtime>
- <requires>
- <import plugin="org.apache.xerces"/>
- <import plugin="org.eclipse.core.tests.harness"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.team.core"/>
- <import plugin="org.eclipse.team.cvs.core"/>
- <import plugin="org.eclipse.team.ui"/>
- <import plugin="org.eclipse.team.cvs.ui"/>
- <import plugin="org.eclipse.compare"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.junit"/>
- <import plugin="org.eclipse.team.tests.core"/>
- </requires>
-
-
-<!-- **************** TESTS ******************* -->
- <extension
- point="org.eclipse.core.tests.harness.tests">
- <test
- id="cvs.all">
- <run
- class="org.eclipse.team.tests.ccvs.core.AllTests">
- </run>
- </test>
- <test
- id="cvs.provider">
- <run
- class="org.eclipse.team.tests.ccvs.core.provider.AllTestsProvider">
- </run>
- </test>
- <test
- id="cvs.compatibility">
- <run
- class="org.eclipse.team.tests.ccvs.core.compatible.AllTestsCompatibility">
- </run>
- </test>
- <test
- id="cvs.resources">
- <run
- class="org.eclipse.team.tests.ccvs.core.cvsresources.AllTestsCVSResources">
- </run>
- </test>
- <test
- id="cvs.sync">
- <run
- class="org.eclipse.team.tests.ccvs.core.provider.SyncElementTest">
- </run>
- </test>
- <test
- id="cvs.remote">
- <run
- class="org.eclipse.team.tests.ccvs.core.provider.RemoteResourceTest">
- </run>
- </test>
- <test
- id="cvsui.benchmark.all">
- <run
- class="org.eclipse.team.tests.ccvs.ui.benchmark.AllTests">
- </run>
- </test>
- <test
- id="cvsui.benchmark.sync">
- <run
- class="org.eclipse.team.tests.ccvs.ui.benchmark.SyncTests">
- </run>
- </test>
- <test
- id="cvsui.benchmark.workflow">
- <run
- class="org.eclipse.team.tests.ccvs.ui.benchmark.WorkflowTests">
- </run>
- </test>
- <test
- id="cvsui.benchmark.command">
- <run
- class="org.eclipse.team.tests.ccvs.ui.benchmark.CommandTests">
- </run>
- </test>
- </extension>
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- name="Empty Perspective"
- class="org.eclipse.team.tests.ccvs.ui.EmptyPerspective"
- id="org.eclipse.team.tests.ccvs.ui.EmptyPerspective">
- </perspective>
- </extension>
- <extension
- id="harness"
- point="org.eclipse.core.runtime.applications">
- <application>
- <run
- class="org.eclipse.team.tests.ccvs.ui.EclipseUITestHarnessApplication">
- </run>
- </application>
- </extension>
-
-</plugin>
diff --git a/tests/org.eclipse.team.tests.cvs.core/readme.txt b/tests/org.eclipse.team.tests.cvs.core/readme.txt
deleted file mode 100644
index 82b728362..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/readme.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-README for org.eclipse.core.team.tests.cvs.core
-
-This plug-in provides the CVS tests. It also contains the script, test.xml,
-which launches the CVS automated tests after the a build.
-In order to run the tests, perform the following steps:
-
-1. Load the eclipse test harness plug-ins and fragments
-
-2. Load the following plug-ins:
- org.eclipse.team.tests.cvs.core
-
-3. Modify the repository.properties file in plug-in
-org.eclipse.team.tests.cvs.core to contain the
-information required to connect to your repository.
-Important fields in the repository properties file
-are:
-
- repository - the location string that identifies your test repository
- initrepo - true if you want to initialize the repository before beginning
- rsh - the rsh (or ssh) client used to initialize the repository
-
-The rsh field is similar to the CVS_RSH environment variable
-
-Your repository must allow rsh connections from your userid and machine in order for
-the tests to run.
-
-4. Run the test.xml Ant script in Eclipse \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/repository.properties b/tests/org.eclipse.team.tests.cvs.core/repository.properties
deleted file mode 100644
index 15f636660..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/repository.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-repository=:pserver:@user@:@password@@@host@:@root@
-repository1=:pserver:@user@:@password@@@host@:@root1@
-repository2=:pserver:@user@:@password@@@host@:@root2@
-command=C:\cvs\bin\cvs
-debug=false
-standalone=false
-initrepo=false
-temp=C:\temp
-rsh=rsh
-localRepo=false
-waitFactor=5 \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkBig.zip b/tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkBig.zip
deleted file mode 100644
index 8a0f9cf83..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkBig.zip
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkSmall.zip b/tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkSmall.zip
deleted file mode 100644
index ea3729efb..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkSmall.zip
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkTiny.zip b/tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkTiny.zip
deleted file mode 100644
index a127ff3d7..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkTiny.zip
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/CVSROOT/modules b/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/CVSROOT/modules
deleted file mode 100644
index 3ab59a67f..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/CVSROOT/modules
+++ /dev/null
@@ -1,65 +0,0 @@
-# Three different line formats are valid:
-# key -a aliases...
-# key [options] directory
-# key [options] directory files...
-#
-# Where "options" are composed of:
-# -i prog Run "prog" on "cvs commit" from top-level of module.
-# -o prog Run "prog" on "cvs checkout" of module.
-# -e prog Run "prog" on "cvs export" of module.
-# -t prog Run "prog" on "cvs rtag" of module.
-# -u prog Run "prog" on "cvs update" of module.
-# -d dir Place module in directory "dir" instead of module name.
-# -l Top-level directory only -- do not recurse.
-#
-# NOTE: If you change any of the "Run" options above, you'll have to
-# release and re-checkout any working directories of these modules.
-#
-# And "directory" is a path to a directory relative to $CVSROOT.
-#
-# The "-a" option specifies an alias. An alias is interpreted as if
-# everything on the right of the "-a" had been typed on the command line.
-#
-# You can encode a module within a module by using the special '&'
-# character to interpose another module into the current module. This
-# can be useful for creating a module that consists of many directories
-# spread out over the entire source repository.
-
-# Block access to CVS hogs
-#world -a denied___checkout_of_world_takes_too_long
-#. -a denied___checkout_of_world_takes_too_long
-
-# self referencing modules
-project1 project1
-
-# checkout docs in flattened structure
-docs -d docs common/docs
-macros common/macros
-
-# include docs with project
-project2 project2 &docs
-# only project2
-project2-only project2
-
-# a use of alias
-project3-src project3/src
-project3-src_file -a project3-src/file.c project3-src/file.h
-project3-sub project3/sub &project3-src_file
-
-# embeddings
-project4 project4 &macros
-project5-project4 -d extensions/project4 project4
-project5 project5 &project5-project4 &macros
-
-# using -d to build a project from other projects
-project6-dirA -d dirA project6/A
-project6-dirB -d dirB project6/B
-project6 &project6-dirA &project6-dirB
-
-# using aliases to provide packaging
-project7-common -a project7/common
-project7-pc -a project7-common project7/pc
-project7-linux -a project7-common project7/linux
-
-# simple use of module alias
-project8-alias -a project8 common \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/common/docs/readme.html b/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/common/docs/readme.html
deleted file mode 100644
index 8c7fe2111..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/common/docs/readme.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<html>
-</html> \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/common/macros/macro1 b/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/common/macros/macro1
deleted file mode 100644
index c88e4d621..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/common/macros/macro1
+++ /dev/null
@@ -1 +0,0 @@
-This is a macro \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project1/f1/file-in-p1.txt b/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project1/f1/file-in-p1.txt
deleted file mode 100644
index 5ba54a8be..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project1/f1/file-in-p1.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is a file in project1 \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project2/file-p2.txt b/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project2/file-p2.txt
deleted file mode 100644
index 547cc5e4f..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project2/file-p2.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is a file in project 2 \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/src/file.c b/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/src/file.c
deleted file mode 100644
index a3f314b05..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/src/file.c
+++ /dev/null
@@ -1 +0,0 @@
-This is a c file \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/src/file.h b/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/src/file.h
deleted file mode 100644
index d45f90e27..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/src/file.h
+++ /dev/null
@@ -1 +0,0 @@
-This is an h file \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/sub/file-sub.txt b/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/sub/file-sub.txt
deleted file mode 100644
index d45364ec8..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/sub/file-sub.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is a file in project3/sub \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/common/common.txt b/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/common/common.txt
deleted file mode 100644
index 127506764..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/common/common.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is a common file \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/linux/linux.txt b/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/linux/linux.txt
deleted file mode 100644
index c7078a38d..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/linux/linux.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is a linux file \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/pc/pc.txt b/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/pc/pc.txt
deleted file mode 100644
index 4bf706a8b..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/pc/pc.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is a pc file \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project8/file-p8.txt b/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project8/file-p8.txt
deleted file mode 100644
index e9257ebb5..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project8/file-p8.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is a file in project8 \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllTeamAndCVSTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllTeamAndCVSTests.java
deleted file mode 100644
index 34bc77809..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllTeamAndCVSTests.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.eclipse.team.tests.ccvs.core;
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.team.tests.core.AllTeamTests;
-
-public class AllTeamAndCVSTests extends EclipseTest {
-
- /**
- * Constructor for CVSClientTest.
- */
- public AllTeamAndCVSTests() {
- super();
- }
-
- /**
- * Constructor for CVSClientTest.
- * @param name
- */
- public AllTeamAndCVSTests(String name) {
- super(name);
- }
-
- /*
- * ORDER IS IMPORTANT: Run compatibility and resource tests before any other!!!
- */
- public static Test suite() {
- TestSuite suite = new TestSuite();
- suite.addTest(new TestSetup(AllTeamTests.suite()));
- suite.addTest(new CVSTestSetup(AllTests.suite()));
- return suite;
- }
-}
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllTests.java
deleted file mode 100644
index 7f0ddf5b2..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllTests.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package org.eclipse.team.tests.ccvs.core;
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests extends EclipseTest {
-
- /**
- * Constructor for CVSClientTest.
- */
- public AllTests() {
- super();
- }
-
- /**
- * Constructor for CVSClientTest.
- * @param name
- */
- public AllTests(String name) {
- super(name);
- }
-
- /*
- * ORDER IS IMPORTANT: Run compatibility and resource tests before any other!!!
- */
- public static Test suite() {
- TestSuite suite = new TestSuite();
- suite.addTest(org.eclipse.team.tests.ccvs.core.compatible.AllTestsCompatibility.suite());
- suite.addTest(org.eclipse.team.tests.ccvs.core.cvsresources.AllTestsCVSResources.suite());
- suite.addTest(org.eclipse.team.tests.ccvs.core.provider.AllTestsProvider.suite());
- return new CVSTestSetup(suite);
- }
-}
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSClientException.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSClientException.java
deleted file mode 100644
index b8bd8746e..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSClientException.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.eclipse.team.tests.ccvs.core;
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-import org.eclipse.team.internal.ccvs.core.CVSException;
-
-public class CVSClientException extends CVSException {
-
- public CVSClientException(String message) {
- super(message);
- }
-
-}
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSTestSetup.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSTestSetup.java
deleted file mode 100644
index 86b55c353..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSTestSetup.java
+++ /dev/null
@@ -1,189 +0,0 @@
-package org.eclipse.team.tests.ccvs.core;
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.PrintStream;
-
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-
-public class CVSTestSetup extends TestSetup {
- public static final String REPOSITORY_LOCATION;
- public static final boolean INITIALIZE_REPO;
- public static final boolean DEBUG;
- public static final boolean LOCAL_REPO;
- public static final String RSH;
- public static final int WAIT_FACTOR;
-
- public static CVSRepositoryLocation repository;
-
- // Static initializer for constants
- static {
- loadProperties();
- REPOSITORY_LOCATION = System.getProperty("eclipse.cvs.repository");
- INITIALIZE_REPO = Boolean.valueOf(System.getProperty("eclipse.cvs.initrepo", "false")).booleanValue();
- DEBUG = Boolean.valueOf(System.getProperty("eclipse.cvs.debug", "false")).booleanValue();
- RSH = System.getProperty("eclipse.cvs.rsh", "rsh");
- LOCAL_REPO = Boolean.valueOf(System.getProperty("eclipse.cvs.localRepo", "false")).booleanValue();
- WAIT_FACTOR = Integer.parseInt(System.getProperty("eclipse.cvs.waitFactor", "1"));
- }
-
- public static void loadProperties() {
- String propertiesFile = System.getProperty("eclipse.cvs.properties");
- if (propertiesFile == null) return;
- File file = new File(propertiesFile);
- if (file.isDirectory()) file = new File(file, "repository.properties");
- try {
- BufferedReader reader = new BufferedReader(new FileReader(file));
- try {
- for (String line; (line = reader.readLine()) != null; ) {
- int sep = line.indexOf("=");
- String property = line.substring(0, sep).trim();
- String value = line.substring(sep + 1).trim();
- System.setProperty("eclipse.cvs." + property, value);
- }
- } finally {
- reader.close();
- }
- } catch (Exception e) {
- System.err.println("Could not read repository properties file: " + file.getAbsolutePath());
- }
- }
-
- /**
- * Constructor for CVSTestSetup.
- */
- public CVSTestSetup(Test test) {
- super(test);
- }
-
- public static void executeRemoteCommand(ICVSRepositoryLocation repository, String commandLine) {
- if (! LOCAL_REPO) {
- commandLine = RSH + " " + repository.getHost() + " -l " + repository.getUsername() + " " + commandLine;
- }
- int returnCode = executeCommand(commandLine, null, null);
- if (returnCode != -1 && returnCode != 0) {
- System.err.println("Remote command returned " + returnCode + ": " + commandLine);
- }
- }
-
- /**
- * Executes a command.
- * Returns the command's return code, or -1 on failure.
- *
- * @param commandLine the local command line to run
- * @param environment the new environment variables, or null to inherit from parent process
- * @param workingDirectory the new workingDirectory, or null to inherit from parent process
- */
- public static int executeCommand(String commandLine, String[] environment, File workingDirectory) {
- PrintStream debugStream = CVSTestSetup.DEBUG ? System.out : null;
- try {
- if (debugStream != null) {
- // while debugging, dump CVS command line client results to stdout
- // prefix distinguishes between message source stream
- debugStream.println();
- printPrefixedLine(debugStream, "CMD> ", commandLine);
- if (workingDirectory != null) printPrefixedLine(debugStream, "DIR> ", workingDirectory.toString());
- }
- Process cvsProcess = Runtime.getRuntime().exec(commandLine, environment, workingDirectory);
- // stream output must be dumped to avoid blocking the process or causing a deadlock
- startBackgroundPipeThread(cvsProcess.getErrorStream(), debugStream, "ERR> ");
- startBackgroundPipeThread(cvsProcess.getInputStream(), debugStream, "MSG> ");
-
- int returnCode = cvsProcess.waitFor();
- if (debugStream != null) debugStream.println("RESULT> " + returnCode);
- return returnCode;
- } catch (IOException e) {
- printPrefixedLine(System.err, "Unable to execute command: ", commandLine);
- e.printStackTrace(System.err);
- } catch (InterruptedException e) {
- printPrefixedLine(System.err, "Unable to execute command: ", commandLine);
- e.printStackTrace(System.err);
- }
- return -1;
- }
-
- private static void startBackgroundPipeThread(final InputStream is, final PrintStream os,
- final String prefix) {
- new Thread() {
- public void run() {
- BufferedReader reader = null;
- try {
- try {
- reader = new BufferedReader(new InputStreamReader(is));
- for (;;) {
- String line = reader.readLine();
- if (line == null) break;
- if (os != null) printPrefixedLine(os, prefix, line);
- }
- } finally {
- if (reader != null) reader.close();
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }.start();
- }
-
- private static void printPrefixedLine(PrintStream os, String prefix, String line) {
- os.print(prefix);
- os.println(line.substring(0, Math.min(line.length(), 256))); // trim long lines
- }
-
- /*
- * Use rsh to delete any contents of the repository and initialize it again
- */
- private static void initializeRepository(CVSRepositoryLocation repository) {
- String repoRoot = repository.getRootDirectory();
- executeRemoteCommand(repository, "rm -rf " + repoRoot);
- executeRemoteCommand(repository, "cvs -d " + repoRoot + " init");
- }
-
- public void setUp() throws CVSException {
- if (repository == null)
- repository = setupRepository(REPOSITORY_LOCATION);
- }
-
- protected CVSRepositoryLocation setupRepository(String location) throws CVSException {
-
- // Give some info about which repository the tests are running with
- System.out.println("Connecting to: " + location);
-
- // Validate that we can connect, also creates and caches the repository location. This
- // is important for the UI tests.
- CVSRepositoryLocation repository = (CVSRepositoryLocation)CVSProvider.getInstance().getRepository(location);
- //CVSRepositoryLocation repository = CVSRepositoryLocation.fromString(location);
- try {
- repository.validateConnection(new NullProgressMonitor());
- } catch (CVSException e) {
- System.out.println("Unable to connect to remote repository: " + repository.getLocation());
- throw e;
- }
-
- // Initialize the repo if requested (requires rsh access)
- if( INITIALIZE_REPO ) {
- initializeRepository(repository);
- }
-
- return repository;
- }
-
- public void tearDown() throws CVSException {
- // Nothing to do here
- }
-
-}
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CommandLineCVSClient.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CommandLineCVSClient.java
deleted file mode 100644
index e144f515b..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CommandLineCVSClient.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.tests.ccvs.core;
-
-import java.io.File;
-
-import junit.framework.Assert;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-
-public class CommandLineCVSClient implements ICVSClient {
- public static final ICVSClient INSTANCE = new CommandLineCVSClient();
- private static final String cvsExecutable =
- System.getProperty("eclipse.cvs.command");
-
- public void executeCommand(ICVSRepositoryLocation repositoryLocation,
- IContainer localRoot, String command, String[] globalOptions,
- String[] localOptions, String[] arguments) throws CVSException {
- execute(repositoryLocation.getLocation(), localRoot.getLocation().toFile(), command,
- globalOptions, localOptions, arguments);
- try {
- localRoot.refreshLocal(IResource.DEPTH_INFINITE, null);
- } catch (CoreException e) {
- throw new CVSClientException("CoreException during refreshLocal: " + e.getMessage());
- }
- }
-
- public static void execute(
- String repositoryLocation, File localRoot, String command,
- String[] globalOptions, String[] localOptions,
- String[] arguments) throws CVSException {
- // test arguments
- Assert.assertNotNull(repositoryLocation);
- Assert.assertNotNull(localRoot);
- Assert.assertNotNull(command);
- Assert.assertNotNull(globalOptions);
- Assert.assertNotNull(localOptions);
- Assert.assertNotNull(arguments);
- Assert.assertTrue(localRoot.exists());
-
- // build command line
- StringBuffer commandLineBuf = new StringBuffer(cvsExecutable);
- commandLineBuf.append(" -d \"");
- commandLineBuf.append(repositoryLocation);
- commandLineBuf.append('"');
- appendStrings(commandLineBuf, globalOptions);
- commandLineBuf.append(' ');
- commandLineBuf.append(command);
- appendStrings(commandLineBuf, localOptions);
- appendStrings(commandLineBuf, arguments);
-
- // execute command
- JUnitTestCase.waitMsec(1500);
- int returnCode = CVSTestSetup.executeCommand(commandLineBuf.toString(), null, localRoot);
- if (returnCode != 0) {
- throw new CVSClientException("Command line client returned non-zero code: " + returnCode);
- }
- }
-
- private static void appendStrings(StringBuffer commandLine, String[] strings) {
- for (int i = 0; i < strings.length; i++) {
- String string = strings[i];
- if (string != null && string.length() != 0) {
- commandLine.append(" \"");
- commandLine.append(string);
- commandLine.append('"');
- }
- }
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseCVSClient.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseCVSClient.java
deleted file mode 100644
index 6484ba1bf..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseCVSClient.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.tests.ccvs.core;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import junit.framework.Assert;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-
-public class EclipseCVSClient implements ICVSClient {
- public static final ICVSClient INSTANCE = new EclipseCVSClient();
- private static final HashMap commandPool = new HashMap();
- static {
- commandPool.put("update", Command.UPDATE);
- commandPool.put("co", Command.CHECKOUT);
- commandPool.put("ci", Command.COMMIT);
- commandPool.put("import", Command.IMPORT);
- commandPool.put("add", Command.ADD);
- commandPool.put("remove", Command.REMOVE);
- commandPool.put("status", Command.STATUS);
- commandPool.put("log", Command.LOG);
- commandPool.put("tag", Command.TAG);
- commandPool.put("rtag", Command.RTAG);
- commandPool.put("admin", Command.ADMIN);
- commandPool.put("diff", Command.DIFF);
- }
-
- public void executeCommand(ICVSRepositoryLocation repositoryLocation,
- IContainer localRoot, String command, String[] globalOptions,
- String[] localOptions, String[] arguments) throws CVSException {
- execute(repositoryLocation, CVSWorkspaceRoot.getCVSFolderFor(localRoot), command,
- globalOptions, localOptions, arguments);
- }
-
- public static void execute(
- ICVSRepositoryLocation cvsRepositoryLocation, ICVSFolder cvsLocalRoot,
- String command, String[] globalOptions, String[] localOptions,
- String[] arguments) throws CVSException {
- // test arguments
- Assert.assertNotNull(cvsRepositoryLocation);
- Assert.assertNotNull(cvsLocalRoot);
- Assert.assertNotNull(command);
- Assert.assertNotNull(globalOptions);
- Assert.assertNotNull(localOptions);
- Assert.assertNotNull(arguments);
- Assert.assertTrue(cvsLocalRoot.exists());
-
- // get command instance
- Command cvsCommand = (Command) commandPool.get(command);
-
- // get global options
- List globals = new ArrayList();
- for (int i = 0; i < globalOptions.length; i++) {
- globals.add(new CustomGlobalOption(globalOptions[i]));
- }
- GlobalOption[] cvsGlobalOptions = (GlobalOption[]) globals.toArray(new GlobalOption[globals.size()]);
-
- // get local options
- List locals = new ArrayList();
- for (int i = 0; i < localOptions.length; i++) {
- String option = localOptions[i];
- String argument = null;
- if ((i < localOptions.length - 1) && (localOptions[i + 1].charAt(0) != '-')) {
- argument = localOptions[++i];
- }
- locals.add(new CustomLocalOption(option, argument));
- }
- LocalOption[] cvsLocalOptions = (LocalOption[]) locals.toArray(new LocalOption[locals.size()]);
-
- // execute command
- IProgressMonitor monitor = new NullProgressMonitor();
- Session session = new Session(cvsRepositoryLocation, cvsLocalRoot);
- try {
- session.open(monitor);
- IStatus status = cvsCommand.execute(session,
- cvsGlobalOptions, cvsLocalOptions, arguments, null, monitor);
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSClientException("Eclipse client returned non-ok status: " + status);
- }
- } finally {
- session.close();
- monitor.done();
- }
- }
-
- private static class CustomGlobalOption extends GlobalOption {
- public CustomGlobalOption(String option) {
- super(option);
- }
- }
-
- private static class CustomLocalOption extends LocalOption {
- public CustomLocalOption(String option, String arg) {
- super(option, arg);
- }
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseTest.java
deleted file mode 100644
index 5befa8e8c..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseTest.java
+++ /dev/null
@@ -1,555 +0,0 @@
-package org.eclipse.team.tests.ccvs.core;
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-import java.io.BufferedInputStream;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.tests.harness.EclipseWorkspaceTest;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProvider;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Import;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.client.Update;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.connection.CVSServerException;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFile;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolder;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-public class EclipseTest extends EclipseWorkspaceTest {
-
- protected static IProgressMonitor DEFAULT_MONITOR = new NullProgressMonitor();
- protected static final int RANDOM_CONTENT_SIZE = 3876;
-
- /**
- * Constructor for CVSBlackBoxTest.
- */
- public EclipseTest() {
- super();
- }
- public EclipseTest(String name) {
- super(name);
- }
-
- /*
- * Get the resources for the given resource names
- */
- public IResource[] getResources(IContainer container, String[] hierarchy) throws CoreException {
- IResource[] resources = new IResource[hierarchy.length];
- for (int i=0;i<resources.length;i++) {
- resources[i] = container.findMember(hierarchy[i]);
- if (resources[i] == null) {
- resources[i] = buildResources(container, new String[] {hierarchy[i]})[0];
- }
- }
- return resources;
- }
-
- /**
- * Add the resources to an existing container and upload them to CVS
- */
- public IResource[] addResources(IContainer container, String[] hierarchy, boolean checkin) throws CoreException, TeamException {
- IResource[] newResources = buildResources(container, hierarchy, false);
- getProvider(container).add(newResources, IResource.DEPTH_ZERO, DEFAULT_MONITOR);
- if (checkin)
- getProvider(container).checkin(newResources, IResource.DEPTH_ZERO, DEFAULT_MONITOR);
- return newResources;
- }
-
- public void appendText(IResource resource, String text, boolean prepend) throws CoreException, IOException {
- IFile file = (IFile)resource;
- InputStream in = file.getContents();
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- try {
- if (prepend) {
- bos.write(text.getBytes());
- }
- int i;
- while ((i = in.read()) != -1) {
- bos.write(i);
- }
- if (!prepend) {
- bos.write(text.getBytes());
- }
- } finally {
- in.close();
- }
- file.setContents(new ByteArrayInputStream(bos.toByteArray()), false, false, DEFAULT_MONITOR);
- }
-
- /**
- * Delete the resources from an existing container and the changes to CVS
- */
- public IResource[] changeResources(IContainer container, String[] hierarchy, boolean checkin) throws CoreException, TeamException {
- List changedResources = new ArrayList(hierarchy.length);
- for (int i=0;i<hierarchy.length;i++) {
- IResource resource = container.findMember(hierarchy[i]);
- if (resource.getType() == IResource.FILE) {
- changedResources.add(resource);
- ((IFile)resource).setContents(getRandomContents(), false, false, null);
- }
- }
- IResource[] resources = (IResource[])changedResources.toArray(new IResource[changedResources.size()]);
- if (checkin)
- getProvider(container).checkin(resources, IResource.DEPTH_ZERO, DEFAULT_MONITOR);
- return resources;
- }
-
- /**
- * Delete the resources from an existing container and the changes to CVS
- */
- public IResource[] deleteResources(IContainer container, String[] hierarchy, boolean checkin) throws CoreException, TeamException {
- IResource[] resources = getResources(container, hierarchy);
- getProvider(container).delete(resources, DEFAULT_MONITOR);
- if (checkin)
- getProvider(container).checkin(resources, IResource.DEPTH_ZERO, DEFAULT_MONITOR);
- return resources;
- }
-
- /**
- * Unmanage the resources
- */
- public void unmanageResources(IContainer container, String[] hierarchy) throws CoreException, TeamException {
- IResource[] resources = getResources(container, hierarchy);
- for (int i=0;i<resources.length;i++) {
- CVSWorkspaceRoot.getCVSResourceFor(resources[i]).unmanage(null);
- }
- }
-
- /**
- * Update the resources from an existing container with the changes from the CVS repository
- */
- public IResource[] updateResources(IContainer container, String[] hierarchy, boolean ignoreLocalChanges) throws CoreException, TeamException {
- IResource[] resources = getResources(container, hierarchy);
- LocalOption[] options = Command.NO_LOCAL_OPTIONS;
- if(ignoreLocalChanges) {
- options = new LocalOption[] {Update.IGNORE_LOCAL_CHANGES};
- }
- getProvider(container).update(resources, options, null, true /*createBackups*/, DEFAULT_MONITOR);
- return resources;
- }
-
- public void updateProject(IProject project, CVSTag tag, boolean ignoreLocalChanges) throws TeamException {
- LocalOption[] options = Command.NO_LOCAL_OPTIONS;
- if(ignoreLocalChanges) {
- options = new LocalOption[] {Update.IGNORE_LOCAL_CHANGES};
- }
- getProvider(project).update(new IResource[] {project}, options, tag, true /*createBackups*/, DEFAULT_MONITOR);
- }
-
- public void commitProject(IProject project) throws TeamException {
- getProvider(project).checkin(new IResource[] {project}, IResource.DEPTH_INFINITE, DEFAULT_MONITOR);
- }
-
- /**
- * Commit the resources from an existing container to the CVS repository
- */
- public IResource[] commitResources(IContainer container, String[] hierarchy) throws CoreException, TeamException {
- IResource[] resources = getResources(container, hierarchy);
- getProvider(container).checkin(resources, IResource.DEPTH_ZERO, DEFAULT_MONITOR);
- return resources;
- }
-
- /**
- * Commit the resources from an existing container to the CVS repository
- */
- public void tagProject(IProject project, CVSTag tag) throws TeamException {
- IStatus status = getProvider(project).tag(new IResource[] {project}, IResource.DEPTH_INFINITE, tag, DEFAULT_MONITOR);
- if (status.getCode() != CVSStatus.OK) {
- throw new CVSException(status);
- }
- }
-
- /**
- * Return a collection of resources defined by hierarchy. The resources
- * are added to the workspace and to the file system. If the manage flag is true, the
- * resources are auto-managed, if false, they are left un-managed.
- */
- public IResource[] buildResources(IContainer container, String[] hierarchy, boolean includeContainer) throws CoreException {
- List resources = new ArrayList(hierarchy.length + 1);
- resources.addAll(Arrays.asList(buildResources(container, hierarchy)));
- if (includeContainer)
- resources.add(container);
- IResource[] result = (IResource[]) resources.toArray(new IResource[resources.size()]);
- ensureExistsInWorkspace(result, true);
- for (int i = 0; i < result.length; i++) {
- if (result[i].getType() == IResource.FILE)
- // 3786 bytes is the average size of Eclipse Java files!
- ((IFile) result[i]).setContents(getRandomContents(RANDOM_CONTENT_SIZE), true, false, null);
- }
- return result;
- }
-
- public void checkinResources(IContainer container, boolean deep) throws TeamException {
- getProvider(container).checkin(new IResource[] {container}, deep?IResource.DEPTH_INFINITE:IResource.DEPTH_ZERO, DEFAULT_MONITOR);
- }
- /*
- * Checkout a copy of the project into a project with the given postfix
- */
- protected IProject checkoutCopy(IProject project, String postfix) throws TeamException {
- // Check the project out under a different name and validate that the results are the same
- IProject copy = getWorkspace().getRoot().getProject(project.getName() + postfix);
- CVSProviderPlugin.getProvider().checkout(getRepository(), copy, CVSWorkspaceRoot.getCVSFolderFor(project).getFolderSyncInfo().getRepository(), null, DEFAULT_MONITOR);
- return copy;
- }
-
- protected IProject checkoutCopy(IProject project, CVSTag tag) throws TeamException {
- // Check the project out under a different name and validate that the results are the same
- IProject copy = getWorkspace().getRoot().getProject(project.getName() + tag.getName());
- CVSProviderPlugin.getProvider().checkout(getRepository(), copy,
- CVSWorkspaceRoot.getCVSFolderFor(project).getFolderSyncInfo().getRepository(),
- tag, DEFAULT_MONITOR);
- return copy;
- }
-
-
- protected IProject checkoutProject(IProject project, String moduleName, CVSTag tag) throws TeamException {
- if (project == null)
- project = getWorkspace().getRoot().getProject(new Path(moduleName).lastSegment());
- CVSProviderPlugin.getProvider().checkout(getRepository(), project, moduleName, tag, DEFAULT_MONITOR);
- return project;
- }
- /*
- * This method creates a project with the given resources, imports
- * it to CVS and checks it out
- */
- protected IProject createProject(String prefix, String[] resources) throws CoreException, TeamException {
- IProject project = getUniqueTestProject(prefix);
- buildResources(project, resources, true);
- shareProject(project);
- assertValidCheckout(project);
- return project;
- }
-
- /*
- * Compare two projects by comparing thier providers
- */
- protected void assertEquals(IProject project1, IProject project2) throws CoreException, TeamException, IOException {
- assertEquals(project1, project2, false, false);
- }
-
- protected void assertEquals(IProject project1, IProject project2, boolean includeTimestamps, boolean includeTags) throws CoreException, TeamException, IOException {
- assertEquals(getProvider(project1), getProvider(project2), includeTimestamps, includeTags);
- }
-
- /*
- * Compare CVS team providers by comparing the cvs resource corresponding to the provider's project
- */
- protected void assertEquals(CVSTeamProvider provider1, CVSTeamProvider provider2, boolean includeTimestamps, boolean includeTags) throws CoreException, TeamException, IOException {
- assertEquals(Path.EMPTY, CVSWorkspaceRoot.getCVSFolderFor(provider1.getProject()),
- CVSWorkspaceRoot.getCVSFolderFor(provider2.getProject()),
- includeTimestamps, includeTags);
- }
-
- /*
- * Compare resources by casting them to their prpoer type
- */
- protected void assertEquals(IPath parent, ICVSResource resource1, ICVSResource resource2, boolean includeTimestamps, boolean includeTags) throws CoreException, CVSException, IOException {
- assertEquals("Resource types do not match for " + parent.append(resource1.getName()), resource1.isFolder(), resource2.isFolder());
- if (!resource1.isFolder())
- assertEquals(parent, (ICVSFile)resource1, (ICVSFile)resource2, includeTimestamps, includeTags);
- else
- assertEquals(parent, (ICVSFolder)resource1, (ICVSFolder)resource2, includeTimestamps, includeTags);
- }
-
- /*
- * Compare folders by comparing their folder sync info and there children
- *
- * XXX What about unmanaged children?
- */
- protected void assertEquals(IPath parent, ICVSFolder container1, ICVSFolder container2, boolean includeTimestamps, boolean includeTags) throws CoreException, CVSException, IOException {
- IPath path = parent.append(container1.getName());
- assertEquals(path, container1.getFolderSyncInfo(), container2.getFolderSyncInfo(), includeTags);
- assertTrue("The number of resource in " + path.toString() + " differs",
- container1.members(ICVSFolder.FILE_MEMBERS | ICVSFolder.FOLDER_MEMBERS).length
- == container2.members(ICVSFolder.FILE_MEMBERS | ICVSFolder.FOLDER_MEMBERS).length);
- ICVSResource[] resources = container1.members(ICVSFolder.FILE_MEMBERS | ICVSFolder.FOLDER_MEMBERS);
- for (int i= 0;i <resources.length;i++) {
- assertEquals(path, resources[i], container2.getChild(resources[i].getName()), includeTimestamps, includeTags);
- }
-
- }
-
- /*
- * Compare the files contents and sync information
- */
- protected void assertEquals(IPath parent, ICVSFile file1, ICVSFile file2, boolean includeTimestamps, boolean includeTags) throws CoreException, CVSException, IOException {
- if (file1.getName().equals(".project")) return;
- // Getting the contents first is important as it will fetch the proper sync info if one of the files is a remote handle
- assertTrue("Contents of " + parent.append(file1.getName()) + " do not match", compareContent(getContents(file1), getContents(file2)));
- assertEquals(parent.append(file1.getName()), file1.getSyncInfo(), file2.getSyncInfo(), includeTimestamps, includeTags);
- }
-
- /*
- * Compare sync info by comparing the entry line generated by the sync info
- */
- protected void assertEquals(IPath path, ResourceSyncInfo info1, ResourceSyncInfo info2, boolean includeTimestamp, boolean includeTag) throws CoreException, CVSException, IOException {
- if (info1 == null) {
- assertTrue("Resource Sync info differs for " + path.toString(), info2 == null);
- return;
- }
- String line1;
- String line2;
- if(includeTimestamp) {
- line1 = info1.getEntryLine();
- line2 = info2.getEntryLine();
- } else {
- line1 = info1.getServerEntryLine(null);
- line2 = info2.getServerEntryLine(null);
- }
- if (!includeTag) {
- // Strip everything past the last slash
- line1 = line1.substring(0, line1.lastIndexOf('/'));
- line2 = line2.substring(0, line2.lastIndexOf('/'));
- }
- assertTrue("Resource Sync info differs for " + path.toString(), line1.equals(line2));
- }
-
- /*
- * Use the equals of folder sync info unless the tag is not included in which case we just
- * compare the root and repository
- */
- protected void assertEquals(IPath path, FolderSyncInfo info1, FolderSyncInfo info2, boolean includeTag) throws CoreException, CVSException, IOException {
- if (includeTag) {
- assertTrue("Folder sync info differs for " + path.toString(), info1.equals(info2));
- } else {
- assertTrue("Repository Root differs for " + path.toString(), info1.getRoot().equals(info2.getRoot()));
- assertTrue("Repository relative path differs for " + path.toString(), info1.getRepository().equals(info2.getRepository()));
- }
- }
-
-
- /*
- * Compare folders by comparing their folder sync info and there children
- *
- * XXX What about unmanaged children?
- */
- protected void assertEquals(IPath parent, RemoteFolder container1, RemoteFolder container2, boolean includeTags) throws CoreException, TeamException, IOException {
- IPath path = parent.append(container1.getName());
- assertEquals(path, container1.getFolderSyncInfo(), container2.getFolderSyncInfo(), includeTags);
- ICVSRemoteResource[] members1 = container1.getMembers(DEFAULT_MONITOR);
- ICVSRemoteResource[] members2 = container2.getMembers(DEFAULT_MONITOR);
- assertTrue("Number of members differ for " + path, members1.length == members2.length);
- Map memberMap2 = new HashMap();
- for (int i= 0;i <members2.length;i++) {
- memberMap2.put(members2[i].getName(), members2[i]);
- }
- for (int i= 0;i <members1.length;i++) {
- ICVSRemoteResource member2 = (ICVSRemoteResource)memberMap2.get(members1[i].getName());
- assertNotNull("Resource does not exist: " + path.append(members1[i].getName()) + member2);
- assertEquals(path, members1[i], member2, includeTags);
- }
- }
- protected void assertEquals(IPath parent, ICVSRemoteResource resource1, ICVSRemoteResource resource2, boolean includeTags) throws CoreException, TeamException, IOException {
- assertEquals("Resource types do not match for " + parent.append(resource1.getName()), resource1.isContainer(), resource2.isContainer());
- if (resource1.isContainer())
- assertEquals(parent, (RemoteFolder)resource1, (RemoteFolder)resource2, includeTags);
- else
- assertEquals(parent, (ICVSFile)resource1, (ICVSFile)resource2, false, includeTags);
- }
-
-
- /*
- * Compare the local project with the remote state by checking out a copy of the project.
- */
- protected void assertLocalStateEqualsRemote(IProject project) throws TeamException, CoreException, IOException {
- assertEquals(getProvider(project), getProvider(checkoutCopy(project, "-remote")), false, true);
- }
-
- /*
- * Compare the local project with the remote state indicated by the given tag by checking out a copy of the project.
- */
- protected void assertLocalStateEqualsRemote(String message, IProject project, CVSTag tag) throws TeamException, CoreException, IOException {
- assertEquals(getProvider(project), getProvider(checkoutCopy(project, tag)), true, false);
- }
-
- protected void assertHasNoRemote(String prefix, IResource[] resources) throws TeamException {
- for (int i=0;i<resources.length;i++)
- assertHasNoRemote(prefix, resources[i]);
- }
-
- protected void assertHasNoRemote(String prefix, IResource resource) throws TeamException {
- assertTrue(prefix + " resource should not have a remote", !getProvider(resource).hasRemote(resource));
- }
-
- protected void assertHasRemote(String prefix, IResource[] resources) throws TeamException {
- for (int i=0;i<resources.length;i++)
- assertHasRemote(prefix, resources[i]);
- }
-
- protected void assertHasRemote(String prefix, IResource resource) throws TeamException {
- assertTrue(prefix + " resource should have a remote", getProvider(resource).hasRemote(resource));
- }
-
- protected void assertIsModified(String prefix, IResource[] resources) throws TeamException {
- for (int i=0;i<resources.length;i++)
- assertIsModified(prefix, resources[i]);
- }
-
- protected void assertIsModified(String prefix, IResource resource) throws TeamException {
- // Only check for files as CVS doesn't dirty folders
- if (resource.getType() == IResource.FILE)
- assertTrue(prefix + " resource " + resource.getFullPath() + " should be dirty.", ((ICVSFile)getCVSResource(resource)).isModified());
- }
-
- protected void assertNotModified(String prefix, IResource[] resources) throws TeamException {
- for (int i=0;i<resources.length;i++)
- assertNotModified(prefix, resources[i]);
- }
-
- protected void assertNotModified(String prefix, IResource resource) throws TeamException {
- assertTrue(prefix + " resource should be dirty", !((ICVSFile)getCVSResource(resource)).isModified());
- }
-
- protected void assertValidCheckout(IProject project) {
- // NOTE: Add code to ensure that the project was checkout out properly
- CVSTeamProvider provider = (CVSTeamProvider)RepositoryProvider.getProvider(project);
- assertNotNull(provider);
- }
- protected InputStream getContents(ICVSFile file) throws CVSException, IOException {
- if (file instanceof ICVSRemoteFile)
- return ((RemoteFile)file).getContents(DEFAULT_MONITOR);
- else
- return new BufferedInputStream(file.getContents());
- }
-
- /*
- * Get the CVS Resource for the given resource
- */
- protected ICVSResource getCVSResource(IResource resource) throws CVSException {
- return CVSWorkspaceRoot.getCVSResourceFor(resource);
- }
-
- protected IProject getNamedTestProject(String name) throws CoreException {
- IProject target = getWorkspace().getRoot().getProject(name);
- if (!target.exists()) {
- target.create(null);
- target.open(null);
- }
- assertExistsInFileSystem(target);
- return target;
- }
- protected CVSTeamProvider getProvider(IResource resource) throws TeamException {
- return (CVSTeamProvider)RepositoryProvider.getProvider(resource.getProject());
- }
- protected static InputStream getRandomContents(int sizeAtLeast) {
- StringBuffer randomStuff = new StringBuffer(sizeAtLeast + 100);
- while (randomStuff.length() < sizeAtLeast) {
- randomStuff.append(getRandomSnippet());
- }
- return new ByteArrayInputStream(randomStuff.toString().getBytes());
- }
- /**
- * Return String with some random text to use
- * as contents for a file resource.
- */
- public static String getRandomSnippet() {
- switch ((int) Math.round(Math.random() * 10)) {
- case 0 :
- return "este e' o meu conteudo (portuguese)";
- case 1 :
- return "Dann brauchen wir aber auch einen deutschen Satz!";
- case 2 :
- return "I'll be back";
- case 3 :
- return "don't worry, be happy";
- case 4 :
- return "there is no imagination for more sentences";
- case 5 :
- return "customize yours";
- case 6 :
- return "foo";
- case 7 :
- return "bar";
- case 8 :
- return "foobar";
- case 9 :
- return "case 9";
- default :
- return "these are my contents";
- }
- }
- protected IProject getUniqueTestProject(String prefix) throws CoreException {
- // manage and share with the default stream create by this class
- return getNamedTestProject(prefix + "-" + Long.toString(System.currentTimeMillis()));
- }
-
- protected CVSRepositoryLocation getRepository() {
- return CVSTestSetup.repository;
- }
- protected void importProject(IProject project) throws TeamException {
-
- // Create the root folder for the import operation
- ICVSFolder root = CVSWorkspaceRoot.getCVSFolderFor(project);
-
- // Perform the import
- IStatus status;
- Session s = new Session(getRepository(), root);
- s.open(DEFAULT_MONITOR);
- try {
- status = Command.IMPORT.execute(s,
- Command.NO_GLOBAL_OPTIONS,
- new LocalOption[] {Import.makeArgumentOption(Command.MESSAGE_OPTION, "Initial Import")},
- new String[] { project.getName(), getRepository().getUsername(), "start" },
- null,
- DEFAULT_MONITOR);
- } finally {
- s.close();
- }
-
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSServerException(status);
- }
- }
-
- protected void shareProject(IProject project) throws TeamException, CoreException {
- ((CVSProvider)CVSProviderPlugin.getProvider()).createModule(getRepository(), project, null, DEFAULT_MONITOR);
- List resourcesToAdd = new ArrayList();
- IResource[] members = project.members();
- for (int i = 0; i < members.length; i++) {
- if ( ! CVSWorkspaceRoot.getCVSResourceFor(members[i]).isIgnored()) {
- resourcesToAdd.add(members[i]);
- }
- }
- getProvider(project).add((IResource[]) resourcesToAdd.toArray(new IResource[resourcesToAdd.size()]), IResource.DEPTH_INFINITE, DEFAULT_MONITOR);
- getProvider(project).checkin(new IResource[] {project}, IResource.DEPTH_INFINITE, DEFAULT_MONITOR);
- // Pause to ensure that future operations happen later than timestamp of committed resources
- JUnitTestCase.waitMsec(1500);
- }
-}
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/ICVSClient.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/ICVSClient.java
deleted file mode 100644
index 79406c89e..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/ICVSClient.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.tests.ccvs.core;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-
-public interface ICVSClient {
- public void executeCommand(
- ICVSRepositoryLocation repositoryLocation, IContainer localRoot, String command,
- String[] globalOptions, String[] localOptions, String[] arguments)
- throws CVSException;
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/JUnitTestCase.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/JUnitTestCase.java
deleted file mode 100644
index cf1eba30f..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/JUnitTestCase.java
+++ /dev/null
@@ -1,323 +0,0 @@
-package org.eclipse.team.tests.ccvs.core;
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.PrintStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.awtui.TestRunner;
-import junit.framework.TestCase;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-
-/**
- * Base-class to the low level-testcases for the Session.
- * Supplies convinience-methods and default attributes for the testcases.
- * Especally data for a default-connection to the server is stored.
- */
-public abstract class JUnitTestCase extends TestCase {
- protected static final int RANDOM_CONTENT_SIZE = 10000;
- protected static final boolean NEWLINE_TEST = false;
- protected static final String PLATFORM_NEWLINE = System.getProperty("line.separator");
- protected static final IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
-
- public static final String[] EMPTY_ARGS = new String[0];
-
- /**
- * Init the options and arguments to standard-values
- */
- public JUnitTestCase(String name) {
- super(name);
- }
-
- /**
- * Delete a project/resource form the standard cvs-server
- */
- protected void magicDeleteRemote(String remoteName) throws CVSException {
- magicDeleteRemote(CVSTestSetup.repository, remoteName);
- }
-
- /**
- * Delete a project/resource form the specified cvs-server
- */
- protected static void magicDeleteRemote(ICVSRepositoryLocation location, String remoteName)
- throws CVSException {
- CVSTestSetup.executeRemoteCommand(location, "rm -rf " +
- new Path(location.getRootDirectory()).append(remoteName).toString());
- }
-
- /**
- * Sends the project to the standard cvs-server so that it contains the resources
- * described in createResources. The files have random content.
- *
- * @param projectName the name of the project to import
- * @param createResources e.g. new String[]{"a.txt","f1/b.txt","f1/c.txt","f2/d.txt"}
- */
- protected void magicSetUpRepo(String projectName, String[] createResources)
- throws IOException, CoreException, CVSException {
- magicSetUpRepo(CVSTestSetup.repository, projectName, createResources);
- }
-
- /**
- * Sends the project to the specified cvs-server so that it contains the resources
- * described in createResources. The files have random content.
- *
- * @param location the CVS repository location
- * @param projectName the name of the project to import
- * @param createResources e.g. new String[]{"a.txt","f1/b.txt","f1/c.txt","f2/d.txt"}
- */
- protected static void magicSetUpRepo(ICVSRepositoryLocation location, String projectName,
- String[] createResources) throws IOException, CoreException, CVSException {
- IProject projectRoot = workspaceRoot.getProject(projectName + "-setup-tmp");
- mkdirs(projectRoot);
- createRandomFile(projectRoot, createResources);
- magicDeleteRemote(location, projectName);
-
- String[] lOptions = new String[]{"-m","msg"};
- String[] args = new String[]{projectName,"a","b"};
-
- EclipseCVSClient.execute(location, CVSWorkspaceRoot.getCVSFolderFor(projectRoot),
- "import", EMPTY_ARGS, lOptions, args);
- projectRoot.delete(false /*force*/, null);
- }
-
- /**
- * Compare Arrays and find the first different element
- */
- protected static void assertEqualsArrays(Object[] obArr1, Object[] obArr2) {
-
- assertEquals("Called assertEqualsArrays with null on one side", obArr1 == null,obArr2 == null);
- if (obArr1 == null) {
- return;
- }
-
- for (int i=0; i<Math.min(obArr1.length,obArr2.length); i++) {
- assertEquals("At Element " + i + " of the array",obArr1[i],obArr2[i]);
- }
-
- // If the Arrays are different in length, look for the first
- // not existing element and compare it to the existing in the
- // other array
- if (obArr1.length > obArr2.length) {
- assertEquals("Arrays of different length",obArr1[obArr2.length],null);
- return;
- }
-
- if (obArr1.length < obArr2.length) {
- assertEquals("Arrays of different length",obArr2[obArr1.length],null);
- return;
- }
-
- }
-
- /**
- * Write text lines to file from an array of strings.
- */
- protected static void writeToFile(IFile file, String[] contents)
- throws IOException, CoreException {
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- PrintStream os = new PrintStream(bos);
- try {
- for (int i = 0; i < contents.length; i++) {
- os.println(contents[i]);
- }
- ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
- if (file.exists()) {
- file.setContents(bis, false /*force*/, true /*keepHistory*/, null);
- } else {
- mkdirs(file.getParent());
- file.create(bis, false /*force*/, null);
- }
- } finally {
- os.close();
- }
- }
-
- /**
- * Read text lines from file into an array of strings.
- */
- protected static String[] readFromFile(IFile file)
- throws IOException, CoreException {
- if (! file.exists()) return null;
- BufferedReader reader = new BufferedReader(new InputStreamReader(file.getContents()));
- List fileContentStore = new ArrayList();
- try {
- String line;
- while ((line = reader.readLine()) != null) {
- fileContentStore.add(line);
- }
- } finally {
- reader.close();
- }
- return (String[]) fileContentStore.toArray(new String[fileContentStore.size()]);
- }
-
- /**
- * Append text files to file from an array of strings, create new file if it
- * does not exist yet.
- */
- protected static void appendToFile(IFile file, String[] contents)
- throws IOException, CoreException {
- String[] oldContents = readFromFile(file);
- String[] newContents;
- if (oldContents == null) {
- newContents = contents;
- } else {
- newContents = new String[oldContents.length + contents.length];
- System.arraycopy(oldContents, 0, newContents, 0, oldContents.length);
- System.arraycopy(contents, 0, newContents, oldContents.length, contents.length);
- }
- writeToFile(file, newContents);
- }
-
- /**
- * Pre-Append text files to file from an array of strings, create new file if it
- * does not exist yet.
- */
- protected static void prefixToFile(IFile file, String[] contents)
- throws IOException, CoreException {
- String[] oldContents = readFromFile(file);
- String[] newContents;
- if (oldContents == null) {
- newContents = contents;
- } else {
- newContents = new String[oldContents.length + contents.length];
- System.arraycopy(contents, 0, newContents, 0, contents.length);
- System.arraycopy(oldContents, 0, newContents, contents.length, oldContents.length);
- }
- writeToFile(file, newContents);
- }
-
- /**
- * genertates Random content meand to be written in a File
- */
- protected static String createRandomContent() {
-
- StringBuffer content = new StringBuffer();
- int contentSize;
-
- content.append("Random file generated for test" + PLATFORM_NEWLINE);
-
- contentSize = (int) Math.round(RANDOM_CONTENT_SIZE * 2 * Math.random());
- for (int i=0; i<contentSize; i++) {
-
- if (Math.random()>0.99) {
- content.append(PLATFORM_NEWLINE);
- }
-
- if (Math.random()>0.99) {
- content.append("\n");
- }
-
- if (NEWLINE_TEST) {
- if (Math.random()>0.99) {
- content.append("\n\r");
- }
- if (Math.random()>0.99) {
- content.append('\r');
- }
- if (Math.random()>0.99) {
- content.append("\r\n");
- }
- if (Math.random()>0.99) {
- content.append("\n");
- }
- if (Math.random()>0.99) {
- content.append("\n\n");
- }
- if (Math.random()>0.99) {
- content.append("\r\r");
- }
- }
-
- content.append((char)('\u0021' + Math.round(60 * Math.random())));
- }
-
- return content.toString();
- }
-
- /**
- * Creates a folder (and its parents if needed).
- */
- protected static void mkdirs(IContainer container) throws CoreException {
- if (container.getType() == IResource.PROJECT) {
- IProject project = (IProject) container;
- if (! project.exists()) {
- project.create(null);
- }
- project.open(null);
- } else if (container.getType() == IResource.FOLDER) {
- IFolder folder = (IFolder) container;
- if (! folder.exists()) {
- mkdirs(folder.getParent());
- folder.create(false /*force*/, true /*local*/, null);
- }
- }
- }
-
- /**
- * Creates the file with random content, and all the folders on the
- * way to there.
- */
- private static void createRandomFile(IFile file)
- throws IOException, CoreException {
- mkdirs(file.getParent());
- writeToFile(file, new String[] { createRandomContent() });
- }
-
- /**
- * Build the given fileStructure, all files are going to have
- * sample content, all folders on the way are created.
- */
- protected static void createRandomFile(IContainer parent, String[] fileNameArray)
- throws IOException, CoreException {
- for (int i = 0; i < fileNameArray.length; i++) {
- IFile file = parent.getFile(new Path(fileNameArray[i]));
- createRandomFile(file);
- }
- }
-
- /**
- * wait milliseconds to continou the execution
- */
- public static void waitMsec(int msec) {
- try {
- int wait = CVSTestSetup.WAIT_FACTOR * msec;
- long start = System.currentTimeMillis();
- Thread.currentThread().sleep(wait);
- long end = System.currentTimeMillis();
- // Allow a 100 ms error in waiting
- assertTrue("Error in thread class. Did not wait long enough", (end - start) > (wait - 100));
- } catch(InterruptedException e) {
- fail("wait-problem");
- }
- }
-
- /**
- * Call this method from the main-method of your test-case.
- * It initialises some required parameter and runs the testcase.
- */
- protected static void run(Class test) {
- // XXX is this property used anywhere?
- System.setProperty("eclipse.cvs.standalone", "true");
- TestRunner.run(test);
- }
-}
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/AllTestsCompatibility.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/AllTestsCompatibility.java
deleted file mode 100644
index a6e887eb0..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/AllTestsCompatibility.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.eclipse.team.tests.ccvs.core.compatible;
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.team.tests.ccvs.core.JUnitTestCase;
-
-public class AllTestsCompatibility extends TestSuite {
-
- public static Test suite() {
- TestSuite suite = new TestSuite();
- suite.addTest(BasicTest.suite());
- suite.addTest(ConflictTest.suite());
- suite.addTest(ModuleTest.suite());
- return new CompatibleTestSetup(suite);
- }
-
- public AllTestsCompatibility(String name) {
- super(name);
- }
-
- public AllTestsCompatibility() {
- super();
- }
-}
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/BasicTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/BasicTest.java
deleted file mode 100644
index f8b4b82e6..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/BasicTest.java
+++ /dev/null
@@ -1,490 +0,0 @@
-package org.eclipse.team.tests.ccvs.core.compatible;
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-import java.util.Date;
-import java.util.GregorianCalendar;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.team.tests.ccvs.core.JUnitTestCase;
-
-public class BasicTest extends JUnitTestCase {
- SameResultEnv env1;
- SameResultEnv env2;
-
- public BasicTest(String arg) {
- super(arg);
- env1 = new SameResultEnv(arg + "-checkout1");
- env2 = new SameResultEnv(arg + "-checkout2");
- }
-
- public BasicTest() {
- this("BasicTest");
- }
-
- public static void main(String[] args) {
- run(BasicTest.class);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(BasicTest.class);
- return new CompatibleTestSetup(suite);
- //return new CompatibleTestSetup(new BasicTest("testReadOnly"));
- }
- public void setUp() throws Exception {
- env1.setUp();
- env2.setUp();
-
- // Set the project to the content we need ...
- env1.magicSetUpRepo("proj2",new String[]{"a.txt","f1/b.txt","f1/c.txt"});
- env2.deleteFile("proj2");
- }
-
- public void tearDown() throws Exception {
- env1.tearDown();
- env2.tearDown();
- }
-
- public void testAdd() throws Exception {
-
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- env1.writeToFile("proj2/d.txt",new String[]{"The file to be added","next"});
- env1.mkdirs("proj2/f2/f3");
- env1.mkdirs("proj2/f4/f5");
- env1.writeToFile("proj2/f4/f5/e.txt", new String[]{"Another file to be added","next"});
-
- env1.execute("add",EMPTY_ARGS,new String[]{"d.txt"},"proj2");
- env1.execute("add",EMPTY_ARGS,new String[]{"f2","f2/f3"},"proj2");
- env1.execute("add",EMPTY_ARGS,new String[]{"f4"},"proj2");
- env1.execute("add",EMPTY_ARGS,new String[]{"f4/f5"},"proj2");
- env1.execute("add",EMPTY_ARGS,new String[]{"f4/f5/e.txt"},"proj2");
- env1.execute("ci",new String[]{"-m","TestMessage"},new String[]{"proj2"});
-
- // Check the stuff out somewhere else to acctually check, that
- // the file has been accepted
- env2.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- }
-
- public void testAddUpdate() throws Exception {
-
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- env2.execute("co",EMPTY_ARGS,new String[]{"proj2"});
-
- env1.writeToFile("proj2/d.txt",new String[]{"The file to be added","next"});
- env1.mkdirs("proj2/f2/f3");
- env1.mkdirs("proj2/f4/f5");
- env1.writeToFile("proj2/f4/f5/e.txt", new String[]{"Another file to be added","next"});
-
- env1.execute("add",EMPTY_ARGS,new String[]{"d.txt"},"proj2");
- env1.execute("add",EMPTY_ARGS,new String[]{"f2","f2/f3"},"proj2");
- env1.execute("add",EMPTY_ARGS,new String[]{"f4"},"proj2");
- env1.execute("add",EMPTY_ARGS,new String[]{"f4/f5"},"proj2");
- env1.execute("add",EMPTY_ARGS,new String[]{"f4/f5/e.txt"},"proj2");
- env1.execute("ci",new String[]{"-m","TestMessage"},new String[]{"proj2"});
-
- env2.execute("update",EMPTY_ARGS,new String[]{"proj2"});
-
- }
-
- public void testRemove() throws Exception {
-
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- env1.deleteFile("proj2/a.txt");
- env1.deleteFile("proj2/f1/c.txt");
-
- env1.execute("remove",EMPTY_ARGS,new String[]{"a.txt"},"proj2");
- env1.execute("remove",EMPTY_ARGS,new String[]{"f1/c.txt"},"proj2");
- env1.execute("ci",new String[]{"-m","TestMessage"},new String[]{"proj2"});
-
- // Check the stuff out somewhere else to acctually check, that
- // the file has been accepted
- env2.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- }
-
- public void testRemoveRecusive() throws Exception {
-
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- env2.execute("co",EMPTY_ARGS,new String[]{"proj2"});
-
- env1.deleteFile("proj2/a.txt");
- env1.deleteFile("proj2/f1/c.txt");
-
- env1.execute("remove",EMPTY_ARGS,new String[0],"proj2");
- env1.execute("ci",new String[]{"-m","TestMessage"},new String[]{"proj2"});
-
- // Check the stuff out somewhere else to acctually check, that
- // the file has been accepted
- env2.execute("update",EMPTY_ARGS,new String[]{"proj2"});
- }
-
- public void testRoundRewrite() throws Exception {
-
- // Download content in two locations
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"},"");
- env2.execute("co",EMPTY_ARGS,new String[]{"proj2"},"");
-
- // change the file "proj1/folder1/c.txt" in env1 check it in
- // on the server
- env1.appendToFile("proj2/f1/c.txt", new String[] { "AppendIt" });
- env1.execute("ci",new String[]{"-m","TestMessage"},new String[]{"proj2"},"");
-
- // assure that the file is different in env1 and env2
- // try {
- // assertEqualsArrays(env1.readFromFile("proj2/f1/c.txt"),
- // env2.readFromFile("proj2/f1/c.txt"));
- // throw new IllegalArgumentException("This is a failed Assertion");
- // } catch (AssertionFailedError e) {}
-
- // update env2 and make sure the changes are there
- env2.execute("update",EMPTY_ARGS,new String[]{"proj2"},"");
- // assertEqualsArrays(env1.readFromFile("proj2/f1/c.txt"),
- // env2.readFromFile("proj2/f1/c.txt"));
- }
-
- public void testUpdateMinusN() throws Exception {
- String[] fileContent1;
-
- fileContent1 = new String[]{"RandomNumber", Math.random() + ""};
-
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- env2.execute("co",EMPTY_ARGS,new String[]{"proj2"});
-
- env1.writeToFile("proj1/folder1/c.txt",fileContent1);
-
- env1.execute("ci",new String[]{"-n"},new String[]{"-m","TestMessage"},new String[]{"proj2"},"");
- env2.execute("update",EMPTY_ARGS,new String[]{"proj2"});
- }
-
- public void testStatus() throws Exception {
-
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- env1.execute("status",EMPTY_ARGS,new String[]{"proj2"});
-
- env1.deleteFile("proj2/a.txt");
- env1.deleteFile("proj2/f1/c.txt");
- env1.appendToFile("proj2/f1/b.txt",new String[] { "AppendIt" });
-
- env1.execute("status",EMPTY_ARGS,new String[]{"proj2"});
- env1.execute("status",EMPTY_ARGS,new String[0],"proj2");
-
- env1.createRandomFile("proj2/d.txt");
-
- env1.execute("status",EMPTY_ARGS,new String[0],"proj2");
- env1.execute("status",EMPTY_ARGS,new String[]{"f1/b.txt"},"proj2");
- // env1.execute("status",localOptions,new String[]{"d.txt"},"proj2");
- }
-
- public void testLog() throws Exception {
-
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- env1.execute("log",EMPTY_ARGS,new String[]{"proj2"});
-
- env1.deleteFile("proj2/a.txt");
- env1.deleteFile("proj2/f1/c.txt");
- env1.appendToFile("proj2/f1/b.txt",new String[] { "AppendIt" });
-
- env1.execute("log",EMPTY_ARGS,new String[]{"proj2"});
- env1.execute("log",EMPTY_ARGS,new String[0],"proj2");
-
- env1.createRandomFile("proj2/d.txt");
-
- env1.execute("log",EMPTY_ARGS,new String[0],"proj2");
- env1.execute("log",EMPTY_ARGS,new String[]{"f1/b.txt"},"proj2");
-
- }
-
- public void testBranchTag() throws Exception {
-
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- env1.execute("tag",new String[]{"-b"},new String[]{"tag1","proj2"});
-
- env1.deleteFile("proj2/a.txt");
- env1.deleteFile("proj2/f1/c.txt");
- env1.appendToFile("proj2/f1/b.txt",new String[] { "AppendIt" });
-
- env1.execute("tag",new String[]{"-b"},new String[]{"tag2","proj2"});
-
- env1.createRandomFile("proj2/d.txt");
-
- env1.deleteFile("proj2");
-
- // Try an commit and an add in the two different streams
- env1.execute("co",new String[]{"-r","tag1"},new String[]{"proj2"});
- env1.appendToFile("proj2/f1/b.txt", new String[] { "AppendItTwo" });
- env1.createRandomFile("proj2/d.txt");
- env1.execute("add",new String[0],new String[]{"d.txt"},"proj2");
- env1.execute("ci",new String[]{"-m","branch"},new String[]{"proj2"});
- env1.deleteFile("proj2");
- env1.execute("co",new String[]{"-r","tag1"},new String[]{"proj2"});
-
- env2.execute("co",new String[]{"-r","tag2"},new String[]{"proj2"});
- env2.appendToFile("proj2/f1/b.txt", new String[] { "AppendItThree" });
- env2.createRandomFile("proj2/d.txt");
- env2.execute("add",new String[0],new String[]{"d.txt"},"proj2");
- env2.execute("ci",new String[]{"-m","branch"},new String[]{"proj2"});
- env2.deleteFile("proj2");
- env2.execute("co",new String[]{"-r","tag2"},new String[]{"proj2"});
- }
-
- public void testBranchingWithLocalChanges() throws Exception {
- // Try to branch of a workspace with local changes
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- JUnitTestCase.waitMsec(1500);
- env1.appendToFile("proj2/f1/b.txt",new String[] { "AppendIt" });
- env1.execute("tag",new String[]{"-b"},new String[]{"branch-with-changes","proj2"});
- env1.execute("update",new String[]{"-r", "branch-with-changes"},new String[]{"proj2"});
- }
-
- public void testTag() throws Exception {
-
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- env1.execute("tag",EMPTY_ARGS,new String[]{"tag1","proj2"});
-
- env1.deleteFile("proj2/a.txt");
- env1.deleteFile("proj2/f1/c.txt");
- env1.appendToFile("proj2/f1/b.txt",new String[] { "AppendIt" });
-
- env1.execute("tag",EMPTY_ARGS,new String[]{"tag2","proj2"});
- env1.execute("tag",EMPTY_ARGS,new String[]{"tag2"},"proj2");
-
- env1.createRandomFile("proj2/d.txt");
-
- env1.execute("tag",EMPTY_ARGS,new String[]{"tag3"},"proj2");
- env1.execute("tag",EMPTY_ARGS,new String[]{"tag3","f1/b.txt"},"proj2");
-
- env1.deleteFile("proj2");
- env1.execute("co",new String[]{"-r","tag1"},new String[]{"proj2"});
- env1.deleteFile("proj2");
- env1.execute("co",new String[]{"-r","tag2"},new String[]{"proj2"});
- env1.deleteFile("proj2");
- env1.execute("co",new String[]{"-r","tag3"},new String[]{"proj2"});
-
- // env1.execute("tag",localOptions,new String[]{"d.txt"},"proj2");
-
- env1.execute("update", new String[]{"-r","tag1"}, new String[]{"proj2"});
- env1.execute("update", new String[]{"-r","tag2"}, new String[]{"proj2"});
- env1.execute("update", new String[]{"-r","tag3"}, new String[]{"proj2"});
- env1.execute("update", new String[]{"-A"}, new String[]{"proj2"});
- }
-
- public void testRTag() throws Exception {
-
- // Checkout and tag the project
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- env1.execute("tag",EMPTY_ARGS,new String[]{"tag1","proj2"});
- env1.deleteFile("proj2");
-
- // Use rtag to tag the above tag as both a version and a branch
- env1.execute("rtag",new String[]{"-r", "tag1"},new String[]{"rtag1","proj2"});
- env1.execute("rtag",new String[]{"-b", "-r", "tag1"},new String[]{"btag1","proj2"});
-
- // Checkout the version and branch
- env1.deleteFile("proj2");
- env1.execute("co",new String[]{"-r","rtag1"},new String[]{"proj2"});
- env1.deleteFile("proj2");
- env1.execute("co",new String[]{"-r","btag1"},new String[]{"proj2"});
- }
-
- public void testPrune() throws Exception {
-
- // Download content in two locations
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"},"");
- env2.execute("co",EMPTY_ARGS,new String[]{"proj2"},"");
-
- // change the file "proj1/folder1/c.txt" in env1 check it in
- // on the server
- env1.deleteFile("proj2/f1/b.txt");
- env1.deleteFile("proj2/f1/c.txt");
- env1.execute("remove",EMPTY_ARGS,new String[0],"proj2");
-
- env1.execute("ci",new String[]{"-m","TestMessage"},new String[]{"proj2"},"");
- env1.execute("update",new String[]{"-P"},new String[]{"proj2"},"");
-
- // update env2 and make sure the changes are there
- env2.execute("update",new String[]{"-P"},new String[]{"proj2"},"");
-
- }
-
- public void testPrune2() throws Exception {
-
- // Download content in two locations
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"},"");
- env2.execute("co",EMPTY_ARGS,new String[]{"proj2"},"");
-
- // change the file "proj1/folder1/c.txt" in env1 check it in
- // on the server
- env1.deleteFile("proj2/f1/b.txt");
- env1.deleteFile("proj2/f1/c.txt");
- env1.execute("remove",EMPTY_ARGS,new String[0],"proj2");
-
- env1.execute("ci",new String[]{"-m","TestMessage"},new String[]{"proj2"},"");
- env1.execute("update",new String[]{"-P"},new String[]{},"proj2");
-
- // update env2 and make sure the changes are there
- env2.execute("update",new String[]{"-P"},new String[]{},"proj2");
-
- }
-
- public void testAdmin() throws Exception {
-
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"},"");
-
- env1.execute("admin",new String[]{"-kb"},new String[]{"proj2/f1/b.txt"},"");
- env1.execute("update",EMPTY_ARGS,new String[]{"proj2"},"");
-
- env2.execute("co",EMPTY_ARGS,new String[]{"proj2"},"");
- }
-
- public void testDiff() throws Exception {
-
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"});
- env1.execute("diff",EMPTY_ARGS,new String[]{"proj2"});
-
- env1.setIgnoreExceptions(true);
-
- env1.appendToFile("proj2/f1/c.txt",new String[] {"AppendIt2" });
- env1.appendToFile("proj2/f1/b.txt",new String[] { "AppendIt" });
-
- env1.execute("diff",EMPTY_ARGS,new String[]{"proj2"});
- env1.execute("diff",EMPTY_ARGS,new String[0],"proj2");
-
- env1.createRandomFile("proj2/d.txt");
-
- env1.execute("diff",EMPTY_ARGS,new String[0],"proj2");
- env1.execute("diff",EMPTY_ARGS,new String[]{"f1/b.txt"},"proj2");
- // env1.execute("diff",localOptions,new String[]{"d.txt"},"proj2");
-
- env1.setIgnoreExceptions(false);
- }
-
- public void testReadOnly() throws Exception {
-
- // Checkout a read-only copy
- env1.execute("co",new String[]{"-r"},EMPTY_ARGS,new String[]{"proj2"},"");
- // Checkout and modify a writable copy
- env2.execute("co",new String[]{},EMPTY_ARGS,new String[]{"proj2"},"");
- env2.appendToFile("proj2/f1/c.txt",new String[] {"AppendIt2" });
- // Update the read only copy
- env1.execute("update",new String[] {"-r"},EMPTY_ARGS,new String[]{"proj2"},"");
-
- // Update the read-only copy to writable
- env1.execute("update",new String[] {},EMPTY_ARGS,new String[]{"proj2"},"");
- }
-
- public void testQuestionables() throws Exception {
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"},"");
- env1.writeToFile("proj2/f2/d.txt", new String[]{"content"});
- env1.writeToFile("proj2/f3/f4/d.txt", new String[]{"content"});
- env1.writeToFile("proj2/f5/f6/f7/d.txt", new String[]{"content"});
- env1.execute("add",new String[0],new String[]{"f3"},"proj2");
- env1.execute("add",new String[0],new String[]{"f3/f4"},"proj2");
- env1.execute("update",new String[0],new String[]{"."},"proj2");
- }
-
- public void testImportWrappers() throws Exception {
- // Make the project empty
- env1.magicSetUpRepo("proj3",new String[]{"NoImportant.txt"});
- env2.deleteFile("proj3");
-
- // Create resouces and import them with the
- // special wrapper
- env1.createRandomFile(new String[]{"a.txt","a.class","a.xxx"},"proj3");
- env1.execute("import",
- new String[]{"-W","*.txt -k 'kv'","-W","*.class -k 'b'","-I","*.xxx","-m","msg"},
- new String[]{"proj3","aTag","bTag"},
- "proj3");
-
- // download the server-version
- env2.execute("co",EMPTY_ARGS,new String[]{"proj3"},"");
- }
-
- public void testImportIgnores() throws Exception {
- // Make the project empty
- env1.magicSetUpRepo("proj3",new String[]{"NoImportant.txt"});
- env2.deleteFile("proj3");
-
- // Create resouces and import them with the
- // special wrapper
- env1.createRandomFile(new String[]{"a.txt","a.class","a.xxx"},"proj3");
- env1.execute("import",
- new String[]{"-I","*.xxx","-m","msg"},
- new String[]{"proj3","aTag","bTag"},
- "proj3");
-
- // download the server-version
- env2.execute("co",EMPTY_ARGS,new String[]{"proj3"},"");
- }
-
- private String toGMTString(Date d) {
- return d.toGMTString();
- }
-
- public void testDate() throws Exception {
-
- // IMPOTANT:
- // Do not make tests with relative dates, because the times coming back form the server will
- // sometimes differ from the reference-client to the eclipse-client due to the time-delay in calling
-
- Date beforeChange;
- Date firstChange;
- Date secondChange;
-
- env1.execute("co",new String[0],new String[]{"proj2"});
-
- // Change the file "a.txt" and record the times you are doing that at
- waitMsec(1100); // here we wait for the import to finish
- beforeChange = GregorianCalendar.getInstance().getTime();
-
- waitMsec(1100);
-
- env1.appendToFile("proj2/a.txt",new String[] { "AppendIt" });
- env1.execute("ci",new String[]{"-m","msg"},new String[]{"proj2"});
- firstChange = GregorianCalendar.getInstance().getTime();
-
- waitMsec(1100);
-
- env1.appendToFile("proj2/a.txt",new String[] { "AppendIt2" });
- env1.appendToFile("proj2/f1/b.txt",new String[] { "AppendIt2" });
- env1.execute("ci",new String[]{"-m","msg"},new String[]{"proj2"});
- secondChange = GregorianCalendar.getInstance().getTime();
-
- waitMsec(1100);
-
- env1.deleteFile("proj2");
-
- // Now check the project at different times out
- env1.execute("co",new String[]{"-D",toGMTString(beforeChange)},new String[]{"proj2"});
- env1.deleteFile("proj2");
-
- env1.execute("co",new String[]{"-D",toGMTString(firstChange)},new String[]{"proj2"});
- env1.deleteFile("proj2");
-
- env1.execute("co",new String[]{"-D",toGMTString(secondChange)},new String[]{"proj2"});
- env1.deleteFile("proj2");
-
- // Now do some updates to look if update -D works
- env1.execute("co",new String[0],new String[]{"proj2"});
- env1.execute("update",new String[]{"-D",toGMTString(beforeChange)},new String[]{"proj2"});
- env1.execute("update",new String[]{"-D",toGMTString(firstChange)},new String[]{"proj2"});
- env1.execute("update",new String[]{"-D",toGMTString(secondChange)},new String[]{"proj2"});
-
- // We look if the parameter -a is working
- env1.execute("update",new String[]{"-D",toGMTString(beforeChange),"-A"},new String[]{"proj2"});
- env1.execute("update",new String[]{"-D",toGMTString(secondChange)},new String[]{"proj2"});
- env1.deleteFile("proj2");
-
- // We get try to merge changes from different dates
- env1.execute("co",new String[0],new String[]{"proj2"});
- env1.appendToFile("proj2/a.txt", new String[] { "This is the world ..." });
- env1.execute("update",new String[]{"-D",toGMTString(beforeChange)},new String[]{"proj2"});
- env1.appendToFile("proj2/a.txt", new String[] {"... which constantly changes" });
- env1.execute("update",new String[]{"-A"},new String[]{"proj2"});
- // Change something to be able to commit
- env1.appendToFile("proj2/a.txt", new String[] { "... and the changes are approved" });
- env1.execute("ci",new String[]{"-m","msg"},new String[]{"proj2"});
-
- }
-}
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/CompatibleTestSetup.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/CompatibleTestSetup.java
deleted file mode 100644
index 788454176..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/CompatibleTestSetup.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.eclipse.team.tests.ccvs.core.compatible;
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-import junit.framework.Test;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-
-/**
- * @version 1.0
- * @author ${user}
- */
-public class CompatibleTestSetup extends CVSTestSetup {
- public static final String ECLIPSE_REPOSITORY_LOCATION;
- public static final String REFERENCE_REPOSITORY_LOCATION;
- public static CVSRepositoryLocation referenceClientRepository;
- public static CVSRepositoryLocation eclipseClientRepository;
-
- static {
- REFERENCE_REPOSITORY_LOCATION = System.getProperty("eclipse.cvs.repository1");
- ECLIPSE_REPOSITORY_LOCATION = System.getProperty("eclipse.cvs.repository2");
- }
-
- /**
- * Constructor for CompatibleTestSetup.
- */
- public CompatibleTestSetup(Test test) {
- super(test);
- }
-
- /**
- * For compatibility testing, we need to set up two repositories
- */
- public void setUp() throws CVSException {
- CVSProviderPlugin.getPlugin().setPruneEmptyDirectories(false);
- CVSProviderPlugin.getPlugin().setFetchAbsentDirectories(false);
-
- // setup the repositories
- if (referenceClientRepository == null)
- referenceClientRepository = setupRepository(REFERENCE_REPOSITORY_LOCATION);
- if (eclipseClientRepository == null)
- eclipseClientRepository = setupRepository(ECLIPSE_REPOSITORY_LOCATION);
- }
-
- public void tearDown() throws CVSException {
- CVSProviderPlugin.getPlugin().setPruneEmptyDirectories(true);
- CVSProviderPlugin.getPlugin().setFetchAbsentDirectories(true);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/ConflictTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/ConflictTest.java
deleted file mode 100644
index 0d012b129..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/ConflictTest.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package org.eclipse.team.tests.ccvs.core.compatible;
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.team.tests.ccvs.core.JUnitTestCase;
-
-public class ConflictTest extends JUnitTestCase {
- SameResultEnv env1;
- SameResultEnv env2;
-
- public ConflictTest() {
- this(null);
- }
-
- public ConflictTest(String arg) {
- super(arg);
- env1 = new SameResultEnv(arg + "checkout1");
- env2 = new SameResultEnv(arg + "checkout2");
- }
-
- public void setUp() throws Exception {
- env1.setUp();
- env2.setUp();
-
- // Set the project to the content we need ...
- env1.magicSetUpRepo("proj2",new String[]{"a.txt","f1/b.txt","f1/c.txt"});
- env2.deleteFile("proj2");
- }
-
- public void tearDown() throws Exception {
- env1.tearDown();
- env2.tearDown();
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(ConflictTest.class);
- //return new CompatibleTestSetup(new ConflictTest("testSimpleConflict"));
- return new CompatibleTestSetup(suite);
- }
-
- public void testSimpleConflict() throws Exception {
- // Download content in two locations
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"},"");
- env2.execute("co",EMPTY_ARGS,new String[]{"proj2"},"");
-
- // change the file in both directories in a different way
- env1.appendToFile("proj2/f1/c.txt", new String[] { "AppendIt This" });
- env2.appendToFile("proj2/f1/c.txt", new String[] { "AppendIt That" });
-
- // commit changes of the first
- env1.execute("ci",new String[]{"-m","TestMessage"},new String[]{"proj2"},"");
-
- // load the changes into the changed file
- // and submit the merge
- env2.execute("update",EMPTY_ARGS,new String[]{"proj2"},"");
-
- // commit must fail because we have a merged conflict which has not been
- // edited.
- env2.setIgnoreExceptions(true);
- env2.execute("ci",new String[]{"-m","TestMessage"},new String[]{"proj2"},"");
- env2.setIgnoreExceptions(false);
-
- // Make a change to the file in order to let the cvs-client know
- // that we solved the confilict
- env2.appendToFile("proj2/f1/c.txt", new String[] { "That's allright" });
- env2.execute("ci",new String[]{"-m","TestMessage"},new String[]{"proj2"},"");
- }
-
- public void testMergedUpdate() throws Exception {
- // Download content in two locations
- env1.execute("co",EMPTY_ARGS,new String[]{"proj2"},"");
- env2.execute("co",EMPTY_ARGS,new String[]{"proj2"},"");
-
- // change the file in both directories in a different way so that
- // can be merged without conflicts
- env1.prefixToFile("proj2/f1/c.txt", new String[] { "AppendIt at top" });
- env2.appendToFile("proj2/f1/c.txt", new String[] { "AppendIt at bottom" });
-
- // commit changes of the first
- env1.execute("ci",new String[]{"-m","TestMessage"},new String[]{"proj2"},"");
-
- // changes should be merged
- env2.execute("update",EMPTY_ARGS,new String[]{"proj2"},"");
- env2.execute("ci",new String[]{"-m","TestMessage"},new String[]{"proj2"},"");
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/ModuleTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/ModuleTest.java
deleted file mode 100644
index fd9080cc8..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/ModuleTest.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package org.eclipse.team.tests.ccvs.core.compatible;
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.team.tests.ccvs.core.JUnitTestCase;
-
-public class ModuleTest extends JUnitTestCase {
- SameResultEnv env1;
- SameResultEnv env2;
-
- public ModuleTest(String arg) {
- super(arg);
- env1 = new SameResultEnv(arg + "checkout1");
- env2 = new SameResultEnv(arg + "checkout2");
- }
-
- public static void main(String[] args) {
- run(ModuleTest.class);
- }
-
- public void setUp() throws Exception {
- env1.setUp();
- env2.setUp();
-
- // Set the project to the content we need ...
- env1.magicDeleteRemote("CVSROOT/modules");
- env1.magicDeleteRemote("CVSROOT/modules,v");
- env1.magicSetUpRepo("proj2",new String[]{"a.txt","f1/b.txt","f1/c.txt","f2/d.txt","f2/f3/e.txt"});
- env2.deleteFile("proj2");
- }
-
- public void tearDown() throws Exception {
- env1.tearDown();
- env2.tearDown();
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(ModuleTest.class);
- return new CompatibleTestSetup(suite);
- }
-
- private void setUpModuleFile(String[] change) throws Exception {
-
- // Write the modules-file
- env1.execute("co",EMPTY_ARGS,new String[]{"CVSROOT"});
- env1.writeToFile("CVSROOT/modules",change);
-
- // Send it up to the server
- env1.execute("add",new String[]{"-m","m"},new String[]{"modules"},"CVSROOT");
- env1.execute("ci",new String[]{"-m","m"},new String[]{"CVSROOT"});
- env1.deleteFile("CVSROOT");
- }
-
- public void testSimpleModule() throws Exception {
- setUpModuleFile(new String[]{"mod1 proj2"});
- env1.execute("co",EMPTY_ARGS,new String[]{"mod1"});
- env1.appendToFile("mod1/a.txt", new String[] { "Append" });
- env1.execute("ci",new String[]{"-m","m"},new String[]{"mod1"});
- env1.execute("update",EMPTY_ARGS,new String[]{"mod1"});
- }
-
- public void testCompositeModule() throws Exception {
- setUpModuleFile(new String[]{ "mod1-f1 proj2/f1",
- "mod1-f2 proj2/f2",
- "mod1f &mod1-f1 &mod1-f2"});
-
- env1.execute("co",EMPTY_ARGS,new String[]{"mod1f"});
- env1.appendToFile("mod1f/mod1-f1/b.txt", new String[] { "Append" });
- env1.execute("ci",new String[]{"-m","m"},new String[]{"mod1f"});
- env1.execute("update",EMPTY_ARGS,new String[]{"mod1f"});
- }
-
- public void testCompositeAliasModule() throws Exception {
- setUpModuleFile(new String[]{"mod1-f1 proj2/f1",
- "mod1t proj2/f1 b.txt",
- "mod1-f2 &proj2/f2 &mod1t",
- "mod1f -a mod1-f1 mod1-f2"});
-
- env1.execute("co",EMPTY_ARGS,new String[]{"mod1f"});
- env1.appendToFile("mod1-f1/b.txt", new String[] { "Append" });
- env1.execute("ci",new String[]{"-m","m"},new String[]{"mod1-f1","mod1-f2"});
- env1.execute("update",EMPTY_ARGS,new String[]{"mod1-f1","mod1-f2"});
- }
-}
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/SameResultEnv.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/SameResultEnv.java
deleted file mode 100644
index acf4ec5f2..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/SameResultEnv.java
+++ /dev/null
@@ -1,487 +0,0 @@
-package org.eclipse.team.tests.ccvs.core.compatible;
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Date;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.tests.ccvs.core.CVSClientException;
-import org.eclipse.team.tests.ccvs.core.CommandLineCVSClient;
-import org.eclipse.team.tests.ccvs.core.EclipseCVSClient;
-import org.eclipse.team.tests.ccvs.core.ICVSClient;
-import org.eclipse.team.tests.ccvs.core.JUnitTestCase;
-
-
-/**
- * This is a TestCase that does provide the possibility
- * to run tests on both the reference reference-client and the
- * client provided by us, and to check on equal results
- * in files and messages to the consol.
- *
- * No own tests should be placed here, instead you should
- * instanciate this testcase in order to make your test from
- * another suite.
- * The class is final, because you need to be able to open
- * two (or more) different enviorments to test certain things.
- */
-public final class SameResultEnv extends JUnitTestCase {
- private IProject referenceProject;
- private ICVSFolder referenceRoot;
- private IProject eclipseProject;
- private ICVSFolder eclipseRoot;
-
- private boolean ignoreExceptions;
-
- public SameResultEnv(String arg) {
- super(arg);
- }
-
- /**
- * Always to be called in the setUp of the testCase that wants to
- * use the same-result Enviorment.
- */
- public void setUp() throws Exception {
- super.setUp();
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- // setup reference client test project
- referenceProject = root.getProject(getName() + "-reference");
- referenceProject.delete(true /*deleteContent*/, true /*force*/, null);
- mkdirs(referenceProject);
- referenceRoot = CVSWorkspaceRoot.getCVSFolderFor(referenceProject);
-
- // setup eclipse client test project
- eclipseProject = root.getProject(getName() + "-eclipse");
- eclipseProject.delete(true /*deleteContent*/, true /*force*/, null);
- mkdirs(eclipseProject);
- eclipseRoot = CVSWorkspaceRoot.getCVSFolderFor(eclipseProject);
-
- // By default, exceptions are not ignored.
- // Specific test cases can choose to ignore exceptions
- ignoreExceptions = false;
- }
-
- /**
- * Always to be called in the tearDown of the testCase that wants to
- * use the same-result Enviorment.
- */
- public void tearDown() throws Exception {
- // we deliberately don't clean up test projects to simplify debugging
- super.tearDown();
- }
-
- /**
- * Helper method.
- * Calls execute(command, EMPTY_ARGS, localOptions, arguments, pathRelativeToRoot)
- */
- public void execute(String command, String[] localOptions, String[] arguments, String pathRelativeToRoot)
- throws CVSException {
- execute(command, EMPTY_ARGS, localOptions, arguments, pathRelativeToRoot);
- }
-
- /**
- * Helper method.
- * Calls execute(command, EMPTY_ARGS, localOptions, arguments, "")
- */
- public void execute(String command, String[] localOptions, String[] arguments)
- throws CVSException {
- execute(command, EMPTY_ARGS, localOptions, arguments, "");
- }
-
- /**
- * Runs a command twice, once in the reference environments, once
- * in the eclipse environment. Compares the resulting resources
- * on disk, but not console output.
- */
- public void execute(String command,
- String[] globalOptions, String[] localOptions, String[] arguments,
- String pathRelativeToRoot) throws CVSException {
-
- // run with reference client
- boolean referenceClientException = execute(CommandLineCVSClient.INSTANCE,
- CompatibleTestSetup.referenceClientRepository, referenceProject,
- command, globalOptions, localOptions, arguments, pathRelativeToRoot);
- // run with Eclipse client
- boolean eclipseClientException = execute(EclipseCVSClient.INSTANCE,
- CompatibleTestSetup.eclipseClientRepository, eclipseProject,
- command, globalOptions, localOptions, arguments, pathRelativeToRoot);
-
- // assert same results
- assertEquals(referenceClientException, eclipseClientException);
- assertConsistent();
- }
-
- private boolean execute(ICVSClient client, ICVSRepositoryLocation repositoryLocation,
- IContainer localRoot, String command,
- String[] globalOptions, String[] localOptions, String[] arguments,
- String pathRelativeToRoot) throws CVSException {
- try {
- IPath path = new Path(pathRelativeToRoot);
- if (path.segmentCount() != 0) {
- localRoot = localRoot.getFolder(path);
- }
- client.executeCommand(repositoryLocation, localRoot, command, globalOptions,
- localOptions, arguments);
- } catch (CVSException e) {
- if (ignoreExceptions) return true;
- throw e;
- }
- return false;
- }
-
- /**
- * Deletes files on the both of the cvs-servers.
- */
- public void magicDeleteRemote(String remoteName) throws CVSException {
- super.magicDeleteRemote(CompatibleTestSetup.referenceClientRepository, remoteName);
- super.magicDeleteRemote(CompatibleTestSetup.eclipseClientRepository, remoteName);
- }
-
- /**
- * Set up both of the repos on the cvs-server(s) with the standard
- * file-structure:
- * project
- * a.txt
- * f1
- * b.txt
- * c.txt
- */
- public void magicSetUpRepo(String projectName)
- throws IOException, CoreException, CVSException {
- magicSetUpRepo(projectName, new String[]{"a.txt","f1/b.txt","f1/c.txt"});
- }
-
- /**
- * Set up both of the repos on the cvs-server(s) with a filestructre
- * resulting for your input in the parameter createResources.
- */
- public void magicSetUpRepo(String projectName, String[] createResources)
- throws IOException, CoreException, CVSException {
- magicDeleteRemote(projectName);
-
- IProject projectRoot = workspaceRoot.getProject(projectName + "-setup-tmp");
- mkdirs(projectRoot);
- createRandomFile(projectRoot, createResources);
-
- String[] lOptions = new String[]{"-m","msg"};
- String[] args = new String[]{projectName,"a","b"};
-
- magicDeleteRemote(CompatibleTestSetup.referenceClientRepository, projectName);
- EclipseCVSClient.execute(CompatibleTestSetup.referenceClientRepository, CVSWorkspaceRoot.getCVSFolderFor(projectRoot),
- "import", EMPTY_ARGS, lOptions, args);
-
- magicDeleteRemote(CompatibleTestSetup.eclipseClientRepository, projectName);
- EclipseCVSClient.execute(CompatibleTestSetup.eclipseClientRepository, CVSWorkspaceRoot.getCVSFolderFor(projectRoot),
- "import", EMPTY_ARGS, lOptions, args);
-
- projectRoot.delete(false /*force*/, null);
- }
-
- /**
- * Create a file with random-content in both, the reference client and
- * the eclipse-client.
- *
- * @param relativeFileName is the relative path as allways in the
- class used for access
- */
- public void createRandomFile(String relativeFileName)
- throws IOException, CoreException {
- String[] contents = new String[] { createRandomContent() };
- writeToFile(relativeFileName, contents);
- }
-
- /**
- * Call createRandomFile for every element of the array
- *
- * @see SameResultEnv#createRandomFile(String)
- */
- public void createRandomFile(String[] relativeFileNames,
- String pathRelativeToRoot) throws CoreException, IOException {
- if (pathRelativeToRoot == null) {
- pathRelativeToRoot = "";
- } else if (! pathRelativeToRoot.endsWith("/")) {
- pathRelativeToRoot += "/";
- }
- for (int i = 0; i < relativeFileNames.length; i++) {
- createRandomFile(pathRelativeToRoot + relativeFileNames[i]);
- }
- }
-
- /**
- * Read from the file (check that we have acctually got the same
- * content in both versions
- */
- public String[] readFromFile(String relativeFileName)
- throws IOException, CoreException {
- IFile referenceFile = referenceProject.getFile(relativeFileName);
- String[] content1 = super.readFromFile(referenceFile);
- IFile eclipseFile = eclipseProject.getFile(relativeFileName);
- String[] content2 = super.readFromFile(eclipseFile);
- assertEqualsArrays(content1,content2);
- return content1;
- }
-
- /**
- * Delete a file / folder from both directories.
- */
- public void deleteFile(String relativeFileName) throws CoreException {
- IResource referenceFile, eclipseFile;
- if (relativeFileName.length() != 0) {
- referenceFile = referenceProject.findMember(relativeFileName);
- eclipseFile = eclipseProject.findMember(relativeFileName);
- } else {
- referenceFile = referenceProject;
- eclipseFile = eclipseProject;
- }
- assertEquals(referenceFile != null, eclipseFile != null);
- if (referenceFile == null) return;
- assertEquals(referenceFile.exists(), eclipseFile.exists());
- referenceFile.delete(true, null);
- eclipseFile.delete(true, null);
- }
-
- /**
- * Creates a folder (and its parents if needed) in both environments.
- */
- public void mkdirs(String relativeFolderName) throws CoreException {
- IFolder referenceFolder = referenceProject.getFolder(relativeFolderName);
- IFolder eclipseFolder = eclipseProject.getFolder(relativeFolderName);
- assertEquals(referenceFolder.exists(), eclipseFolder.exists());
- mkdirs(referenceFolder);
- mkdirs(eclipseFolder);
- }
-
- /**
- * Append a String to an file (acctally to both of the files, that are going
- * to have the same content)
- */
- public void appendToFile(String relativeFileName, String[] contents)
- throws IOException, CoreException {
- // Wait a second so that the timestamp will change for sure
- waitMsec(1500);
-
- IFile referenceFile = referenceProject.getFile(relativeFileName);
- appendToFile(referenceFile, contents);
- IFile eclipseFile = eclipseProject.getFile(relativeFileName);
- appendToFile(eclipseFile, contents);
- }
-
- /**
- * Append a String to an file (acctally to both of the files, that are going
- * to have the same content)
- */
- public void prefixToFile(String relativeFileName, String[] contents)
- throws IOException, CoreException {
- // Wait a second so that the timestamp will change for sure
- waitMsec(1500);
-
- IFile referenceFile = referenceProject.getFile(relativeFileName);
- prefixToFile(referenceFile, contents);
- IFile eclipseFile = eclipseProject.getFile(relativeFileName);
- prefixToFile(eclipseFile, contents);
- }
-
- /**
- * Write to the file (acctally to both of the files, that are going
- * to have the same content)
- */
- public void writeToFile(String relativeFileName, String[] contents)
- throws IOException, CoreException {
- IFile referenceFile = referenceProject.getFile(relativeFileName);
- writeToFile(referenceFile, contents);
- IFile eclipseFile = eclipseProject.getFile(relativeFileName);
- writeToFile(eclipseFile, contents);
- }
-
- /**
- * Checks whether the two directories inside the environment
- * are equal and therefore the state valid.
- */
- public void assertConsistent() throws CVSException {
- assertEquals(referenceRoot, eclipseRoot);
- }
-
- /**
- * Deep compare of two ManagedResources (most likly folders).
- * Passwords are ignored.
- *
- * @param ignoreTimestamp if true timestamps of
- files are ignored for the comparison
- */
- public static void assertEquals(ICVSResource mResource1,
- ICVSResource mResource2)
- throws CVSException {
-
- assertEquals(mResource1.isFolder(), mResource2.isFolder());
- assertEquals(mResource1.isManaged() , mResource2.isManaged());
- assertEquals(mResource1.exists(), mResource2.exists());
-
- if (!mResource1.exists()) {
- return;
- }
-
- if (mResource1.isFolder()) {
- assertEquals((ICVSFolder)mResource1,(ICVSFolder)mResource2);
- } else {
- assertEquals((ICVSFile)mResource1,(ICVSFile)mResource2);
- }
- }
-
- /**
- * Assert that two CVSFile's are equal by comparing the content
- * and the metainformation out of the ResourceSync.
- */
- private static void assertEquals(ICVSFile mFile1, ICVSFile mFile2) throws CVSException {
-
- if (mFile1.getName().equals(".project")) return;
-
- // Check the permissions on disk
- assertEquals(mFile1.isReadOnly(), mFile2.isReadOnly());
-
- // Compare the content of the files
- try {
- InputStream in1 = mFile1.getContents();
- InputStream in2 = mFile2.getContents();
- byte[] buffer1 = new byte[(int)mFile1.getSize()];
- byte[] buffer2 = new byte[(int)mFile2.getSize()];
- // This is not the right way to do it, because the Stream
- // may read less than the whoole file
- in1.read(buffer1);
- in2.read(buffer2);
- in1.close();
- in2.close();
- assertEquals("Length differs for file " + mFile1.getName(), buffer1.length, buffer2.length);
- assertEquals("Contents differs for file " + mFile1.getName(), new String(buffer1),new String(buffer2));
- } catch (IOException e) {
- throw new CVSException("Error in TestCase");
- }
-
- // We can not do the ceck, because the reference client does
- // check out dirty files ?!?
- // assertEquals(mFile1.isDirty(),mFile2.isDirty());
-
- assertEquals(mFile1.getSyncInfo() == null,mFile2.getSyncInfo() == null);
- if (mFile1.getSyncInfo() == null) {
- return;
- }
-
- ResourceSyncInfo info1 = mFile1.getSyncInfo();
- ResourceSyncInfo info2 = mFile2.getSyncInfo();
-
- assertEquals(info1.getKeywordMode(), info2.getKeywordMode());
- assertEquals(info1.getTag(), info2.getTag());
- assertEquals(info1.getName(), info2.getName());
- assertEquals(info1.getRevision(), info2.getRevision());
-
- assertEquals(info1.isDeleted(), info2.isDeleted());
- assertEquals(info1.isAdded(), info2.isAdded());
- assertEquals(info1.isMerged(), info2.isMerged());
- assertEquals(info1.isMergedWithConflicts(), info2.isMergedWithConflicts());
-
- // Ensure that timestamps are written using same timezone.
- // assertTimestampEquals(info1.getTimeStamp(), info2.getTimeStamp());
-
- // We are not able to check for the permissions, as the reference-client doesn't save them
- }
-
- private static void assertTimestampEquals(Date timestamp1, Date timestamp2) {
- assertEquals(timestamp1!=null, timestamp2!=null);
- if(timestamp1!=null) {
- long time1 = timestamp1.getTime();
- long time2 = timestamp2.getTime();
- long difference = Math.abs(time1 - time2);
- assertTrue("timestamps should be in same timezone:" + timestamp1 + ":" + timestamp2, difference < (10*60*1000)); // 10 minutes
- }
- }
-
- /**
- * Assert that two CVSFile's are equal. First the
- * metainformation out of the FolderSync for this
- * folder is compared, then the amount of children is
- * checked and finally the recussion is started to
- * compare the children of this folder.
- */
- private static void assertEquals(ICVSFolder mFolder1,
- ICVSFolder mFolder2)
- throws CVSException {
-
- assertEquals(mFolder1.isCVSFolder(),mFolder2.isCVSFolder());
-
- if (mFolder1.isCVSFolder()) {
- String root1 = removePassword(mFolder1.getFolderSyncInfo().getRoot());
- String root2 = removePassword(mFolder2.getFolderSyncInfo().getRoot());
- root1 = root1.substring(0,root1.lastIndexOf("@"));
- root2 = root2.substring(0,root2.lastIndexOf("@"));
- assertEquals(root1,root2);
-
- assertEquals(mFolder1.getFolderSyncInfo().getRepository(),mFolder2.getFolderSyncInfo().getRepository());
- assertEquals(mFolder1.getFolderSyncInfo().getIsStatic(),mFolder2.getFolderSyncInfo().getIsStatic());
- assertEquals(mFolder1.getFolderSyncInfo().getTag(),mFolder2.getFolderSyncInfo().getTag());
- }
-
- ICVSResource[] resourceList1 = mFolder1.members(ICVSFolder.FILE_MEMBERS | ICVSFolder.FOLDER_MEMBERS);
- ICVSResource[] resourceList2 = mFolder2.members(ICVSFolder.FILE_MEMBERS | ICVSFolder.FOLDER_MEMBERS);
- assertEquals(resourceList1.length, resourceList2.length);
- for (int i=0; i<resourceList1.length; i++) {
- boolean resourceFound = false;
- for (int j=0; j<resourceList2.length; j++) {
- if (resourceList1[i].getName().equals(resourceList2[j].getName())) {
- assertEquals(resourceList1[i], resourceList2[j]);
- resourceFound = true;
- break;
- }
- }
- assertTrue("Resource " + resourceList1[i].getName() + " not found in the list",resourceFound);
- }
- }
-
- /**
- * Sets whether Exceptions that are thrown in the execution of both of the clients are
- * catched or thrown to the upper level. If the exceptions are catched the result of the
- * reference-client and this client are compared as if the execution succseded.
- */
- public void setIgnoreExceptions(boolean ignoreExceptions) {
- this.ignoreExceptions = ignoreExceptions;
- }
-
- /**
- * returns ":pserver:nkrambro@fiji:/home/nkrambro/repo"
- * when you insert ":pserver:nkrambro:password@fiji:/home/nkrambro/repo"
- */
- public static String removePassword(String root) {
- StringTokenizer tok = new StringTokenizer(root, ":@", true);
- StringBuffer filteredRoot = new StringBuffer();
- int colonCounter = 3;
- while (tok.hasMoreTokens()) {
- String token = tok.nextToken();
- if ("@".equals(token)) colonCounter = -1;
- if (":".equals(token)) {
- if (--colonCounter == 0) continue; // skip colon
- }
- if (colonCounter == 0) continue; // skip password
- filteredRoot.append(token);
- }
- return filteredRoot.toString();
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/AllTestsCVSResources.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/AllTestsCVSResources.java
deleted file mode 100644
index e4e41a51c..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/AllTestsCVSResources.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.eclipse.team.tests.ccvs.core.cvsresources;
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-
-public class AllTestsCVSResources extends EclipseTest {
- public static Test suite() {
- TestSuite suite = new TestSuite();
- suite.addTest(ResourceSyncInfoTest.suite());
- suite.addTest(EclipseSynchronizerTest.suite());
- suite.addTest(EclipseFolderTest.suite());
- return suite;
- }
-
- public AllTestsCVSResources(String name) {
- super(name);
- }
-
- public AllTestsCVSResources() {
- super();
- }
-}
-
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/BatchedTestSetup.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/BatchedTestSetup.java
deleted file mode 100644
index baba39804..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/BatchedTestSetup.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.eclipse.team.tests.ccvs.core.cvsresources;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-
-public class BatchedTestSetup extends TestSetup {
- public BatchedTestSetup(Test test) {
- super(test);
- }
-
- public void setUp() throws CVSException {
- EclipseSynchronizer.getInstance().beginOperation(null);
- }
-
- public void tearDown() throws CVSException {
- EclipseSynchronizer.getInstance().endOperation(null);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/EclipseFolderTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/EclipseFolderTest.java
deleted file mode 100644
index e7d95d96e..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/EclipseFolderTest.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.tests.ccvs.core.cvsresources;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceVisitor;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.ICVSRunnable;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-
-/**
- * What does this class do?
- */
-public class EclipseFolderTest extends EclipseTest {
- public EclipseFolderTest() {
- super();
- }
-
- public EclipseFolderTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite();
- suite.addTestSuite(EclipseFolderTest.class);
- return new CVSTestSetup(suite);
- }
-
- protected void assertChildrenHaveSync(IContainer root, final boolean hasSync) throws CoreException, CVSException {
- root.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- try {
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- if(!cvsResource.isIgnored()) {
- if(resource.getType()==IResource.FILE) {
- assertTrue((cvsResource.getSyncInfo()!=null) == hasSync);
- } else {
- assertTrue((((ICVSFolder)cvsResource).getFolderSyncInfo()!=null) == hasSync);
- }
- }
- } catch(CVSException e) {
- throw new CoreException(e.getStatus());
- }
- return true;
- }
- });
- }
-
- public void testUnmanageFolder() throws CoreException, TeamException {
- IProject project = createProject("testUnmanageFolder_A", new String[] {"a.txt", "folder1/", "folder1/b.txt", "folder1/folder2/", "folder1/folder2/c.txt"});
- ICVSFolder cvsProject = CVSWorkspaceRoot.getCVSFolderFor(project);
- assertChildrenHaveSync(project, true);
-
- // test that unmanaging the project flushes sync info
- cvsProject.unmanage(null);
- assertChildrenHaveSync(project, false);
-
- final IProject projectB = createProject("testUnmanageFolder_B", new String[] {"a.txt", "folder1/", "folder1/b.txt", "folder1/folder2/", "folder1/folder2/c.txt"});
- final ICVSFolder cvsProjectB = CVSWorkspaceRoot.getCVSFolderFor(projectB);
- assertChildrenHaveSync(projectB, true);
-
- // test that unmanaging in a CVS runnable flushes too
- cvsProjectB.run(new ICVSRunnable() {
- public void run(IProgressMonitor monitor) throws CVSException {
- try {
- assertChildrenHaveSync(projectB, true);
- cvsProjectB.unmanage(null);
- assertChildrenHaveSync(projectB, false);
- } catch(CoreException e) {
- throw CVSException.wrapException(e);
- }
- }
- }, null);
- assertChildrenHaveSync(projectB, false);
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/EclipseSynchronizerTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/EclipseSynchronizerTest.java
deleted file mode 100644
index 3b09a0395..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/EclipseSynchronizerTest.java
+++ /dev/null
@@ -1,448 +0,0 @@
-package org.eclipse.team.tests.ccvs.core.cvsresources;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
-import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.MutableResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-
-/**
- * Tests the EclipseSynchronizer.
- * Does not test state change broadcasts.
- */
-public class EclipseSynchronizerTest extends EclipseTest {
- private IProject project;
- private static EclipseSynchronizer sync = EclipseSynchronizer.getInstance();
-
- public EclipseSynchronizerTest() {
- super();
- }
-
- public EclipseSynchronizerTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite();
-
- // Run all tests twice to ensure consistency between batched and non-batched behaviour.
- // 1. First run -- no batching
- suite.addTestSuite(EclipseSynchronizerTest.class);
- // 2. Second run -- with batching
- suite.addTest(new BatchedTestSetup(new TestSuite(EclipseSynchronizerTest.class)));
- return new CVSTestSetup(suite);
- }
-
- public void testFolderSync() throws CoreException, CVSException {
- // Workspace root
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- _testFolderSyncInvalid(root);
-
- // Non-existant project
- IProject project = root.getProject(getName() + "-" + System.currentTimeMillis());
- assertDoesNotExistInFileSystem(project);
- _testFolderSyncInvalid(project);
-
- // Project
- project.create(null);
- project.open(null);
- _testFolderSyncValid(project);
-
- // Non-existant folder
- IFolder folder = project.getFolder("folder1");
- assertDoesNotExistInFileSystem(folder);
- _testFolderSyncInvalid(folder);
-
- // Non-existant folder with non-existant parent
- IFolder childFolder = folder.getFolder("folder2");
- assertDoesNotExistInFileSystem(childFolder);
- _testFolderSyncInvalid(childFolder);
-
- // Folder
- folder.create(false /*force*/, true /*local*/, null);
- _testFolderSyncValid(folder);
-
- // Child folder
- childFolder.create(false /*force*/, true /*local*/, null);
- _testFolderSyncValid(childFolder);
-
- // Deleted folder -- sync info should no longer exist
- sync.setFolderSync(folder, dummyFolderSync(folder));
- folder.delete(false /*force*/, null);
- _testFolderSyncInvalid(folder); // verifies sync info was deleted
-
- // Recreated folder -- sync info should not be preserved across deletions
- folder.create(false /*force*/, true /*local*/, null);
- sync.setFolderSync(folder, dummyFolderSync(folder));
- folder.delete(false /*force*/, null);
- folder.create(false /*force*/, true /*local*/, null);
- _testFolderSyncValid(folder); // verifies sync info has not reappeared
-
- // Deleted project
- sync.setFolderSync(project, dummyFolderSync(project));
- project.delete(false /*force*/, null);
- _testFolderSyncInvalid(project);
- }
-
- /*
- * Test get/set/delete folder sync for things that support it.
- * Assumes container does not already have sync info.
- */
- private void _testFolderSyncValid(IContainer container) throws CoreException, CVSException {
- FolderSyncInfo info = sync.getFolderSync(container);
- assertNull(info);
- sync.deleteFolderSync(container);
- FolderSyncInfo newInfo = dummyFolderSync(container);
- sync.setFolderSync(container, newInfo);
- info = sync.getFolderSync(container);
- assertEquals(newInfo, info);
- // verify that deleteFolderSync() does the right thing
- buildResources(container, new String[] { "hassync/", "nosync", "hassync.txt", "nosync.txt" }, true);
- IResource resource = container.getFile(new Path("hassync.txt"));
- sync.setResourceSync(resource, dummyResourceSync(resource));
- resource = container.getFile(new Path("hassync"));
- sync.setResourceSync(resource, dummyResourceSync(resource));
- assertNotNull(sync.getResourceSync(container.getFile(new Path("hassync.txt"))));
- assertNull(sync.getResourceSync(container.getFile(new Path("nosync.txt"))));
- assertNotNull(sync.getResourceSync(container.getFolder(new Path("hassync"))));
- assertNull(sync.getResourceSync(container.getFolder(new Path("nosync"))));
- if (container.getType() == IResource.FOLDER) {
- sync.setResourceSync(container, dummyResourceSync(container));
- assertNotNull(sync.getResourceSync(container));
- }
- // should delete folder sync for self, and resource sync for children
- sync.deleteFolderSync(container);
- info = sync.getFolderSync(container);
- assertNull(info);
- assertNull(sync.getResourceSync(container.getFile(new Path("hassync.txt"))));
- assertNull(sync.getResourceSync(container.getFile(new Path("nosync.txt"))));
- assertNull(sync.getResourceSync(container.getFolder(new Path("hassync"))));
- assertNull(sync.getResourceSync(container.getFolder(new Path("nosync"))));
- if (container.getType() == IResource.FOLDER) {
- assertNotNull(sync.getResourceSync(container));
- }
- }
-
- /*
- * Test get/set/delete folder sync for things that should not support it.
- * Assumes container does not already have sync info.
- */
- private void _testFolderSyncInvalid(IContainer container) throws CVSException {
- FolderSyncInfo info = sync.getFolderSync(container);
- assertNull(info);
- sync.deleteFolderSync(container);
- try {
- sync.setFolderSync(container, dummyFolderSync(container));
- fail("Expected CVSException");
- } catch (CVSException e) {
- }
- info = sync.getFolderSync(container);
- assertNull(info);
- }
-
- public void testResourceSync() throws CoreException, CVSException {
- // Workspace root
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- _testResourceSyncInvalid(root);
-
- // Project
- IProject project = getUniqueTestProject(getName());
- assertExistsInFileSystem(project);
- _testResourceSyncInvalid(project);
-
- // Folder
- IFolder folder = project.getFolder("folder1");
- folder.create(false /*force*/, true /*local*/, null);
- _testResourceSyncValid(folder);
-
- // File
- IFile file = folder.getFile("file1");
- file.create(getRandomContents(), false /*force*/, null);
- _testResourceSyncValid(file);
-
- // Deleted/recreated file -- if parent exists, sync info should be preserved across deletions
- ResourceSyncInfo info = dummyResourceSync(file);
- sync.setResourceSync(file, info);
- file.delete(false /*force*/, null);
- ResourceSyncInfo newInfo = sync.getResourceSync(file);
- assertEquals(newInfo, info);
- file.create(getRandomContents(), false /*force*/, null);
- newInfo = sync.getResourceSync(file);
- assertEquals(newInfo, info);
- sync.deleteResourceSync(file);
- file.delete(false /*force*/, null);
- _testResourceSyncValid(file);
-
- // Deleted parent -- sync info of children should also be deleted
- sync.setResourceSync(file, info);
- folder.delete(false /*force*/, null);
- info = sync.getResourceSync(file);
- assertNull(info);
-
- // File in non-existant folder
- IFolder dummyFolder = project.getFolder("folder2");
- assertDoesNotExistInFileSystem(dummyFolder);
- IFile dummyFile = dummyFolder.getFile("file2");
- assertDoesNotExistInFileSystem(dummyFile);
- _testResourceSyncInvalid(dummyFile);
- }
-
- /*
- * Test get/set/delete resource sync for things that support it.
- * Assumes resource does not already have sync info.
- */
- private void _testResourceSyncValid(IResource resource) throws CVSException {
- ResourceSyncInfo info = sync.getResourceSync(resource);
- assertNull(info);
- sync.deleteResourceSync(resource);
- ResourceSyncInfo newInfo = dummyResourceSync(resource);
- sync.setResourceSync(resource, newInfo);
- info = sync.getResourceSync(resource);
- assertEquals(newInfo, info);
- sync.deleteResourceSync(resource);
- info = sync.getResourceSync(resource);
- assertNull(info);
- }
-
- /*
- * Test get/set/delete resource sync for things that should not support it.
- * Assumes resource does not already have sync info.
- */
- private void _testResourceSyncInvalid(IResource resource) throws CVSException {
- ResourceSyncInfo info = sync.getResourceSync(resource);
- assertNull(info);
- sync.deleteResourceSync(resource);
- try {
- sync.setResourceSync(resource, dummyResourceSync(resource));
- fail("Expected CVSException");
- } catch (CVSException e) {
- }
- info = sync.getResourceSync(resource);
- assertNull(info);
- }
-
- public void testIgnores() throws CoreException, CVSException {
- // Workspace root
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- _testIgnoresInvalid(root);
-
- // Non-existant project
- IProject project = root.getProject(getName() + "-" + System.currentTimeMillis());
- assertDoesNotExistInFileSystem(project);
- _testIgnoresInvalid(project);
-
- // Project
- project.create(null);
- project.open(null);
- _testIgnoresValid(project);
-
- // Non-existant folder
- IFolder folder = project.getFolder("folder1");
- assertDoesNotExistInFileSystem(folder);
- _testIgnoresInvalid(folder);
-
- // Non-existant folder with non-existant parent
- IFolder childFolder = folder.getFolder("folder2");
- assertDoesNotExistInFileSystem(childFolder);
- _testIgnoresInvalid(childFolder);
-
- // Folder
- folder.create(false /*force*/, true /*local*/, null);
- _testIgnoresValid(folder);
-
- // Child folder
- childFolder.create(false /*force*/, true /*local*/, null);
- _testIgnoresValid(childFolder);
-
- // Deleted folder -- ignores should no longer exist
- sync.addIgnored(folder, "*.foo");
- folder.delete(false /*force*/, null);
- _testIgnoresInvalid(folder); // verifies sync info was deleted
-
- // Recreated folder -- sync info should not be preserved across deletions
- folder.create(false /*force*/, true /*local*/, null);
- sync.addIgnored(folder, "*.foo");
- folder.delete(false /*force*/, null);
- folder.create(false /*force*/, true /*local*/, null);
- _testIgnoresValid(folder); // verifies sync info has not reappeared
-
- // Deleted project
- sync.addIgnored(project, "*.foo");
- project.delete(false /*force*/, null);
- _testIgnoresInvalid(project);
- }
-
- /*
- * Test get/set ignores for things that should not support it.
- * Assumes resource does not already have ignores.
- */
- private void _testIgnoresValid(IContainer container) throws CVSException {
- String[] ignored = sync.getIgnored(container);
- assertTrue(ignored.length == 0);
- sync.addIgnored(container, "*.xyz");
- ignored = sync.getIgnored(container);
- assertBijection(ignored, new String[] { "*.xyz" }, null);
- sync.addIgnored(container, "*.abc");
- sync.addIgnored(container, "*.def");
- ignored = sync.getIgnored(container);
- assertBijection(ignored, new String[] { "*.abc", "*.def", "*.xyz" }, null);
- }
-
- /*
- * Test get/set ignores for things that should not support it.
- * Assumes resource does not already have ignores.
- */
- private void _testIgnoresInvalid(IContainer container) throws CVSException {
- String[] ignored = sync.getIgnored(container);
- assertTrue(ignored.length == 0);
- try {
- sync.addIgnored(container, "*.xyz");
- fail("Expected CVSException");
- } catch (CVSException e) {
- }
- ignored = sync.getIgnored(container);
- assertTrue(ignored.length == 0);
- }
-
- public void testMembers() throws CoreException, CVSException {
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- IProject project1 = getUniqueTestProject(getName() + "1");
- IProject project2 = root.getProject(getName() + "2" + System.currentTimeMillis());
-
- // Workspace root
- IResource[] members = sync.members(ResourcesPlugin.getWorkspace().getRoot());
- assertBijection(members, ResourcesPlugin.getWorkspace().getRoot().getProjects(), null);
-
- // Non-existant project
- members = sync.members(project2);
- assertEquals("Non-existant project should have no members", 0, members.length);
-
- // Non-existant folder
- IFolder folder = project1.getFolder("folder1");
- assertDoesNotExistInFileSystem(folder);
- members = sync.members(folder);
- assertEquals("Non-existant folder should have no members", 0, members.length);
-
- // Non-existant folder with non-existant parent
- IFolder childFolder = folder.getFolder("folder2");
- assertDoesNotExistInFileSystem(childFolder);
- members = sync.members(childFolder);
- assertEquals("Non-existant folder should have no members", 0, members.length);
-
- // Project
- buildResources(project1, new String[] {
- "hassync.txt", "deleted_nosync.txt", "deleted.txt", "hassync/", "deleted/", "deleted_nosync/" }, true);
-
- // initially none of the resources have sync info and they all exist
- Object[] ignores = new Object[] { project1.getFolder("CVS") };
- Set expectedMembers = new HashSet(Arrays.asList(project1.members()));
- members = sync.members(project1);
- assertBijection(expectedMembers.toArray(), members, ignores);
-
- // add sync info, resources should still appear exactly once
- IResource resource = project1.getFile("hassync.txt");
- sync.setResourceSync(resource, dummyResourceSync(resource));
- resource = project1.getFolder("hassync");
- sync.setResourceSync(resource, dummyResourceSync(resource));
-
- resource = project1.getFile("deleted.txt");
- sync.setResourceSync(resource, dummyResourceSync(resource));
- resource = project1.getFolder("deleted");
- sync.setResourceSync(resource, dummyResourceSync(resource));
-
- members = sync.members(project1);
- assertBijection(expectedMembers.toArray(), members, ignores);
-
- // delete resources, those with sync info should still appear, those without should not
- resource = project1.getFile("deleted.txt");
- resource.delete(false /*force*/, null);
- resource = project1.getFolder("deleted");
- resource.delete(false /*force*/, null);
-
- resource = project1.getFile("deleted_nosync.txt");
- resource.delete(false /*force*/, null);
- expectedMembers.remove(resource);
- resource = project1.getFolder("deleted_nosync");
- resource.delete(false /*force*/, null);
- expectedMembers.remove(resource);
-
- members = sync.members(project1);
- assertBijection(expectedMembers.toArray(), members, ignores);
-
- // delete sync info, only those that exist should appear
- resource = project1.getFile("hassync.txt");
- sync.deleteResourceSync(resource);
- resource = project1.getFolder("hassync");
- sync.deleteResourceSync(resource);
-
- resource = project1.getFile("deleted.txt");
- sync.deleteResourceSync(resource);
- expectedMembers.remove(resource);
- resource = project1.getFolder("deleted");
- sync.deleteResourceSync(resource);
- expectedMembers.remove(resource);
-
- members = sync.members(project1);
- assertBijection(expectedMembers.toArray(), members, ignores);
- }
-
- private FolderSyncInfo dummyFolderSync(IContainer container) {
- return new FolderSyncInfo("repo", "root", CVSTag.DEFAULT, false);
- }
-
- private ResourceSyncInfo dummyResourceSync(IResource resource) {
- if (resource.getType() == IResource.FILE) {
- MutableResourceSyncInfo info = new MutableResourceSyncInfo(resource.getName(), "1.1");
- info.setTag(CVSTag.DEFAULT);
- return info;
- } else {
- return new ResourceSyncInfo(resource.getName());
- }
- }
-
- /**
- * Assert that there exists a bijection between the elements of the arrays.
- */
- private void assertBijection(Object[] a, Object[] b, Object[] ignores) {
- List listA = new LinkedList(Arrays.asList(a));
- List listB = new LinkedList(Arrays.asList(b));
- if (ignores != null) {
- for (int i = 0; i < ignores.length; ++i ) {
- listA.remove(ignores[i]);
- listB.remove(ignores[i]);
- }
- }
- assertEquals("Should have same number of elements", listA.size(), listB.size());
- for (Iterator it = listB.iterator(); it.hasNext();) {
- Object obj = it.next();
- assertTrue("Should contain the same elements", listA.contains(obj));
- listA.remove(obj);
- }
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/ResourceSyncInfoTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/ResourceSyncInfoTest.java
deleted file mode 100644
index eff24d5f8..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/ResourceSyncInfoTest.java
+++ /dev/null
@@ -1,145 +0,0 @@
-package org.eclipse.team.tests.ccvs.core.cvsresources;
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.util.Date;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-
-public class ResourceSyncInfoTest extends EclipseTest {
-
- public ResourceSyncInfoTest() {
- super();
- }
-
- public ResourceSyncInfoTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(ResourceSyncInfoTest.class);
- return new CVSTestSetup(suite);
- }
-
- public void testEntryLineParsing() {
- String entryLine;
-
- // testing malformed entry lines first
- try {
- new ResourceSyncInfo("//////", null, null);
- fail();
- } catch(CVSException e) {
- }
- try {
- new ResourceSyncInfo("//1.1///", null, null);
- fail();
- } catch(CVSException e) {
- }
- try {
- new ResourceSyncInfo("/file.txt////", null, null);
- fail();
- } catch(CVSException e) {
- }
- try {
- new ResourceSyncInfo("/file.txt//////////", null, null);
- fail();
- } catch(CVSException e) {
- }
- }
-
- public void testEntryLineConstructor() throws CVSException {
- ResourceSyncInfo info;
- info = new ResourceSyncInfo("/file.java/-1.1/Mon Feb 25 21:44:02 2002/-k/", null, null);
- assertTrue(info.isDeleted());
-
- info = new ResourceSyncInfo("/file.java/0/something/-k/", null, null);
- assertTrue(info.isAdded());
-
- info = new ResourceSyncInfo("/file.java/1.0/Mon Feb 25 21:44:02 2002/-k/Tv1", null, null);
- assertTrue(info.getTag() != null);
-
- Date timestamp = new Date(123000);
- info = new ResourceSyncInfo("/file.java/1.0/Mon Feb 25 21:44:02 2002/-k/Tv1", null, timestamp);
- assertTrue(info.getTimeStamp().equals(timestamp));
-
- info = new ResourceSyncInfo("/file.java/0/Mon Feb 25 21:44:02 2002/-k/", null, timestamp);
- assertTrue(info.getTimeStamp().equals(timestamp));
-
- String permissions = "u=rwx,g=rwx,o=rwx";
- info = new ResourceSyncInfo("/file.java/2.0/Mon Feb 25 21:44:02 2002/-k/Tv1", permissions, null);
- assertTrue(info.getPermissions().equals(permissions));
-
- info = new ResourceSyncInfo("D/file.java////", null, null);
- assertTrue(info.isDirectory());
- }
-
- public void testConstructor() throws CVSException {
- ResourceSyncInfo info;
-
- info = new ResourceSyncInfo("folder");
- assertTrue(info.isDirectory());
-
- Date timestamp = new Date(123000);
- info = new ResourceSyncInfo("/file.java/-2.34/Mon Feb 25 21:44:02 2002/-k/Tv1", null, null);
- assertTrue(info.isDeleted());
- assertTrue(info.getRevision().equals("2.34"));
-
- info = new ResourceSyncInfo("/file.java/0/Mon Feb 25 21:44:02 2002/-k/Tv1", null, null);
- String entry = info.getEntryLine();
- assertTrue(info.isAdded());
- }
-
- public void testMergeTimestamps() throws CVSException {
- ResourceSyncInfo info, info2;
- Date timestamp = new Date(123000);
- Date timestamp2 = new Date(654000);
-
- info = new ResourceSyncInfo("/file.java/1.1//-kb/", null, timestamp);
- assertTrue(!info.isMerged());
- assertTrue(!info.isNeedsMerge(timestamp));
-
- // test merged entry lines the server and ensure that their entry line format is compatible
- info = new ResourceSyncInfo("/file.java/1.1/+=/-kb/", null, timestamp);
- String entryLine = info.getEntryLine();
- info2 = new ResourceSyncInfo(entryLine, null, null);
- assertTrue(info.isMerged() && info2.isMerged());
- assertTrue(info.isNeedsMerge(timestamp) && info2.isNeedsMerge(timestamp));
- assertTrue(!info.isNeedsMerge(timestamp2) && !info2.isNeedsMerge(timestamp2));
- assertTrue(info.getTimeStamp().equals(timestamp) && info2.getTimeStamp().equals(timestamp));
-
- info = new ResourceSyncInfo("/file.java/1.1/+modified/-kb/", null, null);
- entryLine = info.getEntryLine();
- info2 = new ResourceSyncInfo(entryLine, null, null);
- assertTrue(info.isMerged() && info2.isMerged());
- assertTrue(!info.isNeedsMerge(timestamp) && !info2.isNeedsMerge(timestamp));
- assertTrue(!info.isNeedsMerge(timestamp2) && !info2.isNeedsMerge(timestamp2));
- assertTrue(info.getTimeStamp()==null && info2.getTimeStamp()==null);
- }
-
- public void testTimestampCompatibility() throws CVSException, CoreException {
- String entryLine1 = "/a.bin/1.1/Mon Feb 9 21:44:02 2002/-kb/";
- String entryLine2 = "/a.bin/1.1/Mon Feb 9 21:44:02 2002/-kb/";
- String entryLine3 = "/a.bin/1.1/Mon Feb 09 21:44:02 2002/-kb/";
- ResourceSyncInfo info1 = new ResourceSyncInfo(entryLine1, null, null);
- ResourceSyncInfo info2 = new ResourceSyncInfo(entryLine2, null, null);
- ResourceSyncInfo info3 = new ResourceSyncInfo(entryLine3, null, null);
- Date date1 = info1.getTimeStamp();
- Date date2 = info2.getTimeStamp();
- Date date3 = info3.getTimeStamp();
- assertTrue(date1.equals(date2));
- assertTrue(date1.equals(date3));
- assertTrue(date2.equals(date3));
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/AllTestsProvider.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/AllTestsProvider.java
deleted file mode 100644
index fd652594c..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/AllTestsProvider.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.eclipse.team.tests.ccvs.core.provider;
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-
-/**
- * @version 1.0
- * @author ${user}
- */
-public class AllTestsProvider extends EclipseTest {
-
- /**
- * Constructor for AllTests.
- */
- public AllTestsProvider() {
- super();
- }
-
- /**
- * Constructor for AllTests.
- * @param name
- */
- public AllTestsProvider(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite();
- //suite.addTestSuite(ModuleTest.class);
- suite.addTest(ImportTest.suite());
- suite.addTest(CVSProviderTest.suite());
- suite.addTest(RemoteResourceTest.suite());
- suite.addTest(SyncElementTest.suite());
- suite.addTest(ResourceDeltaTest.suite());
- return new CVSTestSetup(suite);
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/CVSProviderTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/CVSProviderTest.java
deleted file mode 100644
index a9bf8704e..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/CVSProviderTest.java
+++ /dev/null
@@ -1,412 +0,0 @@
-package org.eclipse.team.tests.ccvs.core.provider;
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-import java.io.BufferedInputStream;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.util.HashMap;
-import java.util.Map;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-import org.eclipse.team.tests.ccvs.core.JUnitTestCase;
-
-/*
- * This class tests both the CVSProvider and the CVSTeamProvider
- */
-public class CVSProviderTest extends EclipseTest {
-
- /**
- * Constructor for CVSProviderTest
- */
- public CVSProviderTest() {
- super();
- }
-
- /**
- * Constructor for CVSProviderTest
- */
- public CVSProviderTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(CVSProviderTest.class);
- return new CVSTestSetup(suite);
- //return new CVSTestSetup(new CVSProviderTest("testReadOnly"));
- }
-
- public void testAdd() throws TeamException, CoreException {
-
- // Test add with cvsignores
- /*
- IProject project = createProject("testAdd", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
- IFile file = project.getFile(".cvsignore");
- file.create(new ByteArrayInputStream("ignored.txt".getBytes()), false, null);
- file = project.getFile("ignored.txt");
- file.create(new ByteArrayInputStream("some text".getBytes()), false, null);
- file = project.getFile("notignored.txt");
- file.create(new ByteArrayInputStream("some more text".getBytes()), false, null);
- file = project.getFile("folder1/.cvsignore");
- file.create(new ByteArrayInputStream("ignored.txt".getBytes()), false, null);
- file = project.getFile("folder1/ignored.txt");
- file.create(new ByteArrayInputStream("some text".getBytes()), false, null);
- file = project.getFile("folder1/notignored.txt");
- file.create(new ByteArrayInputStream("some more text".getBytes()), false, null);
-
- getProvider(project).add(new IResource[] {project}, IResource.DEPTH_INFINITE, DEFAULT_MONITOR);
-
- assertTrue( ! CVSWorkspaceRoot.getCVSResourceFor(project.getFile("ignored.txt")).isManaged());
- assertTrue( ! CVSWorkspaceRoot.getCVSResourceFor(project.getFile("folder1/ignored.txt")).isManaged());
-
- assertTrue(CVSWorkspaceRoot.getCVSResourceFor(project.getFile("notignored.txt")).isManaged());
- assertTrue(CVSWorkspaceRoot.getCVSResourceFor(project.getFile("folder1/notignored.txt")).isManaged());
- assertTrue(CVSWorkspaceRoot.getCVSResourceFor(project.getFile(".cvsignore")).isManaged());
- assertTrue(CVSWorkspaceRoot.getCVSResourceFor(project.getFile("folder1/.cvsignore")).isManaged());
- */
- }
-
- public void testDeleteHandling() throws TeamException, CoreException {
-
- IProject project = createProject("testDeleteHandling", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
-
- // Delete a file and ensure that it is an outgoing deletion
- project.getFile("deleted.txt").delete(false, false, null);
- ICVSFile file = CVSWorkspaceRoot.getCVSFileFor(project.getFile("deleted.txt"));
- assertTrue("File is not outgoing deletion", file.getSyncInfo().isDeleted());
-
- // Delete a folder and ensure that the file is managed but doesn't exist
- // (Special behavior is provider by the CVS move/delete hook but this is not part of CVS core)
- project.getFolder("folder1").delete(false, false, null);
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor(project.getFolder("folder1"));
- assertTrue("Deleted folder not in proper state", ! folder.exists() && folder.isManaged());
- }
-
- public void testCheckin() throws TeamException, CoreException, IOException {
- IProject project = createProject("testCheckin", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
-
- // Perform some operations on the project
- IResource[] newResources = buildResources(project, new String[] { "added.txt", "folder2/", "folder2/added.txt" }, false);
- IFile file = project.getFile("changed.txt");
- JUnitTestCase.waitMsec(1500);
- file.setContents(getRandomContents(), false, false, null);
- getProvider(project).add(newResources, IResource.DEPTH_ZERO, DEFAULT_MONITOR);
- getProvider(project).delete(new IResource[] {project.getFile("deleted.txt")}, DEFAULT_MONITOR);
- assertIsModified("testDeepCheckin: ", newResources);
- assertIsModified("testDeepCheckin: ", new IResource[] {project.getFile("deleted.txt"), project.getFile("changed.txt")});
- getProvider(project).checkin(new IResource[] {project}, IResource.DEPTH_INFINITE, DEFAULT_MONITOR);
- assertLocalStateEqualsRemote(project);
- }
-
- public void testMoveHandling() throws TeamException, CoreException {
- IProject project = createProject("testMoveHandling", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
-
- // Move a file and ensure that it is an outgoing deletion at the source and unmanaged at the destination
- project.getFile("deleted.txt").move(new Path("moved.txt"), false, false, null);
- ICVSFile file = CVSWorkspaceRoot.getCVSFileFor(project.getFile("deleted.txt"));
- assertTrue("Source is not outgoing deletion", file.getSyncInfo().isDeleted());
- file = CVSWorkspaceRoot.getCVSFileFor(project.getFile("moved.txt"));
- assertTrue("Destination not in proper state", ! file.isManaged());
-
- // Move a folder and ensure the source is deleted
- project.getFolder("folder1").move(new Path("moved"), false, false, null);
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor(project.getFolder("folder1"));
- assertTrue("Deleted folder not in proper state", ! folder.exists() && folder.isManaged());
- folder = CVSWorkspaceRoot.getCVSFolderFor(project.getFolder("moved"));
- assertTrue("Deleted folder should not be managed", ! folder.isManaged());
- assertTrue("Deleted folder should not be a CVS folder", ! folder.isCVSFolder());
- }
-
- public void testUpdate() throws TeamException, CoreException, IOException {
- // Create a test project, import it into cvs and check it out
- IProject project = createProject("testUpdate", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
-
- // Check the project out under a different name
- IProject copy = checkoutCopy(project, "-copy");
-
- // Perform some operations on the copy
- addResources(copy, new String[] { "added.txt", "folder2/", "folder2/added.txt" }, false);
- IFile file = copy.getFile("changed.txt");
- JUnitTestCase.waitMsec(1500);
- file.setContents(getRandomContents(), false, false, null);
- getProvider(copy).delete(new IResource[] {copy.getFile("deleted.txt")}, DEFAULT_MONITOR);
-
- // Commit the copy and update the project
- getProvider(copy).checkin(new IResource[] {copy}, IResource.DEPTH_INFINITE, DEFAULT_MONITOR);
- getProvider(project).update(new IResource[] {project}, Command.NO_LOCAL_OPTIONS, null, true /*createBackups*/, DEFAULT_MONITOR);
- assertEquals(project, copy);
- }
-
- public void testVersionTag() throws TeamException, CoreException, IOException {
-
- // Create a test project, import it into cvs and check it out
- IProject project = createProject("testTag", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
-
- // Perform some operations on the copy and commit
- IProject copy = checkoutCopy(project, "-copy");
- JUnitTestCase.waitMsec(1500);
- addResources(copy, new String[] { "added.txt", "folder2/", "folder2/added.txt" }, false);
- changeResources(copy, new String[] {"changed.txt"}, false);
- deleteResources(copy, new String[] {"deleted.txt"}, false);
- checkinResources(copy, true);
-
- // Tag the original, checkout the tag and compare with original
- CVSTag v1Tag = new CVSTag("v1", CVSTag.VERSION);
- tagProject(project, v1Tag);
- IProject v1 = checkoutCopy(project, v1Tag);
- assertEquals(project, v1);
-
- // Update original to HEAD and compare with copy including tags
- updateProject(project, null, false);
- assertEquals(project, copy, false, true);
-
- // Update copy to v1 and compare with the copy (including tag)
- updateProject(copy, v1Tag, false);
- assertEquals(copy, v1, false, true);
-
- // Update copy back to HEAD and compare with project (including tag)
- updateProject(copy, CVSTag.DEFAULT, false);
- assertEquals(project, copy, false, true);
- }
-
- public void testMakeBranch() throws TeamException, CoreException, IOException {
- // Create a test project
- IProject project = createProject("testSyncOnBranch", new String[] { "file1.txt", "file2.txt", "file3.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
-
- // Make some local modifications including "cvs adds" and "cvs removes"
- addResources(project, new String[] {"folder1/c.txt"}, false);
- deleteResources(project, new String[] {"folder1/b.txt"}, false);
- changeResources(project, new String[] {"file2.txt"}, false);
-
- // Make the branch including a pre-version
- CVSTag version = new CVSTag("v1", CVSTag.BRANCH);
- CVSTag branch = new CVSTag("branch1", CVSTag.BRANCH);
- getProvider(project).makeBranch(new IResource[] {project}, version, branch, true, true, DEFAULT_MONITOR);
-
- // Checkout a copy from the branch and version and compare
- IProject branchCopy = checkoutCopy(project, branch);
- IProject versionCopy = checkoutCopy(project, branch);
- assertEquals(branchCopy, versionCopy, true, false);
-
- // Commit the project, update the branch and compare
- commitProject(project);
- updateProject(branchCopy, null, false);
- assertEquals(branchCopy, project, false, true);
- }
-
- public void testPruning() throws TeamException, CoreException, IOException {
- // Create a project with empty folders
- CVSProviderPlugin.getPlugin().setPruneEmptyDirectories(false);
- IProject project = createProject("testPruning", new String[] { "file.txt", "folder1/", "folder2/folder3/" });
-
- // Disable pruning, checkout a copy and ensure original and copy are the same
- IProject copy = checkoutCopy(project, "-copy");
- assertEquals(project, copy);
-
- // Enable pruning, update copy and ensure emtpy folders are gone
- CVSProviderPlugin.getPlugin().setPruneEmptyDirectories(true);
- updateProject(copy, null, false);
- assertDoesNotExistInFileSystem(new IResource[] {copy.getFolder("folder1"), copy.getFolder("folder2"), copy.getFolder("folder2/folder3")});
-
- // Checkout another copy and ensure that the two copies are the same (with pruning enabled)
- IProject copy2 = checkoutCopy(project, "-copy2");
- assertEquals(copy, copy2);
-
- // Disable pruning, update copy and ensure directories come back
- CVSProviderPlugin.getPlugin().setPruneEmptyDirectories(false);
- updateProject(copy, null, false);
- assertEquals(project, copy);
-
- // Enable pruning again since it's the default
- CVSProviderPlugin.getPlugin().setPruneEmptyDirectories(true);
- }
-
- public void testGet() throws TeamException, CoreException, IOException {
-
- // Create a project
- IProject project = createProject("testGet", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
-
- // Checkout a copy and modify locally
- IProject copy = checkoutCopy(project, "-copy");
- //addResources(copy, new String[] { "added.txt", "folder2/", "folder2/added.txt" }, false);
- deleteResources(copy, new String[] {"deleted.txt"}, false);
- IFile file = copy.getFile("changed.txt");
- JUnitTestCase.waitMsec(1500);
- file.setContents(getRandomContents(), false, false, null);
-
- // get the remote conetns
- getProvider(copy).get(new IResource[] {copy}, IResource.DEPTH_INFINITE, DEFAULT_MONITOR);
- assertEquals(project, copy);
- }
-
- public void testReadOnly() throws TeamException, CoreException, IOException {
- IProject project = createProject("testReadOnly", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
- // Need to check the project out as read-only
- }
-
- public void testCleanLineDelimiters() throws TeamException, CoreException, IOException {
- // Create a project
- IProject project = getUniqueTestProject("testCleanLineDelimiters");
- IFile file = project.getFile("testfile");
- IProgressMonitor monitor = new NullProgressMonitor();
-
- // empty file
- setFileContents(file, "");
- CVSTeamProvider.cleanLineDelimiters(file, false, monitor);
- assertEqualsFileContents(file, "");
- CVSTeamProvider.cleanLineDelimiters(file, true, monitor);
- assertEqualsFileContents(file, "");
-
- // one byte
- setFileContents(file, "a");
- CVSTeamProvider.cleanLineDelimiters(file, false, monitor);
- assertEqualsFileContents(file, "a");
- CVSTeamProvider.cleanLineDelimiters(file, true, monitor);
- assertEqualsFileContents(file, "a");
-
- // single orphan carriage return (should be preserved)
- setFileContents(file, "\r");
- CVSTeamProvider.cleanLineDelimiters(file, false, monitor);
- assertEqualsFileContents(file, "\r");
- CVSTeamProvider.cleanLineDelimiters(file, true, monitor);
- assertEqualsFileContents(file, "\r");
-
- // single line feed
- setFileContents(file, "\n");
- CVSTeamProvider.cleanLineDelimiters(file, false, monitor);
- assertEqualsFileContents(file, "\n");
- CVSTeamProvider.cleanLineDelimiters(file, true, monitor);
- assertEqualsFileContents(file, "\r\n");
-
- // single carriage return line feed
- setFileContents(file, "\r\n");
- CVSTeamProvider.cleanLineDelimiters(file, true, monitor);
- assertEqualsFileContents(file, "\r\n");
- CVSTeamProvider.cleanLineDelimiters(file, false, monitor);
- assertEqualsFileContents(file, "\n");
-
- // mixed text with orphaned CR's
- setFileContents(file, "The \r\n quick brown \n fox \r\r\r\n jumped \n\n over \r\n the \n lazy dog.\r\n");
- CVSTeamProvider.cleanLineDelimiters(file, false, monitor);
- assertEqualsFileContents(file, "The \n quick brown \n fox \r\r\n jumped \n\n over \n the \n lazy dog.\n");
- setFileContents(file, "The \r\n quick brown \n fox \r\r\r\n jumped \n\n over \r\n the \n lazy dog.\r\n");
- CVSTeamProvider.cleanLineDelimiters(file, true, monitor);
- assertEqualsFileContents(file, "The \r\n quick brown \r\n fox \r\r\r\n jumped \r\n\r\n over \r\n the \r\n lazy dog.\r\n");
- }
-
- public void testKeywordSubstitution() throws TeamException, CoreException, IOException {
- testKeywordSubstitution(Command.KSUBST_BINARY); // -kb
- testKeywordSubstitution(Command.KSUBST_TEXT); // -ko
- testKeywordSubstitution(Command.KSUBST_TEXT_EXPAND); // -kkv
- }
-
- private void testKeywordSubstitution(KSubstOption ksubst) throws TeamException, CoreException, IOException {
- // setup some known file types
- Team.setAllTypes( new String[] {"xbin", "xtxt"}, new int[] {Team.BINARY, Team.TEXT});
-
- // create a test project
- IProject project = createProject("testKeywordSubstitution", new String[] { "dummy" });
- addResources(project, new String[] { "binary.xbin", "text.xtxt", "folder1/", "folder1/a.xtxt" }, true);
- addResources(project, new String[] { "added.xbin", "added.xtxt" }, false);
- assertHasKSubstOption(project, "binary.xbin", Command.KSUBST_BINARY);
- assertHasKSubstOption(project, "added.xbin", Command.KSUBST_BINARY);
- assertHasKSubstOption(project, "text.xtxt", Command.KSUBST_TEXT);
- assertHasKSubstOption(project, "folder1/a.xtxt", Command.KSUBST_TEXT);
- assertHasKSubstOption(project, "added.xtxt", Command.KSUBST_TEXT);
-
- // change keyword substitution
- Map map = new HashMap();
- map.put(project.getFile("binary.xbin"), ksubst);
- map.put(project.getFile("added.xbin"), ksubst);
- map.put(project.getFile("text.xtxt"), ksubst);
- map.put(project.getFile("folder1/a.xtxt"), ksubst);
- map.put(project.getFile("added.xtxt"), ksubst);
-
- JUnitTestCase.waitMsec(1500);
- IStatus status = getProvider(project).setKeywordSubstitution(map, null);
- assertTrue("Status should be ok, was: " + status.toString(), status.isOK());
- assertHasKSubstOption(project, "binary.xbin", ksubst);
- assertHasKSubstOption(project, "text.xtxt", ksubst);
- assertHasKSubstOption(project, "folder1/a.xtxt", ksubst);
- assertHasKSubstOption(project, "added.xtxt", ksubst);
- assertHasKSubstOption(project, "added.xbin", ksubst);
-
- // verify that substitution mode changed remotely and "added.xtxt", "added.xbin" don't exist
- IProject copy = checkoutCopy(project, "-copy");
- assertHasKSubstOption(copy, "binary.xbin", ksubst);
- assertHasKSubstOption(copy, "text.xtxt", ksubst);
- assertHasKSubstOption(copy, "folder1/a.xtxt", ksubst);
- assertDoesNotExistInWorkspace(copy.getFile("added.xtxt"));
- assertDoesNotExistInWorkspace(copy.getFile("added.xbin"));
-
- // commit added files then checkout the copy again
- commitResources(project, new String[] { "added.xbin", "added.xtxt" });
- IProject copy2 = checkoutCopy(project, "-copy2");
- assertHasKSubstOption(copy2, "added.xtxt", ksubst);
- assertHasKSubstOption(copy2, "added.xbin", ksubst);
-
- // verify that local contents are up to date
- assertEquals(project, copy2);
- }
-
- public static void setFileContents(IFile file, String string) throws CoreException {
- InputStream is = new ByteArrayInputStream(string.getBytes());
- if (file.exists()) {
- file.setContents(is, false /*force*/, true /*keepHistory*/, null);
- } else {
- file.create(is, false /*force*/, null);
- }
- }
- public static String getFileContents(IFile file) throws CoreException, IOException {
- StringBuffer buf = new StringBuffer();
- Reader reader = new InputStreamReader(new BufferedInputStream(file.getContents()));
- try {
- int c;
- while ((c = reader.read()) != -1) buf.append((char) c);
- } finally {
- reader.close();
- }
- return buf.toString();
- }
-
- public static void assertEqualsFileContents(IFile file, String string) throws CoreException, IOException {
- String other = getFileContents(file);
- assertEquals(string, other);
- }
-
- public static void assertHasKSubstOption(IContainer container, String filename, KSubstOption ksubst)
- throws TeamException {
- IFile file = container.getFile(new Path(filename));
- ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor(file);
- ResourceSyncInfo info = cvsFile.getSyncInfo();
- assertEquals(ksubst, info.getKeywordMode());
- }
-}
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ImportTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ImportTest.java
deleted file mode 100644
index f591638d0..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ImportTest.java
+++ /dev/null
@@ -1,155 +0,0 @@
-package org.eclipse.team.tests.ccvs.core.provider;
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-
-/**
- * @version 1.0
- * @author ${user}
- */
-public class ImportTest extends EclipseTest {
-
- /**
- * Constructor for ImportTest.
- */
- public ImportTest() {
- super();
- }
-
- /**
- * Constructor for ImportTest.
- * @param name
- */
- public ImportTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(ImportTest.class);
- return new CVSTestSetup(suite);
- //return new CVSTestSetup(new ImportTest("testReadOnly"));
- }
-
- // Assert that the two containers have equal contents
- protected void assertEquals(IContainer container1, IContainer container2) throws CoreException {
- assertEquals(container1.getName(), container2.getName());
- List members1 = new ArrayList();
- members1.addAll(Arrays.asList(container1.members()));
- members1.remove(container1.findMember("CVS"));
-
- List members2 = new ArrayList();
- members2.addAll(Arrays.asList(container2.members()));
- members2.remove(container2.findMember("CVS"));
-
- assertTrue(members1.size() == members2.size());
- for (int i=0;i<members1.size();i++) {
- IResource member1 = (IResource)members1.get(i);
- IResource member2 = container2.findMember(member1.getName());
- assertNotNull(member2);
- assertEquals(member1, member2);
- }
- }
-
- // Assert that the two files have equal contents
- protected void assertEquals(IFile file1, IFile file2) throws CoreException {
- assertEquals(file1.getName(), file2.getName());
- assertTrue(compareContent(file1.getContents(), file2.getContents()));
- }
-
- // Assert that the two projects have equal contents ignoreing the project name
- // and the .vcm_meta file
- protected void assertEquals(IProject container1, IProject container2) throws CoreException {
- List members1 = new ArrayList();
- members1.addAll(Arrays.asList(container1.members()));
- members1.remove(container1.findMember(".project"));
- members1.remove(container1.findMember("CVS"));
-
- List members2 = new ArrayList();
- members2.addAll(Arrays.asList(container2.members()));
- members2.remove(container2.findMember(".project"));
- members2.remove(container2.findMember("CVS"));
-
- assertTrue("Number of children differs for " + container1.getFullPath(), members1.size() == members2.size());
- for (int i=0;i<members1.size();i++) {
- IResource member1 = (IResource)members1.get(i);
- IResource member2 = container2.findMember(member1.getName());
- assertNotNull(member2);
- assertEquals(member1, member2);
- }
- }
- protected void assertEquals(IResource resource1, IResource resource2) throws CoreException {
- assertEquals(resource1.getType(), resource2.getType());
- if (resource1.getType() == IResource.FILE)
- assertEquals((IFile)resource1, (IFile)resource2);
- else
- assertEquals((IContainer)resource1, (IContainer)resource2);
- }
-
- public void testImportAndCheckout() throws TeamException, CoreException {
- // Create a test project and import it into cvs
- IProject project = getUniqueTestProject("testImport");
- IResource[] result = buildResources(project, new String[] { "file1.txt", "folder1/", "folder1/a.txt" }, true);
- importProject(project);
-
- // Check it out under a different name and validate that the results are the same
- IProject copy = getWorkspace().getRoot().getProject(project.getName() + "Copy");
- CVSProviderPlugin.getProvider().checkout(getRepository(), copy, project.getName(), null, DEFAULT_MONITOR);
- assertValidCheckout(copy);
- assertEquals(project, copy);
- }
-
- public void testCheckout() throws TeamException, CoreException, IOException {
- // Create a project and checkout a copy
- IProject project = createProject("testCheckout", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
- IProject copy = checkoutCopy(project, "-copy");
-
- // 0. checkout the project again
- project = checkoutProject(project, null, null);
- assertEquals(project, copy, true, true);
-
- // 1. Delete the project but not it's contents and checkout the project again
- project.delete(false, false, DEFAULT_MONITOR);
- project = checkoutProject(project, null, null);
- assertEquals(project, copy, true, true);
-
- // 2. Delete the project and its contents and use the module name instead of the project
- project.delete(true, false, DEFAULT_MONITOR);
- project = checkoutProject(null, project.getName(), null);
- assertEquals(project, copy, true, true);
-
- // 3. Create a project in a custom location and check out over it
- project.delete(true, false, DEFAULT_MONITOR);
- IProjectDescription desc = ResourcesPlugin.getWorkspace().newProjectDescription(project.getName());
- //desc.setLocation(new Path("C:\\temp\\project"));
- project.create(desc, DEFAULT_MONITOR);
- project = checkoutProject(project, null, null);
- assertEquals(project, copy, true, true);
-
- // 4. Checkout something that doesn't contain a .project
- project.delete(true, false, DEFAULT_MONITOR);
- project = checkoutProject(null, project.getName() + "/folder1", null);
- //assertEquals(project, copy.getFolder("folder1"));
-
-
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ModuleTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ModuleTest.java
deleted file mode 100644
index c4c5a7494..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ModuleTest.java
+++ /dev/null
@@ -1,292 +0,0 @@
-package org.eclipse.team.tests.ccvs.core.provider;
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-
-import junit.framework.Assert;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.core.internal.plugins.PluginDescriptor;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IPluginDescriptor;
-import org.eclipse.core.runtime.IPluginRegistry;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Session;
-import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolder;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteModule;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-
-/**
- * This class tests the Command framework using simple CVS commands
- */
-public class ModuleTest extends EclipseTest {
-
- public static final String RESOURCE_PATH = "resources/CommandTest/";
-
- public ModuleTest() {
- super(null);
- }
-
- public ModuleTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(ModuleTest.class);
- //return new CVSTestSetup(suite);
- return new CVSTestSetup(new ModuleTest("testAliasForFiles"));
- }
-
- private static boolean isSetUp = false;
-
- private static RemoteModule[] remoteModules;
-
- public void setUp() throws TeamException, CoreException, IOException {
- if (isSetUp) return;
-
- // upload the modules definitions file
- PluginDescriptor testPlugin = (PluginDescriptor)Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.team.tests.cvs.core");
- String filePath = testPlugin.getLocation().concat(RESOURCE_PATH + "CVSROOT/modules");
- URL url = null;
- try {
- url = new URL (filePath);
- } catch (java.net.MalformedURLException e) {
- assertTrue("Bad URL for " + filePath, true);
- }
-
- waitMsec(1000);
-
- IProject cvsroot = checkoutProject(null, "CVSROOT", null);
- InputStream in = url.openStream();
- try {
- cvsroot.getFile("modules").setContents(in, false, false, DEFAULT_MONITOR);
- } finally {
- in.close();
- }
- commitProject(cvsroot);
-
- uploadProject("common");
-
- remoteModules = RemoteModule.getRemoteModules(getRepository(), null, DEFAULT_MONITOR);
-
- isSetUp = true;
- }
-
- protected void uploadProject(String projectName) throws TeamException, IOException, CoreException {
- // locate the test case contents in the plugin resources
- IPluginRegistry registry = Platform.getPluginRegistry();
- IPluginDescriptor descriptor = registry.getPluginDescriptor("org.eclipse.team.tests.cvs.core");
- URL baseURL = descriptor.getInstallURL();
- URL url = new URL(baseURL, RESOURCE_PATH + projectName);
- url = Platform.resolve(url);
- Assert.assertTrue(url.getProtocol().equals("file"));
- IPath path = new Path(url.getPath());
-
- // create a project rooted there
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IWorkspaceRoot workspaceRoot = workspace.getRoot();
- IProject project = workspaceRoot.getProject(projectName);
- IProjectDescription projectDescription = workspace.newProjectDescription(projectName);
- projectDescription.setLocation(path);
- project.create(projectDescription, null);
- project.open(null);
-
- // import the project into CVS
- Session s = new Session(getRepository(), CVSWorkspaceRoot.getCVSFolderFor(project));
- s.open(DEFAULT_MONITOR);
- try {
- Command.IMPORT.execute(s, Command.NO_GLOBAL_OPTIONS,
- new LocalOption[] {Command.makeArgumentOption(Command.MESSAGE_OPTION, "")},
- new String[] { projectName, "start", "vendor"},
- null,
- DEFAULT_MONITOR);
- } finally {
- s.close();
- }
-
- // delete the project locally
- project.delete(false /*deleteContent*/, false /*force*/, null);
- }
-
- // XXX Temporary method of checkout (i.e. with vcm_meta
- protected IProject checkoutProject(String projectName, CVSTag tag) throws TeamException {
- IProject project = super.checkoutProject(getWorkspace().getRoot().getProject(projectName), null, tag);
- ICVSFolder parent = (ICVSFolder)CVSWorkspaceRoot.getCVSResourceFor(project);
- ICVSResource vcmmeta = CVSWorkspaceRoot.getCVSResourceFor(project.getFile(".vcm_meta"));
- if ( ! vcmmeta.isManaged() && ! parent.getFolderSyncInfo().getIsStatic()) {
- getProvider(project).add(new IResource[] {project.getFile(".vcm_meta")}, IResource.DEPTH_INFINITE, DEFAULT_MONITOR);
- waitMsec(1000);
- commitProject(project);
- }
- return project;
- }
-
- /**
- * wait milliseconds to continou the execution
- */
- protected static void waitMsec(int msec) {
- try {
- Thread.currentThread().sleep(msec);
- } catch(InterruptedException e) {
- fail("wait-problem");
- }
- }
-
- /*
- * Test the following definition
- *
- * # self referencing modules
- * project1 project1
- */
- public void testSelfReferencingModule() throws TeamException, CoreException, IOException {
- uploadProject("project1");
- IProject project1 = checkoutProject("project1", null);
- IRemoteSyncElement tree = CVSWorkspaceRoot.getRemoteSyncTree(project1, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertEquals(Path.EMPTY, CVSWorkspaceRoot.getCVSResourceFor(project1), (ICVSResource)tree.getRemote(), false, false);
- RemoteModule module = getRemoteModule("project1");
- assertEquals(Path.EMPTY, (RemoteFolder)tree.getRemote(), module, false);
- }
-
- /*
- * Test the following definition
- *
- * # checkout docs in flattened structure
- * docs -d docs common/docs
- * macros common/macros
- */
- public void testFlattenedStructure() throws TeamException, CoreException, IOException {
-
- IProject docs = checkoutProject("docs", null);
- IRemoteSyncElement tree = CVSWorkspaceRoot.getRemoteSyncTree(docs, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertEquals(Path.EMPTY, CVSWorkspaceRoot.getCVSResourceFor(docs), (ICVSResource)tree.getRemote(), false, false);
- RemoteModule module = getRemoteModule("docs");
- assertEquals(Path.EMPTY, (RemoteFolder)tree.getRemote(), module, false);
-
- IProject macros = checkoutProject("macros", null);
- tree = CVSWorkspaceRoot.getRemoteSyncTree(macros, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertEquals(Path.EMPTY, CVSWorkspaceRoot.getCVSResourceFor(macros), (ICVSResource)tree.getRemote(), false, false);
- module = getRemoteModule("macros");
- assertEquals(Path.EMPTY, (RemoteFolder)tree.getRemote(), module, false);
-
- }
-
- /*
- * Test the following definition
- *
- * # include docs with project
- * project2 project2 &docs
- * # only project2
- * project2-only project2
- */
- public void testIncludeAndExcludeDocs() throws TeamException, CoreException, IOException {
- uploadProject("project2");
- IProject project2 = checkoutProject("project2", null);
- IRemoteSyncElement tree = CVSWorkspaceRoot.getRemoteSyncTree(project2, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertEquals(Path.EMPTY, CVSWorkspaceRoot.getCVSResourceFor(project2), (ICVSResource)tree.getRemote(), false, false);
-
- RemoteModule module = getRemoteModule("project2");
- assertEquals(Path.EMPTY, (RemoteFolder)tree.getRemote(), module, false);
-
- project2 = checkoutProject("project2-only", null);
- tree = CVSWorkspaceRoot.getRemoteSyncTree(project2, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertEquals(Path.EMPTY, CVSWorkspaceRoot.getCVSResourceFor(project2), (ICVSResource)tree.getRemote(), false, false);
-
- module = getRemoteModule("project2-only");
- assertEquals(Path.EMPTY, (RemoteFolder)tree.getRemote(), module, false);
-
- }
-
- /*
- * Test the following definition
- *
- * # a use of alias
- * project3-src project3/src
- * project3-src_file -a project3-src/file.c mc-src/file.h
- * project3-sub project3/sub &project3-src_file
- */
- public void testAliasForFiles() throws TeamException, CoreException, IOException {
- uploadProject("project3");
- IProject project3 = checkoutProject("project3-sub", null);
- IRemoteSyncElement tree = CVSWorkspaceRoot.getRemoteSyncTree(project3, CVSTag.DEFAULT, DEFAULT_MONITOR);
-// assertEquals("Local does not match remote", Session.getManagedResource(project3), (ICVSResource)tree.getRemote(), false, false);
-
- project3 = checkoutProject("project3-src", null);
- tree = CVSWorkspaceRoot.getRemoteSyncTree(project3, CVSTag.DEFAULT, DEFAULT_MONITOR);
-// assertEquals("Local does not match remote", Session.getManagedResource(project3), (ICVSResource)tree.getRemote(), false, false);
-
- project3 = checkoutProject("project3-src_file", null);
- tree = CVSWorkspaceRoot.getRemoteSyncTree(project3, CVSTag.DEFAULT, DEFAULT_MONITOR);
-// assertEquals("Local does not match remote", Session.getManagedResource(project3), (ICVSResource)tree.getRemote(), false, false);
- }
-
- /*
- * Test the following definition
- *
- * # using aliases to provide packaging
- * project7-common -a project7/common
- * project7-pc -a project7-common project7/pc
- * project7-linux -a project7-common project7/linux
- */
- public void testAliases() throws TeamException, CoreException, IOException {
- uploadProject("project7");
- IProject project7 = checkoutProject("project7-common", null);
- IRemoteSyncElement tree = CVSWorkspaceRoot.getRemoteSyncTree(project7, CVSTag.DEFAULT, DEFAULT_MONITOR);
-// assertEquals("Local does not match remote", Session.getManagedResource(project7), (ICVSResource)tree.getRemote(), false, false);
-
- project7 = checkoutProject("project7-pc", null);
- tree = CVSWorkspaceRoot.getRemoteSyncTree(project7, CVSTag.DEFAULT, DEFAULT_MONITOR);
-// assertEquals("Local does not match remote", Session.getManagedResource(project7), (ICVSResource)tree.getRemote(), false, false);
-
- project7 = checkoutProject("project7-linux", null);
- tree = CVSWorkspaceRoot.getRemoteSyncTree(project7, CVSTag.DEFAULT, DEFAULT_MONITOR);
-// assertEquals("Local does not match remote", Session.getManagedResource(project7), (ICVSResource)tree.getRemote(), false, false);
- }
-
-
- /*
- * Test the following definition
- *
- * # simple use of module alias
- * project8-alias -a project8 common
- */
- public void testSimpleAlias() throws TeamException, CoreException, IOException {
- uploadProject("project8");
-
- // XXX Module checkout will not work yet
- // IProject project8 = checkoutProject("project8-alias", null);
-
- RemoteModule module = getRemoteModule("project8-alias");
- }
-
- public RemoteModule getRemoteModule(String moduleName) {
- for (int i = 0; i < remoteModules.length; i++) {
- RemoteModule module = remoteModules[i];
- // XXX shouldn't be getName
- if (module.getName().equals(moduleName))
- return module;
- }
- return null;
- }
-}
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/RemoteResourceTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/RemoteResourceTest.java
deleted file mode 100644
index 0db51ccd1..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/RemoteResourceTest.java
+++ /dev/null
@@ -1,316 +0,0 @@
-package org.eclipse.team.tests.ccvs.core.provider;
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteResource;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.CVSTeamProvider;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.ILogEntry;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolder;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolderTree;
-import org.eclipse.team.internal.ccvs.core.resources.RemoteFolderTreeBuilder;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-import org.eclipse.team.tests.ccvs.core.JUnitTestCase;
-
-public class RemoteResourceTest extends EclipseTest {
-
- public RemoteResourceTest() {
- super();
- }
-
- public RemoteResourceTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(RemoteResourceTest.class);
- return new CVSTestSetup(suite);
- //return new CVSTestSetup(new RemoteResourceTest("testBuildRemoteTree"));
- }
-
- protected void assertRemoteMatchesLocal(String message, RemoteFolder remote, IContainer container) throws CVSException, IOException, CoreException {
- assertEquals(Path.EMPTY, (ICVSResource)remote, CVSWorkspaceRoot.getCVSFolderFor(container), false, false);
- }
-
- protected void getMembers(ICVSRemoteFolder folder, boolean deep) throws TeamException {
- IRemoteResource[] children = folder.members(DEFAULT_MONITOR);
- if (deep) {
- for (int i=0;i<children.length;i++) {
- if (children[i].isContainer())
- getMembers((ICVSRemoteFolder)children[i], deep);
- }
- }
- }
-
- /**
- * RemoteFolderTreeBuilder test
- *
- * Perform some remote additions, changes and deletions
- */
- public void testSimpleChanges() throws TeamException, CoreException, IOException {
-
- // Create a test project and a copy of it
- IProject project = createProject("testRemoteTreeBuilder", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
- IProject copy = checkoutCopy(project, "-copy");
-
- // Make some changes to the copy and commit
- IResource[] newResources = buildResources(copy, new String[] { "added.txt", "folder2/", "folder2/added.txt" }, false);
- IFile file = copy.getFile("changed.txt");
- JUnitTestCase.waitMsec(1500); // Wait so that timestamp of modified file differs from original
- file.setContents(getRandomContents(), false, false, null);
- CVSTeamProvider provider = getProvider(copy);
- provider.add(newResources, IResource.DEPTH_ZERO, DEFAULT_MONITOR);
- provider.delete(new IResource[] {copy.getFile("deleted.txt")}, DEFAULT_MONITOR);
- provider.checkin(new IResource[] {copy}, IResource.DEPTH_INFINITE, DEFAULT_MONITOR);
-
- // Build the remote tree from the original and ensure it matches the copy
- RemoteFolderTree tree = RemoteFolderTreeBuilder.buildRemoteTree(getRepository(), project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertRemoteMatchesLocal("testSimpleChanges", tree, copy);
- }
-
- /**
- * RemoteFolderTreeBuilder test
- *
- * Create a remote tree from a local workspace with no remote changes.
- */
- public void testNoRemoteChanges() throws TeamException, CoreException, IOException {
- IProject project = createProject("testNoRemoteChanges", new String[] { "file1.txt", "file2.txt", "folder1/a.txt", "folder2/folder3/b.txt"});
- RemoteFolderTree tree = RemoteFolderTreeBuilder.buildRemoteTree(getRepository(), project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertRemoteMatchesLocal("testNoRemoteChanges", tree, project);
- }
-
- /**
- * RemoteFolderTreeBuilder test
- *
- * Create a base remote tree from a local workspace with no remote changes.
- */
- public void testGetBase() throws TeamException, CoreException, IOException {
- IProject project = createProject("testGetBase", new String[] { "file1.txt", "file2.txt", "folder1/a.txt", "folder2/folder3/b.txt"});
- RemoteFolderTree tree = RemoteFolderTreeBuilder.buildBaseTree(getRepository(), CVSWorkspaceRoot.getCVSFolderFor(project), CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertRemoteMatchesLocal("testGetBase", tree, project);
- }
-
- /**
- * RemoteFolderTreeBuilder test
- *
- * Add a nested folder structure remotely and build the remote tree
- * from the root.
- */
- public void testFolderAddition() throws TeamException, CoreException, IOException {
-
- // Create a test project
- IProject project = createProject("testFolderAddition", new String[] { "file1.txt", "file2.txt", "folder1/", "folder1/a.txt"});
-
- // Checkout and modify a copy
- IProject copy = checkoutCopy(project, "-copy");
- addResources(copy, new String[] { "folder2/folder3/b.txt" }, false);
- getProvider(copy).checkin(new IResource[] {copy}, IResource.DEPTH_INFINITE, DEFAULT_MONITOR);
-
- // Build the remote tree from the project
- RemoteFolderTree tree = RemoteFolderTreeBuilder.buildRemoteTree(getRepository(), project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertRemoteMatchesLocal("testFolderAddition", tree, copy);
- }
-
- /**
- * RemoteFolderTreeBuilder test
- *
- * Add a nested folder structure remotely and build the remote tree
- * from a child
- */
- public void testNonRootBuild() throws CoreException, TeamException, IOException {
-
- // Create a test project
- IProject project = createProject("testNonRootBuild", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder2/", "folder2/a.txt", "folder2/folder3/", "folder2/folder3/b.txt", "folder2/folder3/c.txt"});
-
- // Checkout and modify a copy
- IProject copy = checkoutCopy(project, "-copy");
- IFile file = copy.getFile("folder2/folder3/c.txt");
- JUnitTestCase.waitMsec(1500); // Wait so that timestamp of modified file differs from original
- file.setContents(getRandomContents(), false, false, null);
- addResources(copy, new String[] { "folder2/folder3/add.txt" }, false);
- getProvider(copy).delete(new IResource[] {copy.getFile("folder2/folder3/b.txt")}, DEFAULT_MONITOR);
- getProvider(copy).checkin(new IResource[] {copy}, IResource.DEPTH_INFINITE, DEFAULT_MONITOR);
-
- // Build the remote tree from the project
- RemoteFolderTree tree = RemoteFolderTreeBuilder.buildRemoteTree(getRepository(), project.getFolder("folder2"), CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertRemoteMatchesLocal("testNonRootBuild", tree, copy.getFolder("folder2"));
- }
-
- /**
- * RemoteResource test
- *
- */
- public void testGetRemoteResource() throws CoreException, TeamException, IOException {
- IProject project = createProject("testGetRemoteResource", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder2/", "folder2/a.txt", "folder2/folder3/", "folder2/folder3/b.txt", "folder2/folder3/c.txt"});
- ICVSRemoteResource file = CVSWorkspaceRoot.getRemoteResourceFor(project.getFile("folder1/a.txt"));
- assertTrue("File should exist remotely", file.exists(DEFAULT_MONITOR));
- assertEquals(Path.EMPTY, (ICVSResource)file, (ICVSResource)CVSWorkspaceRoot.getRemoteResourceFor(project.getFile("folder1/a.txt")), false, false);
- ICVSRemoteResource folder = CVSWorkspaceRoot.getRemoteResourceFor(project.getFolder("folder2/folder3/"));
- getMembers((ICVSRemoteFolder)folder, true);
- assertTrue("Folder should exist remotely", folder.exists(DEFAULT_MONITOR));
- // XXX this didn't work right. I'll need to check into it later
-// assertEquals("Remote folder should match local folder", (ICVSResource)folder, (ICVSResource)Client.getManagedFolder(project.getFolder("folder2/folder3/").getLocation().toFile()));
- }
-
- /*
- * Test that the fetch of a tagged tree matches what is checked out for that tag
- */
- public void testVersionTag() throws TeamException, CoreException, IOException {
- // Create a test project and version it
- CVSTag v1Tag = new CVSTag("v1", CVSTag.VERSION);
- IProject project = createProject("testVersionTag", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt", "folder2/folder3/c.txt"});
- tagProject(project, v1Tag);
-
- // Make some changes, additions (including folders) and deletions and commit
- IFile file = project.getFile("folder1/a.txt");
- file.setContents(getRandomContents(), false, false, null);
- addResources(project, new String[] { "folder2/folder3/add.txt" }, false);
- deleteResources(project, new String[] {"folder1/b.txt"}, false);
- getProvider(project).checkin(new IResource[] {project}, IResource.DEPTH_INFINITE, DEFAULT_MONITOR);
-
- // Fetch the remote tree for the version
- IRemoteSyncElement tree = CVSWorkspaceRoot.getRemoteSyncTree(project, v1Tag, DEFAULT_MONITOR);
-
- // Check out the project version
- project = checkoutCopy(project, v1Tag);
-
- // Compare the two
- assertEquals(Path.EMPTY, (ICVSResource)tree.getRemote(), (ICVSResource)CVSWorkspaceRoot.getCVSResourceFor(project), false, false);
- }
-
- /*
- * Test the fetching of the contents of an empty file
- */
- public void testEmptyFile() throws TeamException, CoreException, IOException {
-
- // Create a project with an empty file
- IProject project = createProject("testEmptyFile", new String[] { "file.txt"});
- IFile file = project.getFile("file.txt");
- JUnitTestCase.waitMsec(1500);
- file.setContents(new ByteArrayInputStream(new byte[0]), false, false, DEFAULT_MONITOR);
- commitResources(project, new String[] {"file.txt"});
-
- ICVSRemoteResource remote = CVSWorkspaceRoot.getRemoteResourceFor(file);
- InputStream in = remote.getContents(DEFAULT_MONITOR);
- int count = 0;
- while(in.read() != -1) {
- count++;
- }
- assertTrue("Remote file should be empty", count==0);
- }
-
- /*
- * Test the fetching of the contents from multiple remote revisions of a file
- */
- public void testFileRevisions() throws TeamException, CoreException, IOException {
-
- // Create a project with an empty file
- IProject project = createProject("testFileRevisions", new String[] { "file.txt"});
- IFile file = project.getFile("file.txt");
- JUnitTestCase.waitMsec(1500);
- file.setContents(new ByteArrayInputStream("hi there".getBytes()), false, false, DEFAULT_MONITOR);
- commitResources(project, new String[] {"file.txt"});
- JUnitTestCase.waitMsec(1500);
- file.setContents(new ByteArrayInputStream("bye there".getBytes()), false, false, DEFAULT_MONITOR);
- commitResources(project, new String[] {"file.txt"});
-
- ICVSRemoteFile remote = (ICVSRemoteFile)CVSWorkspaceRoot.getRemoteResourceFor(file);
- ILogEntry[] entries = remote.getLogEntries(DEFAULT_MONITOR);
- for (int i=0;i<entries.length;i++) {
- InputStream in = entries[i].getRemoteFile().getContents(DEFAULT_MONITOR);
-
- if (entries[i].getRevision().equals("1.2")) {
- int count = 0;
- byte[] buffer = new byte[1024];
- int c;
- while((c = in.read()) != -1) {
- buffer[count] = (byte)c;
- count++;
- }
- String contents = new String(buffer, 0, count);
- assertEquals("the contents of revision 1.2 are not equal", contents, "hi there");
- } else if (entries[i].getRevision().equals("1.3")) {
- int count = 0;
- byte[] buffer = new byte[1024];
- int c;
- while((c = in.read()) != -1) {
- buffer[count] = (byte)c;
- count++;
- }
- String contents = new String(buffer, 0, count);
- assertEquals("the contents of revision 1.3 are not equal", contents, "bye there");
- }
- }
- }
-
- public void testTag() throws TeamException, CoreException, IOException {
- IProject project = createProject("testTag", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder2/folder3/b.txt", "folder2/folder3/c.txt"});
- ICVSRemoteFolder remote = (ICVSRemoteFolder)CVSWorkspaceRoot.getRemoteResourceFor(project);
- CVSTag tag = new CVSTag("v1", CVSTag.VERSION);
- remote.tag(tag, Command.NO_LOCAL_OPTIONS, DEFAULT_MONITOR);
- ICVSRemoteFolder v1 = (ICVSRemoteFolder)CVSWorkspaceRoot.getRemoteTree(project, tag, DEFAULT_MONITOR);
- assertEquals(Path.EMPTY, remote, v1, false);
- CVSTag tag2 = new CVSTag("v2", CVSTag.VERSION);
- v1.tag(tag2, Command.NO_LOCAL_OPTIONS, DEFAULT_MONITOR);
- ICVSRemoteFolder v2 = (ICVSRemoteFolder)CVSWorkspaceRoot.getRemoteTree(project, tag2, DEFAULT_MONITOR);
- assertEquals(Path.EMPTY, remote, v2, false);
- }
-
- public void testExists() throws TeamException, CoreException, IOException, InterruptedException {
- IProject project = createProject("testExists", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder2/", "folder2/a.txt", "folder2/folder3/", "folder2/folder3/b.txt", "folder2/folder3/c.txt"});
- ICVSRemoteResource resource1 = CVSWorkspaceRoot.getRemoteResourceFor(project.getFile("file1.txt"));
- assertTrue(resource1.exists(DEFAULT_MONITOR));
- ICVSRemoteResource resource2 = (ICVSRemoteFolder)CVSWorkspaceRoot.getRemoteResourceFor(project.getFolder("folder2/folder3/"));
- assertTrue(resource2.exists(DEFAULT_MONITOR));
- deleteResources(project, new String[] {"file1.txt", "folder2/folder3/b.txt", "folder2/folder3/c.txt" }, true);
- assertTrue( ! resource1.exists(DEFAULT_MONITOR));
- assertTrue(resource2.exists(DEFAULT_MONITOR));
- if (CVSTestSetup.INITIALIZE_REPO) {
- CVSTestSetup.executeRemoteCommand(getRepository(), "rm -rf " + ((ICVSFolder)resource2).getFolderSyncInfo().getRemoteLocation());
- assertTrue( ! resource2.exists(DEFAULT_MONITOR));
- }
- }
-
-// /**
-// * Test building a sync tree using the RemoteFolderTreeBuilder using a remote resource as the
-// * starting point instead of a local one.
-// */
-// public void testBuildRemoteTree() throws TeamException, CoreException, IOException, InterruptedException {
-// // Create a project and then delete it locally
-// IProject project = createProject("testBuildRemoteTree", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder2/", "folder2/a.txt", "folder2/folder3/", "folder2/folder3/b.txt", "folder2/folder3/c.txt"});
-// String name = project.getName();
-// project.delete(true, false, DEFAULT_MONITOR);
-// // Create a remote resource for the project and build a sync tree from it
-// RemoteFolder folder = new RemoteFolder(null, getRepository(), new Path(name), null);
-// RemoteFolderTree tree = RemoteFolderTreeBuilder.buildRemoteTree((CVSRepositoryLocation)folder.getRepository(), folder, null, DEFAULT_MONITOR);
-// // Reload the project from the repository and ensure that the tree and project are equal.
-// checkoutProject(project, name, null);
-// assertEquals(Path.EMPTY, CVSWorkspaceRoot.getCVSResourceFor(project), tree, false, true);
-// }
-}
-
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ResourceDeltaTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ResourceDeltaTest.java
deleted file mode 100644
index 720f5c23f..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ResourceDeltaTest.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.team.tests.ccvs.core.provider;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResourceVisitor;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-import org.eclipse.team.internal.ccvs.core.util.AddDeleteMoveListener;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-
-public class ResourceDeltaTest extends EclipseTest {
-
- /**
- * Constructor for ResourceDeltaTest.
- */
- public ResourceDeltaTest() {
- super();
- }
-
- /**
- * Constructor for ResourceDeltaTest.
- * @param name
- */
- public ResourceDeltaTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(ResourceDeltaTest.class);
- return new CVSTestSetup(suite);
- //return new CVSTestSetup(new ResourceDeltaTest("testOrphanedSubtree"));
- }
-
- public void assertNotManaged(ICVSFile cvsFile) throws CVSException {
- assertTrue("File " + cvsFile.getName() + " should not be managed", ! cvsFile.isManaged());
- }
-
- public void assertNotManaged(ICVSFolder cvsFolder) throws CVSException {
- assertTrue("Folder " + cvsFolder.getName() + " should not be managed", ! cvsFolder.isManaged());
- assertTrue("Folder " + cvsFolder.getName() + " should not be a cvs folder", ! cvsFolder.isCVSFolder());
- cvsFolder.acceptChildren(new ICVSResourceVisitor() {
- public void visitFile(ICVSFile file) throws CVSException {
- assertNotManaged(file);
- }
- public void visitFolder(ICVSFolder folder) throws CVSException {
- assertNotManaged(folder);
- }
- });
- }
-
- public void assertAdditionMarkerFor(IResource resource, boolean exists) throws CoreException {
- if ( ! CVSProviderPlugin.getPlugin().getShowTasksOnAddAndDelete()) return;
- IMarker[] markers = resource.findMarkers(AddDeleteMoveListener.ADDITION_MARKER, false, IResource.DEPTH_ZERO);
- if (exists) {
- assertTrue("Addition marker doesn't exist for " + resource.getName(), markers.length == 1);
- } else {
- assertTrue("Addition marker exists for " + resource.getName(), markers.length == 0);
- }
- }
-
- public void assertDeletionMarkerFor(IResource resource, boolean exists) throws CoreException {
- if ( ! CVSProviderPlugin.getPlugin().getShowTasksOnAddAndDelete()) return;
- IMarker marker = null;
- if (resource.getParent().exists()) {
- String name = resource.getName();
- IMarker[] markers = resource.getParent().findMarkers(AddDeleteMoveListener.DELETION_MARKER, false, IResource.DEPTH_ZERO);
- for (int i = 0; i < markers.length; i++) {
- IMarker iMarker = markers[i];
- String markerName = (String)iMarker.getAttribute(AddDeleteMoveListener.NAME_ATTRIBUTE);
- if (markerName.equals(name)) {
- marker = iMarker;
- break;
- }
- }
- }
- if (exists) {
- assertTrue("Deletion marker doesn't exist for " + resource.getName(), marker != null);
- } else {
- assertTrue("Deletion marker exists for " + resource.getName(), marker == null);
- }
- }
-
- public void testOrphanedSubtree() throws TeamException, CoreException {
- IProject project = createProject("testOrphanedSubtree", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/folder2/b.txt"});
- IFolder folder = project.getFolder(new Path("folder1"));
- folder.move(new Path("moved"), false, false, null);
- folder = project.getFolder(new Path("moved"));
- ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor(folder);
- assertNotManaged(cvsFolder);
- assertAdditionMarkerFor(folder, true);
- }
-
- public void testDeletionHandling() throws TeamException, CoreException {
- IProject project = createProject("testDeletionHandling", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/folder2/b.txt"});
- addResources(project, new String[] {"added.txt"}, false);
- assertAdditionMarkerFor(project.getFile("added.txt"), false);
- deleteResources(project, new String[] {"added.txt", "deleted.txt"}, false);
- ICVSFile file = CVSWorkspaceRoot.getCVSFileFor(project.getFile("added.txt"));
- assertNotManaged(file);
- assertDeletionMarkerFor(project.getFile("added.txt"), false);
- file = CVSWorkspaceRoot.getCVSFileFor(project.getFile("deleted.txt"));
- assertTrue("File " + file.getName() + " should be managed", file.isManaged());
- ResourceSyncInfo info = file.getSyncInfo();
- assertTrue("File " + file.getName() + " should be marked as deleted", info.isDeleted());
- assertDeletionMarkerFor(project.getFile("deleted.txt"), true);
- }
-
- public void testFileAdditionHandling() throws TeamException, CoreException {
- IProject project = createProject("testFileAdditionHandling", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/folder2/b.txt"});
- deleteResources(project, new String[] {"deleted.txt"}, false);
- assertDeletionMarkerFor(project.getFile("deleted.txt"), true);
- addResources(project, new String[] {"deleted.txt"}, false);
- ICVSFile file = CVSWorkspaceRoot.getCVSFileFor(project.getFile("deleted.txt"));
- assertTrue("File " + file.getName() + " should be managed", file.isManaged());
- ResourceSyncInfo info = file.getSyncInfo();
- assertTrue("File " + file.getName() + " should not be marked as deleted", ! info.isDeleted());
- assertTrue("File " + file.getName() + " should not be marked as addition", ! info.isAdded());
- assertDeletionMarkerFor(project.getFile("deleted.txt"), false);
- assertAdditionMarkerFor(project.getFile("added.txt"), false);
- }
-
- public void testFolderAdditionHandling() throws TeamException, CoreException {
- IProject project = createProject("testFolderAdditionHandling", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/folder2/b.txt"});
- IFolder folder = project.getFolder("newfolder");
- folder.create(false, true, null);
- assertAdditionMarkerFor(folder, true);
- getProvider(project).add(new IResource[] {folder}, IResource.DEPTH_ZERO, DEFAULT_MONITOR);
- assertAdditionMarkerFor(folder, false);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/SyncElementTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/SyncElementTest.java
deleted file mode 100644
index cfb2823d7..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/SyncElementTest.java
+++ /dev/null
@@ -1,869 +0,0 @@
-package org.eclipse.team.tests.ccvs.core.provider;
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-
-import junit.framework.AssertionFailedError;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.ILocalSyncElement;
-import org.eclipse.team.core.sync.IRemoteResource;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.core.sync.RemoteSyncElement;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResource;
-import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.core.client.Update;
-import org.eclipse.team.internal.ccvs.core.resources.CVSRemoteSyncElement;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.team.tests.ccvs.core.EclipseTest;
-import org.eclipse.team.tests.ccvs.core.JUnitTestCase;
-
-public class SyncElementTest extends EclipseTest {
-
- /**
- * Constructor for SyncElementTest.
- */
- public SyncElementTest() {
- super();
- }
-
- /**
- * Constructor for SyncElementTest.
- * @param name
- */
- public SyncElementTest(String name) {
- super(name);
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite(SyncElementTest.class);
- return new CVSTestSetup(suite);
- //return new CVSTestSetup(new SyncElementTest("testAdditionConflicts"));
- }
-
- /*
- * Get the child in the sync tree
- */
- protected ILocalSyncElement getChild(ILocalSyncElement tree, IPath path) throws TeamException {
- if (path.segmentCount() == 0)
- return tree;
- ILocalSyncElement[] children = tree.members(DEFAULT_MONITOR);
- for (int i=0;i<children.length;i++) {
- if (children[i].getName().equals(path.segment(0)))
- return getChild(children[i], path.removeFirstSegments(1));
- }
- assertTrue("Child " + path.toString() + " does not exist", false);
- return null;
- }
-
- /*
- * Assert that the specified resources in the tree have the specified sync kind
- * Ignore conflict types if they are not specified in the assert statement
- */
- public void assertSyncEquals(String message, ILocalSyncElement tree, String[] resources, int[] syncKinds, int granularity) throws TeamException {
- assertTrue(resources.length == syncKinds.length);
- for (int i=0;i<resources.length;i++) {
- int conflictTypeMask = 0x0F; // ignore manual and auto merge sync types for now.
- ILocalSyncElement child = getChild(tree, new Path(resources[i]));
- int kind = child.getSyncKind(granularity, DEFAULT_MONITOR) & conflictTypeMask;
- int kindOther = syncKinds[i] & conflictTypeMask;
- assertTrue(message + ": improper sync state for " + resources[i] + " expected " +
- RemoteSyncElement.kindToString(kindOther) + " but was " +
- RemoteSyncElement.kindToString(kind), kind == kindOther);
- }
- }
-
- public void assertSyncEquals(String message, ILocalSyncElement tree, String[] resources, int[] syncKinds) throws TeamException {
- assertSyncEquals(message, tree, resources, syncKinds, ILocalSyncElement.GRANULARITY_TIMESTAMP);
- }
-
- /*
- * Update the sync info of the resources so they can be committed
- */
- public void makeOutgoing(IRemoteSyncElement tree, String[] hierarchy) throws CoreException, TeamException {
- for (int i=0;i<hierarchy.length;i++) {
- ((CVSRemoteSyncElement)getChild(tree, new Path(hierarchy[i]))).makeOutgoing(DEFAULT_MONITOR);
- }
- }
-
- public void makeIncoming(IRemoteSyncElement tree, String[] hierarchy) throws CoreException, TeamException {
- for (int i=0;i<hierarchy.length;i++) {
- ((CVSRemoteSyncElement)getChild(tree, new Path(hierarchy[i]))).makeIncoming(DEFAULT_MONITOR);
- }
- }
-
- public void makeInSync(IRemoteSyncElement tree, String[] hierarchy) throws CoreException, TeamException {
- for (int i=0;i<hierarchy.length;i++) {
- ((CVSRemoteSyncElement)getChild(tree, new Path(hierarchy[i]))).makeInSync(DEFAULT_MONITOR);
- }
- }
- /*
- * Assert that the named resources have no local resource or sync info
- */
- public void assertDeleted(String message, IRemoteSyncElement tree, String[] resources) throws CoreException, TeamException {
- for (int i=0;i<resources.length;i++) {
- try {
- getChild(tree, new Path(resources[i]));
- } catch (AssertionFailedError e) {
- break;
- }
- assertTrue(message + ": resource " + resources[i] + " still exists in some form", false);
- }
- }
-
- /*
- * Perform a simple test that checks for the different types of incoming changes
- */
- public void testIncomingChanges() throws TeamException, CoreException, IOException {
- // Create a test project
- IProject project = createProject("testIncomingChanges", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
-
- // Checkout and modify a copy
- IProject copy = checkoutCopy(project, "-copy");
- IFile file = copy.getFile("folder1/a.txt");
- JUnitTestCase.waitMsec(1500); // Wait so that timestamp of modified file differs from original
- file.setContents(getRandomContents(), false, false, null);
- addResources(copy, new String[] { "folder2/folder3/add.txt" }, false);
- deleteResources(copy, new String[] {"folder1/b.txt"}, false);
- JUnitTestCase.waitMsec(1500); // Wait so that timestamp of modified file differs from original
- getProvider(copy).checkin(new IResource[] {copy}, IResource.DEPTH_INFINITE, DEFAULT_MONITOR);
-
- // Get the sync tree for the project
- IRemoteSyncElement tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testIncomingChanges", tree,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt", "folder2/", "folder2/folder3/", "folder2/folder3/add.txt"},
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.INCOMING | IRemoteSyncElement.CHANGE,
- IRemoteSyncElement.INCOMING | IRemoteSyncElement.DELETION,
- IRemoteSyncElement.INCOMING | IRemoteSyncElement.ADDITION,
- IRemoteSyncElement.INCOMING | IRemoteSyncElement.ADDITION,
- IRemoteSyncElement.INCOMING | IRemoteSyncElement.ADDITION});
-
- // Catch up to the incoming changes
- // XXX SPECIAL CASE: Update must be run on a resource whose parent is managed at the time of the update.
- makeInSync(tree, new String[] {"folder2/", "folder2/folder3/"});
- updateResources(project, new String[] {"folder1/a.txt", "folder1/b.txt", /* "folder2/", "folder2/folder3/", */ "folder2/folder3/add.txt"}, false);
-
- // Verify that we are in sync (except for "folder1/b.txt", which was deleted)
- tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testIncomingChanges", tree,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder2/", "folder2/folder3/", "folder2/folder3/add.txt"},
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC});
-
- // Ensure "folder1/b.txt" was deleted
- assertDeleted("testIncomingChanges", tree, new String[] {"folder1/b.txt"});
-
- // Verify that the copy equals the original
- assertEquals(project, copy);
- }
-
- /*
- * Perform a simple test that checks for the different types of outgoing changes
- */
- public void testOutgoingChanges() throws TeamException, CoreException {
- // Create a test project (which commits it as well)
- IProject project = createProject("testIncomingChanges", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
-
- // Make some modifications
- IFile file = project.getFile("folder1/a.txt");
- JUnitTestCase.waitMsec(1500); // Wait so that timestamp of modified file differs from original
- file.setContents(getRandomContents(), false, false, null);
- addResources(project, new String[] { "folder2/folder3/add.txt" }, false);
- deleteResources(project, new String[] {"folder1/b.txt"}, false);
-
- // Get the sync tree for the project
- IRemoteSyncElement tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testOutgoingChanges", tree,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt", "folder2/", "folder2/folder3/", "folder2/folder3/add.txt"},
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.CHANGE,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.DELETION,
- IRemoteSyncElement.IN_SYNC, /* adding a folder creates it remotely */
- IRemoteSyncElement.IN_SYNC, /* adding a folder creates it remotely */
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.ADDITION});
-
- // Commit the changes
- commitResources(project, new String[] {"folder1/a.txt", "folder1/b.txt", "folder2/folder3/add.txt"});
-
- // Ensure we're in sync
- tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testOutgoingChanges", tree,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder2/", "folder2/folder3/", "folder2/folder3/add.txt"},
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC});
-
- // Ensure deleted resource "folder1/b.txt" no longer exists
- assertDeleted("testOutgoingChanges", tree, new String[] {"folder1/b.txt"});
- }
-
- /*
- * Perform a test that checks for outgoing changes that are CVS questionables (no add or remove)
- */
- public void testOutgoingQuestionables() throws TeamException, CoreException {
- // Create a test project (which commits it as well)
- IProject project = createProject("testIncomingChanges", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
-
- // Make some modifications
- buildResources(project, new String[] {"folder2/folder3/add.txt"}, false);
- IFile file = project.getFile("folder1/b.txt");
- file.delete(true, DEFAULT_MONITOR);
-
- // Get the sync tree for the project
- IRemoteSyncElement tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testOutgoingQuestionables", tree,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt", "folder2/", "folder2/folder3/", "folder2/folder3/add.txt"},
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.DELETION,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.ADDITION,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.ADDITION,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.ADDITION});
-
- // Update the resource sync info so the resources can be commited
- // Merge won't work for folders so we'll add them explicilty!!!
- addResources(project, new String[] {"folder2/", "folder2/folder3/", "folder2/folder3/add.txt"}, false);
- deleteResources(project, new String[] {"folder1/b.txt"}, false);
- commitResources(project, new String[] {"folder1/b.txt", "folder2/folder3/add.txt"});
-
- // Ensure we are in sync
- tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testOutgoingQuestionables", tree,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder2/", "folder2/folder3/", "folder2/folder3/add.txt"},
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC});
-
- // Ensure "folder1/b.txt" was deleted
- assertDeleted("testOutgoingQuestionables", tree, new String[] {"folder1/b.txt"});
- }
-
- /*
- * Test simple file conflicts
- */
- public void testFileConflict() throws TeamException, CoreException, IOException {
- // Create a test project (which commits it as well)
- IProject project = createProject("testFileConflict", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
-
- // Checkout a copy and make some modifications
- IProject copy = checkoutCopy(project, "-copy");
- IFile file = copy.getFile("file1.txt");
- JUnitTestCase.waitMsec(1500); // Wait so that timestamp of modified file differs from original
- appendText(file, "prefix\n", true);
- file = copy.getFile("folder1/a.txt");
- file.setContents(new ByteArrayInputStream("Use a custom string to avoid intermitant errors!".getBytes()), false, false, null);
- getProvider(copy).checkin(new IResource[] {copy}, IResource.DEPTH_INFINITE, DEFAULT_MONITOR);
-
- // Make the same modifications to the original (We need to test both M and C!!!)
- file = project.getFile("file1.txt");
- JUnitTestCase.waitMsec(1500); // Wait so that timestamp of modified file differs from original
- appendText(file, "\npostfix", false); // This will test merges (M)
- file = project.getFile("folder1/a.txt");
- JUnitTestCase.waitMsec(1500); // Wait so that timestamp of modified file differs from original
- file.setContents(getRandomContents(), false, false, null); // This will test conflicts (C)
-
- // Get the sync tree for the project
- IRemoteSyncElement tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testFileConflict", tree,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt"},
- new int[] {
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE });
-
- // Catch up to the file1.txt conflict using UPDATE with ignoreLocalChanges
- getProvider(project).update(new IResource[] {project.getFile("file1.txt")},
- new Command.LocalOption[] {Update.IGNORE_LOCAL_CHANGES, Command.DO_NOT_RECURSE},
- null, true /*createBackups*/, DEFAULT_MONITOR);
- tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testFileConflict", tree,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt"},
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE });
-
- // Release the folder1/a.txt conflict by merging and then committing
- makeOutgoing(tree, new String[] {"folder1/a.txt"});
- tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testFileConflict", tree,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt"},
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.CHANGE });
- getProvider(project).checkin(new IResource[] {project.getFile("folder1/a.txt")}, IResource.DEPTH_ZERO, DEFAULT_MONITOR);
- tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testFileConflict", tree,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt"},
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC });
- }
-
- /*
- * Test conflicts involving additions
- */
- public void testAdditionConflicts() throws TeamException, CoreException {
-
- // CASE 1: The user adds (using CVS add) a remotely added file
- // (a) catchup is simply get?
- // (b) release must do a merge
- // CASE 2: The user adds (but not using cvs add) a remotely added file
- // (a) catchup is simply get?
- // (b) release must do a merge
- // CASE 3: The user adds a remotely added then deleted file
- // catchup is not applicable
- // release is normal
-
- // Create a test project (which commits it as well) and add an uncommited resource
- IProject project = createProject("testAdditionConflicts", new String[] { "file.txt"});
- addResources(project, new String[] { "add1a.txt", "add1b.txt" }, false);
- addResources(project, new String[] { "add3.txt" }, false);
- buildResources(project, new String[] {"add2a.txt", "add2b.txt"}, false);
-
- // Checkout a copy, add the same resource and commit
- IProject copy = checkoutCopy(project, "-copy");
- addResources(copy, new String[] { "add1a.txt", "add1b.txt", "add2a.txt", "add2b.txt", "add3.txt"}, true);
- deleteResources(copy, new String[] { "add3.txt"}, true);
-
- // Get the sync tree for the project
- IRemoteSyncElement tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testAdditionConflicts", tree,
- new String[] { "file.txt", "add1a.txt", "add1b.txt", "add2a.txt", "add2b.txt", "add3.txt"},
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.ADDITION,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.ADDITION,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.ADDITION,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.ADDITION,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.ADDITION });
-
- // Release the conflict cases (MERGE is not required for add3.txt but we do it anyway to ensure it doesn't cause problems)
- makeOutgoing(tree, new String[]{"add1b.txt", "add2b.txt", "add3.txt"});
- tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testAdditionConflicts", tree,
- new String[] { "file.txt", "add1b.txt", "add2b.txt", "add3.txt"},
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.CHANGE,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.CHANGE,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.ADDITION });
- getProvider(project).checkin(new IResource[] {project.getFile("add1b.txt"), project.getFile("add2b.txt"), project.getFile("add3.txt")}, IResource.DEPTH_ZERO, DEFAULT_MONITOR);
- tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testAdditionConflicts", tree,
- new String[] { "file.txt", "add1b.txt", "add2b.txt", "add3.txt"},
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC });
-
- // Catch-up to conflicting cases using UPDATE
- // XXX SPECIAL CASE: We need to unmanage the resources and delete it before getting the remote
- makeIncoming(tree, new String[] {"add1a.txt"});
- IFile file = project.getFile("add1a.txt");
- file.delete(false, DEFAULT_MONITOR);
- file = project.getFile("add2a.txt");
- file.delete(false, DEFAULT_MONITOR);
- getProvider(project).update(new IResource[] {project.getFile("add1a.txt"), project.getFile("add2a.txt")},
- new Command.LocalOption[] {Command.DO_NOT_RECURSE},
- null, true /*createBackups*/, DEFAULT_MONITOR);
- tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testAdditionConflicts", tree,
- new String[] { "add1a.txt", "add2a.txt"},
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC });
- }
-
- /*
- * Test conflicts involving deletions
- */
- public void testDeletionConflicts() throws TeamException, CoreException {
-
- // CASE 1: The user deletes a remotely modified file
- // (a) catchup must do an update
- // (b) release must do a merge
- // CASE 2: The user deletes (and removes) a remotely modified file
- // (a) catchup must do an unmanage and update
- // (b) release must do a merge
- // CASE 3: The user modified a remotely deleted file
- // (a) catchup must do an unmanage and local delete
- // (b) release must do a merge
- // CASE 4: The user deletes a remotely deleted file
- // (a) catchup can update (or unmanage?)
- // (b) release must unmanage
- // CASE 5: The user deletes (and removes) a remotely deleted file
- // (a) catchup can update (or unmanage?)
- // (b) release must unmanage
-
- // Perform the test case for case A first
-
- // Create a test project (which commits it as well) and delete the resource without committing
- IProject project = createProject("testDeletionConflictsA", new String[] { "delete1.txt", "delete2.txt", "delete3.txt", "delete4.txt", "delete5.txt"});
- IFile file = project.getFile("delete1.txt"); // WARNING: This does a "cvs remove"!!!
- file.delete(false, DEFAULT_MONITOR);
- deleteResources(project, new String[] {"delete2.txt"}, false);
- file = project.getFile("delete3.txt");
- JUnitTestCase.waitMsec(1500); // Wait so that timestamp of modified file differs from original
- file.setContents(getRandomContents(), false, false, null);
- file = project.getFile("delete4.txt");
- file.delete(false, DEFAULT_MONITOR);
- deleteResources(project, new String[] {"delete5.txt"}, false);
-
- // Checkout a copy and commit the deletion
- IProject copy = checkoutCopy(project, "-copy");
- file = copy.getFile("delete1.txt");
- JUnitTestCase.waitMsec(1500); // Wait so that timestamp of modified file differs from original
- file.setContents(getRandomContents(), false, false, null);
- file = copy.getFile("delete2.txt");
- JUnitTestCase.waitMsec(1500); // Wait so that timestamp of modified file differs from original
- file.setContents(getRandomContents(), false, false, null);
- deleteResources(copy, new String[] {"delete3.txt", "delete4.txt", "delete5.txt"}, false);
- getProvider(copy).checkin(new IResource[] {copy}, IResource.DEPTH_INFINITE, DEFAULT_MONITOR);
-
-
- // Get the sync tree for the project
- IRemoteSyncElement tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testDeletionConflictsA", tree,
- new String[] { "delete1.txt", "delete2.txt", "delete3.txt", "delete4.txt", "delete5.txt"},
- new int[] {
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC });
-
- // Catch up to remote changes.
- // XXX SPECIAL CASE: delete1.txt must be unmanaged before the catch-up
- makeIncoming(tree, new String[] {"delete1.txt"});
- // XXX SPECIAL CASE: delete2.txt must be unmanaged before the catch-up
- makeIncoming(tree, new String[] {"delete2.txt"});
- // XXX SPECIAL CASE: delete3.txt must ignore local changes (and -C doesn't work so we'll unmanage and delete the local resource)
- makeIncoming(tree, new String[] {"delete3.txt"});
- project.getFile("delete3.txt").delete(false, DEFAULT_MONITOR);
- updateResources(project, new String[] {"delete1.txt", "delete2.txt", "delete3.txt", "delete4.txt", "delete5.txt"}, true);
- tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testDeletionConflictsA", tree,
- new String[] { "delete1.txt", "delete2.txt"},
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC });
- assertDeleted("testDeletionConflictsA", tree, new String[] {"delete3.txt", "delete4.txt", "delete5.txt"});
-
- // Now redo the test case for case B
-
- // Create a test project (which commits it as well) and delete the resource without committing
- project = createProject("testDeletionConflictsB", new String[] { "delete1.txt", "delete2.txt", "delete3.txt", "delete4.txt", "delete5.txt"});
- file = project.getFile("delete1.txt");
- file.delete(false, DEFAULT_MONITOR);
- deleteResources(project, new String[] {"delete2.txt"}, false);
- file = project.getFile("delete3.txt");
- JUnitTestCase.waitMsec(1500); // Wait so that timestamp of modified file differs from original
- file.setContents(getRandomContents(), false, false, null);
- file = project.getFile("delete4.txt");
- file.delete(false, DEFAULT_MONITOR);
- deleteResources(project, new String[] {"delete5.txt"}, false);
-
- // Checkout a copy and commit the deletion
- copy = checkoutCopy(project, "-copy");
- file = copy.getFile("delete1.txt");
- JUnitTestCase.waitMsec(1500); // Wait so that timestamp of modified file differs from original
- file.setContents(getRandomContents(), false, false, null);
- file = copy.getFile("delete2.txt");
- JUnitTestCase.waitMsec(1500); // Wait so that timestamp of modified file differs from original
- file.setContents(getRandomContents(), false, false, null);
- deleteResources(copy, new String[] {"delete3.txt", "delete4.txt", "delete5.txt"}, false);
- getProvider(copy).checkin(new IResource[] {copy}, IResource.DEPTH_INFINITE, DEFAULT_MONITOR);
-
-
- // Get the sync tree for the project
- tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testDeletionConflictsB", tree,
- new String[] { "delete1.txt", "delete2.txt", "delete3.txt", "delete4.txt", "delete5.txt"},
- new int[] {
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC });
-
- // Release the resources
- // XXX SPECIAL CASE: "delete1.txt", "delete2.txt" and "delete3.txt" must be merged
- makeOutgoing(tree, new String[]{"delete1.txt", "delete2.txt", "delete3.txt"});
- // XXX SPECIAL CASE: "delete4.txt" and "delete5.txt" must be unmanaged
- unmanageResources(project, new String[]{"delete4.txt", "delete5.txt"});
- commitResources(project, new String[] { "delete1.txt", "delete2.txt", "delete3.txt", "delete4.txt", "delete5.txt"});
- tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testDeletionConflictsB", tree,
- new String[] { "delete3.txt"},
- new int[] {
- IRemoteSyncElement.IN_SYNC });
- assertDeleted("testDeletionConflictsB", tree, new String[] {"delete1.txt", "delete2.txt", "delete4.txt", "delete5.txt"});
- }
-
- /*
- * Test the creation and sync of an empty local project that has remote contents
- */
- public void testSyncOnEmptyProject() throws TeamException {
- }
-
- /*
- * Test syncing on a folder that has been deleted from the server
- */
- public void testSyncOnDeletedFolder() throws TeamException {
- }
-
- /*
- * Test syncing on a folder that is empty on the server and has been pruned, then added locally
- */
- public void testSyncOnPrunedFolder() throws TeamException {
- }
-
- /*
- * Test sync involving pruned directories
- */
- public void testSyncWithPruning() throws TeamException {
- }
-
- /*
- * Test a conflict with an incomming foler addition and an unmanaqged lcoal folder
- */
- public void testFolderConflict() throws TeamException, CoreException {
-
- // Create a test project (which commits it as well) and delete the resource without committing
- IProject project = createProject("testFolderConflict", new String[] { "file.txt"});
-
- // Checkout a copy and add some folders
- IProject copy = checkoutCopy(project, "-copy");
- addResources(copy, new String[] {"folder1/file.txt", "folder2/file.txt"}, true);
-
- // Add a folder to the original project (but not using cvs)
- IResource[] resources = buildResources(project, new String[] {"folder1/"});
- ((IFolder)resources[0]).create(false, true, DEFAULT_MONITOR);
-
- IRemoteSyncElement tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testFolderConflict", tree,
- new String[] { "file.txt", "folder1/", "folder1/file.txt", "folder2/", "folder2/file.txt"},
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.ADDITION,
- IRemoteSyncElement.INCOMING | IRemoteSyncElement.ADDITION,
- IRemoteSyncElement.INCOMING | IRemoteSyncElement.ADDITION,
- IRemoteSyncElement.INCOMING | IRemoteSyncElement.ADDITION});
-
- makeInSync(tree, new String[] {"folder1/"});
- tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testFolderConflict", tree,
- new String[] { "file.txt", "folder1/", "folder1/file.txt", "folder2/", "folder2/file.txt"},
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.INCOMING | IRemoteSyncElement.ADDITION,
- IRemoteSyncElement.INCOMING | IRemoteSyncElement.ADDITION,
- IRemoteSyncElement.INCOMING | IRemoteSyncElement.ADDITION});
- }
-
- /*
- * Test that a deleted file can still be deleted through the team provider
- */
- public void testOutgoingDeletion() throws TeamException, CoreException {
-
- // Create a test project (which commits it as well)
- IProject project = createProject("testOutgoingDeletion", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
-
- // Delete a file
- IFile file = project.getFile("folder1/b.txt");
- file.delete(true, DEFAULT_MONITOR); // WARNING: As of 2002/03/05, this is equivalent to a cvs remove
-
- // Get the sync tree for the project
- IRemoteSyncElement tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testOutgoingDeletion", tree,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"},
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.DELETION});
-
- // Commit the deletion
- getProvider(file).checkin(new IResource[] {file}, IResource.DEPTH_ZERO, DEFAULT_MONITOR);
-
- // Get the sync tree again for the project and ensure others aren't effected
- tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testOutgoingDeletion", tree,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt"},
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC});
-
- // Assert that deletion no longer appears in remote tree
- assertDeleted("testOutgoingDeletion", tree, new String[] {"folder1/b.txt"});
- }
-
- /*
- * Test catching up to an incoming addition
- */
- public void testIncomingAddition() throws TeamException, CoreException {
- // Create a test project
- IProject project = createProject("testIncomingAddition", new String[] { "file1.txt", "folder1/", "folder1/a.txt"});
-
- // Checkout and modify a copy
- IProject copy = checkoutCopy(project, "-copy");
- addResources(copy, new String[] { "folder1/add.txt" }, true);
-
- // Get the sync tree for the project
- IRemoteSyncElement tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testIncomingAddition", tree,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/add.txt"},
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.INCOMING | IRemoteSyncElement.ADDITION});
-
- // Get the resource from the tree
- ILocalSyncElement element = getChild(tree, new Path("folder1/add.txt"));
-
- // Catch up to the addition by updating
- getProvider(project).update(new IResource[] {element.getLocal()}, new Command.LocalOption[] {Command.DO_NOT_RECURSE},
- null, true /*createBackups*/, DEFAULT_MONITOR);
-
- // Get the sync tree again for the project and ensure the added resource is in sync
- tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testIncomingAddition", tree,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/add.txt"},
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC});
- }
-
- /*
- * Test changes using a granularity of contents
- */
- public void testGranularityContents() throws TeamException, CoreException, IOException {
- // Create a test project (which commits it as well)
- IProject project = createProject("testGranularityContents", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
-
- // Checkout a copy and make some modifications
- IProject copy = checkoutCopy(project, "-copy");
- IFile file = copy.getFile("file1.txt");
- appendText(file, "", true);
- file = copy.getFile("folder1/a.txt");
- JUnitTestCase.waitMsec(1500); // Wait so that timestamp of modified file differs from original
- file.setContents(getRandomContents(), false, false, null);
- getProvider(copy).checkin(new IResource[] {copy}, IResource.DEPTH_INFINITE, DEFAULT_MONITOR);
-
- // Make the same modifications to the original
- file = project.getFile("file1.txt");
- appendText(file, "", false);
- file = project.getFile("folder1/a.txt");
- JUnitTestCase.waitMsec(1500); // Wait so that timestamp of modified file differs from original
- file.setContents(new ByteArrayInputStream("unique text".getBytes()), false, false, null);
-
- // Get the sync tree for the project
- IRemoteSyncElement tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testGranularityContents", tree,
- new String[] { "file1.txt", "folder1/", "folder1/a.txt"},
- new int[] {
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.IN_SYNC,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE },
- IRemoteSyncElement.GRANULARITY_CONTENTS);
- }
-
- public void testGetBase() throws TeamException, CoreException, IOException {
- // Create a test project (which commits it as well)
- IProject project = createProject("testIncomingChanges", new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
-
- // Checkout and modify a copy
- IProject copy = checkoutCopy(project, "-copy");
-
- // Make some modifications
- IFile file = project.getFile("folder1/a.txt");
- JUnitTestCase.waitMsec(1500); // Wait so that timestamp of modified file differs from original
- file.setContents(getRandomContents(), false, false, null);
- addResources(project, new String[] { "folder1/add.txt" }, false);
- deleteResources(project, new String[] {"folder1/b.txt"}, false);
-
- // Get the sync tree for the project
- IRemoteSyncElement tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertEquals(Path.EMPTY, (ICVSResource)tree.getBase(), CVSWorkspaceRoot.getCVSResourceFor(copy), false, false);
-
- }
-
- public void testSimpleMerge() throws TeamException, CoreException, IOException {
- // Create a test project (which commits it as well)
- IProject project = createProject("testSimpleMerge", new String[] { "file1.txt", "file2.txt", "file3.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
-
- // Checkout and modify a copy
- IProject copy = checkoutCopy(project, "-copy");
- copy.refreshLocal(IResource.DEPTH_INFINITE, DEFAULT_MONITOR);
-
- tagProject(project, new CVSTag("v1", CVSTag.VERSION));
- tagProject(project, new CVSTag("branch1", CVSTag.BRANCH));
-
- getProvider(copy).update(new IResource[] {copy}, Command.NO_LOCAL_OPTIONS,
- new CVSTag("branch1", CVSTag.BRANCH), true /*createBackups*/, DEFAULT_MONITOR);
-
- // make changes on the branch
- addResources(copy, new String[] {"addition.txt", "folderAddition/", "folderAddition/new.txt"}, true);
- deleteResources(copy, new String[] {"folder1/b.txt"}, true);
- JUnitTestCase.waitMsec(1500);
- changeResources(copy, new String[] {"file1.txt", "file2.txt"}, true);
-
- // make change to workspace working on HEAD
- changeResources(project, new String[] {"file2.txt"}, false);
- changeResources(project, new String[] {"file3.txt"}, true);
-
- IRemoteResource base = CVSWorkspaceRoot.getRemoteTree(project, new CVSTag("v1", CVSTag.VERSION), DEFAULT_MONITOR);
- IRemoteResource remote = CVSWorkspaceRoot.getRemoteTree(project, new CVSTag("branch1", CVSTag.BRANCH), DEFAULT_MONITOR);
- IRemoteSyncElement tree = new CVSRemoteSyncElement(true /*three way*/, project, base, remote);
-
- // watch for empty directories and the prune option!!!
- assertSyncEquals("testSimpleMerge sync check", tree,
- new String[] { "addition.txt", "folderAddition/", "folderAddition/new.txt",
- "folder1/b.txt", "file1.txt", "file2.txt", "file3.txt"},
- new int[] { IRemoteSyncElement.INCOMING | IRemoteSyncElement.ADDITION,
- IRemoteSyncElement.INCOMING | IRemoteSyncElement.ADDITION,
- IRemoteSyncElement.INCOMING | IRemoteSyncElement.ADDITION,
- IRemoteSyncElement.INCOMING | IRemoteSyncElement.DELETION,
- IRemoteSyncElement.INCOMING | IRemoteSyncElement.CHANGE,
- IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.CHANGE,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.CHANGE });
- }
-
- public void testSyncOnBranch() throws TeamException, CoreException, IOException {
-
- // Create a test project and a branch
- IProject project = createProject("testSyncOnBranch", new String[] { "file1.txt", "file2.txt", "file3.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
- CVSTag branch = new CVSTag("branch1", CVSTag.BRANCH);
- tagProject(project, branch);
- getProvider(project).update(new IResource[] {project}, Command.NO_LOCAL_OPTIONS, branch, true /*createBackups*/, DEFAULT_MONITOR);
-
- // Checkout and modify a copy
- IProject copy = checkoutCopy(project, branch);
- JUnitTestCase.waitMsec(1500);
- addResources(copy, new String[] {"addition.txt", "folderAddition/", "folderAddition/new.txt"}, true);
- deleteResources(copy, new String[] {"folder1/b.txt"}, true);
- changeResources(copy, new String[] {"file1.txt", "file2.txt"}, true);
-
- // Sync on the original and assert the result equals the copy
- IRemoteSyncElement tree = CVSWorkspaceRoot.getRemoteSyncTree(project, null, DEFAULT_MONITOR);
- assertEquals(Path.EMPTY, (ICVSResource)tree.getRemote(), CVSWorkspaceRoot.getCVSResourceFor(copy), false, false);
- }
-
- public void testRenameProject() throws TeamException, CoreException, IOException {
- String[] resourceNames = new String[] { "changed.txt", "folder1/", "folder1/a.txt" };
- int[] inSync = new int[] {IRemoteSyncElement.IN_SYNC, IRemoteSyncElement.IN_SYNC, IRemoteSyncElement.IN_SYNC};
- IProject project = createProject("testRenameProject", new String[] { "changed.txt", "folder1/", "folder1/a.txt" });
-
- IRemoteSyncElement tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("sync should be in sync", tree, resourceNames, inSync);
- IProjectDescription desc = project.getDescription();
- String newName = project.getName() + "_renamed";
- desc.setName(newName);
- project.move(desc, false, null);
- project = ResourcesPlugin.getWorkspace().getRoot().getProject(newName);
- assertTrue(project.exists());
- tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("sync should be in sync", tree, resourceNames, inSync);
- }
-
- public void testFolderDeletion() throws TeamException, CoreException {
-
- IProject project = createProject("testFolderDeletion", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt", "folder1/folder2/file.txt"});
-
- // Delete a folder and ensure that the file is managed but doesn't exist
- // (Special behavior is provider by the CVS move/delete hook but this is not part of CVS core)
- project.getFolder("folder1").delete(false, false, null);
- ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor(project.getFolder("folder1"));
- assertTrue("Deleted folder not in proper state", ! folder.exists() && folder.isManaged());
-
- // The folders and files should show up as outgoing deletions
- IRemoteSyncElement tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testFolderDeletion sync check", tree,
- new String[] { "folder1", "folder1/a.txt", "folder1/folder2", "folder1/folder2/file.txt"},
- new int[] { IRemoteSyncElement.OUTGOING | IRemoteSyncElement.DELETION,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.DELETION,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.DELETION,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.DELETION});
-
- // commit folder1/a.txt
- commitResources(project, new String[] { "folder1/a.txt" });
-
- // Resync and verify that above file is gone and others remain the same
- tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertSyncEquals("testFolderDeletion sync check", tree,
- new String[] { "folder1", "folder1/folder2", "folder1/folder2/file.txt"},
- new int[] { IRemoteSyncElement.OUTGOING | IRemoteSyncElement.DELETION,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.DELETION,
- IRemoteSyncElement.OUTGOING | IRemoteSyncElement.DELETION});
- assertDeleted("testFolderDeletion", tree, new String[] {"folder1/a.txt"});
-
- // Commit folder1/folder2/file.txt
- commitResources(project, new String[] { "folder1/folder2/file.txt" });
-
- // Resync and verify that all are deleted
- tree = CVSWorkspaceRoot.getRemoteSyncTree(project, CVSTag.DEFAULT, DEFAULT_MONITOR);
- assertDeleted("testFolderDeletion", tree, new String[] {"folder1", "folder1/folder2", "folder1/folder2/file.txt"});
- }
- /**
- * There is special handling required when building a sync tree for a tag when there are undiscovered folders
- * that only contain other folders.
- */
- public void testTagRetrievalForFolderWithNoFile() throws TeamException, CoreException {
- IProject project = createProject("testTagRetrievalForFolderWithNoFile", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt"});
- // Checkout, branch and modify a copy
- IProject copy = checkoutCopy(project, "-copy");
- CVSTag version = new CVSTag("v1", CVSTag.BRANCH);
- CVSTag branch = new CVSTag("branch1", CVSTag.BRANCH);
- getProvider(copy).makeBranch(new IResource[] {copy}, version, branch, true, true, DEFAULT_MONITOR);
- addResources(copy, new String[] {"folder2/folder3/a.txt"}, true);
-
- // Fetch the tree corresponding to the branch using the original as the base.
- // XXX This will fail for CVSNT with directory pruning on
- IRemoteSyncElement tree = CVSWorkspaceRoot.getRemoteSyncTree(project, branch, DEFAULT_MONITOR);
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CVSUITestCase.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CVSUITestCase.java
deleted file mode 100644
index 574ce6c7d..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CVSUITestCase.java
+++ /dev/null
@@ -1,452 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.io.File;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.compare.structuremergeviewer.DiffNode;
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceDescription;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
-import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
-import org.eclipse.team.internal.ccvs.ui.RepositoryManager;
-import org.eclipse.team.internal.ccvs.ui.actions.AddToWorkspaceAction;
-import org.eclipse.team.internal.ccvs.ui.actions.CommitAction;
-import org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithRemoteAction;
-import org.eclipse.team.internal.ccvs.ui.actions.TagAction;
-import org.eclipse.team.internal.ccvs.ui.actions.UpdateAction;
-import org.eclipse.team.internal.ccvs.ui.sync.CVSSyncCompareInput;
-import org.eclipse.team.internal.ccvs.ui.sync.CommitSyncAction;
-import org.eclipse.team.internal.ccvs.ui.sync.ForceCommitSyncAction;
-import org.eclipse.team.internal.ccvs.ui.sync.ForceUpdateSyncAction;
-import org.eclipse.team.internal.ccvs.ui.sync.UpdateSyncAction;
-import org.eclipse.team.internal.ccvs.ui.wizards.SharingWizard;
-import org.eclipse.team.internal.ui.IPromptCondition;
-import org.eclipse.team.internal.ui.sync.ITeamNode;
-import org.eclipse.team.internal.ui.sync.SyncSet;
-import org.eclipse.team.internal.ui.sync.SyncView;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-import org.eclipse.ui.IActionDelegate;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.WorkbenchException;
-
-public class CVSUITestCase extends LoggingTestCase {
- protected static Set installedTrap = new HashSet();
- private List testWindows;
- protected IWorkbenchWindow testWindow;
- protected CVSRepositoryLocation testRepository;
-
- public CVSUITestCase(String name) {
- super(name);
- testWindows = new ArrayList(3);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- testRepository = CVSTestSetup.repository;
- testWindow = openTestWindow();
-
- Display display = testWindow.getShell().getDisplay();
- if (! installedTrap.contains(display)) {
- installedTrap.add(display);
- Util.waitForErrorDialog(display, 10000 /*ms*/, new Waiter() {
- public boolean notify(Object object) {
- Dialog dialog = (Dialog) object;
- printWarning("Encountered error dialog with title: " + dialog.getShell().getText(), null, null);
- dialog.close();
- return true;
- }
- });
- }
-
- // disable auto-build
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IWorkspaceDescription description = workspace.getDescription();
- description.setAutoBuilding(false);
- workspace.setDescription(description);
-
- // disable CVS console
- CVSProviderPlugin.getPlugin().setConsoleListener(null);
-
- // disable CVS markers and prompts
- IPreferenceStore store = CVSUIPlugin.getPlugin().getPreferenceStore();
- store.setValue(ICVSUIConstants.PREF_SHOW_MARKERS, false);
- CVSProviderPlugin.getPlugin().setShowTasksOnAddAndDelete(false);
-
- // disable CVS GZIP compression
- store.setValue(ICVSUIConstants.PREF_COMPRESSION_LEVEL, 0);
- CVSProviderPlugin.getPlugin().setCompressionLevel(0);
-
- // wait for UI to settle
- Util.processEventsUntil(100);
- }
-
- protected void tearDown() throws Exception {
- // wait for UI to settle
- Util.processEventsUntil(100);
- closeAllTestWindows();
- super.tearDown();
- }
-
- /**
- * Open a test window with the empty perspective.
- */
- protected IWorkbenchWindow openTestWindow() {
- try {
- IWorkbenchWindow win = PlatformUI.getWorkbench().openWorkbenchWindow(
- EmptyPerspective.PERSP_ID, ResourcesPlugin.getWorkspace());
- testWindows.add(win);
- return win;
- } catch (WorkbenchException e) {
- fail();
- return null;
- }
- }
-
- /**
- * Close all test windows.
- */
- protected void closeAllTestWindows() {
- Iterator iter = testWindows.iterator();
- IWorkbenchWindow win;
- while (iter.hasNext()) {
- win = (IWorkbenchWindow) iter.next();
- win.close();
- }
- testWindows.clear();
- }
-
- /**
- * Checks out the projects with the specified tags from the test repository.
- */
- protected void actionCheckoutProjects(String[] projectNames, CVSTag[] tags) throws Exception {
- ICVSRemoteFolder[] projects = lookupRemoteProjects(projectNames, tags);
- AddToWorkspaceAction action = new AddToWorkspaceAction() {
- protected IPromptCondition getOverwriteLocalAndFileSystemPrompt() {
- return new DummyPromptCondition();
- }
- };
- runActionDelegate(action, projects, "Repository View Checkout action");
- timestampGranularityHiatus();
- }
-
- /**
- * Replaces the specified resources with the remote contents using the action contribution.
- */
- protected void actionReplaceWithRemote(IResource[] resources) {
- ReplaceWithRemoteAction action = new ReplaceWithRemoteAction() {
- protected IPromptCondition getPromptCondition() {
- return new DummyPromptCondition();
- }
- };
- runActionDelegate(action, resources, "Replace with Remote action");
- timestampGranularityHiatus();
- }
-
- /**
- * Shares the specified project with the test repository.
- * @param project the project to share
- */
- protected void actionShareProject(IProject project) {
- final SharingWizard wizard = new SharingWizard();
- wizard.init(PlatformUI.getWorkbench(), project);
- Util.waitForWizardToOpen(testWindow.getShell(), wizard, new Waiter() {
- public boolean notify(Object object) {
- WizardDialog dialog = (WizardDialog) object;
- startTask("set sharing, pop up sync viewer");
- wizard.performFinish();
- endTask();
- dialog.close();
- return false;
- }
- });
- timestampGranularityHiatus();
- }
-
- /**
- * Updates the specified resources using the action contribution.
- */
- protected void actionCVSCommit(IResource[] resources, final String comment) {
- assertNotNull(comment);
- CommitAction action = new CommitAction() {
- protected String promptForComment() {
- return comment;
- }
- };
- runActionDelegate(action, resources, "CVS Commit action");
- timestampGranularityHiatus();
- }
-
- /**
- * Tags the specified resources using the action contribution.
- */
- protected void actionCVSTag(IResource[] resources, final String name) {
- assertNotNull(name);
- TagAction action = new TagAction() {
- protected String promptForTag() {
- return name;
- }
- protected IPromptCondition getPromptCondition() {
- return new DummyPromptCondition();
- }
- };
- runActionDelegate(action, resources, "CVS Tag action");
- }
-
- /**
- * Updates the specified resources using the action contribution.
- */
- protected void actionCVSUpdate(IResource[] resources) {
- runActionDelegate(new UpdateAction(), resources, "CVS Update action");
- timestampGranularityHiatus();
- }
-
- /**
- * Pops up the synchronizer view for the specified resources.
- * @param resources the resources to sync
- * @return the compare input used
- */
- protected CVSSyncCompareInput syncResources(IResource[] resources) {
- startTask("Synchronize with Repository action");
- SyncView syncView = getSyncView();
- CVSSyncCompareInput input = new CVSSyncCompareInput(resources) {
- // overridden to prevent "nothing to synchronize" dialog from popping up
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- super.run(monitor);
- DiffNode result = getDiffRoot(); // (DiffNode) getCompareResult()
- if (result == null || Util.isEmpty(result)) throw new InterruptedException();
- }
- };
- syncView.showSync(input);
- endTask();
- return input;
- }
-
- /**
- * Commits the specified resources using the synchronizer view.
- * @param resources the resources to commit
- * @param input the compare input for the sync view, or null to create a new one
- * @param comment the comment string, or ""
- */
- protected void syncCommitResources(IResource[] resources, CVSSyncCompareInput input, String comment) {
- if (input == null) input = syncResources(resources);
- IDiffContainer diffRoot = input.getDiffRoot();
- if (Util.isEmpty(diffRoot)) {
- startTask("Nothing to Commit");
- } else {
- ITeamNode[] nodes = getTeamNodesForResources(diffRoot, resources);
- startTask("Sync View Commit action");
- syncCommitInternal(input, nodes, comment);
- }
- endTask();
- timestampGranularityHiatus();
- }
-
- /**
- * Updates the specified resources using the synchronizer view.
- * @param resources the resources to update
- * @param input the compare input for the sync view, or null to create a new one
- * @param comment the comment string, or ""
- */
- protected void syncUpdateResources(IResource[] resources, CVSSyncCompareInput input) {
- if (input == null) input = syncResources(resources);
- IDiffContainer diffRoot = input.getDiffRoot();
- if (Util.isEmpty(diffRoot)) {
- startTask("Nothing to Update");
- } else {
- ITeamNode[] nodes = getTeamNodesForResources(diffRoot, resources);
- startTask("Sync View Update action");
- syncGetInternal(input, nodes);
- }
- endTask();
- timestampGranularityHiatus();
- }
-
- /**
- * Creates and imports project contents from a zip file.
- */
- protected IProject createAndImportProject(String prefix, File zipFile) throws Exception {
- IProject project = Util.createUniqueProject(prefix);
- Util.importZip(project, zipFile);
- return project;
- }
-
- /**
- * Looks up handles for remote projects by name.
- */
- protected ICVSRemoteFolder[] lookupRemoteProjects(String[] projectNames, CVSTag[] tags) throws Exception {
- ICVSRemoteFolder[] folders = new ICVSRemoteFolder[projectNames.length];
- for (int i = 0; i < projectNames.length; ++i) {
- folders[i] = testRepository.getRemoteFolder(projectNames[i], tags[i]);
- }
- return folders;
- }
-
- /**
- * Gets an instance of the Synchronize view
- */
- protected SyncView getSyncView() {
- SyncView view = (SyncView)CVSUIPlugin.getActivePage().findView(SyncView.VIEW_ID);
- if (view == null) {
- view = SyncView.findInActivePerspective();
- }
- if (view != null) {
- try {
- CVSUIPlugin.getActivePage().showView(SyncView.VIEW_ID);
- } catch (PartInitException e) {
- CVSUIPlugin.log(e.getStatus());
- }
- }
- assertNotNull("Could not obtain a Sync View.", view);
- return view;
- }
-
- /**
- * Runs an IActionDelegate prototype instance on a given selection.
- */
- protected void runActionDelegate(IActionDelegate delegate, Object[] selection, String taskName) {
- Action action = new Action() { };
- if (delegate instanceof IObjectActionDelegate) {
- ((IObjectActionDelegate) delegate).setActivePart(action,
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getPartService().getActivePart());
- }
- delegate.selectionChanged(action, new StructuredSelection(selection));
- startTask(taskName);
- delegate.run(action);
- endTask();
- }
-
- /**
- * Commits NON-CONFLICTING and CONFLICTING resources represented by an array of synchronizer nodes.
- */
- private void syncCommitInternal(CVSSyncCompareInput input, ITeamNode[] nodes, final String comment) {
- FakeSelectionProvider selectionProvider = new FakeSelectionProvider(nodes);
- // Commit ONLY NON-CONFLICTING changes
- CommitSyncAction commitAction = new CommitSyncAction(input, selectionProvider, "Commit",
- testWindow.getShell()) {
- protected int promptForConflicts(SyncSet syncSet) {
- return 0; // yes! sync conflicting changes
- }
- protected String promptForComment(RepositoryManager manager) {
- return comment; // use our comment
- }
- };
- commitAction.run();
- // Commit ONLY CONFLICTING changes
- ForceCommitSyncAction forceCommitAction = new ForceCommitSyncAction(input, selectionProvider, "Force Commit",
- testWindow.getShell()) {
- protected int promptForConflicts(SyncSet syncSet) {
- return 0; // yes! sync conflicting changes
- }
- protected String promptForComment(RepositoryManager manager) {
- return comment; // use our comment
- }
- };
- forceCommitAction.run();
- }
-
- /**
- * Updates NON-CONFLICTING and CONFLICTING resources represented by an array of synchronizer nodes.
- */
- private void syncGetInternal(CVSSyncCompareInput input, ITeamNode[] nodes) {
- FakeSelectionProvider selectionProvider = new FakeSelectionProvider(nodes);
- // Update ONLY NON-CONFLICTING changes
- UpdateSyncAction updateAction = new UpdateSyncAction(input, selectionProvider, "Update",
- testWindow.getShell()) {
- protected boolean promptForConflicts() {
- return true;
- }
- protected int promptForMergeableConflicts() {
- return 2;
- }
- };
- updateAction.run();
- // Update ONLY CONFLICTING changes
- ForceUpdateSyncAction forceUpdateAction = new ForceUpdateSyncAction(input, selectionProvider, "Force Update",
- testWindow.getShell()) {
- protected boolean promptForConflicts() {
- return true;
- }
- protected int promptForMergeableConflicts() {
- return 2;
- }
- };
- forceUpdateAction.run();
- }
-
- /**
- * Gets an array of synchronizer nodes corresponding to an array of resouces.
- */
- protected static ITeamNode[] getTeamNodesForResources(IDiffContainer root, IResource[] resources) {
- ITeamNode[] nodes = new ITeamNode[resources.length];
- for (int i = 0; i < resources.length; ++i) {
- nodes[i] = findTeamNodeForResource(root, resources[i]);
- assertNotNull(nodes[i]);
- }
- return nodes;
- }
-
- private static ITeamNode findTeamNodeForResource(IDiffElement root, IResource resource) {
- RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId());
- assertNotNull("Resource " + resource.getFullPath() + " must have an associated CVSProvider", provider);
-
- if (root instanceof ITeamNode) {
- ITeamNode node = (ITeamNode) root;
- if (resource.equals(node.getResource())) return node;
- // prune the backtracking tree
- IResource parent = resource.getParent();
- do {
- if (parent == null) return null; // can't possibly be child of this node
- } while (! resource.equals(parent));
- }
- if (root instanceof IDiffContainer) {
- IDiffContainer container = (IDiffContainer) root;
- if (container.hasChildren()) {
- IDiffElement[] children = container.getChildren();
- for (int i = 0; i < children.length; ++i) {
- ITeamNode node = findTeamNodeForResource(children[i], resource);
- if (node != null) return node;
- }
- }
- }
- return null;
- }
-
- /**
- * Waits for a small amount of time to compensate for file system time stamp granularity.
- */
- private void timestampGranularityHiatus() {
- //JUnitTestCase.waitMsec(1500);
- Util.processEventsUntil(1500);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/DummyPromptCondition.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/DummyPromptCondition.java
deleted file mode 100644
index aa23a7fdd..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/DummyPromptCondition.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v0.5
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v05.html
- *
- * Contributors:
- * IBM - Initial implementation
- ******************************************************************************/
-package org.eclipse.team.tests.ccvs.ui;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.internal.ui.IPromptCondition;
-
-public class DummyPromptCondition implements IPromptCondition {
- public boolean needsPrompt(IResource resource) {
- return false;
- }
- public String promptMessage(IResource resource) {
- // this method should never be called
- return resource.getName();
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/EclipseUITestHarnessApplication.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/EclipseUITestHarnessApplication.java
deleted file mode 100644
index 0ab80b5a1..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/EclipseUITestHarnessApplication.java
+++ /dev/null
@@ -1,183 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.InputStream;
-import java.io.PrintStream;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-
-import junit.framework.Test;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.tests.harness.EclipseTestHarnessApplication;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.internal.Workbench;
-
-/**
- * A test harness with UI and logging support.
- * <pre>
- * Supported arguments:
- * -test <suite> : id of suite to run (must be plugged into extension point)
- * -log <file> : specify a file for logging
- * -nolog : do not write a log file
- * -repeat <n> : number of iterations to run
- * -ignorefirst : ignore (do not record) results from first iteration
- * -purge : purge all projects from the workspace before each iteration
- * <anything else> : passed verbatim to the org.eclipse.ui.workbench application
- * </pre>
- */
-public class EclipseUITestHarnessApplication extends EclipseTestHarnessApplication {
- protected boolean purgeWorkspace;
- protected boolean ignoreFirst;
- protected int repeatCount;
- protected LoggingTestResult logResult;
-
- /**
- * Application entry point.
- */
- public Object run(Object userArgs) throws Exception {
- PrintStream logStream = System.err;
- String logFilename = null;
- purgeWorkspace = false;
- ignoreFirst = false;
- repeatCount = 1;
- if (userArgs instanceof String[]) {
- // parse args, no error handling
- String[] args = (String[]) userArgs;
- List argsList = new ArrayList(args.length);
- for (int i = 0; i < args.length; ++i) {
- if ("-repeat".equals(args[i])) {
- repeatCount = Integer.parseInt(args[++i]);
- } else if ("-ignorefirst".equals(args[i])) {
- ignoreFirst = true;
- } else if ("-nolog".equals(args[i])) {
- logStream = null;
- } else if ("-log".equals(args[i])) {
- logFilename = args[++i];
- } else if ("-purge".equals(args[i])) {
- purgeWorkspace = true;
- } else {
- argsList.add(args[i]);
- }
- }
- userArgs = argsList.toArray(new String[argsList.size()]);
- }
- // setup logging
- if (logFilename != null) {
- File file = new File(logFilename);
- logStream = new PrintStream(new BufferedOutputStream(new FileOutputStream(logFilename)));
- }
- logResult = new LoggingTestResult(logStream);
- try {
- logResult.startLog(System.currentTimeMillis(), getSDKBuildId());
- return launchWorkbench(userArgs);
- } finally {
- logResult.endLog();
- if (logFilename != null) logStream.close();
- }
- }
-
- /**
- * Launches the Workbench UI.
- */
- protected Object launchWorkbench(final Object userArgs) throws Exception {
- final Exception[] exception = new Exception[1];
- Workbench workbench = new Workbench() {
- /*** this code should be kept in sync with Workbench.runEventLoop() ***/
- protected void runEventLoop() {
- // Dispatch all events.
- Display display = Display.getCurrent();
- while (true) {
- try {
- if (!display.readAndDispatch())
- break;
- } catch (Throwable e) {
- break;
- }
- }
-
- // Run our hook.
- try {
- workbenchHook(this);
- } catch (Exception e) {
- exception[0] = e;
- }
-
- // Close the workbench.
- close();
- }
- };
- Object result = workbench.run(userArgs);
- if (exception[0] != null) throw exception[0];
- return result;
- }
-
- /**
- * Callback from Workbench if it launched successfully.
- */
- protected Object workbenchHook(Workbench workbench) throws Exception {
- // run the underlying non-ui test launcher to locate and start the test cases
- return super.run(workbench.getCommandLineArgs());
- }
-
- /**
- * Runs the specified test. Called from the non-ui test launcher.
- */
- protected void run(Test test) {
- for (int i = 0; i < repeatCount; ++i) {
- if (purgeWorkspace) purgeWorkspaceProjects();
- LoggingTestRunner runner = new LoggingTestRunner();
- runner.doRun(test, (i == 0 && ignoreFirst) ? null : logResult, false);
- }
- }
-
- /**
- * Purges the projects in the workspace.
- */
- public static void purgeWorkspaceProjects() {
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- // purge all known projects from the workspace
- IProject[] projects = workspace.getRoot().getProjects();
- for (int i = 0; i < projects.length; ++i) {
- IProject project = projects[i];
- try {
- project.delete(true, true, null);
- } catch (CoreException e) {
- System.err.println("Could not purge project: " + project.getName());
- }
- }
- }
-
- /**
- * Gets the SDK build id.
- */
- public static String getSDKBuildId() {
- try {
- URL url = Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.sdk").getInstallURL();
- url = new URL(url, "platform.ini");
- InputStream is = url.openStream();
- try {
- Properties sdkProperties = new Properties();
- sdkProperties.load(is);
- String buildId = sdkProperties.getProperty("buildID");
- if (buildId != null) return buildId;
- } finally {
- is.close();
- }
- } catch (Exception e) {
- }
- return "unknown";
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/EmptyPerspective.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/EmptyPerspective.java
deleted file mode 100644
index 3fd4f6f57..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/EmptyPerspective.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.ui.*;
-import org.eclipse.ui.part.*;
-import org.eclipse.ui.part.*;
-import org.eclipse.swt.SWT;
-
-/**
- * This perspective is used for testing api. It defines an initial
- * layout with no parts, just an editor area.
- *
- * Note: originally borrowed from org.eclipse.jdt.junit.eclipse.util
- */
-public class EmptyPerspective implements IPerspectiveFactory {
-
- /**
- * The perspective id.
- */
- public static final String PERSP_ID = "org.eclipse.team.tests.ccvs.ui.EmptyPerspective";
-
- /**
- * Constructs a new Default layout engine.
- */
- public EmptyPerspective() {
- super();
- }
-
- /**
- * Defines the initial layout for a perspective.
- *
- * Implementors of this method may add additional views to a
- * perspective. The perspective already contains an editor folder
- * with <code>ID = ILayoutFactory.ID_EDITORS</code>. Add additional views
- * to the perspective in reference to the editor folder.
- *
- * This method is only called when a new perspective is created. If
- * an old perspective is restored from a persistence file then
- * this method is not called.
- *
- * @param factory the factory used to add views to the perspective
- */
- public void createInitialLayout(IPageLayout layout) {
- //layout.addView( MockViewPart.ID, IPageLayout.BOTTOM, 0.5f, layout.getEditorArea() );
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/FakeSelectionProvider.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/FakeSelectionProvider.java
deleted file mode 100644
index ca90addca..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/FakeSelectionProvider.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-
-/**
- * Serves up fake selections.
- *
- * Note: originally borrowed from org.eclipse.jdt.ui.tests.actions
- */
-public class FakeSelectionProvider implements ISelectionProvider {
- private Object[] fElems;
- public FakeSelectionProvider(Object[] elements){
- fElems = elements;
- }
-
- public void addSelectionChangedListener(ISelectionChangedListener listener) {
- }
-
- public ISelection getSelection() {
- return new StructuredSelection(fElems);
- }
-
- public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- }
-
- public void setSelection(ISelection selection) {
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/ICriteria.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/ICriteria.java
deleted file mode 100644
index bacd0aff1..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/ICriteria.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-/**
- * Generic object filter mechanism.
- */
-public interface ICriteria {
- /**
- * Returns true if the candidate object satisfies the specified
- * criteria value according to a particular algorithm.
- */
- public boolean test(Object candidate, Object value);
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/LoggingTestCase.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/LoggingTestCase.java
deleted file mode 100644
index 70effb4b9..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/LoggingTestCase.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-import junit.framework.TestResult;
-import org.eclipse.core.runtime.IStatus;
-
-public class LoggingTestCase extends TestCase {
- private LoggingTestResult logResult;
- private int disableLogStack;
-
- /**
- * Creates a new logging test case.
- */
- public LoggingTestCase(String name) {
- super(name);
- }
-
- /**
- * Runs a test.
- * @param result the result object
- */
- public void run(TestResult result) {
- // run the garbage collector now to improve benchmark precision
- for (int i = 0; i < 4; ++i) {
- System.runFinalization();
- System.gc();
- }
- if (result instanceof LoggingTestResult) {
- logResult = (LoggingTestResult) result;
- disableLogStack = 0;
- } else {
- logResult = null;
- disableLogStack = 1;
- }
- super.run(result);
- }
-
- /**
- * Marks the beginning of a new task group.
- * @param groupName the name for the group
- */
- protected void startGroup(String groupName) {
- if (disableLogStack == 0) logResult.startGroup(groupName);
- }
-
- /**
- * Marks the ends of the active task group.
- */
- protected void endGroup() {
- if (disableLogStack == 0) logResult.endGroup();
- }
-
- /**
- * Marks the beginning of a new task.
- * @param taskName the name for the task
- */
- protected void startTask(String taskName) {
- if (disableLogStack == 0) logResult.startTask(taskName);
- }
-
- /**
- * Marks the ends of the active task.
- */
- protected void endTask() {
- if (disableLogStack == 0) logResult.endTask();
- }
-
- /**
- * Disables logging until re-enabled. (this call nests)
- */
- protected void disableLog() {
- disableLogStack += 1;
- }
-
- /**
- * Enables logging when all previous calls to disableLog are matched.
- */
- protected void enableLog() {
- Assert.assertTrue(disableLogStack > 0);
- disableLogStack -= 1;
- Assert.assertTrue(disableLogStack != 0 || logResult != null);
- }
-
- /**
- * Prints a warning message to the log.
- * @param message the message, or null
- * @param error an exception with a stack trace, or null
- * @param status a status code, or null
- */
- protected void printWarning(String message, Throwable error, IStatus status) {
- if (disableLogStack == 0) logResult.printWarning(message, error, status);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/LoggingTestResult.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/LoggingTestResult.java
deleted file mode 100644
index ee4b28cb1..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/LoggingTestResult.java
+++ /dev/null
@@ -1,258 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.io.PrintStream;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Stack;
-import java.util.StringTokenizer;
-
-import junit.framework.Assert;
-import junit.framework.AssertionFailedError;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestResult;
-import junit.runner.BaseTestRunner;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.core.TeamException;
-
-public class LoggingTestResult extends TestResult {
- protected Stack groupStack;
- protected PerformanceTimer currentTask;
- protected PrintStream logStream;
- protected Stack /* of String */ elements;
- protected String indent;
-
- /**
- * Creates a logging test result.
- * @param logStream the output stream, or null to disable logging
- */
- public LoggingTestResult(PrintStream logStream) {
- this.logStream = logStream;
- this.elements = new Stack();
- this.indent = "";
- groupStack = new Stack();
- currentTask = null;
- }
-
- /**
- * Marks the beginning of a series of log entries.
- */
- public void startLog(long timestamp, String sdkBuild) {
- println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
- startXMLElement("log", new String[] { "timestamp", "sdkbuild" }, new String[] {
- new SimpleDateFormat("dd/MMM/yyyy HH:mm:ss").format(new Date(timestamp)),
- sdkBuild });
- }
-
- /**
- * Marks the end of a series of log entries.
- */
- public void endLog() {
- endXMLElement();
- }
-
- /**
- * Prints a warning message to the log file.
- * @param message the message, or null
- * @param error an exception with a stack trace, or null
- * @param status a status code, or null
- */
- public void printWarning(String message, Throwable error, IStatus status) {
- printAbort("warning", message, error, status);
- }
-
- /**
- * Called by the JUnit framework when an error occurs.
- * @param test the test
- * @param error the exception that occurred
- */
- public void addError(Test test, Throwable error) {
- printAbort("error", null, error, null);
- super.addError(test, error);
- }
-
- /**
- * Called by the JUnit framework when an assertion failure occurs.
- * @param test the test
- * @param error the exception that occurred
- */
- public void addFailure(Test test, AssertionFailedError error) {
- printAbort("failure", null, error, null);
- super.addFailure(test, error);
- }
-
- /**
- * Called by the JUnit framework to mark the beginning of a test case.
- * @param test the test
- */
- public void startTest(Test test) {
- if (test instanceof TestCase) {
- TestCase testCase = (TestCase) test;
- startXMLElement("case", new String[] { "class", "name" },
- new String[] { testCase.getClass().getName(), testCase.getName() });
- groupStack.clear();
- currentTask = null;
- }
- super.startTest(test);
- }
-
- /**
- * Called by the JUnit framework to mark the end of a test case.
- * @param test the test
- */
- public void endTest(Test test) {
- if (test instanceof TestCase) {
- TestCase testCase = (TestCase) test;
- if (currentTask != null) endTask();
- while (! groupStack.isEmpty()) endGroup();
- endXMLElement();
- }
- super.endTest(test);
- }
-
- /**
- * Marks the beginning of a new task group.
- * @param groupName the name for the group
- */
- public void startGroup(String groupName) {
- Assert.assertNull(currentTask);
- startXMLElement("group", new String[] { "name" }, new String[] { groupName });
- groupStack.push(groupName);
- }
-
- /**
- * Marks the end of the active task group.
- */
- public void endGroup() {
- Assert.assertNull(currentTask);
- Assert.assertTrue(! groupStack.empty());
- endXMLElement();
- groupStack.pop();
- }
-
- /**
- * Marks the beginning of a new task.
- * @param taskName the name for the task
- */
- public void startTask(String taskName) {
- Assert.assertNull(currentTask);
- startXMLElement("task", new String[] { "name" }, new String[] { taskName });
- currentTask = new PerformanceTimer(taskName);
- currentTask.start();
- }
-
- /**
- * Marks the end of the active task.
- */
- public void endTask() {
- Assert.assertNotNull(currentTask);
- currentTask.stop();
- printXMLElement("result", new String[] { "elapsed" },
- new String[] { Integer.toString(currentTask.getTotalMillis()) });
- endXMLElement();
- currentTask = null;
- }
-
- protected void startXMLElement(String name, String[] attributes, String[] values) {
- println(formatXMLElement(name, attributes, values, false));
- elements.push(name);
- indent += " ";
- }
-
- protected void printXMLElement(String name, String[] attributes, String[] values) {
- println(formatXMLElement(name, attributes, values, true));
- }
-
- protected String formatXMLElement(String name, String[] attributes, String[] values, boolean quickEnd) {
- // XXX need to escape certain characters in attribute values
- StringBuffer buffer = new StringBuffer("<");
- buffer.append(name);
- if (attributes != null && values != null) {
- for (int i = 0; i < attributes.length; ++i) {
- buffer.append(' ');
- buffer.append(attributes[i]);
- buffer.append("=\"");
- buffer.append(values[i]);
- buffer.append('"');
- }
- }
- if (quickEnd) buffer.append('/');
- buffer.append('>');
- return buffer.toString();
- }
-
- protected void endXMLElement() {
- indent = indent.substring(2);
- String name = (String) elements.pop();
- println("</" + name + ">");
- }
-
- protected void printXMLElementData(String line) {
- // XXX need to escape certain characters in element data
- println(line);
- }
-
- protected void printAbort(String type, String message, Throwable error, IStatus status) {
- if (status == null && error != null) {
- if (error instanceof CoreException) {
- status = ((CoreException) error).getStatus();
- } else if (error instanceof TeamException) {
- status = ((TeamException) error).getStatus();
- }
- }
- if (message == null && error != null) {
- message = error.getMessage();
- if (message == null) {
- message = error.getClass().getName();
- }
- }
- if (message == null && status != null) {
- message = status.getMessage();
- }
- if (message == null) message = "";
- startXMLElement("abort", new String[] { "type", "message" },
- new String[] { type, message });
- if (status != null) printStatus(status);
- if (error != null) printStackTrace(error);
- endXMLElement();
- }
-
- protected void printStatus(IStatus status) {
- startXMLElement("status", new String[] { "severity", "code", "plugin", "message" },
- new String[] {
- Integer.toString(status.getSeverity()),
- Integer.toString(status.getCode()),
- status.getPlugin(), status.getMessage() });
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; ++i) {
- printStatus(children[i]);
- }
- }
- endXMLElement();
- }
-
- protected void printStackTrace(Throwable error) {
- // XXX need a better way to serialize the stack trace
- String trace = BaseTestRunner.getFilteredTrace(error);
- StringTokenizer tok = new StringTokenizer(trace, "\r\n");
- if (! tok.hasMoreTokens()) return; // empty trace?
- tok.nextToken(); // skip message line
- startXMLElement("trace", null, null);
- while (tok.hasMoreTokens()) {
- String frame = tok.nextToken();
- printXMLElementData(frame);
- }
- endXMLElement();
- }
-
- protected void println(String line) {
- if (logStream != null) logStream.println(indent + line);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/LoggingTestRunner.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/LoggingTestRunner.java
deleted file mode 100644
index 2148316f8..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/LoggingTestRunner.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import junit.framework.Test;
-import junit.framework.TestResult;
-import junit.textui.TestRunner;
-
-public class LoggingTestRunner extends TestRunner {
- protected LoggingTestResult logResult;
-
- protected TestResult createTestResult() {
- TestResult result = logResult;
- logResult = null;
- if (result == null) result = new LoggingTestResult(null);
- return result;
- }
-
- /**
- * Runs a logging test suite.
- * @param suite the test suite
- * @param logResult the result object to use, or null to create a new one
- * @param wait if true, pauses between test runs
- */
- public void doRun(Test suite, LoggingTestResult logResult, boolean wait) {
- this.logResult = logResult;
- super.doRun(suite, wait);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/PerformanceTimer.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/PerformanceTimer.java
deleted file mode 100644
index 1a12e6508..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/PerformanceTimer.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-public class PerformanceTimer {
- private long startTime;
- private int totalMillis;
- private String name;
-
- /**
- * Creates a timer, initially not running.
- */
- public PerformanceTimer(String name) {
- this.totalMillis = 0;
- this.name = name;
- }
-
- /**
- * Starts the timer. Timer must not be running.
- */
- public void start() {
- startTime = System.currentTimeMillis();
- }
-
- /**
- * Stops the timer. Timer must be running.
- */
- public void stop() {
- totalMillis += System.currentTimeMillis() - startTime;
- startTime = 0;
- }
-
- /**
- * Returns the total number of milliseconds elapsed over all measured intervals.
- */
- public int getTotalMillis() {
- return totalMillis;
- }
-
- /**
- * Returns the name of this timer.
- */
- public String getName() {
- return name;
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SequenceGenerator.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SequenceGenerator.java
deleted file mode 100644
index e8e5c71e1..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SequenceGenerator.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.Random;
-
-/**
- * Encapsulates algorithms and state for generating deterministic sequences.
- * The sequence of numbers generated will always follow the same pattern,
- * regardless of the time, place, or platform.
- */
-public class SequenceGenerator {
- private static long globalSeqNum = System.currentTimeMillis() * 1000;
- private final Random random;
- private int uniqueInt;
-
- /**
- * Constructs a new sequence generator with a known seed.
- */
- public SequenceGenerator() {
- random = new Random(3141592653589793238L); // a known constant
- uniqueInt = 1000000;
- }
-
- /**
- * Returns a globally unique long integer.
- */
- public static long nextGloballyUniqueLong() {
- return globalSeqNum++;
- }
-
- /**
- * Returns a unique 7-digit integer.
- */
- public int nextUniqueInt() {
- return uniqueInt++;
- }
-
- /**
- * Returns a pseudo-random integer between 0 and n-1.
- * @see Random#nextInt(int)
- */
- public int nextInt(int n) {
- return random.nextInt(n);
- }
-
- /**
- * Returns a pseudo-random real number following a gaussian distribution.
- * @see Random#nextGaussian()
- */
- public double nextGaussian() {
- return random.nextGaussian();
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/Util.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/Util.java
deleted file mode 100644
index a5a85defc..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/Util.java
+++ /dev/null
@@ -1,789 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.List;
-import java.util.zip.ZipException;
-import java.util.zip.ZipFile;
-
-import junit.framework.Assert;
-import org.eclipse.compare.structuremergeviewer.DiffNode;
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.team.internal.ccvs.core.CVSStatus;
-import org.eclipse.ui.internal.dialogs.InternalErrorDialog;
-import org.eclipse.ui.wizards.datatransfer.ImportOperation;
-import org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider;
-
-/**
- * Provides helpers for:
- * <ul>
- * <li>Resource manipulation</li>
- * <li>Diff trees</li>
- * <li>UI automation</li>
- * <li>Parallel development simulation</li>
- * </ul>
- *
- * Note: This class is referenced from the VCM 1.0 performance tests.
- */ public class Util {
- /*** RESOURCE MANIPULATION SUPPORT ***/
-
- /**
- * Gets a handle for a project of a given name.
- * @param name the project name
- * @return the project handle
- */
- public static IProject getProject(String name) throws CoreException {
- return ResourcesPlugin.getWorkspace().getRoot().getProject(name);
- }
-
- /**
- * Creates a new project.
- * @param name the project name
- * @return the project handle
- */
- public static IProject createProject(String name) throws CoreException {
- IProject project = getProject(name);
- if (!project.exists()) project.create(null);
- if (!project.isOpen()) project.open(null);
- return project;
- }
-
- /**
- * Deletes a project.
- * @param project the project
- */
- public static void deleteProject(IProject project) throws CoreException {
- project.delete(false /*force*/, null);
- }
-
- /**
- * Deletes a file and prunes empty containing folders.
- * @param file the file to delete
- */
- public static void deleteFileAndPrune(IFile file) throws CoreException {
- file.delete(false /*force*/, null);
- IContainer container = file.getParent();
- while (container != null && container instanceof IFolder &&
- isFolderEmpty((IFolder) container)) {
- deleteFolder((IFolder) container);
- container = container.getParent();
- }
- }
-
- /**
- * Deletes a folder.
- */
- public static void deleteFolder(IFolder folder) throws CoreException {
- try {
- folder.delete(false /*force*/, null);
- } catch (CoreException e) {
- IStatus status = e.getStatus();
- // ignore errors caused by attempting to delete folders that CVS needs to have around
- if (findStatusByCode(status, CVSStatus.FOLDER_NEEDED_FOR_FILE_DELETIONS) == null) {
- throw e;
- }
- }
- }
-
- /**
- * Finds an IStatus instance in a multi-status by status code.
- */
- public static IStatus findStatusByCode(IStatus status, int code) {
- if (status.getCode() == code) return status;
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++) {
- IStatus found = findStatusByCode(children[i], code);
- if (found != null) return found;
- }
- return null;
- }
-
- /**
- * Creates a uniquely named project.
- * @param prefix a string prepended to the generated name
- * @return the new project
- */
- public static IProject createUniqueProject(String prefix) throws CoreException {
- return createProject(makeUniqueName(null, prefix, null));
- }
-
- /**
- * Creates a uniquely named file in the parent folder or project with random contents.
- * @param gen the sequence generator
- * @param parent the parent IFolder or IProject for the new file
- * @param meanSize the mean size of file to create (in bytes)
- * @param variance 69% of files with be within this amount of the mean
- * @param probBinary the probability of a new file being binary as a percentage
- * @return the new file
- */
- public static IFile createUniqueFile(SequenceGenerator gen, IContainer parent,
- int meanSize, int variance, int probBinary) throws IOException, CoreException {
- int fileSize;
- do {
- fileSize = (int) Math.abs(gen.nextGaussian() * variance + meanSize);
- } while (fileSize > meanSize + variance * 4); // avoid huge files
-
- ByteArrayOutputStream os = new ByteArrayOutputStream();
- String fileName;
- if (gen.nextInt(100) < probBinary) {
- fileName = makeUniqueName(gen, "file", "class"); // binary
- writeRandomBytes(gen, os, fileSize);
- } else {
- fileName = makeUniqueName(gen, "file", "txt"); // text
- writeRandomText(gen, os, fileSize);
- }
- IFile file = parent.getFile(new Path(fileName));
- file.create(new ByteArrayInputStream(os.toByteArray()), true, null);
- os.close();
- return file;
- }
-
- /**
- * Creates a uniquely named folder in the parent folder.
- * @param gen the sequence generator
- * @param parent the parent IFolder or IProject for the new folder
- * @return the new folder
- */
- public static IFolder createUniqueFolder(SequenceGenerator gen, IContainer parent) throws CoreException {
- IFolder folder = parent.getFolder(new Path(Util.makeUniqueName(gen, "folder", null)));
- folder.create(false /*force*/, true /*local*/, null);
- return folder;
- }
-
- /**
- * Renames a resource.
- * The resource handle becomes invalid.
- * @param resource the existing resource
- * @param newName the new name for the resource
- */
- public static void renameResource(IResource resource, String newName) throws CoreException {
- switch (resource.getType()) {
- case IResource.PROJECT: {
- IProject project = (IProject) resource;
- IProjectDescription desc = project.getDescription();
- desc.setName(newName);
- project.move(desc, false /*force*/, true /*keepHistory*/, null);
- } break;
- case IResource.FOLDER: {
- try {
- resource.move(new Path(newName), false /*force*/, null);
- } catch (CoreException e) {
- IStatus status = e.getStatus();
- // ignore errors caused by attempting to delete folders that CVS needs to have around
- if (findStatusByCode(status, CVSStatus.FOLDER_NEEDED_FOR_FILE_DELETIONS) == null) {
- throw e;
- }
- }
- } break;
- default:
- resource.move(new Path(newName), false /*force*/, null);
- break;
- }
- }
-
- /**
- * Modified a resource.
- * @param gen the sequence generator
- * @param file the file to modify
- */
- public static void modifyFile(SequenceGenerator gen, IFile file)
- throws IOException, CoreException {
- ByteArrayOutputStream os = new ByteArrayOutputStream();
- try {
- InputStream is = file.getContents(true);
- try {
- byte[] buffer = new byte[8192];
- int rsize;
- boolean changed = false;
- while ((rsize = is.read(buffer)) != -1) {
- double gaussian;
- do {
- gaussian = gen.nextGaussian() * 0.5; // large changes are less likely than small ones
- } while (gaussian > 1.0 || gaussian < -1.0);
- int changeSize = (int) (gaussian * rsize);
- changed = changed || changeSize != 0;
- os.write(buffer, 0, changeSize < 0 ? - changeSize : rsize); // shrink file
- writeRandomText(gen, os, changeSize); // enlarge file
- }
- if (! changed) os.write('!'); // make sure we actually did change the file
- file.setContents(new ByteArrayInputStream(os.toByteArray()), false /*force*/, true /*keepHistory*/, null);
- } finally {
- is.close();
- }
- } finally {
- os.close();
- }
- }
-
- /**
- * Creates a unique name.
- * Ensures that a deterministic sequence of names is generated for all files
- * and folders within a project, though not across sessions.
- *
- * @param gen the generator, or null if this name is to be globally unique
- * @param prefix a string prepended to the generated name
- * @param extension the file extension not including the period, null if none
- * @return the new name
- */
- public static String makeUniqueName(SequenceGenerator gen, String prefix, String extension)
- throws CoreException {
- StringBuffer name = new StringBuffer(prefix);
- name.append('-');
- if (gen == null) {
- name.append(SequenceGenerator.nextGloballyUniqueLong());
- } else {
- name.append(gen.nextUniqueInt());
- }
- if (extension != null) {
- name.append('.');
- name.append(extension);
- }
- return name.toString();
- }
-
- /**
- * Imports a .zip file into a container's root folder.
- * @param container the container
- * @param file the path of the .zip file
- */
- public static void importZip(IContainer container, File file)
- throws IOException, ZipException, InterruptedException, InvocationTargetException {
- ZipFile zipFile = new ZipFile(file);
- ZipFileStructureProvider provider = new ZipFileStructureProvider(zipFile);
- ImportOperation importOperation = new ImportOperation(container.getFullPath(),
- provider.getRoot(), provider, null);
- importOperation.setOverwriteResources(true); // don't ask
- importOperation.run(new NullProgressMonitor());
- Assert.assertTrue(importOperation.getStatus().isOK());
- }
-
- /**
- * Writes random text to an output stream.
- * @param gen the sequence generator
- */
- public static void writeRandomText(SequenceGenerator gen, OutputStream os, int count) throws IOException {
- while (count-- > 0) {
- int c = gen.nextInt(99);
- os.write((c >= 95) ? '\n' : c + ' ');
- }
- }
-
- /**
- * Writes random bytes to an output stream.
- * @param gen the sequence generator
- */
- public static void writeRandomBytes(SequenceGenerator gen, OutputStream os, int count) throws IOException {
- while (count-- > 0) {
- os.write(gen.nextInt(256));
- }
- }
-
- /**
- * Creates a random folder deeply below the root folder.
- * @param gen the sequence generator
- * @param root the root IFolder or IProject for the operation
- * @return the new folder
- */
- public static IFolder createRandomDeepFolder(SequenceGenerator gen, IContainer root) throws CoreException {
- IContainer container = pickRandomDeepContainer(gen, root);
- for (;;) {
- IFolder folder = createUniqueFolder(gen, container);
- container = folder;
- // 12.5% chance of creating a nested folder
- if (gen.nextInt(8) != 0) return folder;
- }
- }
-
- /**
- * Creates several random files deeply below the root folder.
- * @param gen the sequence generator
- * @param root the root IFolder or IProject for the operation
- * @param count the number of files to create
- * @param meanSize the mean size of file to create (in bytes)
- * @param probBinary the probability of a new file being binary as a percentage
- */
- public static void createRandomDeepFiles(SequenceGenerator gen, IContainer root, int count,
- int meanSize, int variance, int probBinary) throws IOException, CoreException {
- while (count-- > 0) {
- createUniqueFile(gen, pickRandomDeepContainer(gen, root), meanSize, variance, probBinary);
- }
- }
-
- /**
- * Deletes several random files deeply below the root folder.
- * @param gen the sequence generator
- * @param root the root IFolder or IProject for the operation
- * @param count the number of files to delete
- */
- public static void deleteRandomDeepFiles(SequenceGenerator gen, IContainer root, int count) throws CoreException {
- while (count-- > 0) {
- IFile file = pickRandomDeepFile(gen, root);
- if (file == null) break;
- deleteFileAndPrune(file);
- }
- }
-
- /**
- * Modifies several random files deeply below the root folder.
- * @param gen the sequence generator
- * @param root the root IFolder or IProject for the operation
- * @param count the number of files to modify
- */
- public static void modifyRandomDeepFiles(SequenceGenerator gen, IContainer root, int count)
- throws IOException, CoreException {
- // perhaps we can add a parameter for the "magnitude" of the change
- while (count-- > 0) {
- IFile file = pickRandomDeepFile(gen, root);
- if (file == null) break;
- modifyFile(gen, file);
- }
- }
-
- /**
- * Touches several random files deeply below the root folder.
- * @param gen the sequence generator
- * @param root the root IFolder or IProject for the operation
- * @param count the number of files to touch
- */
- public static void touchRandomDeepFiles(SequenceGenerator gen, IContainer root, int count) throws CoreException {
- while (count-- > 0) {
- IFile file = pickRandomDeepFile(gen, root);
- if (file == null) break;
- file.touch(null);
- }
- }
-
- /**
- * Renames several random files deeply below the root folder.
- * @param gen the sequence generator
- * @param root the root IFolder or IProject for the operation
- * @param count the number of files to touch
- */
- public static void renameRandomDeepFiles(SequenceGenerator gen, IContainer root, int count) throws CoreException {
- IProject project = root.getProject();
- while (count-- > 0) {
- IFile file = pickRandomDeepFile(gen, root);
- if (file == null) break;
- renameResource(file, makeUniqueName(gen, "file", file.getFileExtension()));
- }
- }
-
- /**
- * Picks a random file from the parent folder or project.
- * @param gen the sequence generator
- * @param parent the parent IFolder or IProject for the operation
- * @return the file that was chosen, or null if no suitable files
- */
- public static IFile pickRandomFile(SequenceGenerator gen, IContainer parent) throws CoreException {
- IResource[] members = filterResources(parent.members());
- for (int size = members.length; size != 0; --size) {
- int elem = gen.nextInt(size);
- if (members[elem] instanceof IFile) return (IFile) members[elem];
- System.arraycopy(members, elem + 1, members, elem, size - elem - 1);
- }
- return null;
- }
-
- /**
- * Picks a random folder from the parent folder or project.
- * @param gen the sequence generator
- * @param parent the parent IFolder or IProject for the operation
- * @return the folder, or null if no suitable folders
- */
- public static IFolder pickRandomFolder(SequenceGenerator gen, IContainer parent) throws CoreException {
- IResource[] members = filterResources(parent.members());
- for (int size = members.length; size != 0; --size) {
- int elem = gen.nextInt(size);
- if (members[elem] instanceof IFolder) return (IFolder) members[elem];
- System.arraycopy(members, elem + 1, members, elem, size - elem - 1);
- }
- return null;
- }
-
- /**
- * Picks a random file deeply from the root folder or project.
- * @param gen the sequence generator
- * @param root the root IFolder or IProject for the operation
- * @return the file that was chosen, or null if no suitable files
- */
- public static IFile pickRandomDeepFile(SequenceGenerator gen, IContainer root) throws CoreException {
- IResource[] members = filterResources(root.members());
- for (int size = members.length; size != 0; --size) {
- int elem = gen.nextInt(size);
- IResource resource = members[elem];
- if (resource instanceof IFile) return (IFile) resource;
- if (resource instanceof IFolder) {
- IFile file = pickRandomDeepFile(gen, (IFolder) resource);
- if (file != null) return file;
- }
- System.arraycopy(members, elem + 1, members, elem, size - elem - 1);
- }
- return null;
- }
-
- /**
- * Picks a random folder deeply from the root folder or project.
- * May pick the project's root container.
- * @param gen the sequence generator
- * @param root the root IFolder or IProject for the operation
- * @return the container that was chosen, never null
- */
- public static IContainer pickRandomDeepContainer(SequenceGenerator gen, IContainer root) throws CoreException {
- if (gen.nextInt(6) == 0) {
- IResource[] members = filterResources(root.members());
- for (int size = members.length; size != 0; --size) {
- int elem = gen.nextInt(size);
- IResource resource = members[elem];
- if (resource instanceof IFolder) {
- return pickRandomDeepContainer(gen, (IFolder) resource);
- }
- System.arraycopy(members, elem + 1, members, elem, size - elem - 1);
- }
- }
- Assert.assertTrue(isValidContainer(root));
- return root;
- }
-
- /**
- * Returns true if the folder does not contain any real files.
- */
- public static boolean isFolderEmpty(IFolder folder) throws CoreException {
- IResource[] members = folder.members();
- for (int i = 0; i < members.length; ++i) {
- if (isValidFile(members[i]) || isValidFolder(members[i])) return false;
- }
- return true;
- }
-
- /**
- * Returns true iff file is a valid IFile (that should not be ignored).
- */
- public static boolean isValidFile(IResource file) throws CoreException {
- String name = file.getName();
- return file instanceof IFile
- && ! file.isPhantom()
- && ! name.equals(".classpath")
- && ! name.equals(".project")
- && ! name.equals(".vcm_meta");
- }
-
- /**
- * Returns true iff folder is a valid IFolder (that should not be ignored).
- */
- public static boolean isValidFolder(IResource folder) throws CoreException {
- String name = folder.getName();
- return folder instanceof IFolder
- && ! folder.isPhantom()
- && ! name.equals("CVS")
- && ! name.equals("bin");
- }
-
- /**
- * Returns true iff container is a valid IFolder or IProject (that should not be ignored).
- */
- public static boolean isValidContainer(IResource container) throws CoreException {
- return container instanceof IProject || isValidFolder(container);
- }
-
- /**
- * Returns true iff resource is a valid IFile, IFolder or IProject (that should not be ignored).
- */
- public static boolean isValidResource(IResource resource) throws CoreException {
- return isValidFile(resource) || isValidContainer(resource);
- }
-
- /**
- * Filters and sorts an array of resources to ensure deterministic behaviour across
- * sessions. The general idea is to guarantee that given a known sequence of
- * pseudo-random numbers, we will always pick the same sequence of files and
- * folders each time we repeat the test.
- */
- public static IResource[] filterResources(IResource[] resources) throws CoreException {
- List list = new ArrayList(resources.length);
- for (int i = 0; i < resources.length; ++i) {
- if (isValidResource(resources[i])) list.add(resources[i]);
- }
- if (list.size() != resources.length) {
- resources = (IResource[]) list.toArray(new IResource[list.size()]);
- }
- Arrays.sort(resources, new Comparator() {
- public int compare(Object a, Object b) {
- return ((IResource) a).getName().compareTo(((IResource) b).getName());
- }
- });
- return resources;
- }
-
- /*** DIFF SUPPORT ***/
-
- public static boolean isEmpty(IDiffContainer node) {
- if (node == null) return true;
- if (node.getKind() != 0) return false;
- IDiffElement[] children = node.getChildren();
- for (int i = 0; i < children.length; i++) {
- if (!isEmpty(children[i])) return false;
- }
- return true;
- }
- public static boolean isEmpty(IDiffElement element) {
- if (element == null) return true;
- if (element.getKind() != 0) return false;
- if (element instanceof IDiffContainer) {
- IDiffElement[] children = ((DiffNode)element).getChildren();
- for (int i = 0; i < children.length; i++) {
- if (!isEmpty(children[i])) return false;
- }
- }
- return true;
- }
-
- /*** UI SUPPORT ***/
-
- /**
- * Opens the specified wizard, then notifies the waiter.
- * The WizardDialog instance is passed as argument to notify() in the waiter.
- */
- public static void waitForWizardToOpen(Shell parent, IWizard wizard, final Waiter waiter) {
- WizardDialog dialog = new WizardDialog(parent, wizard) {
- public int open() {
- // create the window's controls
- create();
- // hook into the event loop so we get called back when the wizard is up and running
- final Display display = getContents().getDisplay();
- final WizardDialog dialog = this;
- display.asyncExec(new Runnable() {
- public void run() {
- while (display.readAndDispatch()); // process any other pending messages first
- waiter.notify(dialog);
- }
- });
- // call open (does not create the window's controls a second time)
- return super.open();
- }
- };
- dialog.open();
- }
-
- /**
- * Notifies the waiter when a Shell matching the specified criteria opens.
- * The Shell instance is passed as argument to notify() in the waiter.
- *
- * @param display the root display
- * @param pollingPeriod the number of milliseconds to wait between polls
- * @param value a value used for matching
- * @param criteria a strategy for matching the controls with a value,
- * or null to match any Shell.
- * @param waiter the waiter to be notified
- */
- public static void waitForShellToOpen(final Display display, final int pollingPeriod,
- final Object value, final ICriteria criteria, final Waiter waiter) {
- final Runnable hook = new Runnable() {
- public void run() {
- if (display.isDisposed()) return;
- Shell[] shells = display.getShells();
- for (int i = 0; i < shells.length; ++i) {
- Shell shell = shells[i];
- if (criteria != null && ! criteria.test(shell, value)) continue;
- if (! waiter.notify(shell)) return;
- }
- // poll again as soon as possible
- if (waiter.keepWaiting()) {
- display.timerExec(pollingPeriod, this);
- }
- }
- };
- hook.run();
- }
-
-
- /**
- * Installs a watchdog for JFace error dialogs for the current display.
- * The Dialog instance is passed as argument to notify() in the waiter.
- * Recognized dialogs:
- * - ErrorDialog
- * - InternalErrorDialog
- *
- * @param display the root display
- * @param pollingPeriod the number of milliseconds to wait between polls
- * @param waiter the waiter to be notified
- */
- public static void waitForErrorDialog(Display display, int pollingPeriod, final Waiter waiter) {
- ICriteria criteria = new ICriteria() {
- public boolean test(Object candidate, Object value) {
- Shell shell = (Shell) candidate;
- if (shell.isDisposed()) return false;
- Object data = shell.getData();
- if (data == null) return false;
- return data instanceof ErrorDialog || data instanceof InternalErrorDialog;
- }
- };
- waitForShellToOpen(display, pollingPeriod, null, criteria, new Waiter() {
- public boolean keepWaiting() {
- return waiter.keepWaiting();
- }
-
- public boolean notify(Object object) {
- return waiter.notify(((Shell) object).getData());
- }
- });
- }
-
- /**
- * Finds a Control in a Composite hierarchy matching the specified criteria.
- *
- * @param root the root of the hierarchy to search
- * @param clazz the Class representing the precise type of Control to find
- * @param value a value used for matching
- * @param criteria a strategy for matching the controls with a value,
- * or null to match anything of the right class.
- * @return the first matching Control, or null if none found.
- */
- public static Control findControl(Composite root, Class clazz, Object value, ICriteria criteria) {
- if (clazz.isAssignableFrom(root.getClass())) {
- if (criteria == null || criteria.test(root, value)) return root;
- }
- Control[] children = root.getChildren();
- for (int i = 0; i < children.length; ++i) {
- final Control candidate = children[i];
- if (candidate instanceof Composite) {
- Control c = findControl((Composite) candidate, clazz, value, criteria);
- if (c != null) return c;
- } else {
- if (clazz.isAssignableFrom(candidate.getClass())) {
- if (criteria == null || criteria.test(candidate, value)) return candidate;
- }
- }
- }
- return null;
- }
-
- /**
- * Finds a Control in a Composite hierarchy with the specified text string.
- * Note: clazz must specify a Control subclass that defines getText()
- *
- * @param root the root of the hierarchy to search
- * @param clazz the Class representing the precise type of Control to find
- * @param text the text string to find
- * @return the first matching Control, or null if none found.
- */
- public static Control findControlWithText(Composite root, Class clazz, String text) {
- return findControl(root, clazz, text, new ICriteria() {
- public boolean test(Object control, Object value) {
- // getText is only defined on certain subclasses of Composite
- // so we must use reflection to find the method
- try {
- Method m = control.getClass().getMethod("getText", new Class[0]);
- String text = (String) m.invoke(control, new Object[0]);
- return value.equals(stripMnemonicEscapes(text));
- } catch (Exception e) {
- e.printStackTrace();
- Assert.fail("Could not invoke method getText()");
- }
- return false;
- }
- });
- }
-
- /**
- * Posts a fake event to the queue.
- * Fills in the event type and widget fields.
- * @param event the Event
- */
- public static void postEvent(final Widget widget, final int eventType, final Event event) {
- Display display = widget.getDisplay();
- event.type = eventType;
- event.widget = widget;
- display.asyncExec(new Runnable() {
- public void run() {
- widget.notifyListeners(eventType, event);
- }
- });
- }
-
- /**
- * Strips mnemonic escapes from a text label.
- */
- public static String stripMnemonicEscapes(String label) {
- StringBuffer buf = new StringBuffer();
- int length = label.length();
- for (int i = 0; i < length; ++i) {
- char c = label.charAt(i);
- if (c == '&') {
- i += 1;
- if (i < length) c = label.charAt(i);
- }
- buf.append(c);
- }
- return buf.toString();
- }
-
- /**
- * Process pending events for the current display, until at least the
- * specified number of milliseconds elapses.
- */
- public static void processEventsUntil(int hiatus) {
- Display display = Display.getCurrent();
- Assert.assertNotNull(display);
- final boolean done[] = new boolean[] { hiatus == 0 };
- if (hiatus != 0) display.timerExec(hiatus, new Runnable() {
- public void run() { done[0] = true; }
- });
- for (;;) {
- while (display.readAndDispatch());
- if (done[0]) return;
- display.sleep();
- }
- }
-
- /**
- * Process pending events for the current display, until resumed by the user.
- * Very useful for inspecting intermediate results while debugging.
- */
- public static void processEventsUntilResumed(String title) {
- Display display = Display.getCurrent();
- Assert.assertNotNull(display);
- Shell shell = new Shell(display, SWT.CLOSE);
- shell.setText("Close me to resume: " + title);
- shell.setBounds(0, 0, 500, 30);
- shell.open();
- while (! shell.isDisposed()) {
- while (! display.readAndDispatch()) display.sleep();
- }
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/Waiter.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/Waiter.java
deleted file mode 100644
index 69f184424..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/Waiter.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Abstract listener used for the generic problem of waiting for
- * something to happen and retrieving some related information.
- * e.g. Waiting for a window with a given title to open and getting its handle.
- */
-public abstract class Waiter {
- /**
- * Called when the desired event has occurred.
- * @param object an object related to the event, type depends on the context
- * @return true to keep waiting, otherwise false
- */
- public abstract boolean notify(Object object);
-
- /**
- * Called after each unsuccessful poll for the event.
- * @return true to keep waiting, otherwise false
- */
- public boolean keepWaiting() {
- return true;
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/AllTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/AllTests.java
deleted file mode 100644
index 6a3fcb522..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/AllTests.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui.benchmark;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests extends TestSuite {
- public static Test suite() {
- TestSuite suite = new TestSuite();
- suite.addTestSuite(SyncTests.class);
- suite.addTestSuite(WorkflowTests.class);
- //suite.addTestSuite(CommandTests.class);
- return new BenchmarkTestSetup(suite);
- }
-
- public AllTests(String name) {
- super(name);
- }
- public AllTests() {
- super();
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkTestSetup.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkTestSetup.java
deleted file mode 100644
index 6b1c46260..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/BenchmarkTestSetup.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui.benchmark;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-
-import junit.framework.Test;
-import org.eclipse.core.runtime.IPluginDescriptor;
-import org.eclipse.core.runtime.IPluginRegistry;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
-
-public class BenchmarkTestSetup extends CVSTestSetup {
- public static final File BIG_ZIP_FILE;
- public static final File SMALL_ZIP_FILE;
- public static final File TINY_ZIP_FILE;
-
- // Static initializer for constants
- static {
- try {
- BIG_ZIP_FILE = getTestFile("benchmarkBig.zip");
- SMALL_ZIP_FILE = getTestFile("benchmarkSmall.zip");
- TINY_ZIP_FILE = getTestFile("benchmarkTiny.zip");
- } catch (IOException e) {
- throw new Error(e.getMessage());
- }
- }
-
- public static File getTestFile(String name) throws IOException {
- IPluginRegistry registry = Platform.getPluginRegistry();
- IPluginDescriptor descriptor = registry.getPluginDescriptor("org.eclipse.team.tests.cvs.core");
- URL baseURL = descriptor.getInstallURL();
- URL url = new URL(baseURL, "resources/BenchmarkTest/" + name);
- url = Platform.asLocalURL(url);
- if (url.getProtocol().equals("file")) {
- return new File(url.getFile()).getAbsoluteFile();
- }
- throw new IOException("Cannot find test file: " + name);
- }
-
- public BenchmarkTestSetup(Test test) {
- super(test);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/CommandTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/CommandTests.java
deleted file mode 100644
index cf734b26e..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/CommandTests.java
+++ /dev/null
@@ -1,231 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui.benchmark;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceVisitor;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
-import org.eclipse.team.tests.ccvs.core.CommandLineCVSClient;
-import org.eclipse.team.tests.ccvs.core.EclipseCVSClient;
-import org.eclipse.team.tests.ccvs.core.ICVSClient;
-import org.eclipse.team.tests.ccvs.ui.CVSUITestCase;
-import org.eclipse.team.tests.ccvs.ui.Util;
-
-public class CommandTests extends CVSUITestCase {
- private String baseName;
- private IProject referenceProject;
- private IProject eclipseProject;
- private IProject uiProject;
-
- public CommandTests(String name) {
- super(name);
- }
- public CommandTests() {
- super("");
- }
- public static Test suite() {
- return new BenchmarkTestSetup(new TestSuite(CommandTests.class));
- }
-
- public void setUp() throws Exception {
- super.setUp();
- baseName = Util.makeUniqueName(null, getName(), null);
- referenceProject = Util.createProject(baseName + "-reference");
- eclipseProject = Util.createProject(baseName + "-eclipse");
- uiProject = Util.createProject(baseName);
- }
-
- public void testImportAddCommitCheckout() throws Throwable {
- // import a project using each client
- new ComparativeTest("import/add/commit big project") {
- protected void runCommandTest(final IContainer localRoot, ICVSClient client) throws Exception {
- // use the import command to create a new module
- IFolder folder = localRoot.getFolder(new Path("empty_folder"));
- folder.create(false /*force*/, true /*local*/, null);
- execute(client, "import empty module", folder, "import",
- new String[] { },
- new String[] { "-m", "initial import" },
- new String[] { localRoot.getName(), "vendor", "start" });
- folder.delete(false /*force*/, null);
-
- // checkout the project
- localRoot.delete(false /*force*/, null);
- execute(client, "checkout module", localRoot.getParent(), "co",
- new String[] { },
- new String[] { },
- new String[] { localRoot.getName() });
-
- // prepare contents
- prepareContents(localRoot);
-
- // determine the set of files and folders to be added
- final Map /* from KSubstOption to String */ files = new HashMap();
- final Set /* of String */ folders = new TreeSet();
- final int trim = localRoot.getProjectRelativePath().segmentCount();
- localRoot.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- if (! resource.equals(localRoot)) {
- String name = resource.getProjectRelativePath().removeFirstSegments(trim).toString();
- if (resource.getType() == IResource.FILE) {
- KSubstOption ksubst = KSubstOption.fromFile((IFile) resource);
- Set set = (Set) files.get(ksubst);
- if (set == null) {
- set = new HashSet();
- files.put(ksubst, set);
- }
- set.add(name);
- } else {
- folders.add(name);
- }
- }
- return true;
- }
- }, IResource.DEPTH_INFINITE, false);
-
- // add all folders
- if (!folders.isEmpty()) {
- executeInParts(client, "add folders", localRoot, "add",
- new String[] { },
- new String[] { },
- (String[])folders.toArray(new String[folders.size()]));
- }
- // add all files
- for (Iterator it = files.entrySet().iterator(); it.hasNext();) {
- Map.Entry entry = (Map.Entry) it.next();
- KSubstOption ksubst = (KSubstOption) entry.getKey();
- Set set = (Set) entry.getValue();
- executeInParts(client, "add files (" + ksubst.getShortDisplayText() + ")", localRoot, "add",
- new String[] { },
- new String[] { ksubst.toString() },
- (String[])set.toArray(new String[set.size()]));
- }
-
- // commit everything
- execute(client, "commit module", localRoot, "ci",
- new String[] { },
- new String[] { "-m", "dummy message" },
- new String[] { });
- }
- protected void runUITest(IContainer localRoot) throws Exception {
- prepareContents(localRoot);
- actionShareProject(uiProject);
- syncCommitResources(new IResource[] { uiProject }, null, "initial");
- }
- private void prepareContents(IContainer localRoot) throws Exception {
- Util.importZip(localRoot, BenchmarkTestSetup.BIG_ZIP_FILE);
- }
- }.run();
-
- // check it out using each client
- new ComparativeTest("checkout big project") {
- protected void runCommandTest(IContainer localRoot, ICVSClient client) throws Exception {
- execute(client, "checkout module", localRoot.getParent(), "co",
- new String[] { },
- new String[] { "-P" },
- new String[] { localRoot.getName() });
- }
- protected void runUITest(IContainer localRoot) throws Exception {
- actionCheckoutProjects(new String[] { localRoot.getName() }, new CVSTag[] { CVSTag.DEFAULT });
- }
- protected void setUp(IContainer localRoot) throws Exception {
- // delete then recreate the container
- IProject project = (IProject) localRoot;
- Util.deleteProject(project);
- project.create(null);
- project.open(null);
- // delete the .project file (avoid .project is in the way error)
- IFile file = project.getFile(".project");
- file.delete(false /*force*/, null);
- }
- }.run();
- }
-
- protected abstract class ComparativeTest {
- private String name;
- public ComparativeTest(String name) {
- this.name = name;
- }
- public void run() throws Exception {
- startGroup(name);
-
- startGroup("command line client");
- setUp(referenceProject);
- runCommandTest(referenceProject, CommandLineCVSClient.INSTANCE);
- tearDown(referenceProject);
- endGroup();
-
- startGroup("eclipse client");
- setUp(eclipseProject);
- runCommandTest(eclipseProject, EclipseCVSClient.INSTANCE);
- tearDown(eclipseProject);
- endGroup();
-
- startGroup("user interface");
- setUp(uiProject);
- runUITest(uiProject);
- tearDown(uiProject);
- endGroup();
-
- endGroup();
- }
- protected abstract void runCommandTest(IContainer localRoot, ICVSClient client) throws Exception ;
- protected abstract void runUITest(IContainer localRoot) throws Exception;
- protected void setUp(IContainer localRoot) throws Exception {
- }
- protected void tearDown(IContainer localRoot) throws Exception {
- }
- protected void execute(ICVSClient client, String taskname,
- IContainer localRoot, String command,
- String[] globalOptions, String[] localOptions, String[] arguments) throws CVSException {
- // The execution time for the client will include overhead associated with
- // computing the command to be run and cleaning up Eclipse state once it has
- // completed, including notifying resource delta listener. Since all clients
- // in the Eclipse environment are subject to this overhead, the theory is that
- // it will be a constant factor that we can neglect.
- startTask(taskname);
- client.executeCommand(testRepository, localRoot, command, globalOptions, localOptions, arguments);
- endTask();
- }
- protected void executeInParts(ICVSClient client, String taskname,
- IContainer localRoot, String command,
- String[] globalOptions, String[] localOptions, String[] arguments) throws CVSException {
- // There are problems executing commands with too many arguments
- // so we have to break them up into chunks.
- startTask(taskname);
- int i = 0;
- do {
- int len = Math.min(200, arguments.length - i);
- String[] args;
- if (i == 0 && len == arguments.length) {
- args = arguments;
- } else {
- args = new String[len];
- System.arraycopy(arguments, i, args, 0, len);
- }
- client.executeCommand(testRepository, localRoot, command, globalOptions, localOptions, args);
- i += len;
- } while (arguments.length - i > 0);
- endTask();
- }
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/SyncTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/SyncTests.java
deleted file mode 100644
index 04d56f804..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/SyncTests.java
+++ /dev/null
@@ -1,112 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui.benchmark;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.tests.ccvs.ui.CVSUITestCase;
-import org.eclipse.team.tests.ccvs.ui.SequenceGenerator;
-import org.eclipse.team.tests.ccvs.ui.Util;
-
-public class SyncTests extends CVSUITestCase {
- private static final int FILE_SIZE_MEAN = 16384;
- private static final int FILE_SIZE_VARIANCE = 0;
- private static final int PROB_BINARY = 0;
-
- public SyncTests(String name) {
- super(name);
- }
- public SyncTests() {
- super("");
- }
-
- public static Test suite() {
- return new BenchmarkTestSetup(new TestSuite(SyncTests.class));
- }
-
- public void testSync0() throws Exception {
- // test sync on project with no changes
- IProject project = setupOutProject();
- startGroup("test sync with no changes");
- syncCommitResources(new IResource[] { project }, null, "");
- endGroup();
- }
-
- public void testSync1() throws Exception {
- runTestSync(1);
- }
-
- public void testSync10() throws Exception {
- runTestSync(10);
- }
-
- public void testSync100() throws Exception {
- runTestSync(100);
- }
-
- protected IProject setupOutProject() throws Exception {
- IProject project = createAndImportProject("testSync", BenchmarkTestSetup.SMALL_ZIP_FILE);
- disableLog();
- actionShareProject(project);
- syncCommitResources(new IResource[] { project }, null, "initial");
- enableLog();
- return project;
- }
-
- /**
- * Runs a sequence of operations for the synchronizer tests.
- * A parallel project is used to generate incoming changes.
- */
- protected void runTestSync(int size) throws Exception {
- final SequenceGenerator gen = new SequenceGenerator();
-
- // setup out project then move it out of the way
- IProject outProject = setupOutProject();
- String moduleName = outProject.getName();
- Util.renameResource(outProject, moduleName + "out");
- outProject = Util.getProject(moduleName + "out");
-
- // setup in project
- disableLog();
- actionCheckoutProjects(new String[] { moduleName }, new CVSTag[] { new CVSTag() });
- enableLog();
- IProject inProject = Util.getProject(moduleName);
-
- /*** outgoing and incoming changes ***/
- startGroup("synchronize " + size + " added file(s)");
- Util.createRandomDeepFiles(gen, outProject, size, FILE_SIZE_MEAN, FILE_SIZE_VARIANCE, PROB_BINARY);
- startGroup("as outgoing changes");
- syncCommitResources(new IResource[] { outProject }, null, "");
- endGroup();
- startGroup("as incoming changes");
- syncUpdateResources(new IResource[] { inProject }, null);
- endGroup();
- endGroup();
-
- startGroup("synchronize " + size + " modified file(s)");
- Util.modifyRandomDeepFiles(gen, outProject, size);
- startGroup("as outgoing changes");
- syncCommitResources(new IResource[] { outProject }, null, "");
- endGroup();
- startGroup("as incoming changes");
- syncUpdateResources(new IResource[] { inProject }, null);
- endGroup();
- endGroup();
-
- startGroup("synchronize " + size + " removed file(s)");
- Util.deleteRandomDeepFiles(gen, outProject, size);
- startGroup("as outgoing changes");
- syncCommitResources(new IResource[] { outProject }, null, "");
- endGroup();
- startGroup("as incoming changes");
- syncUpdateResources(new IResource[] { inProject }, null);
- endGroup();
- endGroup();
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/WorkflowTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/WorkflowTests.java
deleted file mode 100644
index 50f04ba5a..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/benchmark/WorkflowTests.java
+++ /dev/null
@@ -1,157 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui.benchmark;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.io.File;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.tests.ccvs.ui.CVSUITestCase;
-import org.eclipse.team.tests.ccvs.ui.LoggingTestResult;
-import org.eclipse.team.tests.ccvs.ui.SequenceGenerator;
-import org.eclipse.team.tests.ccvs.ui.Util;
-
-public class WorkflowTests extends CVSUITestCase {
- private int FILE_SIZE_MEAN = 16384;
- private int FILE_SIZE_VARIANCE = 12288;
- private int PROB_BINARY = 5;
- public WorkflowTests(String name) {
- super(name);
- }
- public WorkflowTests() {
- super("");
- }
-
- public static Test suite() {
- return new BenchmarkTestSetup(new TestSuite(WorkflowTests.class));
- //return new BenchmarkTestSetup(new WorkflowTests("testTinyWorkflow"));
- }
-
- public void testBigWorkflow() throws Exception {
- runWorkflowTests("testBig", BenchmarkTestSetup.BIG_ZIP_FILE);
- }
-
- public void testSmallWorkflow() throws Exception {
- runWorkflowTests("testSmall", BenchmarkTestSetup.SMALL_ZIP_FILE);
- }
-
- public void testTinyWorkflow() throws Exception {
- runWorkflowTests("testTiny", BenchmarkTestSetup.TINY_ZIP_FILE);
- }
-
- /**
- * Runs a series of incoming and outgoing workflow-related tests.
- */
- protected void runWorkflowTests(String name, File initialContents) throws Exception {
- final SequenceGenerator gen = new SequenceGenerator();
- IProject outProject = createAndImportProject(name, initialContents);
-
- // test project sharing
- startGroup("test project sharing");
- actionShareProject(outProject);
- endGroup();
-
- // test initial project commit
- startGroup("test initial project commit");
- syncCommitResources(new IResource[] { outProject }, null, "initial");
- endGroup();
-
- // move the project out of the way
- String moduleName = outProject.getName();
- Util.renameResource(outProject, moduleName + "out");
- outProject = Util.getProject(moduleName + "out");
-
- // test initial project checkout
- startGroup("test initial project checkout");
- actionCheckoutProjects(new String[] { moduleName }, new CVSTag[] { new CVSTag() });
- endGroup();
- IProject inProject = Util.getProject(moduleName);
-
- // test scenarios
- startGroup("test incoming and outgoing change scenarios");
- startGroup("adding a new component - localized additions and some changes");
- Util.modifyRandomDeepFiles(gen, outProject, 5);
- Util.touchRandomDeepFiles(gen, outProject, 2);
- IFolder componentRoot = Util.createRandomDeepFolder(gen, outProject);
- Util.createRandomDeepFiles(gen, componentRoot, 12, FILE_SIZE_MEAN, FILE_SIZE_VARIANCE, PROB_BINARY);
- syncCommitResources(new IResource[] { outProject }, null, "");
- endGroup();
-
- startGroup("catching up to a new component - localized additions and some changes");
- syncUpdateResources(new IResource[] { inProject }, null);
- endGroup();
-
- startGroup("fixing a bug - localized changes");
- Util.modifyRandomDeepFiles(gen, componentRoot, 2);
- Util.touchRandomDeepFiles(gen, componentRoot, 2);
- syncCommitResources(new IResource[] { outProject }, null, "");
- endGroup();
-
- startGroup("catching up to a bug fix - localized changes");
- syncUpdateResources(new IResource[] { inProject }, null);
- endGroup();
-
- startGroup("moving a package - scattered changes, files moved");
- Util.modifyRandomDeepFiles(gen, outProject, 5); // a few scattered changes
- Util.modifyRandomDeepFiles(gen, componentRoot, 12); // changes to "package" stmt
- Util.renameResource(componentRoot, Util.makeUniqueName(gen, "folder", null));
- syncCommitResources(new IResource[] { outProject }, null, "");
- endGroup();
-
- startGroup("catching up to a moved package - scattered changes, files moved");
- syncUpdateResources(new IResource[] { inProject }, null);
- endGroup();
-
- startGroup("big refactoring - scattered changes, files renamed and balanced additions/deletions");
- Util.deleteRandomDeepFiles(gen, outProject, 4); // some stuff deleted
- Util.modifyRandomDeepFiles(gen, outProject, 20); // many scattered changes
- Util.renameRandomDeepFiles(gen, outProject, 5); // renamed some stuff
- Util.createRandomDeepFiles(gen, outProject, 4, FILE_SIZE_MEAN, FILE_SIZE_VARIANCE, PROB_BINARY); // some new stuff added
- syncCommitResources(new IResource[] { outProject }, null, "");
- endGroup();
-
- startGroup("catching up to a big refactoring - scattered changes, files renamed and balanced additions/deletions");
- syncUpdateResources(new IResource[] { inProject }, null);
- endGroup();
- endGroup();
-
- // test tagging a project
- startGroup("tag project");
- actionCVSTag(new IResource[] { outProject }, "v101");
- endGroup();
-
- // replace with remote contents
- startGroup("test replace with remote contents scenarios");
- startGroup("no local dirty files, no remote changes");
- actionReplaceWithRemote(new IResource[] { inProject });
- endGroup();
-
- startGroup("abandoning some local work, no remote changes");
- Util.deleteRandomDeepFiles(gen, inProject, 4); // some stuff locally deleted
- Util.modifyRandomDeepFiles(gen, inProject, 6); // a few unimportant changes to forget
- Util.createRandomDeepFiles(gen, inProject, 4, FILE_SIZE_MEAN, FILE_SIZE_VARIANCE, PROB_BINARY); // some new work to abandon
- actionReplaceWithRemote(new IResource[] { inProject });
- endGroup();
-
- startGroup("no local dirty files, many remote changes");
- // e.g. returning from a long vacation
- Util.deleteRandomDeepFiles(gen, outProject, 10); // some components obsoleted
- Util.modifyRandomDeepFiles(gen, outProject, 42); // many changes
- Util.renameRandomDeepFiles(gen, outProject, 8); // evidence of some refactoring
- Util.createRandomDeepFiles(gen, outProject, 10, FILE_SIZE_MEAN, FILE_SIZE_VARIANCE, PROB_BINARY); // a few new components added
- disableLog();
- syncCommitResources(new IResource[] { outProject }, null, "");
- enableLog();
- actionReplaceWithRemote(new IResource[] { inProject });
- endGroup();
- endGroup();
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/ArgumentParser.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/ArgumentParser.java
deleted file mode 100644
index ee9359101..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/ArgumentParser.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui.logformatter;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-public class ArgumentParser {
- protected ArgumentParser() {
- }
-
- public boolean parse(String[] args) {
- int index = 0;
- String option = null;
- for (int i = 0; i < args.length; i++) {
- String arg = args[i];
- if (arg == null) continue;
- if (arg.charAt(0) == '-') {
- if (option != null && ! handleOption(option, null)) return false;
- option = arg;
- } else if (option != null) {
- if (! handleOption(option, arg)) return false;
- option = null;
- } else {
- if (! handleArgument(index++, arg)) return false;
- }
- }
- if (option != null && ! handleOption(option, null)) return false;
- return handleFinished();
- }
-
- protected boolean handleFinished() {
- return true;
- }
-
- protected boolean handleArgument(int index, String arg) {
- return false;
- }
-
- protected boolean handleOption(String option, String arg) {
- return false;
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/CaseEntry.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/CaseEntry.java
deleted file mode 100644
index 3ae0ba97e..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/CaseEntry.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui.logformatter;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.xml.sax.Attributes;
-
-public class CaseEntry extends LogEntryContainer {
- private String className;
-
- public CaseEntry(LogEntryContainer parent, Attributes attributes) {
- this(parent, attributes.getValue("name"), attributes.getValue("class"));
- }
-
- public CaseEntry(LogEntryContainer parent, String name, String className) {
- super(parent, name);
- this.className = (className != null) ? className : "unknown";
- }
-
- public void accept(ILogEntryVisitor visitor) {
- visitor.visitCaseEntry(this);
- }
-
- /**
- * Returns the class name of the test case.
- */
- public String getClassName() {
- return className;
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/DelimitedValuesWriter.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/DelimitedValuesWriter.java
deleted file mode 100644
index 95be9e392..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/DelimitedValuesWriter.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui.logformatter;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.io.PrintStream;
-
-public class DelimitedValuesWriter {
- private static final String BEGIN_QUOTE = "\"";
- private static final String END_QUOTE = "\"";
- private PrintStream ps;
- private String delimiter;
- private boolean quoted;
- private boolean firstField;
-
- public DelimitedValuesWriter(PrintStream ps, String delimiter, boolean quoted) {
- this.ps = ps;
- this.delimiter = delimiter;
- this.quoted = quoted;
- this.firstField = true;
- }
-
- public void printField(String field) {
- if (firstField) {
- firstField = false;
- } else {
- ps.print(delimiter);
- }
- if (quoted) ps.print(BEGIN_QUOTE);
- ps.print(field);
- if (quoted) ps.print(END_QUOTE);
- }
- public void printFields(String[] fields) {
- for (int i = 0; i < fields.length; i++) {
- printField(fields[i]);
- }
- }
- public void printRecord(String[] fields) {
- printFields(fields);
- endRecord();
- }
- public void endRecord() {
- ps.println();
- firstField = true;
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/GroupEntry.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/GroupEntry.java
deleted file mode 100644
index 20c15f3b5..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/GroupEntry.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui.logformatter;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.xml.sax.Attributes;
-
-public class GroupEntry extends LogEntryContainer {
- public GroupEntry(LogEntryContainer parent, Attributes attributes) {
- this(parent, attributes.getValue("name"));
- }
-
- public GroupEntry(LogEntryContainer parent, String name) {
- super(parent, name);
- }
-
- public void accept(ILogEntryVisitor visitor) {
- visitor.visitGroupEntry(this);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/ILogEntryVisitor.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/ILogEntryVisitor.java
deleted file mode 100644
index 884f86206..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/ILogEntryVisitor.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui.logformatter;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-public interface ILogEntryVisitor {
- public void visitRootEntry(RootEntry entry);
- public void visitCaseEntry(CaseEntry entry);
- public void visitGroupEntry(GroupEntry entry);
- public void visitTaskEntry(TaskEntry entry);
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/LogEntry.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/LogEntry.java
deleted file mode 100644
index e3300a2d8..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/LogEntry.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui.logformatter;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-
-import junit.framework.Assert;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.DefaultHandler;
-import org.xml.sax.helpers.XMLReaderFactory;
-
-public abstract class LogEntry {
- LogEntryContainer parent;
- String name;
-
- /**
- * Creates a new log entry with the specified parent.
- * @param parent the parent container
- * @param name the name of the entry
- */
- public LogEntry(LogEntryContainer parent, String name) {
- this.parent = parent;
- this.name = name != null ? name : "unknown";
- if (parent != null) parent.addEntry(this);
- }
-
- /**
- * Accepts a visitor.
- * @param visitor the visitor
- */
- public abstract void accept(ILogEntryVisitor visitor);
-
- /**
- * Returns the name of this entry.
- */
- public String getName() {
- return name;
- }
-
- /**
- * Returns the parent container of this entry, or null if none.
- */
- public LogEntryContainer getParent() {
- return parent;
- }
-
- /**
- * Reads an array of log entries from a file.
- * @return the log entries
- */
- public static RootEntry readLog(File file) throws IOException, SAXException {
- XMLReader reader = XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");
- LogContentHandler contentHandler = new LogContentHandler();
- reader.setContentHandler(contentHandler);
- reader.parse(new InputSource(new FileInputStream(file)));
- return contentHandler.getLogEntries();
- }
-
- private static class LogContentHandler extends DefaultHandler implements ContentHandler {
- private RootEntry root = null;
- private LogEntry current = null;
-
- public RootEntry getLogEntries() {
- return root;
- }
- public void startElement(String uri, String localName, String qName, Attributes attributes)
- throws SAXException {
- if ("log".equals(localName)) {
- Assert.assertNull(current);
- current = root = new RootEntry(null, attributes);
- } else if ("case".equals(localName)) {
- Assert.assertNotNull(current);
- Assert.assertTrue(current instanceof RootEntry);
- current = new CaseEntry((LogEntryContainer) current, attributes);
- } else if ("group".equals(localName)) {
- Assert.assertNotNull(current);
- Assert.assertTrue(current instanceof CaseEntry || current instanceof GroupEntry);
- current = new GroupEntry((LogEntryContainer) current, attributes);
- } else if ("task".equals(localName)) {
- Assert.assertNotNull(current);
- Assert.assertTrue(current instanceof CaseEntry || current instanceof GroupEntry);
- current = new TaskEntry((LogEntryContainer) current, attributes);
- } else if ("result".equals(localName)) {
- Assert.assertNotNull(current);
- Assert.assertTrue(current instanceof TaskEntry);
- ((TaskEntry) current).addResult(new Result(attributes));
- } else if ("abort".equals(localName)) {
- // currently we ignore failure entries
- // XXX need a good way to represent failures
- } else if ("trace".equals(localName)) {
- // currently we ignore stack frames associated with failure entries
- } else if ("status".equals(localName)) {
- // currently we ignore status associated with failure entries
- } else {
- throw new SAXException("Unrecognized element: " + localName);
- }
- }
- public void endElement(String uri, String localName, String qName)
- throws SAXException {
- Assert.assertNotNull(current);
- if ("result".equals(localName) || "abort".equals(localName) ||
- "trace".equals(localName) || "status".equals(localName)) {
- // nothing to do
- } else {
- current = current.getParent();
- }
- }
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/LogEntryContainer.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/LogEntryContainer.java
deleted file mode 100644
index 71c6eb471..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/LogEntryContainer.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui.logformatter;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-public abstract class LogEntryContainer extends LogEntry {
- private List /* of LogEntry */ list = new ArrayList();
-
- public LogEntryContainer(LogEntryContainer parent, String name) {
- super(parent, name);
- }
-
- /**
- * Accepts a visitor for each child in the order in which they are listed.
- * @param visitor the visitor
- */
- public void acceptChildren(ILogEntryVisitor visitor) {
- Iterator it = list.iterator();
- while (it.hasNext()) {
- LogEntry entry = (LogEntry) it.next();
- entry.accept(visitor);
- }
- }
-
- /**
- * Returns the list of children in this container.
- */
- public LogEntry[] members() {
- return (LogEntry[]) list.toArray(new LogEntry[list.size()]);
- }
-
- /**
- * Returns the member with the specified name and class.
- */
- public LogEntry findMember(String name, Class clazz) {
- Iterator it = list.iterator();
- while (it.hasNext()) {
- LogEntry entry = (LogEntry) it.next();
- if (name.equals(entry.getName()) &&
- clazz.isAssignableFrom(entry.getClass())) return entry;
- }
- return null;
- }
-
- /*
- * Adds the specified entry to the end of the list.
- */
- void addEntry(LogEntry entry) {
- list.add(entry);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/LogFormatterUIMain.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/LogFormatterUIMain.java
deleted file mode 100644
index 14e6b3a61..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/LogFormatterUIMain.java
+++ /dev/null
@@ -1,182 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui.logformatter;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FillLayout;
-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.Display;
-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.Shell;
-import org.eclipse.swt.widgets.TabFolder;
-import org.eclipse.swt.widgets.TabItem;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * Quick and dirty UI frontend for the log formatters.
- */
-public class LogFormatterUIMain {
-
- public LogFormatterUIMain() {
- }
-
- public static void main(String[] args) {
- new LogFormatterUIMain().run();
- }
-
- public void run() {
- Display display = new Display();
- Shell shell = new Shell(display);
-
- shell.setText("Log Formatter UI");
- createContents(shell);
-
- shell.setSize(500, 300);
- shell.open();
- while (! shell.isDisposed()) {
- if (! display.readAndDispatch()) display.sleep();
- }
- shell.dispose();
- display.dispose();
- }
-
- protected void createContents(Composite parent) {
- parent.setLayout(new FillLayout());
- TabFolder tabFolder = new TabFolder(parent, SWT.NONE);
- createSummaryTabContents(new TabItem(tabFolder, SWT.NONE));
- createDiffTabContents(new TabItem(tabFolder, SWT.NONE));
- }
-
- protected void createSummaryTabContents(TabItem item) {
- Composite top = new Composite(item.getParent(), SWT.NONE);
- item.setControl(top);
- item.setText("Create Log Summary");
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- top.setLayout(layout);
-
- final Text logFileText = createFileSelector(top, "Log file path: ");
- final Text outputFileText = createFileSelector(top, "Output file path: ");
-
- final Button csvCheckButton = new Button(top, SWT.CHECK);
- csvCheckButton.setText("Produce comma separated values data");
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_CENTER);
- data.horizontalSpan = 3;
- csvCheckButton.setLayoutData(data);
-
- final Button rawCheckButton = new Button(top, SWT.CHECK);
- rawCheckButton.setText("Do not merge results from successive iterations");
- data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_CENTER);
- data.horizontalSpan = 3;
- rawCheckButton.setLayoutData(data);
-
- createRunButton(top, new Runnable() {
- public void run() {
- PrintSummaryMain.main(new String[] {
- logFileText.getText(),
- "-out", outputFileText.getText(),
- csvCheckButton.getSelection() ? "-csv" : null,
- rawCheckButton.getSelection() ? "-raw" : null });
- }
- });
- }
-
- protected void createDiffTabContents(TabItem item) {
- Composite top = new Composite(item.getParent(), SWT.NONE);
- item.setControl(top);
- item.setText("Create Log Diff");
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- top.setLayout(layout);
-
- final Text newerLogFileText = createFileSelector(top, "Newer log file path: ");
- final Text olderLogFileText = createFileSelector(top, "Older log file path: ");
- final Text outputFileText = createFileSelector(top, "Output file path: ");
-
- Label label = new Label(top, SWT.NONE);
- label.setText("Threshold %");
- label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_CENTER));
-
- final Text thresholdText = new Text(top, SWT.BORDER);
- thresholdText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_CENTER));
- thresholdText.setText("0");
-
- new Label(top, SWT.NONE);
-
- final Button csvCheckButton = new Button(top, SWT.CHECK);
- csvCheckButton.setText("Produce comma separated values data");
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_CENTER);
- data.horizontalSpan = 3;
- csvCheckButton.setLayoutData(data);
-
- final Button ignoreCheckButton = new Button(top, SWT.CHECK);
- ignoreCheckButton.setText("Ignore negligible changes in results");
- data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_CENTER);
- data.horizontalSpan = 3;
- ignoreCheckButton.setLayoutData(data);
-
- createRunButton(top, new Runnable() {
- public void run() {
- PrintDiffMain.main(new String[] {
- newerLogFileText.getText(),
- olderLogFileText.getText(),
- "-out", outputFileText.getText(),
- "-t", thresholdText.getText(),
- csvCheckButton.getSelection() ? "-csv" : null,
- ignoreCheckButton.getSelection() ? "-i" : null });
- }
- });
- }
-
- protected Text createFileSelector(Composite parent, String labelText) {
- Label label = new Label(parent, SWT.NONE);
- label.setText(labelText);
- label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_CENTER));
-
- final Text text = new Text(parent, SWT.BORDER);
- text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_CENTER));
-
- Button browseButton = new Button(parent, SWT.PUSH);
- browseButton.setText("Browse...");
- browseButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- FileDialog dialog = new FileDialog(text.getShell(), SWT.OPEN);
- dialog.setFileName(text.getText());
- String name = dialog.open();
- if (name != null) {
- text.setText(name);
- }
- }
- });
- browseButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- return text;
- }
-
- protected Button createRunButton(Composite parent, final Runnable runnable) {
- Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_END | GridData.GRAB_VERTICAL);
- data.horizontalSpan = 3;
- separator.setLayoutData(data);
-
- final Button runButton = new Button(parent, SWT.PUSH);
- runButton.setText("Run");
- data = new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.VERTICAL_ALIGN_FILL);
- data.horizontalSpan = 3;
- runButton.setLayoutData(data);
- runButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- runButton.getDisplay().asyncExec(runnable);
- }
- });
- return runButton;
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/MergeRunsVisitor.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/MergeRunsVisitor.java
deleted file mode 100644
index 86e12e994..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/MergeRunsVisitor.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui.logformatter;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-public class MergeRunsVisitor implements ILogEntryVisitor {
- private RootEntry defaultRoot;
- private RootEntry root;
- private LogEntryContainer parent;
-
- /**
- * Creates a new visitor to merge series of log entries.
- * @param root the root of an existing log to merge into, or null
- */
- public MergeRunsVisitor(RootEntry root) {
- this.defaultRoot = defaultRoot;
- this.parent = null;
- }
-
- /**
- * Returns the root of the newly merged log, or null if none.
- */
- public RootEntry getMergedRoot() {
- return root;
- }
-
- public void visitRootEntry(RootEntry entry) {
- root = defaultRoot;
- if (root == null) {
- root = new RootEntry(null, entry.getName(), entry.getSDKBuildId(), entry.getTimestamp());
- }
- parent = root;
- entry.acceptChildren(this);
- }
-
- public void visitCaseEntry(CaseEntry entry) {
- LogEntryContainer oldParent = parent;
- CaseEntry newEntry = (CaseEntry) parent.findMember(entry.getName(), CaseEntry.class);
- if (newEntry == null) {
- newEntry = new CaseEntry(parent, entry.getName(), entry.getClassName());
- }
- parent = newEntry;
- entry.acceptChildren(this);
- parent = oldParent;
- }
-
- public void visitGroupEntry(GroupEntry entry) {
- LogEntryContainer oldParent = parent;
- GroupEntry newEntry = (GroupEntry) parent.findMember(entry.getName(), GroupEntry.class);
- if (newEntry == null) {
- newEntry = new GroupEntry(parent, entry.getName());
- }
- parent = newEntry;
- entry.acceptChildren(this);
- parent = oldParent;
- }
-
- public void visitTaskEntry(TaskEntry entry) {
- TaskEntry newEntry = (TaskEntry) parent.findMember(entry.getName(), TaskEntry.class);
- if (newEntry == null) {
- newEntry = new TaskEntry(parent, entry.getName());
- }
- Result[] results = entry.getResults();
- for (int i = 0; i < results.length; i++) {
- newEntry.addResult(results[i]);
- }
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintCSVDiffVisitor.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintCSVDiffVisitor.java
deleted file mode 100644
index 5f1a47f5a..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintCSVDiffVisitor.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui.logformatter;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-public class PrintCSVDiffVisitor extends PrintDiffVisitor {
- private static final String GROUP_DELIMITER = " / ";
- private DelimitedValuesWriter writer;
- private String caseName;
- private String groupName;
-
- /**
- * Creates a diff visitor that generates CSV output.
- *
- * @param writer the delimited values writer
- * @see PrintDiffVisitor
- */
- public PrintCSVDiffVisitor(DelimitedValuesWriter writer, RootEntry olderRoot, int threshold, boolean ignoreNegligible) {
- super(olderRoot, threshold, ignoreNegligible);
- this.writer = writer;
- }
-
- protected void visitRootEntry(RootEntry entry, RootEntry olderEntry) {
- entry.acceptChildren(this);
- }
-
- protected void visitCaseEntry(CaseEntry entry, CaseEntry olderEntry) {
- caseName = entry.getName();
- groupName = null;
- entry.acceptChildren(this);
- }
-
- protected void visitGroupEntry(GroupEntry entry, GroupEntry olderEntry) {
- String oldGroupName = groupName;
- if (groupName == null) {
- groupName = entry.getName();
- } else {
- groupName += GROUP_DELIMITER + entry.getName();
- }
- entry.acceptChildren(this);
- groupName = oldGroupName;
- }
-
- protected void visitTaskEntry(TaskEntry entry, TaskEntry olderEntry) {
- writer.printFields(new String[] {
- caseName, // case
- groupName, // group
- entry.getName() // task
- });
- printTaskEntry(entry);
- printTaskEntry(olderEntry);
- if (entry.getTotalRuns() != 0 && olderEntry.getTotalRuns() != 0) {
- int olderMean = olderEntry.getAverageMillis();
- int diff = entry.getAverageMillis() - olderMean;
- if (isDifferenceUncertain(entry, olderEntry)) {
- writer.printField("UNCERTAIN");
- } else if (isDifferenceNegligible(entry, olderEntry)) {
- writer.printField("NEGLIGIBLE");
- } else {
- writer.printField(diff > 0 ? "SLOWER" : "FASTER"); // change type
- }
- writer.printField(Integer.toString(Math.abs(diff))); // change
- if (olderMean != 0) {
- writer.printField(Util.formatPercentageRatio(Math.abs(diff), olderMean)); // % change
- } else {
- writer.printField("");
- }
- } else {
- writer.printFields(new String[] { "", "", "" });
- }
- writer.endRecord();
- }
-
- protected void printTaskEntry(TaskEntry entry) {
- if (entry.getTotalRuns() != 0) {
- int mean = entry.getAverageMillis();
- writer.printFields(new String[] {
- Integer.toString(entry.getTotalRuns()), // runs
- Integer.toString(mean) // average
- });
- if (entry.getTotalRuns() > 1 && mean != 0) {
- int confidence = entry.getConfidenceInterval();
- writer.printFields(new String[] {
- Integer.toString(confidence), // 95% confidence interval
- Util.formatPercentageRatio(confidence, mean) // 95% c.i. as a percentage
- });
- } else {
- writer.printFields(new String[] { "", "" });
- }
- } else {
- writer.printFields(new String[] { "0", "", "", "" });
- }
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintCSVSummaryVisitor.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintCSVSummaryVisitor.java
deleted file mode 100644
index 2ebf7cd7c..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintCSVSummaryVisitor.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui.logformatter;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-public class PrintCSVSummaryVisitor implements ILogEntryVisitor {
- private static final String GROUP_DELIMITER = " / ";
- private DelimitedValuesWriter writer;
- private String caseName;
- private String groupName;
-
- /**
- * Creates a visitor to print a log as comma-separated values.
- * @param writer the delimited values writer
- */
- public PrintCSVSummaryVisitor(DelimitedValuesWriter writer) {
- this.writer = writer;
- }
-
- public void visitRootEntry(RootEntry entry) {
- entry.acceptChildren(this);
- }
-
- public void visitCaseEntry(CaseEntry entry) {
- caseName = entry.getName();
- groupName = null;
- entry.acceptChildren(this);
- }
-
- public void visitGroupEntry(GroupEntry entry) {
- String oldGroupName = groupName;
- if (groupName == null) {
- groupName = entry.getName();
- } else {
- groupName += GROUP_DELIMITER + entry.getName();
- }
- entry.acceptChildren(this);
- groupName = oldGroupName;
- }
-
- public void visitTaskEntry(TaskEntry entry) {
- writer.printFields(new String[] {
- caseName, // case
- groupName, // group
- entry.getName() // task
- });
- if (entry.getTotalRuns() != 0) {
- int mean = entry.getAverageMillis();
- writer.printFields(new String[] {
- Integer.toString(entry.getTotalRuns()), // runs
- Integer.toString(mean) // average
- });
- if (entry.getTotalRuns() > 1 && mean != 0) {
- int confidence = entry.getConfidenceInterval();
- writer.printFields(new String[] {
- Integer.toString(confidence), // 95% confidence interval
- Util.formatPercentageRatio(confidence, mean) // 95% c.i. as a percentage
- });
- } else {
- writer.printFields(new String[] { "", "" });
- }
- } else {
- writer.printFields(new String[] { "0", "", "", "" });
- }
- // append the result fields (ms)
- Result[] results = entry.getResults();
- for (int i = 0; i < results.length; i++) {
- Result result = results[i];
- if (result.getRuns() == 0) continue;
- writer.printField(Integer.toString(result.getMillis() / result.getRuns()));
- }
- writer.endRecord();
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintDiffMain.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintDiffMain.java
deleted file mode 100644
index 7a82f7a81..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintDiffMain.java
+++ /dev/null
@@ -1,148 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui.logformatter;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintStream;
-
-import org.xml.sax.SAXException;
-
-public class PrintDiffMain {
- public static void main(String[] args) {
- Parser parser = new Parser();
- if (! parser.parse(args)) {
- System.err.println("Usage: <newer log> <older log> [-out <file>] [-csv] [-t <thresh>] [-i]");
- System.err.println(" -out <file> : specify the output file, default is console");
- System.err.println(" -csv : produce comma separated values data");
- System.err.println(" -t <thresh> : minimum non-negligible absolute % change");
- System.err.println(" -i : ignore negligible changes in results");
- return;
- }
- try {
- PrintStream ps = System.out;
- try {
- if (parser.outputFile != null) ps = new PrintStream(new BufferedOutputStream(new FileOutputStream(parser.outputFile)));
- printDiff(ps, parser.newerLogFile, parser.olderLogFile, parser.csv, parser.thresh, parser.ignore);
- } finally {
- if (ps != System.out) ps.close();
- }
- } catch (Exception e) {
- System.err.println("An error occurred:");
- e.printStackTrace();
- return;
- }
- }
-
- private static void printDiff(PrintStream ps, File newerLogFile, File olderLogFile,
- boolean csv, int thresh, boolean ignore) throws IOException, SAXException {
- // read and merge newer log
- RootEntry newerRoot = LogEntry.readLog(newerLogFile);
- MergeRunsVisitor mergeVisitor = new MergeRunsVisitor(null);
- newerRoot.accept(mergeVisitor);
- newerRoot = mergeVisitor.getMergedRoot();
-
- // read and merge older log
- RootEntry olderRoot = LogEntry.readLog(olderLogFile);
- olderRoot.accept(mergeVisitor);
- olderRoot = mergeVisitor.getMergedRoot();
-
- // format options
- StringBuffer options = new StringBuffer();
- if (thresh != 0) {
- options.append("-t ");
- options.append(Integer.toString(thresh));
- options.append(" ");
- }
- if (ignore) options.append("-i ");
-
- // format log file
- if (csv) {
- DelimitedValuesWriter writer = new DelimitedValuesWriter(ps, ",", true /*quoted*/);
- // print header
- writer.printRecord(new String[] { "", "Newer", "Older" });
- writer.printRecord(new String[] { "Log File", newerLogFile.toString(), olderLogFile.toString() });
- writer.printRecord(new String[] { "Generated", newerRoot.getTimestamp(), olderRoot.getTimestamp() });
- writer.printRecord(new String[] { "SDK Build", newerRoot.getSDKBuildId(), olderRoot.getSDKBuildId() });
- writer.endRecord();
- writer.printRecord(new String[] { "Options", "'" + options.toString() });
- writer.endRecord();
- writer.printRecord(new String[] { "", "", "",
- "Newer", "", "", "",
- "Older", "", "", "",
- "", "", "" });
- writer.printRecord(new String[] { "Case", "Group", "Task",
- "Runs", "Avg. (ms)", "95% C.I. (ms)", "95% C.I. (%)",
- "Runs", "Avg. (ms)", "95% C.I. (ms)", "95% C.I. (%)",
- "Change", "Diff (ms)", "Diff (%)" });
- // print quoted CSV data
- PrintCSVDiffVisitor diffVisitor = new PrintCSVDiffVisitor(writer, olderRoot, thresh, ignore);
- newerRoot.accept(diffVisitor);
- } else {
- // print header
- ps.println("=== LOG DIFF ===");
- ps.println("Newer File: " + newerLogFile);
- ps.println(" Generated: " + newerRoot.getTimestamp());
- ps.println(" SDK Build: " + newerRoot.getSDKBuildId());
- ps.println("Older File: " + olderLogFile);
- ps.println(" Generated: " + olderRoot.getTimestamp());
- ps.println(" SDK Build: " + olderRoot.getSDKBuildId());
- ps.println("Options: " + options.toString());
- ps.println();
- // compute and print the differences
- PrintTextDiffVisitor diffVisitor = new PrintTextDiffVisitor(ps, olderRoot, thresh, ignore);
- newerRoot.accept(diffVisitor);
- }
- }
-
- private static class Parser extends ArgumentParser {
- public File newerLogFile = null;
- public File olderLogFile = null;
- public File outputFile = null;
- public boolean csv = false;
- public int thresh = 0;
- public boolean ignore = false;
-
- protected boolean handleFinished() {
- return newerLogFile != null && olderLogFile != null;
- }
- protected boolean handleArgument(int index, String arg) {
- if (index == 0) {
- newerLogFile = new File(arg);
- } else if (index == 1) {
- olderLogFile = new File(arg);
- } else {
- return false;
- }
- return true;
- }
- protected boolean handleOption(String option, String arg) {
- if ("-out".equals(option)) {
- if (arg == null) return false;
- outputFile = new File(arg);
- } else if ("-csv".equals(option)) {
- if (arg != null) return false;
- csv = true;
- } else if ("-t".equals(option)) {
- if (arg == null) return false;
- try {
- thresh = Integer.parseInt(arg, 10);
- } catch (NumberFormatException e) {
- return false;
- }
- if (thresh < 0) return false;
- } else if ("-i".equals(option)) {
- if (arg != null) return false;
- ignore = true;
- } else {
- return false;
- }
- return true;
- }
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintDiffVisitor.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintDiffVisitor.java
deleted file mode 100644
index a75150735..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintDiffVisitor.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui.logformatter;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-public abstract class PrintDiffVisitor implements ILogEntryVisitor {
- protected RootEntry olderRoot;
- protected int threshold; // threshold for negligible changes
- protected boolean ignoreNegligible; // if true, ignores negligible changes
- protected LogEntryContainer olderParent; // corresponding parent in older root
-
- /**
- * Creates a visitor to print a summary of the changes between a log
- * and an older one. Optionally ignores differences within a certain threshold.
- * Does not print older entries for which there are no corresponding newer ones.
- *
- * @param olderRoot the root of the older log
- * @param threshold the minimum non-negligible % change
- * @param ignoreNegligible if true, does not display negligible changes
- */
- public PrintDiffVisitor(RootEntry olderRoot, int threshold, boolean ignoreNegligible) {
- this.olderRoot = olderRoot;
- this.olderParent = null;
- this.threshold = threshold;
- this.ignoreNegligible = ignoreNegligible;
- }
-
- protected abstract void visitRootEntry(RootEntry entry, RootEntry olderEntry);
- protected abstract void visitCaseEntry(CaseEntry entry, CaseEntry olderEntry);
- protected abstract void visitGroupEntry(GroupEntry entry, GroupEntry olderEntry);
- protected abstract void visitTaskEntry(TaskEntry entry, TaskEntry olderEntry);
-
- public void visitRootEntry(RootEntry entry) {
- olderParent = olderRoot;
- visitRootEntry(entry, olderRoot);
- }
-
- public void visitCaseEntry(CaseEntry entry) {
- LogEntryContainer prevOlderParent = olderParent;
- if (olderParent != null) {
- olderParent = (LogEntryContainer) olderParent.findMember(entry.getName(), CaseEntry.class);
- }
- visitCaseEntry(entry, (CaseEntry) olderParent);
- olderParent = prevOlderParent;
- }
-
- public void visitGroupEntry(GroupEntry entry) {
- LogEntryContainer prevOlderParent = olderParent;
- if (olderParent != null) {
- olderParent = (LogEntryContainer) olderParent.findMember(entry.getName(), GroupEntry.class);
- }
- visitGroupEntry(entry, (GroupEntry) olderParent);
- olderParent = prevOlderParent;
- }
-
- public void visitTaskEntry(TaskEntry entry) {
- TaskEntry olderEntry = null;
- if (olderParent != null) {
- olderEntry = (TaskEntry) olderParent.findMember(entry.getName(), TaskEntry.class);
- }
- if (ignoreNegligible && isDifferenceNegligible(entry, olderEntry)) return;
- visitTaskEntry(entry, olderEntry);
- }
-
- protected boolean isDifferenceNegligible(TaskEntry newerEntry, TaskEntry olderEntry) {
- if (newerEntry.getTotalRuns() == 0 || olderEntry.getTotalRuns() == 0) return false;
- int olderMean = olderEntry.getAverageMillis();
- if (olderMean == 0) return false;
- int newerMean = newerEntry.getAverageMillis();
- int diff = Math.abs(newerMean - olderMean);
- return diff * 100 / olderMean < threshold;
- }
-
- protected boolean isDifferenceUncertain(TaskEntry newerEntry, TaskEntry olderEntry) {
- if (newerEntry.getTotalRuns() == 0 || olderEntry.getTotalRuns() == 0) return false;
- int olderMean = olderEntry.getAverageMillis();
- int newerMean = newerEntry.getAverageMillis();
- int diff = Math.abs(newerMean - olderMean);
- int diffCI = newerEntry.getConfidenceInterval() + olderEntry.getConfidenceInterval();
- return diff < diffCI;
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintSummaryMain.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintSummaryMain.java
deleted file mode 100644
index 91e1acfa3..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintSummaryMain.java
+++ /dev/null
@@ -1,116 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui.logformatter;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintStream;
-
-import org.xml.sax.SAXException;
-
-public class PrintSummaryMain {
- public static void main(String[] args) {
- Parser parser = new Parser();
- if (! parser.parse(args)) {
- System.err.println("Usage: <log file> [-out <file>] [-csv] [-raw]");
- System.err.println(" -out <file> : specify the output file, default is console");
- System.err.println(" -csv : produce comma separated values data");
- System.err.println(" -raw : do not merge results from successive iterations");
- return;
- }
- try {
- PrintStream ps = System.out;
- try {
- if (parser.outputFile != null) ps = new PrintStream(new BufferedOutputStream(new FileOutputStream(parser.outputFile)));
- printLog(ps, parser.logFile, parser.csv, parser.raw);
- } finally {
- if (ps != System.out) ps.close();
- }
- } catch (Exception e) {
- System.err.println("An error occurred:");
- e.printStackTrace();
- return;
- }
- }
-
- private static void printLog(PrintStream ps, File logFile, boolean csv, boolean raw)
- throws IOException, SAXException {
- // read and merge the log
- RootEntry root = LogEntry.readLog(logFile);
- if (! raw) {
- MergeRunsVisitor mergeVisitor = new MergeRunsVisitor(null);
- root.accept(mergeVisitor);
- root = mergeVisitor.getMergedRoot();
- }
-
- // format options
- StringBuffer options = new StringBuffer();
- if (raw) options.append("-raw ");
-
- // format log file
- if (csv) {
- DelimitedValuesWriter writer = new DelimitedValuesWriter(ps, ",", true /*quoted*/);
- // print header
- writer.printRecord(new String[] { "Log File", logFile.toString() });
- writer.printRecord(new String[] { "Generated", root.getTimestamp() });
- writer.printRecord(new String[] { "SDK Build", root.getSDKBuildId() });
- writer.endRecord();
- writer.printRecord(new String[] { "Options", "'" + options.toString() });
- writer.endRecord();
- writer.printRecord(new String[] { "Case", "Group", "Task",
- "Runs", "Avg. (ms)", "95% C.I. (ms)", "95% C.I. (%)", "Results (ms)" });
- // print quoted CSV data
- PrintCSVSummaryVisitor visitor = new PrintCSVSummaryVisitor(writer);
- root.accept(visitor);
- } else {
- // print header
- ps.println("=== LOG SUMMARY ===");
- ps.println("File: " + logFile);
- ps.println(" Generated: " + root.getTimestamp());
- ps.println(" SDK Build: " + root.getSDKBuildId());
- ps.println("Options: " + options.toString());
- ps.println();
- // print the log summary
- root.accept(new PrintTextSummaryVisitor(ps));
- }
- }
-
- private static class Parser extends ArgumentParser {
- public File logFile = null;
- public File outputFile = null;
- public boolean csv = false;
- public boolean raw = false;
-
- protected boolean handleFinished() {
- return logFile != null;
- }
- protected boolean handleArgument(int index, String arg) {
- if (index == 0) {
- logFile = new File(arg);
- } else {
- return false;
- }
- return true;
- }
- protected boolean handleOption(String option, String arg) {
- if ("-out".equals(option)) {
- if (arg == null) return false;
- outputFile = new File(arg);
- } else if ("-csv".equals(option)) {
- if (arg != null) return false;
- csv = true;
- } else if ("-raw".equals(option)) {
- if (arg != null) return false;
- raw = true;
- } else {
- return false;
- }
- return true;
- }
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintTextDiffVisitor.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintTextDiffVisitor.java
deleted file mode 100644
index e88c65dd0..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintTextDiffVisitor.java
+++ /dev/null
@@ -1,141 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui.logformatter;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.io.PrintStream;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-public class PrintTextDiffVisitor extends PrintDiffVisitor {
- private PrintStream os;
- private List diffText; // list of things to print
- private String indent;
-
- /**
- * Creates a diff visitor that generates text output.
- *
- * @param os the output stream
- * @see PrintDiffVisitor
- */
- public PrintTextDiffVisitor(PrintStream os, RootEntry olderRoot, int threshold, boolean ignoreNegligible) {
- super(olderRoot, threshold, ignoreNegligible);
- this.os = os;
- this.diffText = null;
- this.indent = "";
- }
-
- protected void visitRootEntry(RootEntry entry, RootEntry olderEntry) {
- entry.acceptChildren(this);
- }
-
- protected void visitCaseEntry(CaseEntry entry, CaseEntry olderEntry) {
- String oldIndent = indent;
- indent += " ";
- StringBuffer line = new StringBuffer(indent);
- line.append("%%% ");
- line.append(entry.getName());
- line.append(", class=");
- line.append(entry.getClassName());
- line.append(':');
- os.println(line);
- diffText = null;
- entry.acceptChildren(this);
- if (diffText != null) {
- Iterator it = diffText.iterator();
- while (it.hasNext()) os.println((String) it.next());
- }
- diffText = null;
- os.println();
- indent = oldIndent;
- }
-
- protected void visitGroupEntry(GroupEntry entry, GroupEntry olderEntry) {
- String oldIndent = indent;
- List oldDiffText = diffText;
- indent += " ";
- diffText = null;
- entry.acceptChildren(this);
- indent = oldIndent;
- if (diffText != null) {
- StringBuffer line = new StringBuffer(indent);
- line.append("+ ");
- line.append(entry.getName());
- line.append(':');
- diffText.add(0, line.toString());
- if (oldDiffText != null) diffText.addAll(0, oldDiffText);
- } else {
- diffText = oldDiffText;
- }
- }
-
- protected void visitTaskEntry(TaskEntry entry, TaskEntry olderEntry) {
- // print task description
- if (diffText == null) diffText = new LinkedList(); // using a list for speedy prepending
- StringBuffer line = new StringBuffer(indent);
- line.append("- ");
- line.append(entry.getName());
- line.append(": ");
- diffText.add(line.toString());
-
- // print new entry performance
- printTaskEntry(" newer: ", entry);
-
- // print older entry performance
- if (olderEntry == null) return;
- printTaskEntry(" older: ", olderEntry);
-
- // print difference
- if (entry.getTotalRuns() == 0 || olderEntry.getTotalRuns() == 0) return;
- int olderMean = olderEntry.getAverageMillis();
- int diff = entry.getAverageMillis() - olderMean;
- line = new StringBuffer(indent);
- line.append(" diff : ");
-
- if (isDifferenceUncertain(entry, olderEntry)) {
- line.append("UNCERTAIN");
- } else if (isDifferenceNegligible(entry, olderEntry)) {
- line.append("NEGLIGIBLE");
- } else {
- line.append(diff > 0 ? "SLOWER" : "FASTER");
- line.append(" by ");
- line.append(Integer.toString(Math.abs(diff)));
- line.append(" ms");
- if (olderEntry.getAverageMillis() != 0) {
- line.append(" = ");
- line.append(Util.formatPercentageRatio(Math.abs(diff), olderMean));
- }
- line.append(" avg.");
- }
- diffText.add(line.toString());
- }
-
- protected void printTaskEntry(String prefix, TaskEntry task) {
- StringBuffer line = new StringBuffer(indent);
- line.append(prefix);
- if (task.getTotalRuns() != 0) {
- int averageTime = task.getAverageMillis();
- line.append(Integer.toString(averageTime));
- line.append(" ms");
- if (task.getTotalRuns() > 1) {
- line.append(" avg. over ");
- line.append(Integer.toString(task.getTotalRuns()));
- line.append(" runs");
- if (averageTime != 0) {
- int confidence = task.getConfidenceInterval();
- line.append(" (95% C.I. +/- ");
- line.append(Integer.toString(confidence));
- line.append(" ms = ");
- line.append(Util.formatPercentageRatio(confidence, averageTime));
- line.append(")");
- }
- }
- } else {
- line.append("skipped!");
- }
- diffText.add(line.toString());
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintTextSummaryVisitor.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintTextSummaryVisitor.java
deleted file mode 100644
index 140366165..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/PrintTextSummaryVisitor.java
+++ /dev/null
@@ -1,103 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui.logformatter;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.io.PrintStream;
-
-public class PrintTextSummaryVisitor implements ILogEntryVisitor {
- private PrintStream os;
- private String indent;
- private int totalAverageTime;
-
- /**
- * Creates a visitor to print a summary of all entries contained in a log.
- * @param os the output stream
- */
- public PrintTextSummaryVisitor(PrintStream os) {
- this.os = os;
- this.indent = "";
- this.totalAverageTime = 0;
- }
-
- protected void visitContainer(LogEntryContainer container) {
- int oldTotalAverageTime = totalAverageTime;
- indent += " ";
- container.acceptChildren(this);
- int averageTime = totalAverageTime - oldTotalAverageTime;
- StringBuffer line = new StringBuffer(indent);
- line.append("* total: ");
- line.append(Integer.toString(averageTime));
- line.append(" ms");
- os.println(line);
- indent = indent.substring(2);
- }
-
- /**
- * Prints the root entry information.
- */
- public void visitRootEntry(RootEntry entry) {
- entry.acceptChildren(this);
- }
-
- /**
- * Prints the total average time spent by all subgroups and subtasks.
- */
- public void visitCaseEntry(CaseEntry entry) {
- StringBuffer line = new StringBuffer(indent);
- line.append("%%% ");
- line.append(entry.getName());
- line.append(", class=");
- line.append(entry.getClassName());
- line.append(':');
- os.println(line);
- visitContainer(entry);
- os.println();
- }
-
- /**
- * Prints the total average time spent by all subtasks.
- */
- public void visitGroupEntry(GroupEntry entry) {
- StringBuffer line = new StringBuffer(indent);
- line.append("+ ");
- line.append(entry.getName());
- line.append(':');
- os.println(line);
- visitContainer(entry);
- }
-
- /**
- * Prints the average amount of time spent by a task.
- */
- public void visitTaskEntry(TaskEntry task) {
- StringBuffer line = new StringBuffer(indent);
- line.append("- ");
- line.append(task.getName());
- line.append(": ");
- if (task.getTotalRuns() != 0) {
- int averageTime = task.getAverageMillis();
- totalAverageTime += averageTime;
- line.append(Integer.toString(averageTime));
- line.append(" ms");
- if (task.getTotalRuns() > 1) {
- line.append(" avg. over ");
- line.append(Integer.toString(task.getTotalRuns()));
- line.append(" runs");
- if (averageTime != 0) {
- int confidence = task.getConfidenceInterval();
- line.append(" (95% C.I. +/- ");
- line.append(Integer.toString(confidence));
- line.append(" ms = ");
- line.append(Util.formatPercentageRatio(confidence, averageTime));
- line.append(")");
- }
- }
- } else {
- line.append("skipped!");
- }
- os.println(line);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/Result.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/Result.java
deleted file mode 100644
index af36f54e2..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/Result.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui.logformatter;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.xml.sax.Attributes;
-
-/**
- * Holds the result of one iteration of tests.
- * Note that a test might be run multiple times per iteration, particularly if it
- * is of very short duration to reduce sampling error. This behaviour is not supported
- * at this time, but will likely be of value in the future.
- */
-public class Result {
- private int runs;
- private int millis;
-
- public Result(Attributes attributes) {
- this(1, Integer.parseInt(attributes.getValue("elapsed")));
- }
- public Result(int runs, int millis) {
- this.runs = runs;
- this.millis = millis;
- }
- public int getRuns() {
- return runs;
- }
- public int getMillis() {
- return millis;
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/RootEntry.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/RootEntry.java
deleted file mode 100644
index 914669176..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/RootEntry.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui.logformatter;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.xml.sax.Attributes;
-
-public class RootEntry extends LogEntryContainer {
- private String sdkBuildId;
- private String timestamp;
-
- public RootEntry(LogEntryContainer parent, Attributes attributes) {
- this(parent, attributes.getValue("name"),
- attributes.getValue("sdkbuild"), attributes.getValue("timestamp"));
- }
-
- public RootEntry(LogEntryContainer parent, String name, String sdkBuildId, String timestamp) {
- super(parent, name);
- this.sdkBuildId = (sdkBuildId != null) ? sdkBuildId : "unknown";
- this.timestamp = (timestamp != null) ? timestamp : "unknown";
- }
-
- public void accept(ILogEntryVisitor visitor) {
- visitor.visitRootEntry(this);
- }
-
- /**
- * Returns the SDK Build id.
- */
- public String getSDKBuildId() {
- return sdkBuildId;
- }
-
- /**
- * Returns the class name of the test case.
- */
- public String getTimestamp() {
- return timestamp;
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/TaskEntry.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/TaskEntry.java
deleted file mode 100644
index ac08e64d1..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/TaskEntry.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui.logformatter;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.xml.sax.Attributes;
-
-public class TaskEntry extends LogEntry {
- private List /* of Result */ results = new ArrayList();
-
- public TaskEntry(LogEntryContainer parent, Attributes attributes) {
- this(parent, attributes.getValue("name"));
- }
-
- public TaskEntry(LogEntryContainer parent, String name) {
- super(parent, name);
- }
-
- public void accept(ILogEntryVisitor visitor) {
- visitor.visitTaskEntry(this);
- }
-
- /**
- * Returns the average number of milliseconds elapsed, or -1 if unknown.
- */
- public int getAverageMillis() {
- int totalMillis = 0;
- int totalRuns = 0;
- for (Iterator it = results.iterator(); it.hasNext();) {
- Result result = (Result) it.next();
- totalMillis += result.getMillis();
- totalRuns += result.getRuns();
- }
- if (totalRuns == 0) return -1;
- return totalMillis / totalRuns;
- }
-
- /**
- * Returns the standard deviation of the sample.
- * sqrt((n * sum(X^2) - sum(X)^2) / (n * (n-1)))
- */
- public double getStandardDeviation() {
- double sumOfSquares = 0.0, sum = 0.0;
- int totalRuns = 0;
- for (Iterator it = results.iterator(); it.hasNext();) {
- Result result = (Result) it.next();
- if (result.getRuns() == 0) continue;
- totalRuns += result.getRuns();
- sum += result.getMillis();
- double average = (double)result.getMillis() / result.getRuns();
- sumOfSquares += average * average * result.getRuns();
- }
- if (totalRuns == 0) return 0;
- return Math.sqrt((sumOfSquares * totalRuns - sum * sum) / (totalRuns * (totalRuns - 1)));
- }
-
- /**
- * Returns a 95% confidence interval from the mean represented by getAverageMillis()
- * Uses the formula:
- * 1.960 * stdev() / sqrt(n)
- */
- public int getConfidenceInterval() {
- return (int) (1.960 * getStandardDeviation() / Math.sqrt(getTotalRuns()));
- }
-
- /**
- * Returns the number of times this task was run.
- */
- public int getTotalRuns() {
- int totalRuns = 0;
- for (Iterator it = results.iterator(); it.hasNext();) {
- Result result = (Result) it.next();
- totalRuns += result.getRuns();
- }
- return totalRuns;
- }
-
- /**
- * Returns an array of all Results for this task.
- */
- public Result[] getResults() {
- return (Result[]) results.toArray(new Result[results.size()]);
- }
-
- /**
- * Adds a result.
- * @param result the result
- */
- public void addResult(Result result) {
- results.add(result);
- }
-
-
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/Util.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/Util.java
deleted file mode 100644
index 10d38f8ba..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/logformatter/Util.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.eclipse.team.tests.ccvs.ui.logformatter;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import java.text.DecimalFormat;
-import java.text.NumberFormat;
-
-public class Util {
- private static final NumberFormat percentageFormat = new DecimalFormat("####0.00%");
-
- public static String formatPercentageRatio(int numerator, int denominator) {
- return percentageFormat.format((double)numerator / denominator);
- }
-}
diff --git a/tests/org.eclipse.team.tests.cvs.core/test.xml b/tests/org.eclipse.team.tests.cvs.core/test.xml
deleted file mode 100644
index 8fac11a25..000000000
--- a/tests/org.eclipse.team.tests.cvs.core/test.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="CVS Automated Tests" default="run" basedir=".">
-
- <!-- The property ${eclipse-home} should be passed into this script -->
-
- <!-- sets the properties eclipse-home, and library-file -->
- <property name="eclipse-home" value="${basedir}/../../"/>
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/>
-
- <!-- get the repository.properties which identify the cvs test repository -->
- <property name="team-home" value="${eclipse-home}/plugins/org.eclipse.team.tests.cvs.core_2.0.0"/>
- <property file="${team-home}/repository.properties"/>
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp/>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
- <property name="location" value="${eclipse-home}/cvs_sniff_folder"/>
- <delete dir="${location}" quiet="true"/>
-
- <!-- Session Test ** CVS Provider ** -->
- <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="vmargs" value="-Declipse.cvs.properties=${team-home}/repository.properties"/>
- <property name="data-dir" value="${location}"/>
- <property name="plugin-name" value="org.eclipse.team.tests.cvs.core"/>
- <property name="classname" value="org.eclipse.team.tests.ccvs.core.provider.AllTestsProvider"/>
- </ant>
-
- <!-- Session Test ** CVS Resources ** -->
- <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="vmargs" value="-Declipse.cvs.properties=${team-home}/repository.properties"/>
- <property name="data-dir" value="${location}"/>
- <property name="plugin-name" value="org.eclipse.team.tests.cvs.core"/>
- <property name="classname" value="org.eclipse.team.tests.ccvs.core.cvsresources.AllTestsCVSResource"/>
- </ant>
-
- </target>
-
- <!-- This target holds code to cleanup the testing environment after the tests -->
- <!-- have been run. You can use this to delete temporary files that are created. -->
- <target name="cleanup">
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen after all -->
- <!-- the tests have been run should go here. -->
- <target name="run" depends="init,suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml"/>
- <property name="output-file" value="org.eclipse.team.tests.cvs.xml"/>
- </ant>
- </target>
-
-</project>

Back to the top