diff options
author | Lars Vogel | 2016-04-12 17:48:16 +0000 |
---|---|---|
committer | Lars Vogel | 2016-04-12 17:48:36 +0000 |
commit | 790652f8bd1c247f29872621ca43f5b825104677 (patch) | |
tree | df0dccf866f7453fad56c7a49169fb151fb11509 /bundles/org.eclipse.team.ui/src/org/eclipse/team/ui | |
parent | e3b27690981c05c355fb29a3f213d6028dda3290 (diff) | |
download | eclipse.platform.team-790652f8bd1c247f29872621ca43f5b825104677.tar.gz eclipse.platform.team-790652f8bd1c247f29872621ca43f5b825104677.tar.xz eclipse.platform.team-790652f8bd1c247f29872621ca43f5b825104677.zip |
Bug 491533 - Run remove unnecessary whitespace cleanup onY20160414-1000I20160417-1112
org.eclipse.team.ui
Change-Id: I422dc120f97d04250967609c7d423377ec11bf01
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Diffstat (limited to 'bundles/org.eclipse.team.ui/src/org/eclipse/team/ui')
80 files changed, 1289 insertions, 1289 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizard.java index d435c3a8c..9a341b40e 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizard.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizard.java @@ -18,7 +18,7 @@ import org.eclipse.ui.IWorkbench; /** * IConfigurationWizard defines the interface that users of the extension * point <code>org.eclipse.team.ui.configurationWizards</code> must implement. - * + * * @since 2.0 */ public interface IConfigurationWizard extends IWizard { diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizardExtension.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizardExtension.java index 4a64c5de5..f4cc70d7a 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizardExtension.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizardExtension.java @@ -16,13 +16,13 @@ import org.eclipse.ui.IWorkbench; /** * Extends {@link IConfigurationWizard} to support the sharing of multiple projects. - * The Share Project wizard uses the "adaptable" mechanism (see {@link IAdapterManager} to obtain an + * The Share Project wizard uses the "adaptable" mechanism (see {@link IAdapterManager} to obtain an * <code>IConfigurationWizardExtension</code> for an <code>IConfigurationWizard</code> * class so clients may choose to have their <code>IConfigurationWizard</code> class implement this * interface as well or may choose to use the adaptable mechanism to provide the extension. * <p> * Clients may implement this interface. - * + * * @see IConfigurationWizard * @since 3.4 */ @@ -36,7 +36,7 @@ public interface IConfigurationWizardExtension { * before other methods are called. * </p> * - * @param workbench the current workbench + * @param workbench the current workbench * @param projects the selected projects */ void init(IWorkbench workbench, IProject[] projects); diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISaveableWorkbenchPart.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISaveableWorkbenchPart.java index 9d9e5d235..41410d48c 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISaveableWorkbenchPart.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISaveableWorkbenchPart.java @@ -17,8 +17,8 @@ import org.eclipse.ui.IWorkbenchPart; /** * A saveable workbench part is a visual component that can be shown within - * different contexts (e.g a dialog, workbench page). - * + * different contexts (e.g a dialog, workbench page). + * * @see SaveablePartDialog * @since 3.0 * @deprecated Clients should use a subclass of {@link CompareEditorInput} @@ -26,7 +26,7 @@ import org.eclipse.ui.IWorkbenchPart; */ @Deprecated public interface ISaveableWorkbenchPart extends ISaveablePart, IWorkbenchPart { - + /** * The property id for <code>isDirty</code>. */ diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IScmUrlImportWizardPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IScmUrlImportWizardPage.java index 17a460aaf..c388c8735 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IScmUrlImportWizardPage.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IScmUrlImportWizardPage.java @@ -16,12 +16,12 @@ import org.eclipse.team.core.ScmUrlImportDescription; /** * IScmUrlImportWizardPage defines the interface that users of the extension * point <code>org.eclipse.team.ui.scmUrlImportPages</code> must implement. - * + * * <strong>EXPERIMENTAL</strong>. This class has been added as part of a work in * progress. There is no guarantee that this API will work or that it will * remain the same. Please do not use this API without consulting with the Team * team. - * + * * @since 3.6 */ public interface IScmUrlImportWizardPage extends IWizardPage { @@ -34,7 +34,7 @@ public interface IScmUrlImportWizardPage extends IWizardPage { * Called when the import wizard is closed by selecting the finish button. * Implementers may store the page result (new/changed bundle import * descriptions in getSelection) here. - * + * * @return if the operation was successful. The wizard will only close when * <code>true</code> is returned. */ @@ -44,7 +44,7 @@ public interface IScmUrlImportWizardPage extends IWizardPage { * Return the import descriptions for the page. The descriptions may differ from those initially * set using {@link #setSelection(ScmUrlImportDescription[])} if the user modified the import * configuration. - * + * * @return the SCM URLs descriptions for the page or <code>null</code> if no selection has been * set */ @@ -54,7 +54,7 @@ public interface IScmUrlImportWizardPage extends IWizardPage { * Sets the import descriptions to be edited on the page. The passed * descriptions can be edited and should be returned in * {@link #getSelection()}. - * + * * @param descriptions * the SCM URLs descriptions edited on the page. */ diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java index 5b1d742cc..ed0ad523a 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java @@ -13,9 +13,9 @@ package org.eclipse.team.ui; /** * Images that are available for providers to re-use. They include * common overlays and wizard images. A provider can use their own - * custom images, these shared images are only available for + * custom images, these shared images are only available for * convenience. - * + * * @see TeamImages * @since 2.0 */ diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageCompareEditorInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageCompareEditorInput.java index fa13643b2..0b9ed7274 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageCompareEditorInput.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageCompareEditorInput.java @@ -32,7 +32,7 @@ import org.eclipse.ui.progress.IProgressService; * of feeding compare viewers. * <p> * This class is not intended to be subclassed by clients outside of the Team framework. - * + * * @since 3.3 */ public abstract class PageCompareEditorInput extends CompareEditorInput implements IContentChangeListener { @@ -47,7 +47,7 @@ public abstract class PageCompareEditorInput extends CompareEditorInput implemen protected PageCompareEditorInput(CompareConfiguration configuration) { super(configuration); } - + /* (non-Javadoc) * @see org.eclipse.compare.CompareEditorInput#createStructureInputPane(org.eclipse.swt.widgets.Composite) */ @@ -93,7 +93,7 @@ public abstract class PageCompareEditorInput extends CompareEditorInput implemen StructuredSelection newSelection = convertSelection(selection, true); super.doubleClick(new DoubleClickEvent((Viewer)event.getSource(), newSelection)); } - + @Override public void setInput(Object input) { super.setInput(input); @@ -111,16 +111,16 @@ public abstract class PageCompareEditorInput extends CompareEditorInput implemen hookupListeners(); return pagePane; } - + /** - * Create the page for this part and return the top level control + * Create the page for this part and return the top level control * for the page. * @param parent the parent composite * @param toolBarManager the toolbar manager for the page * @return the top-level control for the page */ protected abstract IPage createPage(CompareViewerPane parent, IToolBarManager toolBarManager); - + /** * Return the selection provider for the page. This method is * called after the page is created in order to register a @@ -128,7 +128,7 @@ public abstract class PageCompareEditorInput extends CompareEditorInput implemen * @return the selection provider for the page */ protected abstract ISelectionProvider getSelectionProvider(); - + /** * Set the title of the page's page to the given text. The title * will appear in the header of the pane containing the page. @@ -137,7 +137,7 @@ public abstract class PageCompareEditorInput extends CompareEditorInput implemen protected void setPageDescription(String title) { pagePane.setText(title); } - + /* (non-Javadoc) * @see org.eclipse.compare.CompareEditorInput#handleDispose() */ @@ -147,7 +147,7 @@ public abstract class PageCompareEditorInput extends CompareEditorInput implemen cleanupListeners(); unhookContentChangeListener(); } - + private void hookupListeners() { ISelectionProvider selectionProvider = getSelectionProvider(); if (selectionProvider != null) @@ -158,7 +158,7 @@ public abstract class PageCompareEditorInput extends CompareEditorInput implemen sv.addDoubleClickListener(pagePane); } } - + private void cleanupListeners() { ISelectionProvider selectionProvider = getSelectionProvider(); if (selectionProvider != null) @@ -169,7 +169,7 @@ public abstract class PageCompareEditorInput extends CompareEditorInput implemen sv.removeDoubleClickListener(pagePane); } } - + private void hookContentChangeListener(ICompareInput node) { if (hookedInput == node) return; @@ -184,7 +184,7 @@ public abstract class PageCompareEditorInput extends CompareEditorInput implemen ((IContentChangeNotifier)right).addContentChangeListener(this); } } - + private void unhookContentChangeListener() { if (hookedInput != null) { ITypedElement left = hookedInput.getLeft(); @@ -219,7 +219,7 @@ public abstract class PageCompareEditorInput extends CompareEditorInput implemen } return null; } - + /** * Convenience method that calls {@link #prepareInput(ICompareInput, CompareConfiguration, IProgressMonitor)} * with a progress monitor. @@ -250,7 +250,7 @@ public abstract class PageCompareEditorInput extends CompareEditorInput implemen // Ignore } } - + /* (non-Javadoc) * @see org.eclipse.compare.IContentChangeListener#contentChanged(org.eclipse.compare.IContentChangeNotifier) */ @@ -258,7 +258,7 @@ public abstract class PageCompareEditorInput extends CompareEditorInput implemen public void contentChanged(IContentChangeNotifier source) { setDirty(true); } - + /* (non-Javadoc) * @see org.eclipse.compare.CompareEditorInput#canRunInBackground() */ @@ -266,7 +266,7 @@ public abstract class PageCompareEditorInput extends CompareEditorInput implemen public boolean canRunAsJob() { return true; } - + /** * Prepare the compare input for display in a content viewer. This method is * called from {@link #prepareCompareInput(ICompareInput)} and may be called diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageSaveablePart.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageSaveablePart.java index ad532771b..ad5e43975 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageSaveablePart.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageSaveablePart.java @@ -44,7 +44,7 @@ import org.eclipse.ui.progress.IProgressService; * Abstract class for hosting a page based structure input view for the purposes * of feeding compare viewers. * <p> - * + * * @since 3.2 * @noextend This class is not intended to be subclassed by clients outside of the Team framework. * @deprecated Clients should use a subclass of {@link CompareEditorInput} @@ -52,24 +52,24 @@ import org.eclipse.ui.progress.IProgressService; */ @Deprecated public abstract class PageSaveablePart extends SaveablePartAdapter implements IContentChangeListener{ - + private CompareConfiguration cc; Shell shell; - + // Tracking of dirty state private boolean fDirty= false; private ArrayList fDirtyViewers= new ArrayList(); private IPropertyChangeListener fDirtyStateListener; - + // SWT controls private CompareViewerSwitchingPane fContentPane; private CompareViewerPane fEditionPane; private CompareViewerSwitchingPane fStructuredComparePane; private Control control; - + // Configuration options private boolean showContentPanes = true; - + /** * Create a saveable part. * @param shell the shell for the part @@ -78,7 +78,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC protected PageSaveablePart(Shell shell, CompareConfiguration compareConfiguration){ this.shell = shell; this.cc = compareConfiguration; - + fDirtyStateListener= new IPropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent e) { @@ -89,7 +89,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC if (newValue instanceof Boolean) changed= ((Boolean)newValue).booleanValue(); setDirty(e.getSource(), changed); - } + } } }; } @@ -116,9 +116,9 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC data.grabExcessHorizontalSpace = true; composite.setLayout(layout); composite.setLayoutData(data); - + shell = parent.getShell(); - + Splitter vsplitter = new Splitter(composite, SWT.VERTICAL); vsplitter.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_VERTICAL)); // we need two panes: the left for the elements, the right one for the structured diff @@ -138,7 +138,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC feedInput2(e.getSelection()); } }); - fEditionPane.setText(TeamUIMessages.ParticipantPageSaveablePart_0); + fEditionPane.setText(TeamUIMessages.ParticipantPageSaveablePart_0); fContentPane = new CompareViewerSwitchingPane(vsplitter, SWT.BORDER | SWT.FLAT) { @Override protected Viewer getViewer(Viewer oldViewer, Object input) { @@ -159,14 +159,14 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC } ); hookContentChangeListener((ICompareInput)input); - } + } return newViewer; } }; vsplitter.setWeights(new int[]{30, 70}); - + control = composite; - + ToolBarManager toolBarManager = CompareViewerPane.getToolBarManager(fEditionPane); Control c = createPage(fEditionPane, toolBarManager); fEditionPane.setContent(c); @@ -174,7 +174,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC if(! showContentPanes) { hsplitter.setMaximizedControl(fEditionPane); } - + getSelectionProvider().addSelectionChangedListener(new ISelectionChangedListener() { @Override public void selectionChanged(SelectionChangedEvent event) { @@ -185,7 +185,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC } }); } - + /** * Return the selection provider for the page. This method is * called after the page is created in order to register a @@ -195,14 +195,14 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC protected abstract ISelectionProvider getSelectionProvider(); /** - * Create the page for this part and return the top level control + * Create the page for this part and return the top level control * for the page. * @param parent the parent composite * @param toolBarManager the toolbar manager for the page * @return the top-level control for the page */ protected abstract Control createPage(Composite parent, ToolBarManager toolBarManager); - + /** * Set the title of the page's page to the given text. The title * will appear in the header of the pane containing the page. @@ -211,7 +211,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC protected void setPageDescription(String title) { fEditionPane.setText(title); } - + /** * Set the saveable part's dirty state to the given state. * @param dirty the dirty state @@ -228,15 +228,15 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC fDirtyViewers.clear(); } } - + private void setDirty(Object source, boolean dirty) { Assert.isNotNull(source); if (dirty) fDirtyViewers.add(source); else fDirtyViewers.remove(source); - } - + } + /** * Feeds input from the page into the content and structured viewers. * @param input the input @@ -248,7 +248,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC if (fStructuredComparePane != null && !fStructuredComparePane.isDisposed()) fStructuredComparePane.setInput(input); } - + /* * Feeds selection from structure viewer to content viewer. */ @@ -258,7 +258,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC if (input != null) fContentPane.setInput(input); } - + /** * Convenience method that calls {@link #prepareInput(ICompareInput, CompareConfiguration, IProgressMonitor)} * with a progress monitor. @@ -289,7 +289,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC // Ignore } } - + /** * Prepare the compare input for display in a content viewer. This method is * called from {@link #prepareCompareInput(ICompareInput)} and may be called @@ -312,7 +312,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC ((IContentChangeNotifier)right).addContentChangeListener(this); } } - + /** * Return the parent shell of this part. * @return the parent shell of this part @@ -320,7 +320,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC protected Shell getShell() { return shell; } - + /** * This method is internal to the framework and should not be called by clients * outside of the framework. @@ -334,7 +334,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC } )); } - + /* * Find a viewer that can provide a structure view for the given compare input. * Return <code>null</code> if a suitable viewer could not be found. @@ -347,7 +347,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC private Viewer findStructureViewer(Composite parent, Viewer oldViewer, ICompareInput input) { return CompareUI.findStructureViewer(oldViewer, input, parent, cc); } - + /* * Find a viewer that can provide a content compare view for the given compare input. * Return <code>null</code> if a suitable viewer could not be found. @@ -360,7 +360,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC private Viewer findContentViewer(Composite parent, Viewer oldViewer, ICompareInput input) { return CompareUI.findContentViewer(oldViewer, input, parent, cc); } - + /** * Return a compare input that represents the selection. * This input is used to feed the structure and content @@ -386,7 +386,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC /** * Set whether the file contents panes should be shown. If they are not, * only the page will be shown. - * + * * @param showContentPanes whether to show contents pane */ public void setShowContentPanes(boolean showContentPanes) { @@ -395,7 +395,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC /** * Returns the primary control for this part. - * + * * @return the primary control for this part. */ public Control getControl() { @@ -414,7 +414,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC * This method flushes the content in any viewers. Subclasses should * override if they need to perform additional processing when a save is * performed. - * + * * @param monitor * a progress monitor */ @@ -422,10 +422,10 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC public void doSave(IProgressMonitor monitor) { flushViewers(monitor); } - + private void flushViewers(IProgressMonitor monitor) { Iterator iter = fDirtyViewers.iterator(); - + for (int i=0; i<fDirtyViewers.size(); i++){ Object element = iter.next(); IFlushable flushable = (IFlushable)Utils.getAdapter(element, IFlushable.class); diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartAdapter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartAdapter.java index b97b4546a..70c57437e 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartAdapter.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartAdapter.java @@ -16,7 +16,7 @@ import org.eclipse.ui.*; /** * This adapter provides default implementations for methods on {@link ISaveableWorkbenchPart} and - * {@link IWorkbenchPart}. + * {@link IWorkbenchPart}. * <p> * Classes that want to implement a saveable part can simply implement the methods that * they need while accepting the provided defaults for most of the methods. diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartDialog.java index 73adaed7c..80c5990a1 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartDialog.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartDialog.java @@ -26,7 +26,7 @@ import org.eclipse.ui.PlatformUI; /** * A dialog that displays a {@link org.eclipse.team.ui.ISaveableWorkbenchPart} and * ensures that changes made to the input are saved when the dialog is closed. - * + * * @see ISaveableWorkbenchPart * @see SaveablePartAdapter * @since 3.0 @@ -35,7 +35,7 @@ import org.eclipse.ui.PlatformUI; */ @Deprecated public class SaveablePartDialog extends TrayDialog { - + private ISaveableWorkbenchPart input; private String fContextId; private boolean hasSettings = true; @@ -43,8 +43,8 @@ public class SaveablePartDialog extends TrayDialog { /** * Creates a dialog with the given title and input. The input is not created until the dialog * is opened. - * - * @param shell the parent shell or <code>null</code> to create a top level shell. + * + * @param shell the parent shell or <code>null</code> to create a top level shell. * @param input the part to show in the dialog. */ public SaveablePartDialog(Shell shell, ISaveableWorkbenchPart input) { @@ -52,7 +52,7 @@ public class SaveablePartDialog extends TrayDialog { setShellStyle(getShellStyle() | SWT.RESIZE | SWT.MAX); this.input = input; } - + /* (non-Javadoc) * Method declared on Dialog. */ @@ -60,7 +60,7 @@ public class SaveablePartDialog extends TrayDialog { protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); } - + /* (non-Javadoc) * Method declared on Dialog. */ @@ -74,7 +74,7 @@ public class SaveablePartDialog extends TrayDialog { Dialog.applyDialogFont(parent2); return parent; } - + /* (non-Javadoc) * @see org.eclipse.compare.internal.ResizableDialog#close() */ @@ -83,23 +83,23 @@ public class SaveablePartDialog extends TrayDialog { saveChanges(); return super.close(); } - + /** * Save any changes to the compare editor. */ private void saveChanges() { MessageDialog dialog = new MessageDialog( - getShell(), TeamUIMessages.ParticipantCompareDialog_2, null, - TeamUIMessages.ParticipantCompareDialog_3, MessageDialog.QUESTION, new String[]{IDialogConstants.YES_LABEL, + getShell(), TeamUIMessages.ParticipantCompareDialog_2, null, + TeamUIMessages.ParticipantCompareDialog_3, MessageDialog.QUESTION, new String[]{IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL}, 0); // YES is the default - + if (input.isDirty() && dialog.open() == IDialogConstants.OK_ID) { BusyIndicator.showWhile(null, new Runnable() { @Override public void run() { input.doSave(new NullProgressMonitor()); } - }); + }); } } @@ -111,7 +111,7 @@ public class SaveablePartDialog extends TrayDialog { protected ISaveableWorkbenchPart getInput() { return input; } - + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.Dialog#getDialogBoundsSettings() */ @@ -126,7 +126,7 @@ public class SaveablePartDialog extends TrayDialog { } return dialogSettings; } - + /** * Set the help content id of this dialog. * @param contextId the help context id @@ -134,7 +134,7 @@ public class SaveablePartDialog extends TrayDialog { public void setHelpContextId(String contextId) { fContextId= contextId; } - + /* * @see org.eclipse.jface.window.Window#configureShell(Shell) */ @@ -144,7 +144,7 @@ public class SaveablePartDialog extends TrayDialog { if (fContextId != null) PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell, fContextId); } - + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.Dialog#getInitialSize() */ diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamImages.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamImages.java index b9301cfec..bc8ca3eda 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamImages.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamImages.java @@ -18,9 +18,9 @@ import org.eclipse.team.internal.ui.TeamUIPlugin; * TeamImages provides convenience methods for accessing shared images * provided by the <i>org.eclipse.team.ui</i> plug-in. * <p> - * This class provides <code>ImageDescriptor</code>s for each named image in - * {@link ISharedImages}. All <code>Image</code> objects created from the - * provided descriptors are managed the caller and must be disposed appropriately. + * This class provides <code>ImageDescriptor</code>s for each named image in + * {@link ISharedImages}. All <code>Image</code> objects created from the + * provided descriptors are managed the caller and must be disposed appropriately. * </p> * <p> * This class is not intended to be subclassed or instantiated by clients @@ -30,16 +30,16 @@ public class TeamImages { /** * Returns the image descriptor for the given image ID. * Returns <code>null</code> if there is no such image. - * + * * @param id the identifier for the image to retrieve * @return the image descriptor associated with the given ID */ public static ImageDescriptor getImageDescriptor(String id) { return TeamUIPlugin.getImageDescriptor(id); - } + } /** * Convenience method to get an image descriptor for an extension. - * + * * @param extension the extension declaring the image * @param subdirectoryAndFilename the path to the image * @return the image descriptor for the extension diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamOperation.java index 3f9227b3a..91d86b17b 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamOperation.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamOperation.java @@ -32,13 +32,13 @@ import org.eclipse.ui.progress.IProgressConstants; * An operation that can be configured to run in the foreground using * the {@link org.eclipse.ui.progress.IProgressService} or the background * as a {@link org.eclipse.core.runtime.jobs.Job}. The execution context is determined - * by what is returned by the {@link #canRunAsJob()} hint which may be overridden by subclasses. - * Subclass must override the <code>run(IProgressMonitor)</code> method to perform + * by what is returned by the {@link #canRunAsJob()} hint which may be overridden by subclasses. + * Subclass must override the <code>run(IProgressMonitor)</code> method to perform * the behavior of the operation in the desired execution context. * <p> - * If this operation is run as a job, it is registered with the job as a + * If this operation is run as a job, it is registered with the job as a * {@link org.eclipse.core.runtime.jobs.IJobChangeListener} and is scheduled with - * the part of this operation if it is not <code>null</code>. + * the part of this operation if it is not <code>null</code>. * Subclasses can override the methods of this interface to receive job change notifications. * </p> * @see org.eclipse.ui.progress.IProgressService @@ -48,10 +48,10 @@ import org.eclipse.ui.progress.IProgressConstants; * @since 3.0 */ public abstract class TeamOperation extends JobChangeAdapter implements IRunnableWithProgress { - + private IWorkbenchPart part; private IRunnableContext context; - + /* * Job context that configures how the team operation will * interact with the progress service @@ -65,14 +65,14 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl super(operation.getJobName(), operation, operation.getSite()); this.operation = operation; } - + @Override protected void configureJob(Job job) { super.configureJob(job); if (operation.isKeepOneProgressServiceEntry()) - job.setProperty(IProgressConstants.KEEPONE_PROPERTY, Boolean.TRUE); + job.setProperty(IProgressConstants.KEEPONE_PROPERTY, Boolean.TRUE); else if(operation.getKeepOperation()) - job.setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE); + job.setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE); gotoAction = operation.getGotoAction(); if(gotoAction != null) job.setProperty(IProgressConstants.ACTION_PROPERTY, gotoAction); @@ -95,7 +95,7 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl } return operation.belongsTo(family); } - + /* (non-Javadoc) * @see org.eclipse.team.internal.ui.actions.JobRunnableContext#getCompletionStatus() */ @@ -106,7 +106,7 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl } return super.getCompletionStatus(); } - + /* (non-Javadoc) * @see org.eclipse.team.internal.ui.actions.JobRunnableContext#isUser() */ @@ -115,7 +115,7 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl return operation.isUserInitiated(); } } - + /** * Create an team operation associated with the given part. * @param part the part the operation is associated with or <code>null</code> if the @@ -132,9 +132,9 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl protected TeamOperation(IRunnableContext context) { this(null, context); } - + /** - * Create an team operation associated with the given part + * Create an team operation associated with the given part * that will run in the given context. * @param part the part the operation is associated with or <code>null</code> * @param context a runnable context @@ -146,13 +146,13 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl /** * Return the part that is associated with this operation. - * + * * @return Returns the part or <code>null</code> */ public IWorkbenchPart getPart() { return part; } - + /** * Run the operation in a context that is determined by the {@link #canRunAsJob()} * hint. If this operation can run as a job then it will be run in a background thread. @@ -169,7 +169,7 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl * the operation is run in the operation's context. Subclasses may * override in order to perform pre-checks to determine if the operation * should run. This may include prompting the user for information, etc. - * + * * @return whether the operation should be run. */ protected boolean shouldRun() { @@ -179,7 +179,7 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl /** * Returns the scheduling rule that is to be obtained before this * operation is executed by its context or <code>null</code> if - * no scheduling rule is to be obtained. If the operation is run + * no scheduling rule is to be obtained. If the operation is run * as a job, the scheduling rule is used as the scheduling rule of the * job. Otherwise, it is obtained before execution of the operation * occurs. @@ -188,90 +188,90 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl * rule is obtained. Subclasses can override in order to obtain a * scheduling rule or can obtain scheduling rules within their operation * if finer grained scheduling is desired. - * + * * @return the scheduling rule to be obtained by this operation * or <code>null</code>. */ protected ISchedulingRule getSchedulingRule() { return null; } - + /** * Return whether the auto-build should be postponed until after * the operation is complete. The default is to postpone the auto-build. * subclasses can override. - * + * * @return whether to postpone the auto-build while the operation is executing. */ protected boolean isPostponeAutobuild() { return true; } - + /** * If this operation can safely be run in the background, then subclasses can * override this method and return <code>true</code>. This will make their - * action run in a {@link org.eclipse.core.runtime.jobs.Job}. - * Subclass that override this method should + * action run in a {@link org.eclipse.core.runtime.jobs.Job}. + * Subclass that override this method should * also override the <code>getJobName()</code> method. - * + * * @return <code>true</code> if this action can be run in the background and * <code>false</code> otherwise. */ protected boolean canRunAsJob() { return false; } - + /** * Return the job name to be used if the action can run as a job. (i.e. * if <code>canRunAsJob()</code> returns <code>true</code>). - * + * * @return the string to be used as the job name */ protected String getJobName() { return ""; //$NON-NLS-1$ } - + /** * This method is called to allow subclasses to configure an action that could be run to show * the results of the action to the user. Default is to return null. - * + * * @return an action that could be run to see the results of this operation */ protected IAction getGotoAction() { return null; } - + /** * This method is called to allow subclasses to configure an icon to show when running this * operation. - * + * * @return an URL to an icon */ protected URL getOperationIcon() { return null; } - + /** * This method is called to allow subclasses to have the results of the * operation remain available to the user in the progress service even after * the job is done. This method is only relevant if the operation is run as * a job (i.e., <code>canRunAsJob</code> returns <code>true</code>). - * + * * @return <code>true</code> to keep the operation and <code>false</code> * otherwise. */ protected boolean getKeepOperation() { return false; } - + /** * This method is similar to <code>getKeepOperation</code> but will - * only keep one entry of a particular type available. + * only keep one entry of a particular type available. * This method is only relevant if the operation is run as * a job (i.e., <code>canRunAsJob</code> returns <code>true</code>). - * Subclasses that override this method should also override + * Subclasses that override this method should also override * <code>isSameFamilyAs</code> in order to match operations of the same type. - * + * * @return <code>true</code> to keep the operation and <code>false</code> * otherwise. * @since 3.1 @@ -279,7 +279,7 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl public boolean isKeepOneProgressServiceEntry() { return false; } - + /** * Return whether this Team operation belongs to the same family * as the given operation for the purpose of showing only one @@ -293,7 +293,7 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl protected boolean isSameFamilyAs(TeamOperation operation) { return false; } - + /** * Return whether the job that is running this operation should be considered * a member member of the given family. Subclasses can override this method in @@ -301,7 +301,7 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl * By default, <code>false</code> is always returned. Subclasses that override the * <code>isKeepOneProgressServiceEntry</code> method do not need to override * this method, but instead should override <code>isSameFamilyAs</code>. - * + * * @param family the family being tested. * @return whether the job that is running this operation should be considered * a member member of the given family. @@ -310,9 +310,9 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl public boolean belongsTo(Object family) { return false; } - + /** - * Indicates whether the operation was user initiated. The + * Indicates whether the operation was user initiated. The * progress for user initiated jobs may be presented differently * than non-user initiated operations if they are run as jobs. * @return whether the operation is user initiated @@ -321,10 +321,10 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl public boolean isUserInitiated() { return true; } - + /** * Return a shell that can be used by the operation to display dialogs, etc. - * + * * @return a shell */ protected Shell getShell() { @@ -341,12 +341,12 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl } return shell[0]; } - + /* * Uses the {@link #canRunAsJob()} hint to return a {@link ITeamRunnableContext} * that is used to execute the <code>run(SyncInfoSet, IProgressMonitor)</code> - * method of this action. - * + * method of this action. + * * @param syncSet the sync info set containing the selected elements for which this * action is enabled. * @return the runnable context in which to run this action. @@ -367,7 +367,7 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl return context; } } - + private IWorkbenchSite getSite() { IWorkbenchSite site = null; if(part != null) { diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java index cfc4635c3..fa1561e98 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java @@ -30,21 +30,21 @@ import org.eclipse.ui.*; * This class is not intended to be subclassed or instantiated by clients */ public class TeamUI { - + /** - * Property constant indicating the global ignores list has changed. + * Property constant indicating the global ignores list has changed. */ public static final String GLOBAL_IGNORES_CHANGED = TeamUIPlugin.ID + "global_ignores_changed"; //$NON-NLS-1$ - + /** * Property constant indicating the global file types list has changed. * @since 3.1 */ public static final String GLOBAL_FILE_TYPES_CHANGED = TeamUIPlugin.ID + "global_file_types_changed"; //$NON-NLS-1$ - + /** * Return the synchronize manager. - * + * * @return the synchronize manager * @since 3.0 */ @@ -54,7 +54,7 @@ public class TeamUI { /** * Register for changes made to Team properties. - * + * * @param listener the listener to add */ public static void addPropertyChangeListener(IPropertyChangeListener listener) { @@ -63,17 +63,17 @@ public class TeamUI { /** * Remove the listener from Team property change listener list. - * + * * @param listener the listener to remove */ public static void removePropertyChangeListener(IPropertyChangeListener listener) { TeamUIPlugin.removePropertyChangeListener(listener); } - + /** * Shows the history view and returns a handle to it. Note that in the case of many * history views, the main history view is the one returned here. - * + * * @return an IHistoryView which is the main history view if it is found or null if it can't be found * @since 3.2 */ @@ -86,7 +86,7 @@ public class TeamUI { return null; } - + /** * Shows a history view containing the given input and returns a handle to the view * or <code>null</code> if no history was available for the given input. If an appropriate @@ -94,9 +94,9 @@ public class TeamUI { * be activated. Otherwise a new view will be opened. * @param page the workbench page containing the history view * @param input the input whose history is to be displayed - * @param pageSource the history page source from which to obtain the page or <code>null</code> + * @param pageSource the history page source from which to obtain the page or <code>null</code> * if the page source should be determined using the Adapter manager. - * + * * @return an IHistoryView which is the main history view if it is found or null if it can't be found * @since 3.3 */ @@ -128,30 +128,30 @@ public class TeamUI { ((GenericHistoryView)view).showHistoryPageFor(input, true, false, pageSource); return view; } - + /** * Return the team content provider manager which gives access to the team * content providers registered with the * <code>org.eclipse.team.ui.teamContentProviders</code> extension point. - * + * * @return the team content provider manager * @since 3.2 */ public static ITeamContentProviderManager getTeamContentProviderManager() { return TeamContentProviderManager.getInstance(); } - + /** * Return a set of wizard pages for the given importer ID. If no wizard page * is registered for the importer then a page will not be created. If an * extension exits, a page will be created, but it's up to the caller to * initialize the page with a set of corresponding descriptions. - * + * * <strong>EXPERIMENTAL</strong>. This class has been added as part of a * work in progress. There is no guarantee that this API will work or that * it will remain the same. Please do not use this API without consulting * with the Team team. - * + * * @param importerId * the importer ID * @return wizard pages diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/ElementLocalHistoryPageSource.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/ElementLocalHistoryPageSource.java index 9556d01a8..fb1cdbc64 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/ElementLocalHistoryPageSource.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/ElementLocalHistoryPageSource.java @@ -23,7 +23,7 @@ import org.eclipse.ui.part.Page; public abstract class ElementLocalHistoryPageSource extends HistoryPageSource { /** - * Return the previous edition from the local history of the given element located in the given + * Return the previous edition from the local history of the given element located in the given * file. A <code>null</code> is returned if a previous edition could not be found. * @param file the file containing the element * @param element the element @@ -33,7 +33,7 @@ public abstract class ElementLocalHistoryPageSource extends HistoryPageSource { public static ITypedElement getPreviousEdition(IFile file, Object element) throws TeamException { return EditionHistoryPage.getPreviousState(file, element); } - + /** * Create an instance of the page source. */ @@ -48,7 +48,7 @@ public abstract class ElementLocalHistoryPageSource extends HistoryPageSource { public final boolean canShowHistoryFor(Object object) { return getFile(object) != null; } - + /* (non-Javadoc) * @see org.eclipse.team.ui.history.IHistoryPageSource#createPage(java.lang.Object) */ @@ -56,7 +56,7 @@ public abstract class ElementLocalHistoryPageSource extends HistoryPageSource { public final Page createPage(Object object) { return new EditionHistoryPage(getFile(object), object); } - + /** * Return the file that contains the given element of <code>null</code> * if this page source can not show history for the given element. @@ -68,7 +68,7 @@ public abstract class ElementLocalHistoryPageSource extends HistoryPageSource { /** * Return the file that contains the given element of <code>null</code> if this page source can * not show history for the given element. - * + * * @param element the element * @return the file that contains the given element of <code>null</code> * @noreference This method is not intended to be referenced by clients. @@ -76,5 +76,5 @@ public abstract class ElementLocalHistoryPageSource extends HistoryPageSource { final public IFile internalGetFile(Object element) { return getFile(element); } - + } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPage.java index a86ff636d..8b6abc62e 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPage.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPage.java @@ -23,12 +23,12 @@ import org.eclipse.ui.part.Page; * @since 3.2 */ public abstract class HistoryPage extends Page implements IHistoryPage, IAdaptable { - + private IHistoryPageSite site; private Object input; private IHistoryView historyView; private PropertyChangeHandler fChangeHandler; - + /* (non-Javadoc) * @see org.eclipse.team.ui.history.IHistoryPage#setSite(org.eclipse.team.ui.history.IHistoryPageSite) */ @@ -36,7 +36,7 @@ public abstract class HistoryPage extends Page implements IHistoryPage, IAdaptab public void setSite(IHistoryPageSite site) { this.site = site; } - + /* (non-Javadoc) * @see org.eclipse.team.ui.history.IHistoryPage#getHistoryPageSite() */ @@ -45,7 +45,7 @@ public abstract class HistoryPage extends Page implements IHistoryPage, IAdaptab return site; } - + /* (non-Javadoc) * @see org.eclipse.team.ui.history.IHistoryPage#getInput() */ @@ -53,7 +53,7 @@ public abstract class HistoryPage extends Page implements IHistoryPage, IAdaptab public Object getInput() { return input; } - + /* (non-Javadoc) * @see org.eclipse.team.ui.history.IHistoryPage#setInput(java.lang.Object, boolean) */ @@ -66,16 +66,16 @@ public abstract class HistoryPage extends Page implements IHistoryPage, IAdaptab /** * Called by HistoryPage after {@link #setInput(Object)}. Clients can * gain access to the input by using {@link #getInput()}. - * + * * @return <code>true</code> if the page was able to display the contents, <code>false</code> otherwise */ public abstract boolean inputSet(); - - + + public void setHistoryView(IHistoryView historyView) { this.historyView = historyView; } - + /* (non-Javadoc) * @see org.eclipse.team.ui.history.IHistoryPage#getHistoryView() */ @@ -83,10 +83,10 @@ public abstract class HistoryPage extends Page implements IHistoryPage, IAdaptab public IHistoryView getHistoryView() { if (historyView != null) return historyView; - + return null; } - + /* (non-Javadoc) * @see org.eclipse.team.ui.history.IHistoryPage#addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener) */ @@ -97,7 +97,7 @@ public abstract class HistoryPage extends Page implements IHistoryPage, IAdaptab } fChangeHandler.addPropertyChangeListener(listener); } - + /* (non-Javadoc) * @see org.eclipse.team.ui.history.IHistoryPage#removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener) */ @@ -107,10 +107,10 @@ public abstract class HistoryPage extends Page implements IHistoryPage, IAdaptab fChangeHandler.removePropertyChangeListener(listener); } } - + /** * Notify all listeners that the given property has changed. - * + * * @param source the object on which a property has changed * @param property identifier of the property that has changed * @param oldValue the old value of the property, or <code>null</code> diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageCompareEditorInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageCompareEditorInput.java index e2dbaf1a1..140b61997 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageCompareEditorInput.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageCompareEditorInput.java @@ -32,7 +32,7 @@ import org.eclipse.ui.part.Page; /** * Displays a history page combined with the compare/merge infrastructure. This only works properly if the * history page adapts to an {@link IHistoryCompareAdapter}. - * + * * @since 3.3 */ public class HistoryPageCompareEditorInput extends PageCompareEditorInput { @@ -48,7 +48,7 @@ public class HistoryPageCompareEditorInput extends PageCompareEditorInput { } }; private boolean isReplace; - + /** * Create a history page compare editor input for the given page and object. * @param configuration the compare configuration @@ -60,7 +60,7 @@ public class HistoryPageCompareEditorInput extends PageCompareEditorInput { this.pageSource = pageSource; this.object = object; } - + /* (non-Javadoc) * @see org.eclipse.compare.CompareEditorInput#prepareInput(org.eclipse.core.runtime.IProgressMonitor) */ @@ -69,7 +69,7 @@ public class HistoryPageCompareEditorInput extends PageCompareEditorInput { throws InvocationTargetException, InterruptedException { return object; } - + /* (non-Javadoc) * @see org.eclipse.compare.CompareEditorInput#handleDispose() */ @@ -81,7 +81,7 @@ public class HistoryPageCompareEditorInput extends PageCompareEditorInput { historyPage.dispose(); } } - + /* (non-Javadoc) * @see org.eclipse.team.ui.PageCompareEditorInput#createPage(org.eclipse.compare.CompareViewerPane, org.eclipse.jface.action.IToolBarManager) */ @@ -102,7 +102,7 @@ public class HistoryPageCompareEditorInput extends PageCompareEditorInput { historyPage.addPropertyChangeListener(changeListener); return (IPage)historyPage; } - + /* (non-Javadoc) * @see org.eclipse.team.ui.PageCompareEditorInput#asCompareInput(org.eclipse.jface.viewers.ISelection) */ @@ -177,7 +177,7 @@ public class HistoryPageCompareEditorInput extends PageCompareEditorInput { } } } - + /* (non-Javadoc) * @see org.eclipse.compare.CompareEditorInput#isEditionSelectionDialog() */ @@ -205,7 +205,7 @@ public class HistoryPageCompareEditorInput extends PageCompareEditorInput { public void setReplace(boolean isReplace) { this.isReplace = isReplace; } - + /* (non-Javadoc) * @see org.eclipse.compare.CompareEditorInput#getOKButtonLabel() */ @@ -215,7 +215,7 @@ public class HistoryPageCompareEditorInput extends PageCompareEditorInput { return TeamUIMessages.HistoryPageCompareEditorInput_0; return super.getOKButtonLabel(); } - + /* (non-Javadoc) * @see org.eclipse.compare.CompareEditorInput#okPressed() */ @@ -232,11 +232,11 @@ public class HistoryPageCompareEditorInput extends PageCompareEditorInput { } return true; } - + /** * A replace has been requested. This method will be * invoked if {@link #isReplaceDialog()} is <code>true</code> - * and the user has clicked the "Replace" button. + * and the user has clicked the "Replace" button. * By default, this method does nothing. * Subclasses may override. * @param selectedObject the selected object @@ -245,5 +245,5 @@ public class HistoryPageCompareEditorInput extends PageCompareEditorInput { protected void performReplace(Object selectedObject) throws CoreException { // By default, do nothing } - + } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSaveablePart.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSaveablePart.java index 7d7357213..682457d91 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSaveablePart.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSaveablePart.java @@ -30,7 +30,7 @@ import org.eclipse.ui.part.Page; /** * Displays a history page combined with the compare/merge infrastructure. This only works properly if the * history page adapts to an {@link IHistoryCompareAdapter}. - * + * * @deprecated use {@link HistoryPageCompareEditorInput} * @since 3.2 */ @@ -41,7 +41,7 @@ public class HistoryPageSaveablePart extends PageSaveablePart { private DialogHistoryPageSite site; private final Object object; private final IHistoryPageSource pageSource; - + /** * Show the history for the object in a dialog. The history will only be * shown if an {@link IHistoryPageSource} can be found for the object. @@ -72,7 +72,7 @@ public class HistoryPageSaveablePart extends PageSaveablePart { IResource resource = Utils.getResource(object); return (resource != null && resource.getType() == IResource.FILE); } - + /** * Create a history page part for the given page and object. * @param shell the parent shell @@ -107,7 +107,7 @@ public class HistoryPageSaveablePart extends PageSaveablePart { @Override public void contentChanged(IContentChangeNotifier source) { } - + /* (non-Javadoc) * @see org.eclipse.team.ui.PageSaveablePart#createPage(org.eclipse.swt.widgets.Composite, org.eclipse.jface.action.ToolBarManager) */ @@ -125,7 +125,7 @@ public class HistoryPageSaveablePart extends PageSaveablePart { setPageDescription(description); return ((Page) historyPage).getControl(); } - + /* (non-Javadoc) * @see org.eclipse.team.ui.PageSaveablePart#getPageSelectionProvider() */ @@ -133,7 +133,7 @@ public class HistoryPageSaveablePart extends PageSaveablePart { protected final ISelectionProvider getSelectionProvider() { return site.getSelectionProvider(); } - + /* (non-Javadoc) * @see org.eclipse.team.ui.PageSaveablePart#getCompareInput(org.eclipse.jface.viewers.ISelection) */ @@ -154,7 +154,7 @@ public class HistoryPageSaveablePart extends PageSaveablePart { } return null; } - + /* (non-Javadoc) * @see org.eclipse.team.ui.PageSaveablePart#prepareInput(org.eclipse.compare.structuremergeviewer.ICompareInput, org.eclipse.compare.CompareConfiguration, org.eclipse.core.runtime.IProgressMonitor) */ @@ -165,7 +165,7 @@ public class HistoryPageSaveablePart extends PageSaveablePart { compareAdapter.prepareInput(input, configuration, monitor); } } - + /* (non-Javadoc) * @see org.eclipse.team.ui.SaveablePartAdapter#dispose() */ diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSource.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSource.java index 7a447f34a..d75ad2de0 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSource.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSource.java @@ -49,5 +49,5 @@ public abstract class HistoryPageSource implements IHistoryPageSource { IHistoryPageSource pageSource = (IHistoryPageSource)Utils.getAdapter(object, IHistoryPageSource.class); return pageSource; } - + } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryCompareAdapter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryCompareAdapter.java index 1b0d37a88..6808aebd6 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryCompareAdapter.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryCompareAdapter.java @@ -17,20 +17,20 @@ import org.eclipse.core.runtime.IProgressMonitor; /** * An adaptation for a history page for displaying comparisons * triggered by history page selections. - * + * * @since 3.2 * @see HistoryPageSaveablePart * @see IHistoryPage */ public interface IHistoryCompareAdapter { - + /** * Returns an ICompareInput for the passed in object. * @param object the object * @return returns an ICompareInput */ public ICompareInput getCompareInput(Object object); - + /** * Prepare the compare input for display. Clients can perform * any long running preparations and assign labels to the @@ -40,5 +40,5 @@ public interface IHistoryCompareAdapter { * @param monitor a progress monitor */ public void prepareInput(ICompareInput input, CompareConfiguration configuration, IProgressMonitor monitor); - + } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPage.java index c0edb6716..23e08c589 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPage.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPage.java @@ -4,7 +4,7 @@ * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ @@ -24,39 +24,39 @@ import org.eclipse.ui.SubActionBars; * <p>Interface for pages that appear in the team history view.</p> * <p><em>This interface is not intended to be implemented by clients. * Clients can instead subclass {@link HistoryPage}.</em></p> - * + * * <h3>Lifecycle</h3> * <p> * Once an Object requests to have its history shown in the History View (through an action or DND), the History View * will first try to see if any of the open History Views (there can be multiple Views if some of them are pinned) currently * show the requested Object's history. It does this by calling {@link HistoryPage#getInput()} on each IHistoryPage (which is supposed - * to extend {@link HistoryPage} and comparing the input with the passed in Object. If a History View is found that already contains the Object, + * to extend {@link HistoryPage} and comparing the input with the passed in Object. If a History View is found that already contains the Object, * it is brought to the front and its history is refreshed (by calling {@link #refresh()}). * If no History View already contains the requested Object an <code>IHistoryPage</code> might need to be created if the current <code>IHistoryPage</code> - * being shown in the History View doesn't know how to display the Object or if there are no <code>IHistoryPage</code>s being shown in the History View. + * being shown in the History View doesn't know how to display the Object or if there are no <code>IHistoryPage</code>s being shown in the History View. * </p> * <p> - * The History View uses an {@link IHistoryPageSource#createPage(Object)} to create the <code>IHistoryPage</code>. If the History View can + * The History View uses an {@link IHistoryPageSource#createPage(Object)} to create the <code>IHistoryPage</code>. If the History View can * determine what the Repository Provider is for the dropped Object (i.e. the Object is an instance of {@link IResource}), then it will try * to get the {@link IFileHistoryProvider} for the Repository Provider by calling {@link RepositoryProvider#getFileHistoryProvider()}. If no * <code>IFileHistoryProvider</code> is returned, the History View will try to adapt the Repository Provider to a <code>IFileHistoryProvider</code>. - * If the Object whose history is being requested is not an {@link IResource}, it will not be possible to retrieve the Repository Provider from it. + * If the Object whose history is being requested is not an {@link IResource}, it will not be possible to retrieve the Repository Provider from it. * In these instances the History View will try to adapt the Object to an {@link IHistoryPageSource}. * </p> * <p> * Once the <code>IHistoryPage</code> is created, {@link IHistoryPage#setInput(Object)} is called; this is handled by {@link HistoryPage} which clients * should subclass for their own <code>IHistoryPage</code> implementations. <code>HistoryPage</code> will in turn call {@link HistoryPage#inputSet()} - - * which clients can use for setting up their <code>IHistoryPage</code>. The old page in the History View (along with its {@link SubActionBars} is disposed - - * {@link HistoryPage#dispose()} gets called; interested clients can supply a <code>dispose()</code> method in their subclass. Finally, the new page is shown + * which clients can use for setting up their <code>IHistoryPage</code>. The old page in the History View (along with its {@link SubActionBars} is disposed - + * {@link HistoryPage#dispose()} gets called; interested clients can supply a <code>dispose()</code> method in their subclass. Finally, the new page is shown * and its SubActionBars are activated. * </p> - * - * + * + * * @see TeamUI#getHistoryView() * @since 3.2 */ public interface IHistoryPage { - + /** * Property name constant (value <code>"org.eclipse.team.ui.name"</code>) * for the page's name. @@ -70,11 +70,11 @@ public interface IHistoryPage { * @since 3.3 */ public static final String P_DESCRIPTION = TeamUIPlugin.ID + ".description"; //$NON-NLS-1$ - + /** * Fetches and populates the history page for the given Object. Clients * should provide an implementation for their individual pages. - * + * * @param object the object for which history is being requested for * @return true if the page was able to display the history for the object, false otherwise * @since 3.2 @@ -82,17 +82,17 @@ public interface IHistoryPage { public boolean setInput(Object object); /** - * Returns the object whose history is currently being displayed in the history page. - * @return object the object being displayed in the history page or <code>null</code> + * Returns the object whose history is currently being displayed in the history page. + * @return object the object being displayed in the history page or <code>null</code> * if no input has been set; * @since 3.2 */ public Object getInput(); - + /** * Returns true if this history page can show a history for the given object, false if it cannot * @param object the object that is to have history shown - * @return boolean + * @return boolean * @since 3.2 */ public boolean isValidInput(Object object); @@ -105,14 +105,14 @@ public interface IHistoryPage { /** * Returns the name of the object whose history the page is showing - * @return String containing the name of the object + * @return String containing the name of the object * @since 3.2 */ public String getName(); - + /** * Returns a one line description of the object whose history is - * being displayed. For example, for files, this may be the + * being displayed. For example, for files, this may be the * workspace path of the file. The description may be displayed to * the user as tooltip text or by some other means. * @return a one line description of the object whose history is @@ -123,38 +123,38 @@ public interface IHistoryPage { /** * Set the site for the page - this needs to be replaced with a proper - * {@link IHistoryPageSite} in order to allow history pages to be displayed in + * {@link IHistoryPageSite} in order to allow history pages to be displayed in * both views and dialogs. * @param site the history page site * @since 3.2 */ public void setSite(IHistoryPageSite site); - + /** * Returns the {@link IHistoryPageSite} set for this page. * @return the history page site for this page * @since 3.2 */ public IHistoryPageSite getHistoryPageSite(); - + /** - * Called to allow IHistoryPage a chance to dispose of any widgets created + * Called to allow IHistoryPage a chance to dispose of any widgets created * for its page implementation * @since 3.2 */ public void dispose(); - + /** - * Returns the {@link IHistoryView} instance that contains this history page or <em>null</em> if + * Returns the {@link IHistoryView} instance that contains this history page or <em>null</em> if * the history view instance cannot be determined. - * @return IHistoryView the history view that contains this history page or <em>null</em> if + * @return IHistoryView the history view that contains this history page or <em>null</em> if * the history view instance cannot be determined. * @since 3.3 */ public IHistoryView getHistoryView(); - + /** - * Adds a listener for changes to properties of this page. + * Adds a listener for changes to properties of this page. * Has no effect if an identical listener is already * registered. * <p> @@ -172,11 +172,11 @@ public interface IHistoryPage { * @since 3.3 */ public void addPropertyChangeListener(IPropertyChangeListener listener); - + /** * Removes the given property listener from this page. * Has no effect if an identical listener is not already registered. - * + * * @param listener a property listener * @since 3.3 */ diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSite.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSite.java index da573050c..ea56e0265 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSite.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSite.java @@ -20,7 +20,7 @@ import org.eclipse.ui.part.IPageSite; * A site which provides access to the context in which this page * is being displayed. Instances of this interface serve a similar purpose * to <code>IWorkbenchSite</code> instances but is provided as a separate - * objects to allow clients to access the different site types + * objects to allow clients to access the different site types * (view, editor, dialog) using a common interface. This interface also provides * access to the part for the site because this is required by some UI * components. Clients should not need to access the part. @@ -30,29 +30,29 @@ import org.eclipse.ui.part.IPageSite; * <code>instanceof</code> checks can be done with the part. * <p> * This interface is not intended to be implemented by clients. - * + * * @since 3.2 */ public interface IHistoryPageSite { - + /** * Return the workbench page site for the page or <code>null</code> if a * workbench page site is not available (e.g. if the page is being shown in * a dialog). - * + * * @return the workbench page site for the page or <code>null</code> */ IPageSite getWorkbenchPageSite(); - + /** * Return the workbench part for the page or <code>null</code> if a * workbench part is not available (e.g. if the page is being shown in a * dialog). - * + * * @return the workbench part for the page or <code>null</code> */ IWorkbenchPart getPart(); - + /** * Returns the shell for this site. * @return the shell for this site @@ -76,7 +76,7 @@ public interface IHistoryPageSite { * Give the page focus. */ void setFocus(); - + /** * Returns the toolbar manager for this site or <code>null</code> * it there is no toolbar. For sites which have a corresponding @@ -86,11 +86,11 @@ public interface IHistoryPageSite { * @return toolbar manager */ IToolBarManager getToolBarManager(); - + /** * Returns whether this site is modal. * @return true if the site is modal, false otherwise */ boolean isModal(); - + } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSource.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSource.java index fc6dd464b..0b1339f00 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSource.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSource.java @@ -4,7 +4,7 @@ * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ @@ -17,28 +17,28 @@ import org.eclipse.ui.part.Page; /** * Interface to an object which is capable of supplying a history page for display * by the history view or other views, dialogs or editors that wish to display - * the history of an object. - * + * the history of an object. + * * This interface is not intended to be implemented by clients. * Clients can instead subclass {@link HistoryPageSource}. - * + * * @see IFileHistoryProvider * @since 3.2 */ public interface IHistoryPageSource { - + /** * Returns true if this history page source can show a history for the given object, false if it cannot * @param object the object that is to have history shown - * @return boolean + * @return boolean */ public boolean canShowHistoryFor(Object object); - + /** * Called by the history view to create the page for this IFileHistoryProvider. The * page must implement {@link IHistoryPage}. * @param object the object whose history is to be shown - * + * * @see IHistoryPage * @return a Page that implements IHistoryPage (should return either an IPage, IPageBookViewPage or an IHistoryPage */ diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryView.java index f4d66ca84..a0427a2a1 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryView.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryView.java @@ -15,22 +15,22 @@ import org.eclipse.team.core.history.IFileHistory; /** * This interface provides a way for clients to request the History View * to display the history for a given object. - * + * * <p> * This interface is not intended to be implemented by clients. - * + * * @since 3.2 * @see IFileHistory * @see IHistoryPage */ public interface IHistoryView { - + /** * The id for this view. * @since 3.3 */ public static final String VIEW_ID = "org.eclipse.team.ui.GenericHistoryView"; //$NON-NLS-1$ - + /** * Returns the history page that is currently being displayed by the * history view. @@ -38,25 +38,25 @@ public interface IHistoryView { * @return the history page */ public IHistoryPage getHistoryPage(); - + /** - * Shows the history for the passed in object. This method is equivalent to + * Shows the history for the passed in object. This method is equivalent to * {@link #showHistoryFor(Object, boolean)} with <code>force</code> * set to <code>false</code>. - * + * * @param object the input whose history is to be displayed * @return returns the history page that the passed in object is being shown * in or null if no appropriate page can be found. */ public IHistoryPage showHistoryFor(Object object); - + /** * Shows the history for the given object. If force is <code>false</code>, * the history may be displayed in another instance of {@link IHistoryView}. * For example, if the target view is pinned, the history will be shown in another * view instance. If force is <code>true</code>, the history will be shown in this view * instance regardless of the view state. - * + * * @param object the input whose history is to be displayed * @param force whether this view should show the input even if it is pinned * @return returns the history page that the passed in object is being shown @@ -64,5 +64,5 @@ public interface IHistoryView { * @since 3.3 */ public IHistoryPage showHistoryFor(Object object, boolean force); - + } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/RevisionAnnotationController.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/RevisionAnnotationController.java index b31305344..a2b742225 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/RevisionAnnotationController.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/RevisionAnnotationController.java @@ -38,7 +38,7 @@ import org.eclipse.ui.texteditor.ITextEditor; * revision ruler and a history list such as one shown in the history view. In * other words, the selection in the history list will be reflected in the * revision rule and vice versa. - * + * * @see Revision * @see RevisionInformation * @since 3.3 @@ -54,10 +54,10 @@ public abstract class RevisionAnnotationController { Revision selected= null; if (selection instanceof IStructuredSelection) selected= (Revision) ((IStructuredSelection) selection).getFirstElement(); - + if (selected == null) return; - + revisionSelected(selected); } }; @@ -75,12 +75,12 @@ public abstract class RevisionAnnotationController { } } }; - + /** * Open a text editor that supports the use of a revision ruler on the given * file. If an appropriate editor is already open, it is returned. Otherwise * a new editor is opened. - * + * * @param page * the page in which the editor is to be opened * @param file @@ -99,39 +99,39 @@ public abstract class RevisionAnnotationController { return te; } } - - // No existing editor references found, try to open a new editor for the file + + // No existing editor references found, try to open a new editor for the file try { IEditorDescriptor descrptr = IDE.getEditorDescriptor(file); // Try to open the associated editor only if its an internal editor - // Also, if a non-text editor is already open, there is no need to try and open + // Also, if a non-text editor is already open, there is no need to try and open // an editor since the open will find the non-text editor if (descrptr.isInternal() && openEditors.length == 0){ IEditorPart part = page.openEditor(input, IDE.getEditorDescriptor(file).getId(), true, IWorkbenchPage.MATCH_INPUT); AbstractDecoratedTextEditor te = findTextEditorPart(page, part, input); if (te != null) return te; - + //editor opened is not a text editor - close it page.closeEditor(part, false); } - //open file in default text editor + //open file in default text editor IEditorPart part = page.openEditor(input, EditorsUI.DEFAULT_TEXT_EDITOR_ID, true, IWorkbenchPage.MATCH_INPUT | IWorkbenchPage.MATCH_ID); AbstractDecoratedTextEditor te = findTextEditorPart(page, part, input); if (te != null) return te; - + } catch (PartInitException e) { } - + return null; } - + /** * Open a text editor that supports the use of a revision ruler on the given * file. If an appropriate editor is already open, it is returned. Otherwise * a new editor is opened. - * + * * @param page * the page in which the editor is to be opened * @param fileRevision @@ -149,7 +149,7 @@ public abstract class RevisionAnnotationController { return (AbstractDecoratedTextEditor) editor; return null; } - + private static ITextEditor getEditor(String id, Object fileRevision, IStorage storage) throws PartInitException { final IWorkbench workbench= PlatformUI.getWorkbench(); @@ -167,7 +167,7 @@ public abstract class RevisionAnnotationController { return (ITextEditor)part; } else { // There is something really wrong so just bail - throw new PartInitException(TeamUIMessages.RevisionAnnotationController_0); + throw new PartInitException(TeamUIMessages.RevisionAnnotationController_0); } } } @@ -177,7 +177,7 @@ public abstract class RevisionAnnotationController { IEditorRegistry registry = PlatformUI.getWorkbench().getEditorRegistry(); IEditorDescriptor descriptor = registry.getDefaultEditor(storage.getName()); if (descriptor == null || !descriptor.isInternal()) { - id = EditorsUI.DEFAULT_TEXT_EDITOR_ID; + id = EditorsUI.DEFAULT_TEXT_EDITOR_ID; } else { try { if (Utils.isTextEditor(descriptor)) { @@ -193,7 +193,7 @@ public abstract class RevisionAnnotationController { } - + private static AbstractDecoratedTextEditor findOpenTextEditorForFile(IWorkbenchPage page, IFile file) { if (file == null) return null; @@ -201,7 +201,7 @@ public abstract class RevisionAnnotationController { IEditorPart[] editors = findOpenEditorsForFile(page, input); return findTextEditor(page, editors, input); } - + private static AbstractDecoratedTextEditor findTextEditor(IWorkbenchPage page, IEditorPart[] editors, IEditorInput input) { for (int i = 0; i < editors.length; i++) { IEditorPart editor = editors[i]; @@ -229,7 +229,7 @@ public abstract class RevisionAnnotationController { } return null; } - + private static IEditorPart[] findOpenEditorsForFile(IWorkbenchPage page, FileEditorInput input) { final IEditorReference[] references= page.findEditors(input, null, IWorkbenchPage.MATCH_INPUT); final List editors = new ArrayList(); @@ -238,10 +238,10 @@ public abstract class RevisionAnnotationController { IEditorPart editor= reference.getEditor(false); editors.add(editor); } - + return (IEditorPart[]) editors.toArray(new IEditorPart[editors.size()]); } - + private static AbstractDecoratedTextEditor findOpenTextEditorFor(IWorkbenchPage page, Object object) { if (object == null) return null; @@ -264,10 +264,10 @@ public abstract class RevisionAnnotationController { // ignore } } - + return null; } - + private static IRevisionRulerColumnExtension findEditorRevisonRulerColumn(IWorkbenchPage page, Object object) { ITextEditor editor= findOpenTextEditorFor(page, object); if (editor == null) @@ -279,21 +279,21 @@ public abstract class RevisionAnnotationController { return null; return (IRevisionRulerColumnExtension) column; } - + return null; } - + private RevisionAnnotationController(IRevisionRulerColumnExtension revisionRuler, ISelectionProvider historyList) { fHistoryListSelectionProvider = historyList; if (revisionRuler == null) { fRulerSelectionProvider = null; return; } - + fRulerSelectionProvider= revisionRuler.getRevisionSelectionProvider(); fRulerSelectionProvider.addSelectionChangedListener(rulerListener); fHistoryListSelectionProvider.addSelectionChangedListener(historyListListener); - + ((IRevisionRulerColumn)revisionRuler).getControl().addDisposeListener(new DisposeListener() { @Override public void widgetDisposed(DisposeEvent e) { @@ -301,7 +301,7 @@ public abstract class RevisionAnnotationController { } }); } - + /** * Create a controller that links an editor on a local file to a history list. * @param page the workbench page @@ -311,7 +311,7 @@ public abstract class RevisionAnnotationController { public RevisionAnnotationController(IWorkbenchPage page, IFile file, ISelectionProvider historyList) { this(findEditorRevisonRulerColumn(page, file), historyList); } - + /** * Create a controller that links an editor input on a remote file to a history list. * @param page the workbench page @@ -324,7 +324,7 @@ public abstract class RevisionAnnotationController { } /** - * Dispose of the controller. + * Dispose of the controller. */ public void dispose() { if (fRulerSelectionProvider != null) { @@ -339,14 +339,14 @@ public abstract class RevisionAnnotationController { /** * Callback from the ruler when a particular revision has been selected by the user. - * By default, this method will set the selection of the history list selection + * By default, this method will set the selection of the history list selection * provider that was passed in the constructor using the history entry returned * by {@link #getHistoryEntry(Revision)}. Subclasses may override. * @param selected the selected revision */ protected void revisionSelected(Revision selected) { Object entry= getHistoryEntry(selected); - + if (entry != null) { IStructuredSelection selection = new StructuredSelection(entry); if (fHistoryListSelectionProvider instanceof Viewer) { @@ -357,7 +357,7 @@ public abstract class RevisionAnnotationController { } } } - + /** * Return the history list entry corresponding to the provided revision. * THis method is called by the {@link #revisionSelected(Revision)} method in @@ -378,14 +378,14 @@ public abstract class RevisionAnnotationController { fRulerSelectionProvider.setSelection(new StructuredSelection(id)); } } - + /** * Return the revision id associated with the given history list entry. * This method is used to determine which revision in the revision ruler should * be highlighted when the history list selection provider fires a selection changed event. * By default, this method tries to adapt the entry to either {@link IFileRevision} or * {@link IResourceVariant} in order to obtain the content identifier. Subclasses may override. - * + * * @param historyEntry the history list entry * @return the id of the entry */ @@ -399,5 +399,5 @@ public abstract class RevisionAnnotationController { return variant.getContentIdentifier(); return null; } - + } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareAdapter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareAdapter.java index 920119973..ceeb92e56 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareAdapter.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareAdapter.java @@ -24,11 +24,11 @@ import org.eclipse.ui.IMemento; * <p> * Clients should not implement this interface but should subclass {@link SynchronizationCompareAdapter} * instead. - * + * * @since 3.2 */ public interface ISynchronizationCompareAdapter { - + /** * Return whether their is a compare input associated with the given object. * In other words, return <code>true</code> if {@link #asCompareInput(ISynchronizationContext, Object) } @@ -38,7 +38,7 @@ public interface ISynchronizationCompareAdapter { * @return whether their is a compare input associated with the given object */ boolean hasCompareInput(ISynchronizationContext context, Object object); - + /** * Return a compare input for the given model object. Creation of the input * should be fast. Synchronization information calculations that are longer @@ -52,14 +52,14 @@ public interface ISynchronizationCompareAdapter { * if they wish to tailor the compare editor used to show the compare input * of provide an {@link SaveableComparison} in order to have more control * over the save lifecycle during a merge. - * + * * @param context the synchronization context * @param o the model object * @return a compare input or <code>null</code> if the model object is * in-sync or otherwise cannot be compared. */ ICompareInput asCompareInput(ISynchronizationContext context, Object o); - + /** * Get the name associated with the model object of the given mapping. * This name should be suitable for display to the user. @@ -67,7 +67,7 @@ public interface ISynchronizationCompareAdapter { * @return the name of the mapping's model object */ public String getName(ResourceMapping mapping); - + /** * Get the path associated with the model object * of the given mapping. @@ -76,7 +76,7 @@ public interface ISynchronizationCompareAdapter { * @return the path of the model object of the mapping */ public String getPathString(ResourceMapping mapping); - + /** * Return an image descriptor that can be displayed as an icon for the * model object of the given resource mapping. @@ -86,16 +86,16 @@ public interface ISynchronizationCompareAdapter { * @since 3.3 */ public ImageDescriptor getImageDescriptor(ResourceMapping mapping); - + /** - * Save the given resource mappings from this adapters + * Save the given resource mappings from this adapters * model provider into the given memento in a form * that can be restored at a future time. * @param mappings the resource mappings to save * @param memento the memento where the mappings should be saved */ public void save(ResourceMapping[] mappings, IMemento memento); - + /** * Restore the previously saved resource mappings. * @param memento a memento @@ -107,9 +107,9 @@ public interface ISynchronizationCompareAdapter { * Return the synchronization state of the resource mapping with respect to * the given team state provider. This method is invoked from instances of * {@link ITeamStateProvider} when the synchronization state description for - * an element is requested. This method can return -1 to indicate that the state + * an element is requested. This method can return -1 to indicate that the state * calculation should be performed using the resources that the element maps to. - * + * * @param provider * the team state provider * @param mapping @@ -121,9 +121,9 @@ public interface ISynchronizationCompareAdapter { * @return the synchronization state of the element or -1 if the calculation * of the state should be done using the resources of the mapping. * @throws CoreException - * + * * @since 3.3 */ public int getSynchronizationState(ITeamStateProvider provider, ResourceMapping mapping, int stateMask, IProgressMonitor monitor) throws CoreException; - + } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareInput.java index 02a425840..c3673fccf 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareInput.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareInput.java @@ -17,18 +17,18 @@ import org.eclipse.core.runtime.IProgressMonitor; /** * This interface defines extensions to the {@link ICompareInput} - * interface that are used for compare inputs that are returned from the + * interface that are used for compare inputs that are returned from the * {@link ISynchronizationCompareAdapter#asCompareInput(org.eclipse.team.core.mapping.ISynchronizationContext, Object)} * method. * <p> * Clients may implement this interface. - * + * * @see ISynchronizationCompareAdapter#asCompareInput(org.eclipse.team.core.mapping.ISynchronizationContext, Object) - * + * * @since 3.2 */ public interface ISynchronizationCompareInput extends ICompareInput { - + /** * Return the saveable for this compare input or * <code>null</code> if the input is saved directly to disk when the @@ -36,16 +36,16 @@ public interface ISynchronizationCompareInput extends ICompareInput { * @return the saveable for this compare input */ SaveableComparison getSaveable(); - + /** - * Prepare the compare input associated with a model element for display using - * the compare configuration. + * Prepare the compare input associated with a model element for display using + * the compare configuration. * @param configuration the compare configuration for the editor that will display the input * @param monitor a progress monitor - * @throws CoreException + * @throws CoreException */ void prepareInput(CompareConfiguration configuration, IProgressMonitor monitor) throws CoreException; - + /** * Return a human readable path for the compare input that can be * used in a tooltip or other displays that can show more detailed information. diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderDescriptor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderDescriptor.java index 2870f7726..bf12aa8e1 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderDescriptor.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderDescriptor.java @@ -15,10 +15,10 @@ import org.eclipse.jface.preference.IPreferencePage; import org.eclipse.jface.resource.ImageDescriptor; /** - * A description of a single extension registered with the + * A description of a single extension registered with the * <code>org.eclipse.team.ui.teamContentProviders</code> * extension point. - * + * * * <p> * This interface is not intended to be implemented by clients. * @since 3.2 @@ -41,9 +41,9 @@ public interface ITeamContentProviderDescriptor { public String getModelProviderId(); /** - * Return an image descriptor that can be displayed with this content - * extension. - * @return an image descriptor that can be displayed with this content + * Return an image descriptor that can be displayed with this content + * extension. + * @return an image descriptor that can be displayed with this content * extension */ public ImageDescriptor getImageDescriptor(); @@ -56,7 +56,7 @@ public interface ITeamContentProviderDescriptor { * @throws CoreException */ public IPreferencePage createPreferencePage() throws CoreException; - + /** * Return whether this content provider is enabled. If it is not * enabled, it should not be included in any viewers. @@ -69,7 +69,7 @@ public interface ITeamContentProviderDescriptor { * @return a string containing the name or null if no name has been specified */ public String getName(); - + /** * Return whether the FLAT layout is supported by this content provider. * @return whether the FLAT layout is supported by this content provider diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderManager.java index 135825675..1a0ebea6c 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderManager.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderManager.java @@ -26,7 +26,7 @@ import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration; * the <code>org.eclipse.ui.navigator.navigatorContent</code> extension point. * <p> * This interface is not intended to be implemented by clients. - * + * * @see TeamUI#getTeamContentProviderManager() * @see ModelProvider * @since 3.2 @@ -48,7 +48,7 @@ public interface ITeamContentProviderManager { * shown in an {@link ISynchronizePage}. */ public static final String P_SYNCHRONIZATION_CONTEXT = TeamUIPlugin.ID + ".synchronizationContext"; //$NON-NLS-1$ - + /** * Property constant used to store and retrieve the resource mapping scope * from the {@link org.eclipse.ui.navigator.IExtensionStateModel} used by @@ -66,29 +66,29 @@ public interface ITeamContentProviderManager { * @since 3.3 */ public static final String PROP_PAGE_LAYOUT = TeamUIPlugin.ID + ".pageLayout"; //$NON-NLS-1$ - + /** - * Value for the PROP_PAGE_LAYOUT that indicates that the models should display + * Value for the PROP_PAGE_LAYOUT that indicates that the models should display * their elements in tree form. * @since 3.3 */ public static final String TREE_LAYOUT = TeamUIPlugin.ID + ".treeLayout"; //$NON-NLS-1$ - + /** - * Value for the PROP_PAGE_LAYOUT that indicates that the models should display + * Value for the PROP_PAGE_LAYOUT that indicates that the models should display * their elements as a flat list. Only models that indicate in their <code>teamContentProviders</code> * that they support the flat layout will be enabled when the PROP_PAGE_LAYOUT is set * to FLAT_LAYOUT. * @since 3.3 */ public static final String FLAT_LAYOUT = TeamUIPlugin.ID + ".flatLayout"; //$NON-NLS-1$ - + /** * Property constant used during property change notification to indicate * that one one or more model providers have either been enabled or disabled. */ public static final String PROP_ENABLED_MODEL_PROVIDERS = TeamUIPlugin.ID + ".ENABLED_MODEL_PROVIDERS"; //$NON-NLS-1$ - + /** * Return descriptors for all the registered content extensions. * @return descriptors for all the registered content extensions @@ -105,13 +105,13 @@ public interface ITeamContentProviderManager { */ public ITeamContentProviderDescriptor getDescriptor( String modelProviderId); - + /** * Add a property change listener to the manager. * @param listener the listener */ public void addPropertyChangeListener(IPropertyChangeListener listener); - + /** * Remove a property change listener from the manager. * @param listener the listener @@ -121,17 +121,17 @@ public interface ITeamContentProviderManager { /** * Convenience method that returns the list of all enabled content extension ids for * models that have mappings in the given scope. - * + * * @param scope * the scope * @return the list of all content extension ids for models that have * mappings in the given scope */ public String[] getContentProviderIds(ISynchronizationScope scope); - + /** * Enable the given content descriptors, disabling all others. - * This method will fire a {@link ITeamContentProviderManager#PROP_ENABLED_MODEL_PROVIDERS} + * This method will fire a {@link ITeamContentProviderManager#PROP_ENABLED_MODEL_PROVIDERS} * property change event to any registered listeners. * @param descriptors the descriptors to be enabled. * @see ITeamContentProviderDescriptor#isEnabled() diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeEvent.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeEvent.java index 7c1c2f5a5..021f3cdd2 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeEvent.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeEvent.java @@ -14,25 +14,25 @@ import org.eclipse.core.resources.IResource; import org.eclipse.team.ui.synchronize.TeamStateChangeEvent; /** - * A description of the team state changes that have occurred. This event + * A description of the team state changes that have occurred. This event * indicates the resources for which the team state may have changed. * However, it may be the case that the state did not actually change. Clients * that wish to determine if the state ha changed must cache the previous state * and re-obtain the state when they receive this event. Also, the event may - * not include team state changes that resulted from local changes. Clients should listen + * not include team state changes that resulted from local changes. Clients should listen * for resource changes as well. * <p> * This interface is not intended to be implemented by clients. Clients should * instead use {@link TeamStateChangeEvent}. - * + * * @see ITeamStateChangeListener * @see ITeamStateProvider * @see TeamStateChangeEvent - * + * * @since 3.2 */ public interface ITeamStateChangeEvent { - + /** * Return the set of resources that were previously undecorated * but are now decorated. @@ -40,7 +40,7 @@ public interface ITeamStateChangeEvent { * but are now decorated. */ public IResource[] getAddedRoots(); - + /** * Return the set of resources that were previously decorated * but are now undecorated. @@ -48,23 +48,23 @@ public interface ITeamStateChangeEvent { * but are now undecorated. */ public IResource[] getRemovedRoots(); - + /** * Return the set of resources whose decorated state has changed. * @return the set of resources whose decorated state has changed. */ public IResource[] getChangedResources(); - + /** * Return whether the resource has any state changes. This returns * <code>true</code> if the resource is included in the set * of changes returned by {@link #getChangedResources()} or * if it is a descendant of a root that is present in a set * returned by {@link #getAddedRoots()} or {@link #getRemovedRoots()}. - * + * * @param resource the resource * @return whether the resource has any state changes */ public boolean hasChange(IResource resource); - + } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeListener.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeListener.java index f6a4fc011..ad5748a0c 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeListener.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeListener.java @@ -19,7 +19,7 @@ import org.eclipse.team.ui.synchronize.TeamStateProvider; * A listener registered with an {@link TeamStateProvider} in order to * receive change events when the team state of any * resources change. It is the responsibility of clients to determine if - * a label update is required based on the changed resources. + * a label update is required based on the changed resources. * <p> * Change events may not be issued if a local change has resulted in a * synchronization state change. It is up to clients to check whether @@ -27,12 +27,12 @@ import org.eclipse.team.ui.synchronize.TeamStateProvider; * by using the resource delta mechanism. * <p> * Clients may implement this interface - * + * * @see IWorkspace#addResourceChangeListener(org.eclipse.core.resources.IResourceChangeListener) * @since 3.2 */ public interface ITeamStateChangeListener extends EventListener { - + /** * Notification that the team state of resources * has changed. diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateDescription.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateDescription.java index 8fdff21c4..4aca565c1 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateDescription.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateDescription.java @@ -22,7 +22,7 @@ import org.eclipse.team.ui.synchronize.TeamStateProvider; * <p> * This interface is not intended to be implemented by clients. Clients that wish * to create a description should use {@link TeamStateDescription}. - * + * * @see TeamStateProvider * @since 3.2 */ @@ -33,7 +33,7 @@ public interface ITeamStateDescription { * state description was generated. Only the portion of the synchronization * state covered by <code>stateMask</code> used when obtaining this * description is returned. - * + * * @return the synchronization state of the given element * @see IDiff * @see IThreeWayDiff @@ -45,7 +45,7 @@ public interface ITeamStateDescription { * Return the portion of the state flags that represent the kind associated * with the element for which this description was generated. See * {@link IDiff#getKind()} for a description of what this value represents. - * + * * @return the kind associated with the element for which this description * was generated */ @@ -56,7 +56,7 @@ public interface ITeamStateDescription { * associated with the element for which this description was generated. See * {@link IThreeWayDiff#getDirection()} for a description of what this value * represents. - * + * * @return the direction associated with the element for which this * description was generated */ @@ -65,7 +65,7 @@ public interface ITeamStateDescription { /** * Return the properties names for all decorated properties associated with * the element for which this description was generated. - * + * * @return the properties names for all decorated properties */ public abstract String[] getPropertyNames(); @@ -77,9 +77,9 @@ public interface ITeamStateDescription { * @return the value associated with the given property or <code>null</code> */ public abstract Object getProperty(String property); - + /** - * Return whether this state description is equal the to given object. + * Return whether this state description is equal the to given object. * Clients should use this method to test whether two state * descriptions are equal. * @param object the object diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateProvider.java index 6da3d836c..76bf1628f 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateProvider.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateProvider.java @@ -29,14 +29,14 @@ import org.eclipse.team.ui.synchronize.SubscriberTeamStateProvider; * This interface is not intended to be implemented by clients. Clients should * instead subclass {@link TeamStateProvider} or * {@link SubscriberTeamStateProvider}. - * + * * @see IAdapterManager * @see RepositoryProviderType * @see RepositoryProviderType#getSubscriber() * @see TeamStateProvider * @see SubscriberTeamStateProvider * @see SynchronizationStateTester - * + * * @since 3.2 */ public interface ITeamStateProvider { @@ -47,12 +47,12 @@ public interface ITeamStateProvider { * passing he mask returned from {@link #getDecoratedStateMask(Object)}; */ public static final int USE_DECORATED_STATE_MASK = -1; - + /** * Return whether decoration is enabled for the given model element. If * decoration is not enabled, the model does not need to fire label change * events when the team state of the element changes. - * + * * @param element * the model element * @return whether decoration is enabled for the given model element @@ -61,7 +61,7 @@ public interface ITeamStateProvider { /** * Return whether the given element has any decorated state. - * + * * @param element * the element being decorated * @return whether the given element has any decorated state @@ -75,7 +75,7 @@ public interface ITeamStateProvider { * decorated state from * {@link #getStateDescription(Object, int, String[], IProgressMonitor)} in * order to determine if the decorated state has changed. - * + * * <p> * The state mask can consist of the following standard flags: * <ul> @@ -89,7 +89,7 @@ public interface ITeamStateProvider { * <p> * The mask can also consist of flag bits that are unique to the repository * provider associated with the resources that the element maps to. - * + * * @param element * the model element to be decorated * @return the mask that indicates what state the appropriate team decorator @@ -103,7 +103,7 @@ public interface ITeamStateProvider { * Return the set of property identifiers that represent the set of * properties that the team decorator would decorate for the given model * element. - * + * * @param element * the model element to be decorated * @return the set of decorated properties @@ -120,7 +120,7 @@ public interface ITeamStateProvider { * should be <code>null</code> or the value returned from * {@link #getDecoratedProperties(Object)} if the client wishes to obtain * the current decorated state. - * + * * @param element * the model element * @param stateMask @@ -143,10 +143,10 @@ public interface ITeamStateProvider { * of the resources associated with the provider. If a * {@link RemoteResourceMappingContext} is returned, then the client may * access the remote state. - * + * * @param element * the element for which remote contents are desired - * + * * @return a resource mapping context that gives access to the remote state * of the resources associated with the provider */ @@ -155,7 +155,7 @@ public interface ITeamStateProvider { /** * Add a decorated state change listener to the provider. * Adding the same listener more than once has no effect. - * + * * @param listener * the listener */ @@ -165,7 +165,7 @@ public interface ITeamStateProvider { /** * Remove the decorated state change listener to the provider. * Removing a listener that is not registered has no effect. - * + * * @param listener * the listener */ diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/MergeActionHandler.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/MergeActionHandler.java index e31159538..39cc095ba 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/MergeActionHandler.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/MergeActionHandler.java @@ -23,11 +23,11 @@ import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration; /** * An abstract superclass that enables models to create handlers * for the basic merge operations (merge, overwrite and mark-as-merged). - * This class makes use of a {@link SynchronizationOperation} to determine its + * This class makes use of a {@link SynchronizationOperation} to determine its * enablement state and execute the handler. Enablement is determined * using {@link SynchronizationOperation#shouldRun()} and the handler will * invoke {@link SynchronizationOperation#run()} when executed. - * + * * @since 3.2 * @see SynchronizationActionProvider */ @@ -42,10 +42,10 @@ public abstract class MergeActionHandler extends AbstractHandler { updatedEnablement(event); } }; - + /** * Return an instance of the default handler for the given merge action id. - * Note that this handler must be disposed by the caller when it is no longer + * Note that this handler must be disposed by the caller when it is no longer * needed. * @param mergeActionId the merge action id * @param configuration the synchronization page configuration @@ -78,9 +78,9 @@ public abstract class MergeActionHandler extends AbstractHandler { selectionProvider.addSelectionChangedListener(listener); updateEnablement((IStructuredSelection)selectionProvider.getSelection()); } - + /** - * Deregister this handler from selection change events. + * Deregister this handler from selection change events. */ @Override public void dispose() { @@ -122,7 +122,7 @@ public abstract class MergeActionHandler extends AbstractHandler { protected final IStructuredSelection getStructuredSelection() { return selection; } - + /* (non-Javadoc) * @see org.eclipse.core.commands.AbstractHandler#isEnabled() */ @@ -130,7 +130,7 @@ public abstract class MergeActionHandler extends AbstractHandler { public boolean isEnabled() { return enabled; } - + /** * Set the enablement of this handler. * @param isEnabled whether the handler is enabled @@ -141,7 +141,7 @@ public abstract class MergeActionHandler extends AbstractHandler { fireHandlerChanged(new HandlerEvent(this, true, false)); } } - + /* (non-Javadoc) * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent) */ @@ -169,7 +169,7 @@ public abstract class MergeActionHandler extends AbstractHandler { * @return a synchronization operation */ protected abstract SynchronizationOperation getOperation(); - + /** * Return the saveable that is the target of this handler. * By default, the saveable of this handlers operation is returned. diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SaveableComparison.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SaveableComparison.java index 40d4162b4..f40cb4c76 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SaveableComparison.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SaveableComparison.java @@ -20,7 +20,7 @@ import org.eclipse.ui.*; * container in order to determine when a save is required. * <p> * Clients may subclass this class. - * + * * @since 3.2 */ public abstract class SaveableComparison extends Saveable { @@ -29,7 +29,7 @@ public abstract class SaveableComparison extends Saveable { * The property id for <code>isDirty</code>. */ public static final int PROP_DIRTY = IWorkbenchPartConstants.PROP_DIRTY; - + private boolean dirty; private ListenerList listeners = new ListenerList(ListenerList.IDENTITY); @@ -115,7 +115,7 @@ public abstract class SaveableComparison extends Saveable { }); } } - + /** * Method invoked from {@link #doSave(IProgressMonitor)} to write * out the buffer. By default, this method invokes <code>doSave</code> @@ -124,9 +124,9 @@ public abstract class SaveableComparison extends Saveable { * @throws CoreException if errors occur */ protected abstract void performSave(IProgressMonitor monitor) throws CoreException; - + /** - * Method invoked from {@link #doRevert(IProgressMonitor)} to discard the + * Method invoked from {@link #doRevert(IProgressMonitor)} to discard the * changes in the buffer. * @param monitor a progress monitor */ diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationActionProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationActionProvider.java index 496bdf993..2c6555d46 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationActionProvider.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationActionProvider.java @@ -39,24 +39,24 @@ import org.eclipse.ui.navigator.*; * in the {@link #fillActionBars(IActionBars)} method. * <p> * This class may be subclasses by clients. - * + * * @see MergeActionHandler * @since 3.2 */ public class SynchronizationActionProvider extends CommonActionProvider { - + /** * Action id constant for the merge action. * @see #registerHandler(String, IHandler) */ public static final String MERGE_ACTION_ID = "org.eclipse.team.ui.mergeAction"; //$NON-NLS-1$ - + /** * Action id constant for the merge action. * @see #registerHandler(String, IHandler) */ public static final String OVERWRITE_ACTION_ID = "org.eclipse.team.ui.overwriteAction"; //$NON-NLS-1$ - + /** * Action id constant for the mark-as-merge action. * @see #registerHandler(String, IHandler) @@ -92,7 +92,7 @@ public class SynchronizationActionProvider extends CommonActionProvider { * still call this method, in which case they only need to handle providing * open for non-files. Otherwise, if they do not call this method, they must * provide all non-compare related open items. - * + * */ protected void initializeOpenActions() { ICommonViewerSite cvs = getActionSite().getViewSite(); @@ -105,7 +105,7 @@ public class SynchronizationActionProvider extends CommonActionProvider { } } } - + /** * Return the configuration from the synchronize page that contains * the common viewer. @@ -125,7 +125,7 @@ public class SynchronizationActionProvider extends CommonActionProvider { protected final IExtensionStateModel getExtensionStateModel() { return getActionSite().getExtensionStateModel(); } - + /** * Return the synchronization context to which the actions of this provider * apply. @@ -135,10 +135,10 @@ public class SynchronizationActionProvider extends CommonActionProvider { protected final ISynchronizationContext getSynchronizationContext() { return (ISynchronizationContext)getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT); } - + /** * Register the handler as the handler for the given action id when - * a merge action is performed on elements that match this groups + * a merge action is performed on elements that match this groups * enablement. * @param actionId the id of the merge action * @param handler the handler for elements of the model that provided this group @@ -146,7 +146,7 @@ public class SynchronizationActionProvider extends CommonActionProvider { protected void registerHandler(String actionId, IHandler handler) { handlers.put(actionId, handler); } - + /* (non-Javadoc) * @see org.eclipse.ui.actions.ActionGroup#fillContextMenu(org.eclipse.jface.action.IMenuManager) */ @@ -165,7 +165,7 @@ public class SynchronizationActionProvider extends CommonActionProvider { openWithActions.fillContextMenu(menu, fileGroup.getId()); } } - + /* (non-Javadoc) * @see org.eclipse.ui.actions.ActionGroup#fillActionBars(org.eclipse.ui.IActionBars) */ @@ -174,19 +174,19 @@ public class SynchronizationActionProvider extends CommonActionProvider { super.fillActionBars(actionBars); if (openWithActions != null) openWithActions.fillActionBars(actionBars); } - + @Override public void updateActionBars() { super.updateActionBars(); if (openWithActions != null) openWithActions.updateActionBars(); } - + @Override public void setContext(ActionContext context) { super.setContext(context); if (openWithActions != null) openWithActions.setContext(context); } - + /* (non-Javadoc) * @see org.eclipse.ui.actions.ActionGroup#dispose() */ diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationCompareAdapter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationCompareAdapter.java index 48f44b7a6..790ff2a6e 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationCompareAdapter.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationCompareAdapter.java @@ -31,7 +31,7 @@ import org.eclipse.ui.model.IWorkbenchAdapter; * An abstract implementation of {@link ISynchronizationCompareAdapter}. * <p> * Clients may subclass this class. - * + * * @since 3.2 */ public abstract class SynchronizationCompareAdapter implements ISynchronizationCompareAdapter { @@ -88,7 +88,7 @@ public abstract class SynchronizationCompareAdapter implements ISynchronizationC } return ""; //$NON-NLS-1$ } - + /* (non-Javadoc) * @see org.eclipse.team.ui.mapping.IResourceMappingPersistenceAdapter#getFullPath(org.eclipse.core.resources.mapping.ResourceMapping) */ @@ -117,7 +117,7 @@ public abstract class SynchronizationCompareAdapter implements ISynchronizationC } return getName(mapping); } - + /* (non-Javadoc) * @see org.eclipse.team.ui.mapping.ISynchronizationCompareAdapter#getImageDescriptor(org.eclipse.core.resources.mapping.ResourceMapping) */ @@ -150,13 +150,13 @@ public abstract class SynchronizationCompareAdapter implements ISynchronizationC } return null; } - + /** * Return the synchronization state of the resource mapping with respect to * the given team state provider. This method is invoked from instances of * {@link ITeamStateProvider} when the synchronization state description for * an element is requested. - * + * * @param provider * the team state provider * @param mapping @@ -168,12 +168,12 @@ public abstract class SynchronizationCompareAdapter implements ISynchronizationC * @return the synchronization state of the element or -1 if the calculation * of the state should be done using the resources of the mapping. * @throws CoreException - * + * * @since 3.3 */ @Override public int getSynchronizationState(ITeamStateProvider provider, ResourceMapping mapping, int stateMask, IProgressMonitor monitor) throws CoreException { return -1; } - + } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationContentProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationContentProvider.java index 73b840070..521c9bd01 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationContentProvider.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationContentProvider.java @@ -33,7 +33,7 @@ import org.eclipse.ui.navigator.*; /** * Abstract team aware content provider that delegates to another content provider. - * + * * @since 3.2 */ public abstract class SynchronizationContentProvider implements ICommonContentProvider, IDiffChangeListener, IPropertyChangeListener { @@ -41,7 +41,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr private Viewer viewer; private boolean empty; private ICommonContentExtensionSite site; - + /* (non-Javadoc) * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object) */ @@ -57,7 +57,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr public Object[] getElements(Object parent) { return internalGetChildren(parent, true); } - + /* (non-Javadoc) * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object) */ @@ -81,7 +81,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr public boolean hasChildren(Object element) { return internalHasChildren(element); } - + private Object[] internalGetChildren(Object parent, boolean isElement) { Object element = internalGetElement(parent); if (element instanceof ISynchronizationScope) { @@ -139,9 +139,9 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr /** * Return whether the content provider has been initialized and is ready to * provide content in the given context. By default, <code>true</code> is returned. Subclasses - * that need to perform extra processing to prepare should override this method and + * that need to perform extra processing to prepare should override this method and * also override {@link #requestInitialization(ISynchronizationContext)}. - * + * * @param context the context * @return whether the content provider has been initialized and is ready to * provide content in he given context. @@ -149,14 +149,14 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr protected boolean isInitialized(ISynchronizationContext context) { return true; } - + /** * Subclasses that need to perform extra processing to prepare their model * to be displayed by this content provider should override this method and * launch a background task to prepare what is required to display their * model for the given context. An appropriate viewer refresh on the model * provider should be issued when the model is prepared. - * + * * @param context * the context */ @@ -210,7 +210,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr /** * Return whether the given element has children in the given scope. * By default, true is returned if the given element contains any elements - * in the scope or if any of the elements in the scope contain the given + * in the scope or if any of the elements in the scope contain the given * element and the delegate provider returns children for the element. * The {@link ResourceMapping#contains(ResourceMapping)} is used to test * for containment. @@ -240,7 +240,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr * Return whether the given element has children in the given * context. The children may or may not exist locally. * By default, this method returns true if the traversals for - * the element contain any diffs. This could result in false + * the element contain any diffs. This could result in false * positives. Subclasses can override to provide a more * efficient or precise answer. * @param element a model element. @@ -293,7 +293,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr configuration.addPropertyChangeListener(this); ITreeContentProvider provider = getDelegateContentProvider(); if (provider instanceof ICommonContentProvider) { - ((ICommonContentProvider) provider).init(site); + ((ICommonContentProvider) provider).init(site); } ISynchronizationContext context = getContext(); if (context != null) @@ -310,7 +310,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr refresh(); } } - + /** * Return whether elements with the given direction should be included in * the contents. The direction is one of {@link IThreeWayDiff#INCOMING}, @@ -321,7 +321,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr * {@link #getChildren(Object) } is called. It accessing the * <code>ISynchronizePageConfiguration.P_MODE</code> property on the state * model provided by the view to determine what kinds should be included. - * + * * @param direction * the synchronization direction * @return whether elements with the given synchronization kind should be @@ -333,7 +333,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr return ((SynchronizePageConfiguration)configuration).includeDirection(direction); return true; } - + /** * Return the synchronization context associated with the view to which * this content provider applies. A <code>null</code> is returned if @@ -365,7 +365,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr ITeamContentProviderManager.P_SYNCHRONIZATION_SCOPE); return null; } - + /** * Return the synchronization page configuration associated with the view to which * this content provider applies. A <code>null</code> is returned if @@ -381,7 +381,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr ITeamContentProviderManager.P_SYNCHRONIZATION_PAGE_CONFIGURATION); return null; } - + /* (non-Javadoc) * @see org.eclipse.ui.navigator.IMementoAware#restoreState(org.eclipse.ui.IMemento) */ @@ -389,7 +389,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr public void restoreState(IMemento aMemento) { ITreeContentProvider provider = getDelegateContentProvider(); if (provider instanceof ICommonContentProvider) { - ((ICommonContentProvider) provider).restoreState(aMemento); + ((ICommonContentProvider) provider).restoreState(aMemento); } } @@ -400,10 +400,10 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr public void saveState(IMemento aMemento) { ITreeContentProvider provider = getDelegateContentProvider(); if (provider instanceof ICommonContentProvider) { - ((ICommonContentProvider) provider).saveState(aMemento); + ((ICommonContentProvider) provider).saveState(aMemento); } } - + /* (non-Javadoc) * @see org.eclipse.team.core.delta.ISyncDeltaChangeListener#syncDeltaTreeChanged(org.eclipse.team.core.delta.ISyncDeltaChangeEvent, org.eclipse.core.runtime.IProgressMonitor) */ @@ -411,7 +411,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr public void diffsChanged(IDiffChangeEvent event, IProgressMonitor monitor) { refresh(); } - + /* (non-Javadoc) * @see org.eclipse.team.core.diff.IDiffChangeListener#propertyChanged(int, org.eclipse.core.runtime.IPath[]) */ @@ -434,7 +434,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr else treeViewer.refresh(getModelProvider()); } - + }, getViewer().getControl()); } @@ -444,7 +444,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr * @return the model content provider */ protected abstract ITreeContentProvider getDelegateContentProvider(); - + /** * Return the model provider for this content provider. * @return the model provider for this content provider @@ -457,13 +457,13 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr throw new IllegalStateException(); } } - + /** * Return the id of model provider for this content provider. * @return the model provider for this content provider */ protected abstract String getModelProviderId(); - + /** * Return the object that acts as the model root. It is used when getting the children * for a model provider. @@ -478,7 +478,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr protected final Viewer getViewer() { return viewer; } - + /** * Return the subset of the given children that are in the * given scope or are parents of elements that are in scope. @@ -498,7 +498,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr } return result.toArray(new Object[result.size()]); } - + /** * Return the subset of children that are of interest from the given context. * By default, this method returns those children whose traversals contain @@ -563,7 +563,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr * calling {@link #getTraversals(ISynchronizationContext, Object)} to get * the traversals, then obtaining the diffs from the context's diff tree and * then calling {@link #isVisible(IDiff)} for each diff. - * + * * @param context * the synchronization context * @param object @@ -592,14 +592,14 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr } return false; } - + /** * Return whether the given diff should be visible based on the * configuration of the synchronization page showing this content. An * {@link IThreeWayDiff} is visible if the direction of the change matches * the mode of the synchronization page. An {@link ITwoWayDiff} is visible * if it has a kind that represents a change. - * + * * @param diff * the diff * @return whether the diff should be visible @@ -613,17 +613,17 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr } /** - * Return the traversals for the given object in the given context. This + * Return the traversals for the given object in the given context. This * method must not be long running. If a long running calculation is required * to calculate the traversals, an empty traversal should be returned and the - * content provider should initiate a background task to calculate the + * content provider should initiate a background task to calculate the * required traversals and update the view according when the task completes. * @param context the synchronization context * @param object the object * @return the traversals for the given object in the given context */ protected abstract ResourceTraversal[] getTraversals(ISynchronizationContext context, Object object); - + /** * Handle the given exception that occurred while calculating the * children for an element. @@ -674,7 +674,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr public ICommonContentExtensionSite getExtensionSite() { return site; } - + private Object internalGetElement(Object elementOrPath) { if (elementOrPath instanceof TreePath) { TreePath tp = (TreePath) elementOrPath; @@ -682,7 +682,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr } return elementOrPath; } - + /** * Return whether the page has been set to use a flat layout. * @return whether the page has been set to use a flat layout diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationLabelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationLabelProvider.java index b74cfcbf9..a44032627 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationLabelProvider.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationLabelProvider.java @@ -25,7 +25,7 @@ import org.eclipse.ui.navigator.*; /** * A label provider wrapper that adds synchronization image and/or text decorations * to the image and label obtained from the delegate provider. - * + * * @since 3.2 */ public abstract class SynchronizationLabelProvider extends AbstractSynchronizeLabelProvider implements ICommonLabelProvider, IFontProvider { @@ -34,12 +34,12 @@ public abstract class SynchronizationLabelProvider extends AbstractSynchronizeLa private ISynchronizationContext context; private ITreeContentProvider contentProvider; private ICommonContentExtensionSite site; - + private void init(ISynchronizationScope input, ISynchronizationContext context) { this.scope = input; this.context = context; } - + /* (non-Javadoc) * @see org.eclipse.ui.navigator.ICommonLabelProvider#init(org.eclipse.ui.navigator.ICommonContentExtensionSite) */ @@ -47,7 +47,7 @@ public abstract class SynchronizationLabelProvider extends AbstractSynchronizeLa public void init(ICommonContentExtensionSite site) { this.site = site; contentProvider = site.getExtension().getContentProvider(); - init((ISynchronizationScope)site.getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_SCOPE), + init((ISynchronizationScope)site.getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_SCOPE), (ISynchronizationContext)site.getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT)); } @@ -70,7 +70,7 @@ public abstract class SynchronizationLabelProvider extends AbstractSynchronizeLa public ISynchronizationScope getScope() { return scope; } - + /* (non-Javadoc) * @see org.eclipse.ui.navigator.IMementoAware#restoreState(org.eclipse.ui.IMemento) */ @@ -92,7 +92,7 @@ public abstract class SynchronizationLabelProvider extends AbstractSynchronizeLa ((ICommonLabelProvider) provider).saveState(aMemento); } } - + /* (non-Javadoc) * @see org.eclipse.ui.navigator.IDescriptionProvider#getDescription(java.lang.Object) */ @@ -112,7 +112,7 @@ public abstract class SynchronizationLabelProvider extends AbstractSynchronizeLa protected boolean isDecorationEnabled() { return getContext() != null; } - + /* (non-Javadoc) * @see org.eclipse.team.internal.ui.mapping.SynchronizationStateLabelProvider#getImage(java.lang.Object) */ @@ -124,7 +124,7 @@ public abstract class SynchronizationLabelProvider extends AbstractSynchronizeLa } return image; } - + /** * Return the root object for the model. By default, it is the * workspace root. Subclasses may override. This object is used to @@ -134,7 +134,7 @@ public abstract class SynchronizationLabelProvider extends AbstractSynchronizeLa protected Object getModelRoot() { return ResourcesPlugin.getWorkspace().getRoot(); } - + /* (non-Javadoc) * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeLabelProvider#getText(java.lang.Object) */ @@ -160,7 +160,7 @@ public abstract class SynchronizationLabelProvider extends AbstractSynchronizeLa public ICommonContentExtensionSite getExtensionSite() { return site; } - + private Object internalGetElement(Object element) { if (element instanceof TreePath) { TreePath tp = (TreePath) element; diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationOperation.java index 86fbdee6d..3aade8bd1 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationOperation.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationOperation.java @@ -30,10 +30,10 @@ import org.eclipse.ui.IWorkbenchPart; * associated with a synchronization or merge context. * <p> * This class may be subclasses by clients. - * + * * @see ISynchronizationContext * @see IMergeContext - * + * * @since 3.2 */ public abstract class SynchronizationOperation extends TeamOperation { @@ -53,7 +53,7 @@ public abstract class SynchronizationOperation extends TeamOperation { } return null; } - + /** * Create a synchronize operation that operations on the given elements * @param configuration the configuration for the page the operation is associated with @@ -82,7 +82,7 @@ public abstract class SynchronizationOperation extends TeamOperation { protected ISynchronizationContext getContext() { return (ISynchronizationContext)getConfiguration().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT); } - + /** * Return the model elements that are the target of this operation. * @return the model elements that are the target of this operation @@ -90,7 +90,7 @@ public abstract class SynchronizationOperation extends TeamOperation { public Object[] getElements() { return elements; } - + /** * Make <code>shouldRun</code> public so the result * can be used to provide handler enablement @@ -99,11 +99,11 @@ public abstract class SynchronizationOperation extends TeamOperation { public boolean shouldRun() { return super.shouldRun(); } - + /** * Return the saveable that this operation will write its results * to or <code>null</code> if the operation does not buffer - * its results. By default, <code>null</code> is returned but + * its results. By default, <code>null</code> is returned but * subclasses may override. * @return the saveable that this operation will write its results * to or <code>null</code> @@ -111,7 +111,7 @@ public abstract class SynchronizationOperation extends TeamOperation { public SaveableComparison getSaveable() { return null; } - + /* (non-Javadoc) * @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor) */ diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationStateTester.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationStateTester.java index 972f4978d..c723f3735 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationStateTester.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationStateTester.java @@ -23,8 +23,8 @@ import org.eclipse.ui.IDecoratorManager; /** * A state change tester is used by logical models to communicate the - * synchronization state of their logical model elements to - * the lightweight label decorator of a team provider. + * synchronization state of their logical model elements to + * the lightweight label decorator of a team provider. * <p> * There are two different types of elements being decorated: those * that have a one-to-one mapping to a resource and those that do not. @@ -40,7 +40,7 @@ import org.eclipse.ui.IDecoratorManager; * required and to communicate the dirty state of their logical model * elements to the team decorator. * <p> - * Model providers need to re-evaluate the state of a + * Model providers need to re-evaluate the state of a * model element whenever a change in the resources occurs by listening * to both resource deltas and change events from the team state provider * ({@link #getTeamStateProvider()}. @@ -48,7 +48,7 @@ import org.eclipse.ui.IDecoratorManager; * Decoration enablement changes and decoration configuration changes * are handled by the {@link IDecoratorManager#update(String)} API. * A call to this method will result in label changes to all elements. - * The {@link #isDecorationEnabled(Object)} API on this class can + * The {@link #isDecorationEnabled(Object)} API on this class can * be used to determine if an element will receive team decorations. * If decoration is disabled. team state changes on the element can * be ignored. @@ -60,7 +60,7 @@ import org.eclipse.ui.IDecoratorManager; * @see Subscriber#addListener(org.eclipse.team.core.subscribers.ISubscriberChangeListener) */ public class SynchronizationStateTester { - + /** * Constant that is used as the property key on an * {@link IDecorationContext}. Model based views can assign their state @@ -70,14 +70,14 @@ public class SynchronizationStateTester { * decorated. */ public static final String PROP_TESTER = "org.eclipse.team.ui.syncStateTester"; //$NON-NLS-1$ - + /** * Create a synchronization state tester. */ public SynchronizationStateTester() { super(); } - + /** * Return whether state decoration is enabled for the context * to which this tester is associated. If <code>true</code> @@ -87,14 +87,14 @@ public class SynchronizationStateTester { * is returned, a team decorator will not decorate the elements with any * synchronization related decorations. Subclasses will want to disable * state decoration if state decoration is being provided another way - * (e.g. by a {@link SynchronizationLabelProvider}). By default, + * (e.g. by a {@link SynchronizationLabelProvider}). By default, * <code>true</code>is returned. Subclasses may override. * @return whether state decoration is enabled */ public boolean isStateDecorationEnabled() { return true; } - + /** * Return whether decoration is enabled for the given model element in the * context to which this tester is associated. By default, the value @@ -106,7 +106,7 @@ public class SynchronizationStateTester { * decorations should be applied to the model element. Otherwise, the * {@link #getState(Object, int, IProgressMonitor)} should be consulted in * order to determine what state to decorate. - * + * * @param element * the model element * @return whether decoration is enabled for the given model element @@ -142,7 +142,7 @@ public class SynchronizationStateTester { * use the remote file contents available from the provider to determine the proper * state for the element. * </ol> - * + * * @param element the model element * @param stateMask the mask that identifies which state flags are desired if * present @@ -156,21 +156,21 @@ public class SynchronizationStateTester { return desc.getStateFlags(); return IDiff.NO_CHANGE; } - + /** - * Return a team state provider that delegates to the appropriate team + * Return a team state provider that delegates to the appropriate team * provider. - * @return a team state provider that delegates to the appropriate team + * @return a team state provider that delegates to the appropriate team * provider */ public final ITeamStateProvider getTeamStateProvider() { return TeamUIPlugin.getPlugin().getDecoratedStateProvider(); } - + /** * A callback to the tester made from the team decorator to notify the * tester that the given element has been decorated with the given state. - * The purpose of the callback is to allow the owner of the tester to + * The purpose of the callback is to allow the owner of the tester to * cache the decorated state in order to detect whether a future state * change requires a label update for the element. * @param element the element that was decorated @@ -179,6 +179,6 @@ public class SynchronizationStateTester { public void elementDecorated(Object element, ITeamStateDescription description) { // do nothing by default } - + } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeLabelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeLabelProvider.java index 0b428935d..344a0edf4 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeLabelProvider.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeLabelProvider.java @@ -35,13 +35,13 @@ import org.eclipse.team.ui.mapping.*; /** * A label provider wrapper that adds synchronization image and/or text decorations * to the image and label obtained from the delegate provider. - * + * * @since 3.2 */ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider { - + private ImageManager localImageManager; - + /* (non-Javadoc) * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object) */ @@ -50,7 +50,7 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider Image base = getDelegateImage(element); if (isDecorationEnabled() && base != null) { Image decorateImage = decorateImage(base, element); - base = decorateImage; + base = decorateImage; } if (isIncludeOverlays() && base != null) { base = addOverlays(base, element); @@ -75,7 +75,7 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider Image decoratedImage; if (element instanceof ICompareInput) { ICompareInput ci = (ICompareInput) element; - decoratedImage = getCompareImage(base, ci.getKind()); + decoratedImage = getCompareImage(base, ci.getKind()); } else { IDiff node = getDiff(element); decoratedImage = getCompareImage(base, node); @@ -106,7 +106,7 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider ITeamContentProviderDescriptor desc = manager.getDescriptor(provider.getId()); return desc.getImageDescriptor(); } - + private Object internalGetElement(Object element) { if (element instanceof TreePath) { TreePath tp = (TreePath) element; @@ -116,13 +116,13 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider } private Image getCompareImage(Image base, IDiff node) { - int compareKind = getCompareKind(node); + int compareKind = getCompareKind(node); return getCompareImage(base, compareKind); } /** * Returns an image showing the specified change kind applied to a given base image. - * + * * @nooverride This method is not intended to be re-implemented or extended by clients. * @noreference This method is not intended to be referenced by clients. */ @@ -133,7 +133,7 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider private int getCompareKind(IDiff node) { return ResourceDiffCompareInput.getCompareKind(node); } - + /* (non-Javadoc) * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object) */ @@ -163,7 +163,7 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider } return base; } - + /** * Decorate the text with the appropriate diff decorations. * By default, this method uses the diff associated with @@ -176,13 +176,13 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider */ protected String decorateText(String base, Object element) { IDiff node = getDiff(element); - if (node != null && node.getKind() != IDiff.NO_CHANGE) { + if (node != null && node.getKind() != IDiff.NO_CHANGE) { String syncKindString = node.toDiffString(); - return NLS.bind(TeamUIMessages.AbstractSynchronizationLabelProvider_0, new String[] { base, syncKindString }); + return NLS.bind(TeamUIMessages.AbstractSynchronizationLabelProvider_0, new String[] { base, syncKindString }); } return base; } - + /* (non-Javadoc) * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener) */ @@ -215,7 +215,7 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider public void removeListener(ILabelProviderListener listener) { getDelegateLabelProvider().removeListener(listener); } - + /** * Returns whether the synchronization state should be included in the * text of the label. By default, the Team preference is used to determine @@ -226,22 +226,22 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider protected boolean isSyncInfoInTextEnabled() { return isDecorationEnabled() && TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(IPreferenceIds.SYNCVIEW_VIEW_SYNCINFO_IN_LABEL); } - + /** - * Return the label provider that will return the text and image + * Return the label provider that will return the text and image * appropriate for the given model element. Subclasses are responsible for * disposing of the label provider. - * @return the label provider that will return the text and image + * @return the label provider that will return the text and image * appropriate for the given model element */ protected abstract ILabelProvider getDelegateLabelProvider(); - + /** * Return whether the label provider should decorate with the synchronization state. * @return whether the label provider should decorate with the synchronization state */ protected abstract boolean isDecorationEnabled(); - + /** * Return the sync kind of the given element. This is used * to determine how to decorate the image and label of the @@ -253,14 +253,14 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider protected IDiff getDiff(Object element) { return null; } - + private Image addOverlays(Image base, Object element) { if (!isIncludeOverlays()) return base; - + ImageDescriptor[] overlayImages = new ImageDescriptor[4]; boolean hasOverlay = false; - + // Decorate with the busy indicator if (isBusy(element)) { overlayImages[IDecoration.TOP_LEFT] = TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_HOURGLASS_OVR); @@ -288,13 +288,13 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider } return base; } - + /** * Indicate whether the overlays provided by this class should be applied. * By default, <code>false</code> is returned. Subclasses may override * and control individual overlays by overriding the appropriate * query methods. Overlays provided by this class include problem marker - * severity ({@link #getMarkerSeverity(Object)}), propagated conflicts + * severity ({@link #getMarkerSeverity(Object)}), propagated conflicts * ({@link #hasDecendantConflicts(Object)} and busy state ({@link #isBusy(Object)}). * @return whether the overlays provided by this class should be applied */ @@ -308,10 +308,10 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider * there are no markers. By Default, the element is adapted to resource * mapping in order to look for markers. * <p> - * Although this class handles providing the overlays, it does not react - * to marker changes. Subclasses must issue label updates when the markers on + * Although this class handles providing the overlays, it does not react + * to marker changes. Subclasses must issue label updates when the markers on * a logical model element change. - * + * * @param element * the element * @return the marker severity @@ -342,7 +342,7 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider /** * Return whether the given element has descendant conflicts. - * By default, <code>false</code> is returned. Subclasses + * By default, <code>false</code> is returned. Subclasses * may override. * @param element the element * @return whether the given element has descendant conflicts @@ -376,7 +376,7 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider /** * Method that provides a custom font for elements that are * busy. Although this label provider does not implement - * {@link IFontProvider}, subclasses that wish to get + * {@link IFontProvider}, subclasses that wish to get * busy indication using a font can do so. * @param element the element * @return the font to indicate that the element is busy @@ -387,7 +387,7 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider } return null; } - + private ImageManager getImageManager() { ISynchronizationContext context = getContext(); if (context != null) { @@ -414,5 +414,5 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider } return null; } - + } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeParticipant.java index b2cd29166..630fbb8ca 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeParticipant.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeParticipant.java @@ -37,23 +37,23 @@ import org.eclipse.ui.PartInitException; * @since 3.0 */ public abstract class AbstractSynchronizeParticipant extends PlatformObject implements ISynchronizeParticipant { - + /** * Property key used in the property change event fired when the pinned * state of a participant changes. */ public static final String P_PINNED = "org.eclipse.team.pinned"; //$NON-NLS-1$ - + /** * Property key used in the property change event fired when the * participants refresh schedule changes. * @since 3.2 */ public static final String P_SCHEDULED = "org.eclipse.team.schedule"; //$NON-NLS-1$ - + // key for persisting the pinned state of a participant private final static String CTX_PINNED = "root"; //$NON-NLS-1$ - + // property listeners private PropertyChangeHandler fChangeHandler; @@ -67,7 +67,7 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl /** * Default constructor is a no-op. Subclasses that are persistable must support a no-arg constructor - * and + * and */ public AbstractSynchronizeParticipant() { } @@ -96,7 +96,7 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl public String getId() { return fId; } - + /* (non-Javadoc) * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#getSecondaryId() */ @@ -109,7 +109,7 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl * Returns the help context id of this participant or value of * <code>IHelpContextIds.SYNC_VIEW</code> when no specific id has been * provided. - * + * * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#getHelpContextId() * @see org.eclipse.team.internal.ui.IHelpContextIds#SYNC_VIEW * @since 3.5 @@ -139,16 +139,16 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl public final boolean isPinned() { return pinned; } - + /** * Called when the pinned state is changed. Allows subclasses to react to pin state changes. - * + * * @param pinned whether the participant is pinned. */ protected void pinned(boolean pinned) { // Subclasses can re-act to changes in the pinned state } - + /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ @@ -159,7 +159,7 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl ISynchronizeParticipant other = (ISynchronizeParticipant)obj; return getId().equals(other.getId()) && Utils.equalObject(getSecondaryId(), other.getSecondaryId()); } - + /* (non-Javadoc) * @see java.lang.Object#hashCode() */ @@ -167,11 +167,11 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl public int hashCode() { return Utils.getKey(getId(), getSecondaryId()).hashCode(); } - + /** * Return whether this participant can be refreshed. Participants that can * be refreshed may have a Synchronize menu item contributed to their context menu - * and can also be refreshed from the Synchronize drop-down toolbar item. + * and can also be refreshed from the Synchronize drop-down toolbar item. * When refreshed from the toolbar item, the {@link ISynchronizeParticipant#run(org.eclipse.ui.IWorkbenchPart)} * method is called. * @return whether this participant can be refreshed @@ -179,7 +179,7 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl public boolean doesSupportSynchronize() { return true; } - + /* (non-Javadoc) * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener) */ @@ -203,7 +203,7 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl /** * Notify all listeners that the given property has changed. - * + * * @param source the object on which a property has changed * @param property identifier of the property that has changed * @param oldValue the old value of the property, or <code>null</code> @@ -226,7 +226,7 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl // Id fId = config.getAttribute("id"); //$NON-NLS-1$ - + // Title. fName = config.getAttribute("name"); //$NON-NLS-1$ if (fName == null) { @@ -248,14 +248,14 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl if(descriptor instanceof SynchronizeParticipantDescriptor) { setInitializationData(((SynchronizeParticipantDescriptor)descriptor).getConfigurationElement(), null, null); } else { - throw new TeamException(TeamUIMessages.AbstractSynchronizeParticipant_4); + throw new TeamException(TeamUIMessages.AbstractSynchronizeParticipant_4); } } /** * Sets the name of this participant to the specified value and notifies * property listeners of the change. - * + * * @param name the new name */ protected void setName(String name) { @@ -263,11 +263,11 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl fName = name; firePropertyChange(this, IBasicPropertyConstants.P_TEXT, old, name); } - + /** * Sets the image descriptor for this participant to the specified value and * notifies property listeners of the change. - * + * * @param imageDescriptor the new image descriptor */ protected void setImageDescriptor(ImageDescriptor imageDescriptor) { @@ -275,16 +275,16 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl fImageDescriptor = imageDescriptor; firePropertyChange(this, IBasicPropertyConstants.P_IMAGE, old, imageDescriptor); } - + /** * Sets the secondary id for this participant. - * + * * @param secondaryId the secondary id for this participant. */ protected void setSecondaryId(String secondaryId) { - this.fSecondaryId = secondaryId; + this.fSecondaryId = secondaryId; } - + /** * Classes that are persisted must override this method and perform * the following initialization. @@ -329,16 +329,16 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl } /** - * This method is invoked after a page configuration is created but before it is returned by the + * This method is invoked after a page configuration is created but before it is returned by the * <code>createPageConfiguration</code> method. Subclasses can implement this method to * tailor the configuration in ways appropriate to the participant. - * + * * @param configuration the newly create page configuration */ protected abstract void initializeConfiguration(ISynchronizePageConfiguration configuration); - + /** - * Default implementation will update the labels in the given configuration using + * Default implementation will update the labels in the given configuration using * information from the provided element if it adapts to <code>SyncInfo</code>. * It will also cache the contents for the remote and base if the element is * sync info based. @@ -348,7 +348,7 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl * @param monitor a progress monitor that can be used if contacting a server to prepare the element and configuration * @throws TeamException if an error occurred that should prevent the display of the compare editor containing * the element - * + * * @since 3.1 * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#prepareCompareInput(org.eclipse.team.ui.synchronize.ISynchronizeModelElement, org.eclipse.compare.CompareConfiguration, org.eclipse.core.runtime.IProgressMonitor) */ @@ -362,7 +362,7 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl (node).cacheContents(monitor); } } - + /* * Get the sync info node from the element using the adaptable mechanism. * A <code>null</code> is returned if the element doesn't have a sync info @@ -375,7 +375,7 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl } return null; } - + /* (non-Javadoc) * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#getPreferencePages() */ @@ -383,7 +383,7 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl public PreferencePage[] getPreferencePages() { return new PreferencePage[] { new SyncViewerPreferencePage() }; } - + /** * Return whether this participant supports the contribution of actions to * the context menu by contributing a <code>viewerContribution</code> @@ -392,9 +392,9 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl * the <code>id</code> of the participant is used as the <code>targetId</code>. Here is * an extension that could be added to the plugin manifest to contribute an action to * the context menu for a participant - * + * * <pre> - * <extension point="org.eclipse.ui.popupMenus"> + * <extension point="org.eclipse.ui.popupMenus"> * <viewerContribution * id="org.eclipse.team.cvs.ui.viewContributionId" * targetID="org.eclipse.team.cvs.ui.cvsworkspace-participant"> @@ -409,8 +409,8 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl * </viewerContribution> * </extension> * </pre> - * - * + * + * * @return whether this participant supports the contribution of actions to * the context menu using the <code>org.eclipse.ui.popupMenus</code> extension point * @since 3.1 diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeScope.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeScope.java index f010689b7..bcef23350 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeScope.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeScope.java @@ -24,26 +24,26 @@ import org.eclipse.ui.IMemento; /** * Abstract superclass of resource scopes for <code>SubscriberParticipant</code> * instances. - * + * * @see SubscriberParticipant * @since 3.0 * @noextend This class is not intended to be subclassed by clients. */ public abstract class AbstractSynchronizeScope implements ISynchronizeScope { - + /* * Key for scope in memento */ private static final String CTX_SUBSCRIBER_SCOPE_TYPE = TeamUIPlugin.ID + ".SCOPE_TYPE"; //$NON-NLS-1$ - + /* * Scope change listeners */ private ListenerList listeners = new ListenerList(ListenerList.IDENTITY); - + /** * Save the scope to the given memento - * + * * @param scope a scope * @param settings a memento */ @@ -51,10 +51,10 @@ public abstract class AbstractSynchronizeScope implements ISynchronizeScope { settings.putString(CTX_SUBSCRIBER_SCOPE_TYPE, getType(scope)); ((AbstractSynchronizeScope)scope).saveState(settings); } - + /** * Restore a scope from the given memento - * + * * @param settings a memento * @return the scope restored from the given memento */ @@ -71,29 +71,29 @@ public abstract class AbstractSynchronizeScope implements ISynchronizeScope { } return new WorkspaceScope(); } - + private static String getType(ISynchronizeScope scope) { String name = scope.getClass().getName(); int lastDot = name.lastIndexOf("."); //$NON-NLS-1$ if (lastDot == -1) { return name; } - return name.substring(lastDot + 1); + return name.substring(lastDot + 1); } - + /** * Constructor a scope from scratch */ protected AbstractSynchronizeScope() { } - + /** * Constructor a scope from a previously saved state */ protected AbstractSynchronizeScope(IMemento memento) { init(memento); } - + /* (non-Javadoc) * @see org.eclipse.team.internal.ui.synchronize.ScopableSubscriberParticipant.ISynchronizeScope#addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener) */ @@ -103,7 +103,7 @@ public abstract class AbstractSynchronizeScope implements ISynchronizeScope { listeners.add(listener); } } - + /* (non-Javadoc) * @see org.eclipse.team.internal.ui.synchronize.ScopableSubscriberParticipant.ISynchronizeScope#removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener) */ @@ -113,7 +113,7 @@ public abstract class AbstractSynchronizeScope implements ISynchronizeScope { listeners.remove(listeners); } } - + /* (non-Javadoc) * @see org.eclipse.team.ui.synchronize.ISynchronizeScope#dispose() */ @@ -121,10 +121,10 @@ public abstract class AbstractSynchronizeScope implements ISynchronizeScope { public void dispose() { // Do nothing by default } - + /** * Fires the given property change event to all registered listeners. - * + * * @param event the property change event to be fired */ protected void firePropertyChangedEvent(final PropertyChangeEvent event) { @@ -143,32 +143,32 @@ public abstract class AbstractSynchronizeScope implements ISynchronizeScope { } } /** - * Fires a change event for property <code>ISynchronizeScope.ROOTS</code> + * Fires a change event for property <code>ISynchronizeScope.ROOTS</code> * containing the new roots. The old roots are not provided in the event. */ protected void fireRootsChanges() { firePropertyChangedEvent(new PropertyChangeEvent(this, ROOTS, new IResource[0], getRoots())); } - + /** * Persist the state of this scope. Clients must persist enough additional * state to know what type (i.e. subclass) of scope to be recreated. - * + * * @param memento the memento into which the scope is to be saved */ public void saveState(IMemento memento) { // Do nothing by default } - + /** * Method invoked from the constructor which populates the fields of this scope - * + * * @param memento the memento into which the scope was previously saved */ protected void init(IMemento memento) { // Do nothing by default } - + /** * Return whether the given resource is within this scope. * By default, a resource is considered in the scope if @@ -188,7 +188,7 @@ public abstract class AbstractSynchronizeScope implements ISynchronizeScope { } return false; } - + /** * Return the resource mappings that define this scope. * By default, the mappings are just be deep traversals diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeManager.java index f608c3e04..787eb5c4b 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeManager.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeManager.java @@ -11,46 +11,46 @@ package org.eclipse.team.ui.synchronize; /** - * Manages synchronization view participants. Clients can programmatically add + * Manages synchronization view participants. Clients can programmatically add * or remove participant instances from this manager. Managed participants are available to - * clients whereas un-managed participants can still exist but won't be available + * clients whereas un-managed participants can still exist but won't be available * generally available to clients until explicitly added to the manager. * <p> * Participants added to the manager will benefit from the manager's lifecycle * support. The participants will automatically have their <code>init</code> method and <code>dispose</code> - * called when the manager starts and is shutdown and if persistable will + * called when the manager starts and is shutdown and if persistable will * be allowed to save their state on shutdown. * </p><p> * Clients are not intended to implement this interface. * </p> * @see ISynchronizeParticipant * @see org.eclipse.team.ui.TeamUI#getSynchronizeManager() - * @since 3.0 + * @since 3.0 */ -public interface ISynchronizeManager { - +public interface ISynchronizeManager { + /** * Constant identifying the job family identifier for a background job that affects the * synchronization state of resources. All clients * that schedule background jobs that affect synchronization state should include this job * family in their implementation of <code>belongsTo</code>. - * + * * @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object) */ public static final Object FAMILY_SYNCHRONIZE_OPERATION = new Object(); - + /** * Registers the given listener for participant notifications. Has * no effect if an identical listener is already registered. - * + * * @param listener listener to register */ public void addSynchronizeParticipantListener(ISynchronizeParticipantListener listener); - + /** * Removes the given listener for participant notifications. Has * no effect if an identical listener is not already registered. - * + * * @param listener listener to remove */ public void removeSynchronizeParticipantListener(ISynchronizeParticipantListener listener); @@ -59,61 +59,61 @@ public interface ISynchronizeManager { * Adds the given participants to the synchronize manager. Has no effect for * equivalent participants are already registered. The participants will be added * to any existing synchronize views. - * + * * @param participants participants to add */ public void addSynchronizeParticipants(ISynchronizeParticipant[] participants); - + /** * Removes the given participants from the synchronize manager. If the participants are * being displayed in any synchronize views, their associated pages will be closed. - * + * * @param participants participants to remove */ public void removeSynchronizeParticipants(ISynchronizeParticipant[] participants); - + /** * Returns a collection of synchronize participant references registered with the synchronize manager. - * + * * @return a collection of synchronize participants registered with the synchronize manager. */ public ISynchronizeParticipantReference[] getSynchronizeParticipants(); - + /** * Returns the registered synchronize participants with the given type id. It is * possible to have multiple instances of the same participant type. - * + * * @param id the type identifier for the participant - * @return the registered synchronize participants with the given id, or + * @return the registered synchronize participants with the given id, or * an empty list if there are none with that id registered. */ public ISynchronizeParticipantReference[] get(String id); - + /** * Returns the registered synchronize participants with the given type id and instance id. - * + * * @param id the type identifier for the participant * @param secondaryId the instance identifier for this participant type or <code>null</code> * if this participant doesn't support multiple instances. - * @return the registered synchronize participants with the given id, or + * @return the registered synchronize participants with the given id, or * <code>null</code> if none with that id is not registered. */ public ISynchronizeParticipantReference get(String id, String secondaryId); - + /** * Opens the synchronize view in the perspective defined by the user in the team synchronize * preferences. - * + * * @return the opened synchronize view or <code>null</code> if it can't be opened. */ public ISynchronizeView showSynchronizeViewInActivePage(); /** - * Returns the participant descriptor for the given participant type id or + * Returns the participant descriptor for the given participant type id or * <code>null</code> if a descriptor is not found for that id. * @param id the participant id - * - * @return the participant descriptor for the given participant id or + * + * @return the participant descriptor for the given participant id or * <code>null</code> if a descriptor is not found for that id. */ public ISynchronizeParticipantDescriptor getParticipantDescriptor(String id); diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelChangeListener.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelChangeListener.java index 2ba7916ed..8c79725ed 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelChangeListener.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelChangeListener.java @@ -4,7 +4,7 @@ * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelElement.java index f7b31ed4c..42f4003ac 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelElement.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelElement.java @@ -33,26 +33,26 @@ public interface ISynchronizeModelElement extends IDiffContainer, ITypedElement, * Property constant indicating that the element is currently being worked on by an operation. */ public static final String BUSY_PROPERTY = TeamUIPlugin.ID + ".busy"; //$NON-NLS-1$ - + /** * Property constant indicating that the element has children that are conflicting. */ public static final String PROPAGATED_CONFLICT_PROPERTY = TeamUIPlugin.ID + ".conflict"; //$NON-NLS-1$ - + /** * Property constant identifying that this element or one of its children has an error marker. */ public static final String PROPAGATED_ERROR_MARKER_PROPERTY = TeamUIPlugin.ID + ".error"; //$NON-NLS-1$ - + /** * Property constant indicating that this element or one of its children has a warning marker. */ public static final String PROPAGATED_WARNING_MARKER_PROPERTY = TeamUIPlugin.ID + ".warning"; //$NON-NLS-1$ /** - * Adds a listener for changes to properties of this synchronize element. Has no effect if an identical + * Adds a listener for changes to properties of this synchronize element. Has no effect if an identical * listener is already registered. - * + * * @param listener the listener to register */ public abstract void addPropertyChangeListener(IPropertyChangeListener listener); @@ -60,30 +60,30 @@ public interface ISynchronizeModelElement extends IDiffContainer, ITypedElement, /** * Removes the given property change listener from this model element. Has no effect if * the listener is not registered. - * + * * @param listener the listener to remove */ public abstract void removePropertyChangeListener(IPropertyChangeListener listener); /** * Assigns the given property to this element and all it's parents. - * + * * @param propertyName the property name to set * @param value the value of the property */ public void setPropertyToRoot(String propertyName, boolean value); - + /** * Assigns the given property to this element. - * + * * @param propertyName the property name * @param value the value of the property. */ public void setProperty(String propertyName, boolean value); - + /** * Return whether this element has the given property assigned. - * + * * @param propertyName the property to test for * @return <code>true</code> if the property is set and <code>false</code> * otherwise. @@ -92,7 +92,7 @@ public interface ISynchronizeModelElement extends IDiffContainer, ITypedElement, /** * The image descriptor describing the given element. - * + * * @param element the model element for which to return an image. * @return the image descriptor for the given element. */ @@ -101,7 +101,7 @@ public interface ISynchronizeModelElement extends IDiffContainer, ITypedElement, /** * Returns the resource this element is showing synchronization information for or <code>null</code> * if the element does not have an associated local resource. - * + * * @return the resource this element is showing synchronization information for or <code>null</code> * if the element does not have an associated local resource. */ diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePage.java index 4560510e6..8aee51531 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePage.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePage.java @@ -4,7 +4,7 @@ * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ @@ -22,21 +22,21 @@ import org.eclipse.ui.PartInitException; * @since 3.0 */ public interface ISynchronizePage { - + /** * Initialize this page with workbench part that contains the page. * This method will be called after the <code>Page#init(IPageSite)</code> * but before <code>Page#createControl(Composite)</code> - * + * * @param site the workbench part for the view containing the page * @throws PartInitException */ public void init(ISynchronizePageSite site) throws PartInitException; - + /** * Returns the viewer associated with this page or <code>null</code> if the page * doesn't have a viewer. - * + * * @return the viewer associated with this page or <code>null</code> if the page * doesn't have a viewer. */ @@ -46,7 +46,7 @@ public interface ISynchronizePage { * Callback that is invoked from the synchronize configuration whenever a * property's value is about to be changed. The page can react to the change * before change events are fired or veto the change. - * + * * @param configuration the synchronize page configuration * @param key the property key * @param newValue diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageConfiguration.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageConfiguration.java index 0dce3f69e..00e88336a 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageConfiguration.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageConfiguration.java @@ -18,9 +18,9 @@ import org.eclipse.team.internal.ui.TeamUIPlugin; import org.eclipse.ui.IWorkbenchActionConstants; /** - * Configures the model, actions and label decorations of an + * Configures the model, actions and label decorations of an * {@link ISynchronizePage}. Clients can: - * <ul> + * <ul> * <li>set properties to affect the page contents and react to property changes * <li>add and configure the actions available to the user (context menu, * toolbar and view menu) @@ -29,29 +29,29 @@ import org.eclipse.ui.IWorkbenchActionConstants; * @noimplement This interface is not intended to be implemented by clients. */ public interface ISynchronizePageConfiguration { - + /** - * Property constant for the <code>SyncInfoSet</code> that is being - * displayed by the page. Some pages may not be displaying the + * Property constant for the <code>SyncInfoSet</code> that is being + * displayed by the page. Some pages may not be displaying the * contents of a <code>SyncInfoSet</code> in which case the value * associated with this property will be <code>null</code>. */ public static final String P_SYNC_INFO_SET = TeamUIPlugin.ID + ".P_SYNC_INFO_SET"; //$NON-NLS-1$ - + /** - * Property constant for the list of label decorators - * (instance of <code>ILabelDecorator[]</code>) that will be + * Property constant for the list of label decorators + * (instance of <code>ILabelDecorator[]</code>) that will be * applied to the text and image from the label provider. */ public static final String P_LABEL_DECORATORS = TeamUIPlugin.ID + ".P_LABEL_DECORATORS"; //$NON-NLS-1$ /** - * Property constant that defines the groups in the toolbar + * Property constant that defines the groups in the toolbar * menu of the page. The value for this * property should be a string array. If this property is * set to <code>null</code>, the <code>DEFAULT_TOOLBAR_MENU</code> * is used. Also, the groups mentioned in the <code>DEFAULT_TOOLBAR_MENU</code> - * can be removed but will always appear in the same order if + * can be removed but will always appear in the same order if * included. */ public static final String P_TOOLBAR_MENU = TeamUIPlugin.ID + ".P_TOOLBAR_MENU"; //$NON-NLS-1$ @@ -62,27 +62,27 @@ public interface ISynchronizePageConfiguration { * property should be a string array. */ public static final String P_CONTEXT_MENU = TeamUIPlugin.ID + ".P_CONTEXT_MENU"; //$NON-NLS-1$ - + /** - * Property constant that defines the groups in the drop-down view + * Property constant that defines the groups in the drop-down view * menu of the page. The value for this * property should be a string array. If this property is * set to <code>null</code>, the <code>DEFAULT_VIEW_MENU</code> * is used. Also, the groups mentioned in the <code>DEFAULT_VIEW_MENU</code> - * can be removed but will always appear in the same order if + * can be removed but will always appear in the same order if * included. */ public static final String P_VIEW_MENU = TeamUIPlugin.ID + ".P_VIEW_MENU"; //$NON-NLS-1$ /** * The configuration property that defines the filter id that - * determines which object contribution actions appear in the + * determines which object contribution actions appear in the * context menu for the page. This defaults to the id of the * participant but can be set to another id or <code>null</code> * @since 3.1 */ public static final String P_OBJECT_CONTRIBUTION_ID = TeamUIPlugin.ID + ".P_OBJECT_CONTRIBUTION_ID"; //$NON-NLS-1$ - + /** * Property constant for the type of comparison used to create * the <code>SyncInfo</code> in the P_SYNC_INFO_SET property. @@ -90,14 +90,14 @@ public interface ISynchronizePageConfiguration { * modes selection applies. */ public static final String P_COMPARISON_TYPE = TeamUIPlugin.ID + ".P_COMPARISON_TYPE"; //$NON-NLS-1$ - + /** * Property constant for the mode used to filter the visible * elements of the model. The value can be one of the mode integer * constants. */ public static final String P_MODE = TeamUIPlugin.ID + ".P_SYNCVIEWPAGE_MODE"; //$NON-NLS-1$ - + /** * Property constant which indicates which modes are to be available to the user. * The value is to be an integer that combines one or more of the @@ -106,26 +106,26 @@ public interface ISynchronizePageConfiguration { * mode filtering is not supported. */ public static final String P_SUPPORTED_MODES = TeamUIPlugin.ID + ".P_SUPPORTED_MODES"; //$NON-NLS-1$ - + /** * Property constant for the id of the viewer to be used for this page. * The viewer id corresponds to the viewer definition in the Common * Navigator framework. - * + * * @since 3.2 */ public static final String P_VIEWER_ID = TeamUIPlugin.ID + ".P_VIEWER_ID"; //$NON-NLS-1$ - + /** * Property constant for the description (String) of the page that appears * as the description of the view when the page is active. - * + * * @since 3.2 */ public static final String P_PAGE_DESCRIPTION = TeamUIPlugin.ID + ".P_PAGE_DESCRIPTION"; //$NON-NLS-1$ - + /** - * The id of the synchronize group the determines where the synchronize + * The id of the synchronize group the determines where the synchronize * actions appear. */ public static final String SYNCHRONIZE_GROUP = "synchronize"; //$NON-NLS-1$ @@ -135,7 +135,7 @@ public interface ISynchronizePageConfiguration { * actions appear */ public static final String NAVIGATE_GROUP = "navigate"; //$NON-NLS-1$ - + /** * The id of the sort group that determines where sort * actions or submenus appear. @@ -166,7 +166,7 @@ public interface ISynchronizePageConfiguration { * actions appear in the view drop-down. */ public static final String PREFERENCES_GROUP = "preferences"; //$NON-NLS-1$ - + /** * The id of the group that determines where workbench object contributions * should appear. This group will only be used if there is an @@ -174,7 +174,7 @@ public interface ISynchronizePageConfiguration { * @since 3.1 */ public static final String OBJECT_CONTRIBUTIONS_GROUP = IWorkbenchActionConstants.MB_ADDITIONS; - + /** * The id of the layout group that determines whether the layout selection * actions appear in the view drop-down or toolbar. @@ -193,19 +193,19 @@ public interface ISynchronizePageConfiguration { * These groups will always appear in this order in the toolbar. * Clients can disable one or more of these groups by setting * the <code>P_TOOLBAR_MENU</code> property to an array that - * contains a subset of these. Clients can also add groups - * by adding new unique group ids to the array. Added groups + * contains a subset of these. Clients can also add groups + * by adding new unique group ids to the array. Added groups * will appear in the order specified but after the default groups. */ public static final String[] DEFAULT_TOOLBAR_MENU = new String[] { SYNCHRONIZE_GROUP, NAVIGATE_GROUP, MODE_GROUP, LAYOUT_GROUP }; - + /** * These are the default groups used for the drop-down view menu of a page. * These groups will always appear in this order in the view menu. * Clients can disable one or more of these groups by setting * the <code>P_VIEW_MENU</code> property to an array that - * contains a subset of these. Clients can also add groups - * by adding new unique group ids to the array. Added groups + * contains a subset of these. Clients can also add groups + * by adding new unique group ids to the array. Added groups * will appear in the order specified but after the default groups. */ public static final String[] DEFAULT_VIEW_MENU = new String[] { LAYOUT_GROUP, MODE_GROUP, SYNCHRONIZE_GROUP, PREFERENCES_GROUP }; @@ -215,7 +215,7 @@ public interface ISynchronizePageConfiguration { */ public final static String TWO_WAY = "two-way"; //$NON-NLS-1$ public final static String THREE_WAY = "three-way"; //$NON-NLS-1$ - + /** * Modes are direction filters for the view */ @@ -230,21 +230,21 @@ public interface ISynchronizePageConfiguration { * @return the participant */ public abstract ISynchronizeParticipant getParticipant(); - + /** * Return the site which provides access to certain workbench * services. * @return the page site */ public abstract ISynchronizePageSite getSite(); - + /** * Return the page created from and associated with this * configuration. * @return Returns the page for this configuration */ public ISynchronizePage getPage(); - + /** * Set the page for this configuration. This method should only * be called once by the {@link ISynchronizeParticipant} that created @@ -255,7 +255,7 @@ public interface ISynchronizePageConfiguration { /** * Add a property change listener to the configuration. - * Registered listeners will receive notification when + * Registered listeners will receive notification when * any property changes. * @param listener a property change listener */ @@ -302,13 +302,13 @@ public interface ISynchronizePageConfiguration { * @param group a synchronize page action group */ public abstract void removeActionContribution(SynchronizePageActionGroup group); - + /** * Add a label decorator to the page configuration. * @param decorator a label decorator */ public void addLabelDecorator(ILabelDecorator decorator); - + /** * Set the groups that are to be added to the menu identified * by the menu property id. @@ -317,7 +317,7 @@ public interface ISynchronizePageConfiguration { * @param groups a array of groups Ids */ public void setMenuGroups(String menuPropertyId, String[] groups); - + /** * Adds a menu group of the given id to the end of the menu groups list * for the given menu property id. @@ -337,7 +337,7 @@ public interface ISynchronizePageConfiguration { * otherwise */ public abstract boolean hasMenuGroup(String menuPropertyId, String groupId); - + /** * Return the value of the P_MODE property of this configuration. * @return the mode property value @@ -352,13 +352,13 @@ public interface ISynchronizePageConfiguration { * @param mode the mode value */ void setMode(int mode); - + /** * Return the value of the P_SUPPORTED_MODES property of this configuration. * @return the supported modes property value */ int getSupportedModes(); - + /** * Set the P_SUPPORTED_MODES property of this configuration to the * given combination of one or more mode flags (<code>INCOMING_MODE</code>, @@ -375,7 +375,7 @@ public interface ISynchronizePageConfiguration { * or <code>null</code> if the property is not set */ public abstract SyncInfoSet getSyncInfoSet(); - + /** * Return the comparison type used by the page's <code>SyncInfo</code> * modes. @@ -383,7 +383,7 @@ public interface ISynchronizePageConfiguration { * or a custom type). */ String getComparisonType(); - + /** * Set the comparison type used by the page's <code>SyncInfo</code> * modes. The default type is <code>THREE_WAY</code>. @@ -391,14 +391,14 @@ public interface ISynchronizePageConfiguration { * or a custom type). */ void setComparisonType(String type); - + /** * Sets the runnable context that can be used by the page's * actions to display progress. * @param context a runnable context (or null) */ void setRunnableContext(IRunnableContext context); - + /** * Return the runnable context. If <code>null</code> is returned, * actions can use their own method of progress feedback either @@ -408,9 +408,9 @@ public interface ISynchronizePageConfiguration { IRunnableContext getRunnableContext(); /** - * Return the id of the viewer to which this configuration is + * Return the id of the viewer to which this configuration is * associated. - * @return the id of the viewer to which this configuration is + * @return the id of the viewer to which this configuration is * associated * @since 3.2 */ diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageSite.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageSite.java index d6e979f71..e97ab958f 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageSite.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageSite.java @@ -22,7 +22,7 @@ import org.eclipse.ui.IWorkbenchSite; * A site which provides access to the context in which this page * is being displayed. Instances of this interface serve a similar purpose * to <code>IWorkbenchSite</code> instances but is provided as a separate - * objects to allow clients to access the different site types + * objects to allow clients to access the different site types * (view, editor, dialog) using a common interface. This interface also provides * access to the part for the site because this is required by some UI * components. Clients should not need to access the part. @@ -32,7 +32,7 @@ import org.eclipse.ui.IWorkbenchSite; * <code>instanceof</code> checks can be done with the part. * <p> * Clients are not intended to implement this interface - * + * * @since 3.0 */ public interface ISynchronizePageSite { @@ -40,19 +40,19 @@ public interface ISynchronizePageSite { /** * Return the workbench site for the page * or <code>null</code> if a workbench site is not available (e.g. if - * the page is being shown in a dialog). + * the page is being shown in a dialog). * @return the workbench site for the page or <code>null</code> */ IWorkbenchSite getWorkbenchSite(); - + /** * Return the workbench part for the page * or <code>null</code> if a workbench part is not available (e.g. if - * the page is being shown in a dialog). + * the page is being shown in a dialog). * @return the workbench part for the page or <code>null</code> */ IWorkbenchPart getPart(); - + /** * Returns the shell for this site. * @return the shell for this site @@ -84,7 +84,7 @@ public interface ISynchronizePageSite { * Give the page focus. */ void setFocus(); - + /** * Return a settings node that can be used by the * page to save state. A <code>null</code> value @@ -93,7 +93,7 @@ public interface ISynchronizePageSite { * @return a settings node or <code>null</code> */ IDialogSettings getPageSettings(); - + /** * Returns the action bars for this synchronize page site. * diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java index 1607a6abb..abb388de7 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java @@ -21,38 +21,38 @@ import org.eclipse.ui.part.IPageBookViewPage; /** * A synchronize participant is a visual component that can be displayed within any - * control (e.g. view, editor, dialog). Typically a participant is used to show changes between + * control (e.g. view, editor, dialog). Typically a participant is used to show changes between * local resources and variant states of those resources and allows the user to perform actions - * to manipulate the changes. + * to manipulate the changes. * <p> * This class does not mandate how the synchronization state is displayed, but instead provides * the accessors that clients would use to create a visual instance of the this participant. * </p><p> - * A participant can display multiple instances of its synchronization state to the user via the creation + * A participant can display multiple instances of its synchronization state to the user via the creation * of a page {@link #createPage(ISynchronizePageConfiguration)} and * clients can decide where to display the page. For example, the synchronize view is an example * of a client that displays a participant in a view. However, you can imagine that a client may - * also want to display this state in a wizard or dialog instead. + * also want to display this state in a wizard or dialog instead. * </p><p> - * When a participant is registered with the {@link ISynchronizeManager} it will automatically display + * When a participant is registered with the {@link ISynchronizeManager} it will automatically display * in the <i>Synchronize View</i> and if the participant extension point * enabled <code>synchronizeWizards</code> it will also appear in the global synchronize action - * toolbar. + * toolbar. * <p> * A participant is added to the workbench as follows: * <ul> - * <li>A <code>synchronizeParticipant</code> extension is contributed to - * the team registry. This extension defines the participant id, name, icon, type, and + * <li>A <code>synchronizeParticipant</code> extension is contributed to + * the team registry. This extension defines the participant id, name, icon, type, and * participant class. * <li>A user via a wizard provided by the <code>synchronizeWizards</code> extension point * or client code, creates a participant instance and registers it with the * synchronize manager. It then appears in the synchronize view. - * <li>A synchronization can be persistent and thus re-initialized at startup. + * <li>A synchronization can be persistent and thus re-initialized at startup. * <li>A pinned participant will only be removed from the synchronize manager if it is un-pinned. * </ul></p> * <p> * Once a participant is added to the synchronize manager its lifecycle will be managed. On shutdown if - * the participant is persistable, the participant will be asked to persist state via + * the participant is persistable, the participant will be asked to persist state via * the <code>saveState()</code> method. At startup the <code>init()</code> method is called * with a handle to the state that was saved. The dispose method is called when the participant is * removed from the manager and at shutdown. @@ -65,13 +65,13 @@ import org.eclipse.ui.part.IPageBookViewPage; * subclass {@link AbstractSynchronizeParticipant}. */ public interface ISynchronizeParticipant extends IExecutableExtension, IAdaptable { - + /** - * A property constant that can be used to indicate that the content of this participant + * A property constant that can be used to indicate that the content of this participant * has changed. This is a general event that can be used to indicate to the user that there * is a change in state for the participant. In general, the values associated with the event do not have * any meaning. - * + * * @see #addPropertyChangeListener(IPropertyChangeListener) */ public static final String P_CONTENT = "org.eclipse.team.ui.content"; //$NON-NLS-1$ @@ -80,120 +80,120 @@ public interface ISynchronizeParticipant extends IExecutableExtension, IAdaptabl * Returns the unique id that identified the <i>type</i> of this * synchronize participant. The synchronize manager supports registering * several instances of the same participant type. - * + * * @return the unique id that identified the <i>type</i> of this * synchronize participant. */ public String getId(); - + /** * Returns the instance id that identified the unique instance of this * participant. The synchronize manager supports registering * several instances of the same participant type and this id is used * to differentiate between them. - * + * * @return the instance id that identified the unique instance of this * participant or <code>null</code> if this participant doesn't support * multiple instances. - */ + */ public String getSecondaryId(); - + /** * Returns the name of this synchronize participant. This name is displayed to the user. - * + * * @return the name of this synchronize participant */ public String getName(); - + /** * Returns an image descriptor for this synchronize participant, or <code>null</code> * if none. - * + * * @return an image descriptor for this synchronize participant, or <code>null</code> * if none */ public ImageDescriptor getImageDescriptor(); - + /** * Returns if this participant is pinned. Pinned participants will only be removed from the - * synchronize manager until they are un-pinned. - * + * synchronize manager until they are un-pinned. + * * @return <code>true</code> if this participant is pinned and <code>false</code> * otherwise. */ public boolean isPinned(); - + /** * Sets whether this participant is pinned. - * - * @param pinned sets if the participant is pinned. + * + * @param pinned sets if the participant is pinned. */ public void setPinned(boolean pinned); - + /** * Creates the configuration for the participant page. The configuration controls the * options for displaying the participant. The configuration used to initialize the page * when {@link #createPage(ISynchronizePageConfiguration)} is called and as such * can be used to pre-configure visual properties of the displayed page. - * + * * @return the configuration for the participant page. */ public ISynchronizePageConfiguration createPageConfiguration(); - + /** * Creates and returns a new page for this synchronize participant. The * page is displayed using the parameters from the configuration. For example, * the configuration defines the context in which the page is shown, via the - * {@link ISynchronizePageSite}. - * + * {@link ISynchronizePageSite}. + * * @param configuration used to initialize the page * @return a page book view page representation of this synchronize * participant */ public IPageBookViewPage createPage(ISynchronizePageConfiguration configuration); - + /** * Runs the participants action. Typically this would be some action to refresh the synchronization * state of the participant. This action is run from the global synchronize drop-down. - * + * * @param part the part in which the action is run or <code>null</code> if the action * is not being run in a workbench part. */ public void run(IWorkbenchPart part); - + /** - * Initializes this participant with the given participant state. - * A memento is passed to the participant which contains a snapshot + * Initializes this participant with the given participant state. + * A memento is passed to the participant which contains a snapshot * of the participants state from a previous session. * <p> * This method is automatically called by the team plugin shortly after * participant construction. It marks the start of the views * lifecycle. Clients must not call this method. - * </p> + * </p> * @param secondaryId the secondayId of this participant instance or <code>null</code> * if this participant doesn't support multiple instances. - * @param memento the participant state or <code>null</code> if there + * @param memento the participant state or <code>null</code> if there * is no previous saved state - * @exception PartInitException if this participant was not initialized + * @exception PartInitException if this participant was not initialized * successfully */ public void init(String secondaryId, IMemento memento) throws PartInitException; - + /** - * Disposes of this synchronize participant and is called to free the + * Disposes of this synchronize participant and is called to free the * resources associated with a participant. When a participant is added * to the {@link ISynchronizeManager} this method is called when the * manager is shutdown or the participant is removed from the manager. * </p><p> - * Within this method a participant may release any resources, fonts, images, etc. + * Within this method a participant may release any resources, fonts, images, etc. * held by this part. It is also very important to remove all listeners. * </p><p> - * Clients should not call this method (the synchronize manager calls this + * Clients should not call this method (the synchronize manager calls this * method at appropriate times). * </p> */ public void dispose(); - + /** * Saves the participants object state within the memento. This state * will be available when the participant is restored via <code>init</code>. @@ -204,7 +204,7 @@ public interface ISynchronizeParticipant extends IExecutableExtension, IAdaptabl * @param memento a memento to receive the object state */ public void saveState(IMemento memento); - + /** * Adds a listener for changes to properties of this synchronize * participant. Has no effect if an identical listener is already @@ -223,15 +223,15 @@ public interface ISynchronizeParticipant extends IExecutableExtension, IAdaptabl * @param listener a property change listener */ public void addPropertyChangeListener(IPropertyChangeListener listener); - + /** * Removes the given property listener from this synchronize participant. * Has no effect if an identical listener is not already registered. - * + * * @param listener a property listener */ public void removePropertyChangeListener(IPropertyChangeListener listener); - + /** * Prepare the given element and compare configuration for use with a compare editor * input. @@ -241,13 +241,13 @@ public interface ISynchronizeParticipant extends IExecutableExtension, IAdaptabl * @param monitor a progress monitor that can be used if contacting a server to prepare the element and configuration * @throws TeamException if an error occurred that should prevent the display of the compare editor containing * the element - * + * * @since 3.1 */ public void prepareCompareInput( - ISynchronizeModelElement element, - CompareConfiguration configuration, - IProgressMonitor monitor) + ISynchronizeModelElement element, + CompareConfiguration configuration, + IProgressMonitor monitor) throws TeamException; /** @@ -256,10 +256,10 @@ public interface ISynchronizeParticipant extends IExecutableExtension, IAdaptabl * @since 3.1 */ public PreferencePage[] getPreferencePages(); - + /** * Returns the help context id of this participant. - * + * * @return the help context id of this participant * @since 3.5 */ diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantDescriptor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantDescriptor.java index 5e8ae0c31..c7a4084e6 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantDescriptor.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantDescriptor.java @@ -13,9 +13,9 @@ package org.eclipse.team.ui.synchronize; import org.eclipse.jface.resource.ImageDescriptor; /** - * A participant descriptor contains the content of the - * <code>synchronizeParticipants</code> extension section for - * for a registered participant type in the declaring plug-in's + * A participant descriptor contains the content of the + * <code>synchronizeParticipants</code> extension section for + * for a registered participant type in the declaring plug-in's * manifest (<code>plugin.xml</code>) file. * <p> * Clients are not intended to implement this interface. @@ -26,35 +26,35 @@ import org.eclipse.jface.resource.ImageDescriptor; public interface ISynchronizeParticipantDescriptor { /** * Returns the name of this participant. This can be shown to the user. - * + * * @return the name of this participant. This can be shown to the user. */ public String getName(); - + /** * Returns a string describing this participant type. - * + * * @return a string describing this participant type. */ public String getDescription(); - + /** * Returns the unique id that identifies this participant type. - * + * * @return the unique id that identifies this participant type. */ public String getId(); /** * Returns the image descriptor for this participant type. - * + * * @return the image descriptor for this participant type. */ public ImageDescriptor getImageDescriptor(); - + /** * Returns if this participant can be persisted between sessions. - * + * * @return <code>true</code> if this participant can be persisted between sessions * and false otherwise. */ diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantListener.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantListener.java index 8b903670e..513e04245 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantListener.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantListener.java @@ -11,7 +11,7 @@ package org.eclipse.team.ui.synchronize; /** - * A synchronize participant listener is notified when participants are added or + * A synchronize participant listener is notified when participants are added or * removed from the synchronize manager. * <p> * Clients may implement this interface. @@ -19,19 +19,19 @@ package org.eclipse.team.ui.synchronize; * @see ISynchronizeManager * @since 3.0 */ -public interface ISynchronizeParticipantListener { +public interface ISynchronizeParticipantListener { /** * Notification the given participants have been added to the synchronize * manager. - * + * * @param participants added participants */ public void participantsAdded(ISynchronizeParticipant[] participants); - + /** * Notification the given participants have been removed from the * synchronize manager. - * + * * @param participants removed participants */ public void participantsRemoved(ISynchronizeParticipant[] participants); diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantReference.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantReference.java index 15a78e831..5ffb63e88 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantReference.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantReference.java @@ -13,9 +13,9 @@ package org.eclipse.team.ui.synchronize; import org.eclipse.team.core.TeamException; /** - * A reference is a light weight handle used by the {@link ISynchronizeManager} + * A reference is a light weight handle used by the {@link ISynchronizeManager} * to manage registered participants. It is used to reference information - * about a particular participant instance without requiring the participant + * about a particular participant instance without requiring the participant * to be instantiated. Calling the {@link #getParticipant()} method will * cause the participant to be instantiated. * <p> @@ -27,44 +27,44 @@ import org.eclipse.team.core.TeamException; public interface ISynchronizeParticipantReference { /** * Returns the id of the participant type referenced by this handle. - * + * * @return the id of the participant type references by this handle. */ public String getId(); - + /** * Returns the secondary id (e.g. instance id) of the participant type referenced * by this handle or <code>null</code> if the participant doesn't support * multiple instances. - * + * * @return the secondary id of the participant type referenced * by this handle or <code>null</code> if the participant doesn't support * multiple instances. */ public String getSecondaryId(); - + /** * Returns the fully qualified name of this participant reference. This includes the * secondaryId if available. This can be displayed in the user interface to allow * the user to distinguish between multiple instances of a participant. - * + * * @return the fully qualified name of this participant reference */ public String getDisplayName(); - + /** * Returns the participant referenced by this handle. This may trigger loading of the * participant and and a result may be long running. The method may return <code>null</code> * if the participant cannot be de-referenced. - * + * * @return the participant referenced by this handle. * @throws TeamException if an error occurs */ public ISynchronizeParticipant getParticipant() throws TeamException; - + /** * Returns the descriptor for this participant type. - * + * * @return the descriptor for this participant type. */ public ISynchronizeParticipantDescriptor getDescriptor(); diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeScope.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeScope.java index d932ef47a..8950ad7b5 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeScope.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeScope.java @@ -17,56 +17,56 @@ import org.eclipse.jface.util.IPropertyChangeListener; * A synchronize scope defines the set of resources involved in a * synchronization. Instance of this interface are used to scope the resources * of a created {@link SubscriberParticipant}. - * + * * @see SubscriberParticipant * @since 3.0 * @noimplement This interface is not intended to be implemented by clients. */ public interface ISynchronizeScope { - + /** * Property used to indicate when the roots of the scope have changed. */ public static final String ROOTS = "prop_roots"; //$NON-NLS-1$ - + /** * Property used to indicate when the name of the scope has changed. * @since 3.1 */ public static final String NAME = "prop_name"; //$NON-NLS-1$ - + /** * Return the name of the scope - * + * * @return the name of the scope */ public String getName(); - + /** * Return the root resources that define this scope. A return value * of <code>null</code> indicates that the participant should use * its default set of resources. - * + * * @return the root resources or <code>null</code> */ public IResource[] getRoots(); - + /** * Add a property change listener that will get invoked when a * property of the receiver changes. - * + * * @param listener */ public void addPropertyChangeListener(IPropertyChangeListener listener); - + /** * Remove a property change listener. Removing an unregistered listener * has no effect. - * + * * @param listener */ public void removePropertyChangeListener(IPropertyChangeListener listener); - + /** * Dispose of the scope when it is no longer needed. */ diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeView.java index a467a784c..131df1b83 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeView.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeView.java @@ -16,9 +16,9 @@ import org.eclipse.ui.IViewPart; * A view that displays synchronization participants that are registered with the * synchronize manager. This is essentially a generic container that allows * multiple {@link ISynchronizeParticipant} implementations to share the same - * view. The only behavior provided by the view is a mechanism for switching + * view. The only behavior provided by the view is a mechanism for switching * between participants. - * <p> + * <p> * Clients can not add viewActions to this view because they will be global * to all participants. Instead, add participant specific actions as described * in {@link org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration}. @@ -26,33 +26,33 @@ import org.eclipse.ui.IViewPart; * @see ISynchronizeManager#showSynchronizeViewInActivePage() * @since 3.0 * @noimplement Clients are not intended to implement this interface. - * + * */ public interface ISynchronizeView extends IViewPart { /** * The id for this view */ public static final String VIEW_ID = "org.eclipse.team.sync.views.SynchronizeView"; //$NON-NLS-1$ - + /** * This id is no longer used. * @deprecated not used, please use {@link #VIEW_ID} instead. */ @Deprecated public static final String COMPARE_VIEW_ID = "org.eclipse.team.sync.views.CompareView"; //$NON-NLS-1$ - + /** * Displays the given synchronize participant in the Synchronize View. This * has no effect if this participant is already being displayed. - * + * * @param participant participant to be displayed, cannot be <code>null</code> */ public void display(ISynchronizeParticipant participant); - + /** * Returns the participant currently being displayed in the Synchronize View * or <code>null</code> if none. - * + * * @return the participant currently being displayed in the Synchronize View * or <code>null</code> if none */ diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelMergeOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelMergeOperation.java index 3cdf492a9..3ed2c7b8e 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelMergeOperation.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelMergeOperation.java @@ -32,7 +32,7 @@ import org.eclipse.ui.IWorkbenchPart; * A model operation that executes a merge according to the merge lifecycle * associated with an {@link IMergeContext} and {@link IResourceMappingMerger} * instances obtained from the model providers involved. - * + * * @since 3.2 */ public abstract class ModelMergeOperation extends ModelOperation { @@ -42,7 +42,7 @@ public abstract class ModelMergeOperation extends ModelOperation { * the scope of the context. The {@link IResourceMappingMerger} for each * model provider will be consulted and any non-OK status will be * accumulated and returned, - * + * * @param context * the merge context being validated * @param monitor @@ -70,7 +70,7 @@ public abstract class ModelMergeOperation extends ModelOperation { monitor.done(); } } - + /* * Validate the merge by obtaining the {@link IResourceMappingMerger} for the * given provider. @@ -85,13 +85,13 @@ public abstract class ModelMergeOperation extends ModelOperation { return Status.OK_STATUS; return merger.validateMerge(context, monitor); } - + /* * Return the auto-merger associated with the given model provider using the * adaptable mechanism. If the model provider does not have a merger * associated with it, a default merger that performs the merge at the file * level is returned. - * + * * @param provider * the model provider of the elements to be merged (must not be * <code>null</code>) @@ -101,7 +101,7 @@ public abstract class ModelMergeOperation extends ModelOperation { Assert.isNotNull(provider); return (IResourceMappingMerger)Utils.getAdapter(provider, IResourceMappingMerger.class); } - + /** * Create a model merge operation. * @param part the workbench part from which the operation was requested or <code>null</code> @@ -110,12 +110,12 @@ public abstract class ModelMergeOperation extends ModelOperation { protected ModelMergeOperation(IWorkbenchPart part, ISynchronizationScopeManager manager) { super(part, manager); } - + /** * Perform a merge. First {@link #initializeContext(IProgressMonitor)} is * called to determine the set of resource changes. Then the * {@link #executeMerge(IProgressMonitor)} method is invoked. - * + * * @param monitor a progress monitor */ @Override @@ -140,7 +140,7 @@ public abstract class ModelMergeOperation extends ModelOperation { * there are no validation problems, {@link #performMerge(IProgressMonitor)} * will then be called to perform the merge. If there are problems encountered * or if a preview was requested, {@link #handlePreviewRequest()} is called. - * + * * @param monitor a progress monitor */ protected void executeMerge(IProgressMonitor monitor) throws CoreException { @@ -162,7 +162,7 @@ public abstract class ModelMergeOperation extends ModelOperation { } monitor.done(); } - + /** * A preview of the merge has been requested. By default, this method does * nothing. Subclasses that wish to support previewing must override this @@ -255,7 +255,7 @@ public abstract class ModelMergeOperation extends ModelOperation { }; }); } - + /** * Attempt a headless merge of the elements in the context of this * operation. The merge is performed by obtaining the @@ -265,7 +265,7 @@ public abstract class ModelMergeOperation extends ModelOperation { * method. The method will stop on the first conflict encountered. * This method will throw a runtime exception * if the operation does not have a merge context. - * + * * @param monitor * a progress monitor * @return a status that indicates whether the merge succeeded. @@ -275,7 +275,7 @@ public abstract class ModelMergeOperation extends ModelOperation { protected IStatus performMerge(IProgressMonitor monitor) throws CoreException { ISynchronizationContext sc = getContext(); if (sc instanceof IMergeContext) { - IMergeContext context = (IMergeContext) sc; + IMergeContext context = (IMergeContext) sc; final ModelProvider[] providers = sortByExtension(context.getScope().getModelProviders()); final IStatus[] result = new IStatus[] { Status.OK_STATUS }; context.run(new IWorkspaceRunnable() { @@ -308,7 +308,7 @@ public abstract class ModelMergeOperation extends ModelOperation { } return noMergeContextAvailable(); } - + /** * Attempt to merge all the mappings that come from the given provider. * Return a status which indicates whether the merge succeeded or if @@ -345,11 +345,11 @@ public abstract class ModelMergeOperation extends ModelOperation { } return noMergeContextAvailable(); } - + private IStatus noMergeContextAvailable() { throw new IllegalStateException(TeamUIMessages.ModelMergeOperation_2); } - + /** * Return whether the context of this operation has changes that are * of interest to the operation. Subclasses may override. @@ -359,7 +359,7 @@ public abstract class ModelMergeOperation extends ModelOperation { protected boolean hasChangesOfInterest() { return !getContext().getDiffTree().isEmpty() && hasIncomingChanges(getContext().getDiffTree()); } - + private boolean hasIncomingChanges(IDiffTree tree) { return tree.hasMatchingDiffs(ResourcesPlugin.getWorkspace().getRoot().getFullPath(), new FastDiffFilter() { @Override @@ -378,7 +378,7 @@ public abstract class ModelMergeOperation extends ModelOperation { } }); } - + private IMergeContext getMergeContext() { return (IMergeContext)getContext(); } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelOperation.java index 20d3be9b4..7e782047f 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelOperation.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelOperation.java @@ -36,14 +36,14 @@ import org.eclipse.ui.IWorkbenchPart; * must be included in the operation to ensure model consistency. The scope * generation phase will prompt the user if additional resources have been added * to the scope. - * + * * @since 3.2 */ public abstract class ModelOperation extends TeamOperation { - + private boolean previewRequested; private ISynchronizationScopeManager manager; - + /** * Return the list of provides sorted by their extends relationship. * Extended model providers will appear later in the list then those @@ -80,7 +80,7 @@ public abstract class ModelOperation extends TeamOperation { } return false; } - + /** * Create a model operation that operates on the given scope. * @param part the workbench part from which the merge was launched or <code>null</code> @@ -90,10 +90,10 @@ public abstract class ModelOperation extends TeamOperation { super(part); this.manager = manager; } - + /** * Run the operation. This method first ensures that the scope is built - * by calling {@link #initializeScope(IProgressMonitor)} and then invokes the + * by calling {@link #initializeScope(IProgressMonitor)} and then invokes the * {@link #execute(IProgressMonitor)} method. * @param monitor a progress monitor * @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor) @@ -110,12 +110,12 @@ public abstract class ModelOperation extends TeamOperation { monitor.done(); } } - + /** * Method called from {@link #run(IProgressMonitor)} before * the {@link #execute(IProgressMonitor)} method is invoked. * This is done to give the operation a chance to initialize - * any state required to execute. By default, the + * any state required to execute. By default, the * {@link ISynchronizationScopeManager} for this operation * is initialized if it was not previously initialized. * @param monitor a progress monitor @@ -169,7 +169,7 @@ public abstract class ModelOperation extends TeamOperation { /** * Prompt the user by calling {@link #promptForInputChange(String, IProgressMonitor)} - * if the scope of the operation was expanded (as described in + * if the scope of the operation was expanded (as described in * {@link #initializeScope(IProgressMonitor)}). * @param monitor a progress monitor */ @@ -395,15 +395,15 @@ public abstract class ModelOperation extends TeamOperation { if (requestPreviewMessage != null) { forcePreview[0] = dialog.isForcePreview(); } - } + } }); - + if (canceled[0]) { throw new OperationCanceledException(); } return forcePreview[0]; } - + /** * Return the synchronization context for the operation or <code>null</code> * if the operation doesn't have one or if it has not yet been created. @@ -415,7 +415,7 @@ public abstract class ModelOperation extends TeamOperation { } /** - * Execute the operation. This method is invoked after the + * Execute the operation. This method is invoked after the * scope has been generated. * @param monitor a progress monitor * @throws InvocationTargetException @@ -449,5 +449,5 @@ public abstract class ModelOperation extends TeamOperation { protected ISynchronizationScopeManager getScopeManager() { return manager; } - + } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantAction.java index 95da4712f..0faf4fef6 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantAction.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantAction.java @@ -31,7 +31,7 @@ import org.eclipse.ui.actions.BaseSelectionListenerAction; /** * Model provider actions for use with a {@link ModelSynchronizeParticipant}. - * + * * @since 3.2 */ public abstract class ModelParticipantAction extends BaseSelectionListenerAction { @@ -66,10 +66,10 @@ public abstract class ModelParticipantAction extends BaseSelectionListenerAction protected ISynchronizePageConfiguration getConfiguration() { return configuration; } - + /** * Set the selection of this action to the given selection - * + * * @param selection the selection */ public void selectionChanged(ISelection selection) { @@ -78,9 +78,9 @@ public abstract class ModelParticipantAction extends BaseSelectionListenerAction } else { super.selectionChanged(StructuredSelection.EMPTY); } - + } - + /* (non-Javadoc) * @see org.eclipse.ui.actions.BaseSelectionListenerAction#updateSelection(org.eclipse.jface.viewers.IStructuredSelection) */ @@ -89,7 +89,7 @@ public abstract class ModelParticipantAction extends BaseSelectionListenerAction super.updateSelection(selection); return isEnabledForSelection(selection); } - + /** * Return whether the action is enabled for the given selection * @param selection the selection @@ -113,7 +113,7 @@ public abstract class ModelParticipantAction extends BaseSelectionListenerAction */ protected boolean isVisible(IDiff node) { ISynchronizePageConfiguration configuration = getConfiguration(); - if (configuration.getComparisonType() == ISynchronizePageConfiguration.THREE_WAY + if (configuration.getComparisonType() == ISynchronizePageConfiguration.THREE_WAY && node instanceof IThreeWayDiff) { IThreeWayDiff twd = (IThreeWayDiff) node; int mode = configuration.getMode(); @@ -142,19 +142,19 @@ public abstract class ModelParticipantAction extends BaseSelectionListenerAction } return false; } - + /** - * Check to see if the target saveable differs from the currently + * Check to see if the target saveable differs from the currently * active saveable. If it does, prompt to save changes in the * active saveable if it is dirty. - * @throws InterruptedException - * @throws InvocationTargetException + * @throws InterruptedException + * @throws InvocationTargetException */ protected void handleTargetSaveableChange() throws InvocationTargetException, InterruptedException { final SaveableComparison targetSaveable = getTargetSaveable(); final SaveableComparison activeSaveable = getActiveSaveable(); if (activeSaveable != null && activeSaveable.isDirty()) { - PlatformUI.getWorkbench().getProgressService().run(true, true, new IRunnableWithProgress() { + PlatformUI.getWorkbench().getProgressService().run(true, true, new IRunnableWithProgress() { @Override public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { @@ -212,8 +212,8 @@ public abstract class ModelParticipantAction extends BaseSelectionListenerAction options = new String[] {IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL}; } MessageDialog dialog = new MessageDialog( - shell, - TeamUIMessages.ModelParticipantAction_0, null, + shell, + TeamUIMessages.ModelParticipantAction_0, null, NLS.bind(TeamUIMessages.ModelParticipantAction_1, saveable.getName()), MessageDialog.QUESTION, options, @@ -247,7 +247,7 @@ public abstract class ModelParticipantAction extends BaseSelectionListenerAction protected void setActiveSaveable(SaveableComparison saveable) { ((ModelSynchronizeParticipant)configuration.getParticipant()).setActiveSaveable(saveable); } - + /** * Return the saveable that is the target of this operation. * By default, <code>null</code> is returned. @@ -256,14 +256,14 @@ public abstract class ModelParticipantAction extends BaseSelectionListenerAction protected SaveableComparison getTargetSaveable() { return null; } - + /** * Method called when the action is about to be shown in a context menu. * This method recalculates the enablement for the current - * selection and uses that to set the enablement. + * selection and uses that to set the enablement. */ public void updateEnablement() { setEnabled(isEnabledForSelection(getStructuredSelection())); } - + } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantMergeOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantMergeOperation.java index 6cd339384..1cbbe68c5 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantMergeOperation.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantMergeOperation.java @@ -29,11 +29,11 @@ import org.eclipse.ui.progress.WorkbenchJob; /** * A model merge operation that uses a participant to preview the changes * in either a dialog or the Synchronize view. - * + * * @since 3.2 */ public abstract class ModelParticipantMergeOperation extends ModelMergeOperation { - + /** * Status code that can be returned from the {@link #performMerge(IProgressMonitor)} * method to indicate that a subclass would like to force a preview of the merge. @@ -45,9 +45,9 @@ public abstract class ModelParticipantMergeOperation extends ModelMergeOperation private boolean ownsParticipant = true; private boolean sentToSyncView; - + private static final Object PARTICIPANT_MERGE_FAMILY = new Object(); - + /** * Create a merge participant operation for the scope of the given manager. * @param part the workbench part from which the merge was launched or <code>null</code> @@ -69,7 +69,7 @@ public abstract class ModelParticipantMergeOperation extends ModelMergeOperation handlePreviewRequest(); sentToSyncView = true; } - participant.getContext().refresh(getScope().getTraversals(), + participant.getContext().refresh(getScope().getTraversals(), RemoteResourceMappingContext.FILE_CONTENTS_REQUIRED, monitor); // Only wait if we are not going to preview or we are previewing in a dialog if (!sentToSyncView) @@ -80,7 +80,7 @@ public abstract class ModelParticipantMergeOperation extends ModelMergeOperation } } } - + /* (non-Javadoc) * @see org.eclipse.team.ui.operations.ModelMergeOperation#execute(org.eclipse.core.runtime.IProgressMonitor) */ @@ -93,7 +93,7 @@ public abstract class ModelParticipantMergeOperation extends ModelMergeOperation participant.dispose(); } } - + /* (non-Javadoc) * @see org.eclipse.team.ui.mapping.ModelMergeOperation#executeMerge(org.eclipse.core.runtime.IProgressMonitor) */ @@ -102,7 +102,7 @@ public abstract class ModelParticipantMergeOperation extends ModelMergeOperation if (!sentToSyncView) super.executeMerge(monitor); } - + /* (non-Javadoc) * @see org.eclipse.team.ui.operations.ModelMergeOperation#handlePreviewRequest() */ @@ -121,7 +121,7 @@ public abstract class ModelParticipantMergeOperation extends ModelMergeOperation } ParticipantPageCompareEditorInput input = new ParticipantPageCompareEditorInput(cc, pageConfiguration, participant); CompareUI.openCompareDialog(input); - } else { + } else { ISynchronizeManager mgr = TeamUI.getSynchronizeManager(); ISynchronizeView view = mgr.showSynchronizeViewInActivePage(); mgr.addSynchronizeParticipants(new ISynchronizeParticipant[] {participant}); @@ -142,7 +142,7 @@ public abstract class ModelParticipantMergeOperation extends ModelMergeOperation if (TeamUI.getSynchronizeManager().get(participant.getId(), participant.getSecondaryId()) == null) participant.dispose(); } - + }); ownsParticipant = false; job.schedule(); @@ -157,7 +157,7 @@ public abstract class ModelParticipantMergeOperation extends ModelMergeOperation return true; return super.belongsTo(family); } - + /** * Return whether previews should occur in a dialog or in the synchronize view. * @return whether previews should occur in a dialog or in the synchronize view @@ -175,14 +175,14 @@ public abstract class ModelParticipantMergeOperation extends ModelMergeOperation return participant.getContext(); return null; } - + /* (non-Javadoc) * @see org.eclipse.team.ui.operations.ResourceMappingOperation#getPreviewRequestMessage() */ @Override protected String getPreviewRequestMessage() { if (!isPreviewRequested()) { - return TeamUIMessages.ResourceMappingMergeOperation_4; + return TeamUIMessages.ResourceMappingMergeOperation_4; } return super.getPreviewRequestMessage(); } @@ -190,12 +190,12 @@ public abstract class ModelParticipantMergeOperation extends ModelMergeOperation /** * Create the synchronize participant to be used by this operation * to preview changes. By default, a {@link ModelSynchronizeParticipant} - * is created using the scope manager ({@link #getScopeManager()}) context + * is created using the scope manager ({@link #getScopeManager()}) context * from ({@link #createMergeContext()}) and job name ({@link #getJobName()}) * of this operation. Subclasses may override this method. * <p> - * Once created, it is the responsibility of the participant to dispose of the - * synchronization context when it is no longer needed. + * Once created, it is the responsibility of the participant to dispose of the + * synchronization context when it is no longer needed. * @return a newly created synchronize participant to be used by this operation */ protected ModelSynchronizeParticipant createParticipant() { @@ -204,7 +204,7 @@ public abstract class ModelParticipantMergeOperation extends ModelMergeOperation /** * Create a merge context for use by this operation. This method - * is not long running so the operation should not refresh the + * is not long running so the operation should not refresh the * context or perform other long running operations in this thread. * However the context may start initializing in another thread as long * as the job used to perform the initialization belongs to the diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantWizard.java index 7874cf403..fc19b0e11 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantWizard.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantWizard.java @@ -19,19 +19,19 @@ import org.eclipse.team.ui.TeamUI; * This is a convenience class for creating wizards for use with the * <code>org.eclipse.team.ui.synchronizeWizard</code> extension point * that create a {@link ModelSynchronizeParticipant}. - * + * * @since 3.2 */ public abstract class ModelParticipantWizard extends ParticipantSynchronizeWizard { private ModelElementSelectionPage selectionPage; - + public ModelParticipantWizard() { super(); setNeedsProgressMonitor(true); } - + /* (non-Javadoc) * @see org.eclipse.team.ui.synchronize.ParticipantSynchronizeWizard#createParticipant() */ @@ -42,7 +42,7 @@ public abstract class ModelParticipantWizard extends ParticipantSynchronizeWizar // We don't know in which site to show progress because a participant could actually be shown in multiple sites. participant.run(null /* no site */); } - + /* (non-Javadoc) * @see org.eclipse.team.ui.synchronize.ParticipantSynchronizeWizard#createScopeSelectionPage() */ @@ -55,7 +55,7 @@ public abstract class ModelParticipantWizard extends ParticipantSynchronizeWizar /** * Method called from {@link #createParticipant()} to create a * {@link ModelSynchronizeParticipant} for the given resource mappings. - * + * * @param selectedMappings * the selected mappings that define the scope * @return a synchronize participant that will be added to the Synchronize diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipant.java index d650b0e0a..24c9a0a57 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipant.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipant.java @@ -41,12 +41,12 @@ import org.eclipse.ui.progress.IProgressConstants2; * a {@link ISynchronizationContext}. * <p> * This class may be subclassed by clients. - * + * * @since 3.2 */ public class ModelSynchronizeParticipant extends AbstractSynchronizeParticipant { - + /** * Property constant used to store and retrieve the id of the active * {@link ModelProvider} from an {@link ISynchronizePageConfiguration}. The @@ -55,36 +55,36 @@ public class ModelSynchronizeParticipant extends * returned, all model providers are considered active and are visible. */ public static final String P_VISIBLE_MODEL_PROVIDER = TeamUIPlugin.ID + ".activeModelProvider"; //$NON-NLS-1$ - + /** * Constant used with the <code>P_ACTIVE_MODEL_PROVIDER</code> property to indicate * that all enabled model providers are active. */ public static final String ALL_MODEL_PROVIDERS_VISIBLE = TeamUIPlugin.ID + ".activeModelProvider"; //$NON-NLS-1$ - + /** * Property constant used during property change notification to indicate * that the enabled model providers for this participant have changed. */ public static final String PROP_ENABLED_MODEL_PROVIDERS = TeamUIPlugin.ID + ".ENABLED_MODEL_PROVIDERS"; //$NON-NLS-1$ - + /** * Property constant used during property change notification to indicate * that the active model of this participant has changed. */ public static final String PROP_ACTIVE_SAVEABLE = TeamUIPlugin.ID + ".ACTIVE_SAVEABLE"; //$NON-NLS-1$ - + /** * Property constant used during property change notification to indicate * that the dirty state for the active saveable model of this participant has changed. */ public static final String PROP_DIRTY = TeamUIPlugin.ID + ".DIRTY"; //$NON-NLS-1$ - + /* * Key for settings in memento */ private static final String CTX_PARTICIPANT_SETTINGS = TeamUIPlugin.ID + ".MODEL_PARTICIPANT_SETTINGS"; //$NON-NLS-1$ - + /* * Key for schedule in memento */ @@ -94,7 +94,7 @@ public class ModelSynchronizeParticipant extends * Key for description in memento */ private static final String CTX_DESCRIPTION = TeamUIPlugin.ID + ".MODEL_PARTICIPANT_DESCRIPTION"; //$NON-NLS-1$ - + /* * Constants used to save and restore this scope */ @@ -102,7 +102,7 @@ public class ModelSynchronizeParticipant extends private static final String CTX_MODEL_PROVIDER_ID = "modelProviderId"; //$NON-NLS-1$ private static final String CTX_MODEL_PROVIDER_MAPPINGS = "mappings"; //$NON-NLS-1$ private static final String CTX_STARTUP_ACTION = "startupAction"; //$NON-NLS-1$ - + private SynchronizationContext context; private boolean mergingEnabled = true; private SubscriberRefreshSchedule refreshSchedule; @@ -135,7 +135,7 @@ public class ModelSynchronizeParticipant extends public static ModelSynchronizeParticipant createParticipant(SynchronizationContext context, String name) { return new ModelSynchronizeParticipant(context, name); } - + /* * Create a participant for the given context * @param context the synchronization context @@ -161,7 +161,7 @@ public class ModelSynchronizeParticipant extends initializeContext(context); refreshSchedule = new SubscriberRefreshSchedule(createRefreshable()); } - + /** * Create a participant in order to restore it from saved state. */ @@ -176,11 +176,11 @@ public class ModelSynchronizeParticipant extends String name = super.getName(); if (description == null) description = Utils.getScopeDescription(getContext().getScope()); - return NLS.bind(TeamUIMessages.SubscriberParticipant_namePattern, new String[] { name, description }); + return NLS.bind(TeamUIMessages.SubscriberParticipant_namePattern, new String[] { name, description }); } /** - * Return the name of the participant as specified in the plugin manifest file. + * Return the name of the participant as specified in the plugin manifest file. * This method is provided to give access to this name since it is masked by * the <code>getName()</code> method defined in this class. * @return the name of the participant as specified in the plugin manifest file @@ -189,7 +189,7 @@ public class ModelSynchronizeParticipant extends protected final String getShortName() { return super.getName(); } - + /* (non-Javadoc) * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant#initializeConfiguration(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration) */ @@ -211,7 +211,7 @@ public class ModelSynchronizeParticipant extends /** * Create the merge action group for this participant. - * Subclasses can override in order to provide a + * Subclasses can override in order to provide a * merge action group that configures certain aspects * of the merge actions. * @return the merge action group for this participant @@ -238,11 +238,11 @@ public class ModelSynchronizeParticipant extends } /** - * Refresh a participant in the background the result of the refresh are shown in the progress view. Refreshing + * Refresh a participant in the background the result of the refresh are shown in the progress view. Refreshing * can also be considered synchronizing, or refreshing the synchronization state. Basically this is a long * running operation that will update the participant's context with new changes detected on the * server. - * + * * @param site the workbench site the synchronize is running from. This can be used to notify the site * that a job is running. * @param mappings the resource mappings to be refreshed @@ -251,7 +251,7 @@ public class ModelSynchronizeParticipant extends IRefreshSubscriberListener listener = new RefreshUserNotificationPolicy(this); internalRefresh(mappings, null, null, site, listener); } - + /* (non-Javadoc) * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#dispose() */ @@ -261,7 +261,7 @@ public class ModelSynchronizeParticipant extends Job.getJobManager().cancel(this); refreshSchedule.dispose(); } - + /** * Set the context of this participant. This method must be invoked * before a page is obtained from the participant. @@ -298,7 +298,7 @@ public class ModelSynchronizeParticipant extends public ISynchronizationContext getContext() { return context; } - + /** * Return a compare input for the given model object or <code>null</code> * if the object is not eligible for comparison. @@ -333,7 +333,7 @@ public class ModelSynchronizeParticipant extends /** * Return whether merge capabilities are enabled for this participant. - * If merging is enabled, merge actions can be shown. If merging is disabled, no + * If merging is enabled, merge actions can be shown. If merging is disabled, no * merge actions should be surfaced. * @return whether merge capabilities should be enabled for this participant */ @@ -348,7 +348,7 @@ public class ModelSynchronizeParticipant extends public void setMergingEnabled(boolean mergingEnabled) { this.mergingEnabled = mergingEnabled; } - + private void internalRefresh(ResourceMapping[] mappings, String jobName, String taskName, IWorkbenchSite site, IRefreshSubscriberListener listener) { if (jobName == null) jobName = getShortTaskName(); @@ -359,30 +359,30 @@ public class ModelSynchronizeParticipant extends job.setUser(true); job.setProperty(IProgressConstants2.SHOW_IN_TASKBAR_ICON_PROPERTY, Boolean.TRUE); Utils.schedule(job, site); - + // Remember the last participant synchronized TeamUIPlugin.getPlugin().getPreferenceStore().setValue(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT, getId()); TeamUIPlugin.getPlugin().getPreferenceStore().setValue(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT_SEC_ID, getSecondaryId()); } - + /** * Returns the short task name (e.g. no more than 25 characters) to describe * the behavior of the refresh operation to the user. This is typically * shown in the status line when this participant is refreshed in the * background. When refreshed in the foreground, only the long task name is * shown. - * + * * @return the short task name to show in the status line. */ protected String getShortTaskName() { return NLS.bind(TeamUIMessages.Participant_synchronizingDetails, getShortName()); } - + /** * Returns the long task name to describe the behavior of the refresh * operation to the user. This is typically shown in the status line when * this subscriber is refreshed in the background. - * + * * @param mappings the mappings being refreshed * @return the long task name * @since 3.1 @@ -399,19 +399,19 @@ public class ModelSynchronizeParticipant extends mappingCount = mappings.length; } if (mappingCount == 1) { - return NLS.bind(TeamUIMessages.Participant_synchronizingMoreDetails, new String[] { getShortName(), Utils.getLabel(mappings[0]) }); + return NLS.bind(TeamUIMessages.Participant_synchronizingMoreDetails, new String[] { getShortName(), Utils.getLabel(mappings[0]) }); } - return NLS.bind(TeamUIMessages.Participant_synchronizingResources, new String[] { getShortName(), Integer.toString(mappingCount) }); + return NLS.bind(TeamUIMessages.Participant_synchronizingResources, new String[] { getShortName(), Integer.toString(mappingCount) }); } - + private IRefreshable createRefreshable() { return new IRefreshable() { - + @Override public RefreshParticipantJob createJob(String interval) { String jobName = NLS.bind(TeamUIMessages.RefreshSchedule_15, new String[] { ModelSynchronizeParticipant.this.getName(), interval }); - return new RefreshModelParticipantJob(ModelSynchronizeParticipant.this, - jobName, + return new RefreshModelParticipantJob(ModelSynchronizeParticipant.this, + jobName, jobName, context.getScope().getMappings(), new RefreshUserNotificationPolicy(ModelSynchronizeParticipant.this)); @@ -428,10 +428,10 @@ public class ModelSynchronizeParticipant extends public SubscriberRefreshSchedule getRefreshSchedule() { return refreshSchedule; } - + }; } - + /* (non-Javadoc) * @see org.eclipse.core.runtime.PlatformObject#getAdapter(java.lang.Class) */ @@ -439,14 +439,14 @@ public class ModelSynchronizeParticipant extends public Object getAdapter(Class adapter) { if (adapter == IRefreshable.class && refreshSchedule != null) { return refreshSchedule.getRefreshable(); - + } if (adapter == SubscriberRefreshSchedule.class) { return refreshSchedule; } return super.getAdapter(adapter); } - + /* (non-Javadoc) * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#saveState(org.eclipse.ui.IMemento) */ @@ -501,7 +501,7 @@ public class ModelSynchronizeParticipant extends } } } - + private ResourceMapping[] loadMappings(IMemento settings) throws PartInitException { List result = new ArrayList(); IMemento[] children = settings.getChildren(CTX_PARTICIPANT_MAPPINGS); @@ -553,10 +553,10 @@ public class ModelSynchronizeParticipant extends /** * Create and return a scope manager that can be used to build the scope of this - * participant when it is restored after a restart. By default, this method + * participant when it is restored after a restart. By default, this method * returns a scope manager that uses the local content. * This method can be overridden by subclasses. - * + * * @param mappings the restored mappings * @return a scope manager that can be used to build the scope of this * participant when it is restored after a restart @@ -564,7 +564,7 @@ public class ModelSynchronizeParticipant extends protected ISynchronizationScopeManager createScopeManager(ResourceMapping[] mappings) { return new SynchronizationScopeManager(super.getName(), mappings, ResourceMappingContext.LOCAL_CONTEXT, true); } - + /* private */ void setRefreshSchedule(SubscriberRefreshSchedule schedule) { if (refreshSchedule != schedule) { if (refreshSchedule != null) { @@ -608,7 +608,7 @@ public class ModelSynchronizeParticipant extends if (isDirty != wasDirty) firePropertyChange(this, PROP_DIRTY, Boolean.valueOf(wasDirty), Boolean.valueOf(isDirty)); } - + /** * Convenience method for switching the active saveable of this participant * to the saveable of the given input. @@ -632,7 +632,7 @@ public class ModelSynchronizeParticipant extends setActiveSaveable(targetBuffer); return true; } - + /** * Return the list of model providers that are enabled for the participant. * By default, the list is those model providers that contain mappings @@ -642,7 +642,7 @@ public class ModelSynchronizeParticipant extends public ModelProvider[] getEnabledModelProviders() { return getContext().getScope().getModelProviders(); } - + /* (non-Javadoc) * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant#getPreferencePages() */ @@ -683,9 +683,9 @@ public class ModelSynchronizeParticipant extends } return false; } - + private SubscriberDiffTreeEventHandler getHandler() { return (SubscriberDiffTreeEventHandler)Utils.getAdapter(context, SubscriberDiffTreeEventHandler.class); } - + } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipantActionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipantActionGroup.java index fa3425d7c..e01201c69 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipantActionGroup.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipantActionGroup.java @@ -27,7 +27,7 @@ import org.eclipse.ui.*; * synchronize participant. The groups adds the following: * <ul> * <li>A toolbar action for attempting an auto-merge - * <li>Context menu merge actions that delegate to the + * <li>Context menu merge actions that delegate to the * model's merge action handlers. * <li>TODO a merge all and overwrite all menu item? * </ul> @@ -36,7 +36,7 @@ import org.eclipse.ui.*; * by overriding {@link #configureMergeAction(String, Action)} and can * configure where in the context menu the actions appear by overriding * {@link #addToContextMenu(String, Action, IMenuManager)}. - * + * * @since 3.2 **/ public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActionGroup { @@ -52,12 +52,12 @@ public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActio * actions (e.g. mark-as-merged) appear in the context menu. */ public static final String OTHER_ACTION_GROUP = "other"; //$NON-NLS-1$ - + /** * The id used to identify the Merge All action. */ protected static final String MERGE_ALL_ACTION_ID = "org.eclipse.team.ui.mergeAll"; //$NON-NLS-1$ - + /** * Create a merge action group. */ @@ -71,14 +71,14 @@ public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActio private MergeAction merge; private MergeAction overwrite; private MergeAction markAsMerged; - + /* (non-Javadoc) * @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#initialize(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration) */ @Override public void initialize(ISynchronizePageConfiguration configuration) { super.initialize(configuration); - + ModelSynchronizeParticipant participant = ((ModelSynchronizeParticipant)configuration.getParticipant()); if (participant.isMergingEnabled()) { updateToolbarAction = new MergeIncomingChangesAction(configuration); @@ -107,7 +107,7 @@ public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActio }); } } - + @Override public void fillActionBars(IActionBars actionBars) { super.fillActionBars(actionBars); @@ -116,7 +116,7 @@ public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActio appendToGroup(menu, ISynchronizePageConfiguration.PREFERENCES_GROUP, showPreferences); } } - + /* (non-Javadoc) * @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#fillContextMenu(org.eclipse.jface.action.IMenuManager) */ @@ -140,18 +140,18 @@ public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActio } } if (allElementsHaveCompareInput) { - menu.appendToGroup(fileGroup.getId(), openInCompareAction); + menu.appendToGroup(fileGroup.getId(), openInCompareAction); } } } } - + /* * Method to add the merge actions to the context menu. This method * is called by the internal synchronization framework and should not * to be invoked by other clients. Subclasses can configure the * merge actions by overriding {@link #configureMergeAction(String, Action)} - * and can control where in the context menu the action appears by + * and can control where in the context menu the action appears by * overriding {@link #addToContextMenu(String, Action, IMenuManager)}. * @param cmm the menu manager */ @@ -163,7 +163,7 @@ public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActio merge = new MergeAction(SynchronizationActionProvider.MERGE_ACTION_ID, cmm, getConfiguration()); configureMergeAction(SynchronizationActionProvider.MERGE_ACTION_ID, merge); registerActionWithWorkbench(merge); - + } merge.update(); addToContextMenu(SynchronizationActionProvider.MERGE_ACTION_ID, merge, cmm); @@ -186,11 +186,11 @@ public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActio } } } - + /** * Register this action with the workbench so that it can participate in keybindings and * retargetable actions. - * + * * @param action the action to register */ private void registerActionWithWorkbench(IAction action) { @@ -203,12 +203,12 @@ public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActio keyBindingService.registerAction(action); } } - + /** * Configure the merge action to have appropriate label, image, etc. * Subclasses may override but should invoke the overridden * method for unrecognized ids in order to support future additions. - * @param mergeActionId the id of the merge action (one of + * @param mergeActionId the id of the merge action (one of * {@link SynchronizationActionProvider#MERGE_ACTION_ID}, * {@link SynchronizationActionProvider#OVERWRITE_ACTION_ID} or * {@link SynchronizationActionProvider#MARK_AS_MERGE_ACTION_ID}) @@ -233,7 +233,7 @@ public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActio } } } - + private boolean isTwoWayMerge() { ModelSynchronizeParticipant participant = ((ModelSynchronizeParticipant)getConfiguration().getParticipant()); ISynchronizationContext context = participant.getContext(); @@ -243,12 +243,12 @@ public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActio } return false; } - + /** - * Add the merge action to the context menu manager. + * Add the merge action to the context menu manager. * Subclasses may override but should invoke the overridden * method for unrecognized ids in order to support future additions. - * @param mergeActionId the id of the merge action (one of + * @param mergeActionId the id of the merge action (one of * {@link SynchronizationActionProvider#MERGE_ACTION_ID}, * {@link SynchronizationActionProvider#OVERWRITE_ACTION_ID} or * {@link SynchronizationActionProvider#MARK_AS_MERGE_ACTION_ID}) @@ -270,7 +270,7 @@ public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActio manager.add(action); } } - + /* (non-Javadoc) * @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#dispose() */ diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageCompareEditorInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageCompareEditorInput.java index d40dd4841..6cefefe79 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageCompareEditorInput.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageCompareEditorInput.java @@ -39,26 +39,26 @@ import org.eclipse.ui.part.IPageBookViewPage; * Displays a synchronize participant page combined with the compare/merge infrastructure. This only works if the * synchronize page viewer provides selections that are of the following types: ITypedElement and ICompareInput * or if the participant is a {@link ModelSynchronizeParticipant}. - * + * * @since 3.3 */ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput { private ISynchronizeParticipant participant; private ISynchronizePageConfiguration pageConfiguration; - + private Image titleImage; private IPageBookViewPage page; private DialogSynchronizePageSite site; private IPropertyChangeListener listener; private Button rememberParticipantButton; - + /** * Creates a part for the provided participant. The page configuration is used when creating the participant page and the resulting * compare/merge panes will be configured with the provided compare configuration. * <p> * For example, clients can decide if the user can edit the compare panes by calling {@link CompareConfiguration#setLeftEditable(boolean)} - * or {@link CompareConfiguration#setRightEditable(boolean)}. + * or {@link CompareConfiguration#setRightEditable(boolean)}. * </p> * @param configuration the compare configuration that will be used to create the compare panes * @param pageConfiguration the configuration that will be provided to the participant prior to creating the page @@ -83,7 +83,7 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput { setTitle(Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, participant.getName())); return participant; } - + /* (non-Javadoc) * @see org.eclipse.compare.CompareEditorInput#getTitleImage() */ @@ -94,7 +94,7 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput { } return titleImage; } - + /* (non-Javadoc) * @see org.eclipse.team.ui.PageCompareEditorInput#handleDispose() */ @@ -103,14 +103,14 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput { if(titleImage != null) { titleImage.dispose(); } - if (page != null) + if (page != null) page.dispose(); if (site != null) site.dispose(); pageConfiguration.removePropertyChangeListener(listener); super.handleDispose(); } - + /* (non-Javadoc) * @see org.eclipse.team.ui.PageCompareEditorInput#createPage(org.eclipse.compare.CompareViewerPane, org.eclipse.jface.action.IToolBarManager) */ @@ -138,7 +138,7 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput { } page.createControl(parent); - + page.setActionBars(site.getActionBars()); toolBarManager.update(true); return page; @@ -164,7 +164,7 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput { ICompareInput compareInput = super.asCompareInput(selection); if (compareInput != null) return compareInput; - + if (selection != null && selection instanceof IStructuredSelection) { IStructuredSelection ss= (IStructuredSelection) selection; if (ss.size() == 1) { @@ -177,7 +177,7 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput { } return null; } - + /* (non-Javadoc) * @see org.eclipse.team.ui.PageCompareEditorInput#prepareInput(org.eclipse.compare.structuremergeviewer.ICompareInput, org.eclipse.compare.CompareConfiguration, org.eclipse.core.runtime.IProgressMonitor) */ @@ -208,7 +208,7 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput { monitor.done(); } } - + private void checkForBufferChange(Shell shell, final ICompareInput input, boolean cancelAllowed, IProgressMonitor monitor) throws CoreException { ISynchronizeParticipant participant = pageConfiguration.getParticipant(); if (participant instanceof ModelSynchronizeParticipant) { @@ -223,14 +223,14 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput { private ISynchronizationCompareInput asModelCompareInput(ICompareInput input) { return (ISynchronizationCompareInput)Utils.getAdapter(input, ISynchronizationCompareInput.class); } - + /* (non-Javadoc) * @see org.eclipse.compare.CompareEditorInput#isSaveNeeded() */ @Override public boolean isSaveNeeded() { if (participant instanceof ModelSynchronizeParticipant) { - ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) participant; + ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) participant; SaveableComparison currentBuffer = msp.getActiveSaveable(); if (currentBuffer != null) { return currentBuffer.isDirty(); @@ -238,7 +238,7 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput { } return super.isSaveNeeded(); } - + /* (non-Javadoc) * @see org.eclipse.compare.CompareEditorInput#saveChanges(org.eclipse.core.runtime.IProgressMonitor) */ @@ -259,7 +259,7 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput { } } } - + private static void commit(IProgressMonitor pm, DiffNode node) throws CoreException { ITypedElement left = node.getLeft(); if (left instanceof LocalResourceTypedElement) @@ -268,13 +268,13 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput { ITypedElement right = node.getRight(); if (right instanceof LocalResourceTypedElement) ((LocalResourceTypedElement) right).commit(pm); - + IDiffElement[] children = node.getChildren(); for (int i = 0; i < children.length; i++) { - commit(pm, (DiffNode)children[i]); + commit(pm, (DiffNode)children[i]); } } - + /* (non-Javadoc) * @see org.eclipse.team.ui.PageCompareEditorInput#contentChanged(org.eclipse.compare.IContentChangeNotifier) */ @@ -291,25 +291,25 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput { Utils.handle(e); } } - + /** * Return the synchronize page configuration for this part - * + * * @return Returns the pageConfiguration. */ public ISynchronizePageConfiguration getPageConfiguration() { return pageConfiguration; } - + /** * Return the Synchronize participant for this part - * + * * @return Returns the participant. */ public ISynchronizeParticipant getParticipant() { return participant; } - + /* (non-Javadoc) * @see org.eclipse.compare.CompareEditorInput#createContents(org.eclipse.swt.widgets.Composite) */ @@ -321,13 +321,13 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput { Control control = super.createContents(composite); control.setLayoutData(new GridData(GridData.FILL_BOTH)); rememberParticipantButton = new Button(composite, SWT.CHECK); - rememberParticipantButton.setText(TeamUIMessages.ParticipantCompareDialog_1); + rememberParticipantButton.setText(TeamUIMessages.ParticipantCompareDialog_1); rememberParticipantButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); return composite; - } + } return super.createContents(parent); } - + /** * Return whether the ability to remember the participant in the synchronize * view should be presented to the user. By default, <code>true</code> is @@ -342,15 +342,15 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput { private boolean shouldCreateRememberButton() { return isOfferToRememberParticipant() && participant != null && ! particantRegisteredWithSynchronizeManager(participant); } - + private boolean isRememberParticipant() { return getParticipant() != null && rememberParticipantButton != null && rememberParticipantButton.getSelection(); } - + private boolean particantRegisteredWithSynchronizeManager(ISynchronizeParticipant participant) { return TeamUI.getSynchronizeManager().get(participant.getId(), participant.getSecondaryId()) != null; } - + private void rememberParticipant() { if(getParticipant() != null) { ISynchronizeManager mgr = TeamUI.getSynchronizeManager(); @@ -359,7 +359,7 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput { view.display(participant); } } - + /* (non-Javadoc) * @see org.eclipse.compare.CompareEditorInput#okPressed() */ @@ -375,7 +375,7 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput { rememberParticipant(); return super.okPressed(); } - + /* (non-Javadoc) * @see org.eclipse.compare.CompareEditorInput#cancelPressed() */ @@ -386,7 +386,7 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput { rememberParticipant(); super.cancelPressed(); } - + /* (non-Javadoc) * @see org.eclipse.compare.CompareEditorInput#getOKButtonLabel() */ @@ -396,12 +396,12 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput { return TeamUIMessages.ParticipantPageCompareEditorInput_0; return TeamUIMessages.ResourceMappingMergeOperation_2; } - + private boolean isEditable() { - return getCompareConfiguration().isLeftEditable() + return getCompareConfiguration().isLeftEditable() || getCompareConfiguration().isRightEditable(); } - + /* (non-Javadoc) * @see org.eclipse.compare.CompareEditorInput#getCancelButtonLabel() */ diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageDialog.java index db1ea289c..d2efb67c4 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageDialog.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageDialog.java @@ -22,24 +22,24 @@ import org.eclipse.team.ui.*; * A dialog that displays the option of adding the participant to the {@link org.eclipse.team.ui.synchronize.ISynchronizeManager} * when the dialog is closed. This can be useful for showing changes for a participant modally and allowing the * user to decide if the participant shown should be made available non-modally. - * + * * @see SaveablePartAdapter * @see ISynchronizeParticipant * @since 3.0 - * @deprecated Clients should use {@link ParticipantPageCompareEditorInput} + * @deprecated Clients should use {@link ParticipantPageCompareEditorInput} * and {@link CompareUI#openCompareDialog(org.eclipse.compare.CompareEditorInput)} */ @Deprecated public class ParticipantPageDialog extends SaveablePartDialog { - + private ISynchronizeParticipant participant; private Button rememberParticipantButton; /** * Creates a dialog with the given participant and input. The input is not created until the dialog * is opened. - * - * @param shell the parent shell or <code>null</code> to create a top level shell. + * + * @param shell the parent shell or <code>null</code> to create a top level shell. * @param input the compare input to show in the dialog * @param participant the given participant */ @@ -47,21 +47,21 @@ public class ParticipantPageDialog extends SaveablePartDialog { super(shell, input); this.participant = participant; } - + /* (non-Javadoc) * Method declared on Dialog. */ @Override protected Control createDialogArea(Composite parent2) { - Composite parent = (Composite) super.createDialogArea(parent2); + Composite parent = (Composite) super.createDialogArea(parent2); if (isOfferToRememberParticipant() && participant != null && ! particantRegisteredWithSynchronizeManager(participant)) { rememberParticipantButton = new Button(parent, SWT.CHECK); - rememberParticipantButton.setText(TeamUIMessages.ParticipantCompareDialog_1); + rememberParticipantButton.setText(TeamUIMessages.ParticipantCompareDialog_1); } Dialog.applyDialogFont(parent2); return parent; } - + /* (non-Javadoc) * @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int) */ @@ -72,15 +72,15 @@ public class ParticipantPageDialog extends SaveablePartDialog { } super.buttonPressed(buttonId); } - + private boolean isRememberParticipant() { return getParticipant() != null && rememberParticipantButton != null && rememberParticipantButton.getSelection(); } - + private boolean particantRegisteredWithSynchronizeManager(ISynchronizeParticipant participant) { return TeamUI.getSynchronizeManager().get(participant.getId(), participant.getSecondaryId()) != null; } - + private void rememberParticipant() { if(getParticipant() != null) { ISynchronizeManager mgr = TeamUI.getSynchronizeManager(); @@ -89,16 +89,16 @@ public class ParticipantPageDialog extends SaveablePartDialog { view.display(participant); } } - + /** * Returns the participant showing in this dialog. - * - * @return the participant showing in this dialog. + * + * @return the participant showing in this dialog. */ protected ISynchronizeParticipant getParticipant() { return participant; } - + /** * Return whether the ability to remember the participant in the synchronize * view should be presented to the user. By default, <code>true</code> is diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPagePane.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPagePane.java index 351aab225..0a1050332 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPagePane.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPagePane.java @@ -27,7 +27,7 @@ import org.eclipse.ui.part.IPageBookViewPage; * Stand alone presentation of a participant page within a view pane. This * allows showing a participant page with it's toolbar in dialogs and embedded * in views and editors. - * + * * @since 3.1 */ public final class ParticipantPagePane { @@ -37,18 +37,18 @@ public final class ParticipantPagePane { private Image titleImage; private Shell shell; private boolean isModal; - + // SWT controls private CompareViewerPane fEditionPane; private IPageBookViewPage fPage; private DialogSynchronizePageSite site; - + /** * Creates a part for the provided participant. The page configuration is used when creating the participant page and the resulting * compare/merge panes will be configured with the provided compare configuration. * <p> * For example, clients can decide if the user can edit the compare panes by calling {@link org.eclipse.compare.CompareConfiguration#setLeftEditable(boolean)} - * or {@link org.eclipse.compare.CompareConfiguration#setRightEditable(boolean)}. + * or {@link org.eclipse.compare.CompareConfiguration#setRightEditable(boolean)}. * </p> * @param shell the parent shell for this part * @param isModal to set the pane as modal or not @@ -61,7 +61,7 @@ public final class ParticipantPagePane { this.participant = participant; this.pageConfiguration = pageConfiguration; } - + /* (non-Javadoc) * @see org.eclipse.team.ui.SaveablePartAdapter#dispose() */ @@ -75,7 +75,7 @@ public final class ParticipantPagePane { if (site != null) site.dispose(); } - + /* (non-Javadoc) * @see org.eclipse.ui.IWorkbenchPart#getTitleImage() */ @@ -103,14 +103,14 @@ public final class ParticipantPagePane { layout.marginWidth = 0; layout.verticalSpacing = 0; top.setLayout(layout); - + shell = parent.getShell(); - - fEditionPane = new CompareViewerPane(top, SWT.BORDER | SWT.FLAT); - fEditionPane.setText(TeamUIMessages.ParticipantPageSaveablePart_0); - + + fEditionPane = new CompareViewerPane(top, SWT.BORDER | SWT.FLAT); + fEditionPane.setText(TeamUIMessages.ParticipantPageSaveablePart_0); + fEditionPane.setLayoutData(SWTUtils.createHVFillGridData()); - + fPage = participant.createPage(pageConfiguration); site = new DialogSynchronizePageSite(shell, isModal); ((SynchronizePageConfiguration)pageConfiguration).setSite(site); @@ -119,29 +119,29 @@ public final class ParticipantPagePane { try { ((ISynchronizePage)fPage).init(pageConfiguration.getSite()); } catch (PartInitException e1) { - TeamUIPlugin.log(IStatus.ERROR, TeamUIMessages.ParticipantPagePane_0, e1); + TeamUIPlugin.log(IStatus.ERROR, TeamUIMessages.ParticipantPagePane_0, e1); } fPage.createControl(fEditionPane); fPage.setActionBars(site.getActionBars()); fEditionPane.setContent(fPage.getControl()); tbm.update(true); - + return top; } - + /** * Return the synchronize page configuration for this part - * + * * @return Returns the pageConfiguration. */ public ISynchronizePageConfiguration getPageConfiguration() { return pageConfiguration; } - + /** * Return the Synchronize participant for this part - * + * * @return Returns the participant. */ public ISynchronizeParticipant getParticipant() { diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageSaveablePart.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageSaveablePart.java index 43e82cb5b..f4be4324f 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageSaveablePart.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageSaveablePart.java @@ -35,7 +35,7 @@ import org.eclipse.ui.part.IPageBookViewPage; * Displays a synchronize participant page combined with the compare/merge infrastructure. This only works if the * synchronize page viewer provides selections that are of the following types: ITypedElement and ICompareInput * or if the participant is a {@link ModelSynchronizeParticipant}. - * + * * @since 3.0 * @deprecated Clients should use a subclass of {@link PageCompareEditorInput} * and {@link CompareUI#openCompareDialog(org.eclipse.compare.CompareEditorInput)} @@ -49,7 +49,7 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo private IPageBookViewPage page; private DialogSynchronizePageSite site; - + private IPropertyChangeListener listener; private Viewer viewer; @@ -58,7 +58,7 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo * compare/merge panes will be configured with the provided compare configuration. * <p> * For example, clients can decide if the user can edit the compare panes by calling {@link CompareConfiguration#setLeftEditable(boolean)} - * or {@link CompareConfiguration#setRightEditable(boolean)}. + * or {@link CompareConfiguration#setRightEditable(boolean)}. * </p> * @param shell the parent shell for this part * @param cc the compare configuration that will be used to create the compare panes @@ -70,7 +70,7 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo this.participant = participant; this.pageConfiguration = pageConfiguration; } - + /* (non-Javadoc) * @see org.eclipse.team.ui.SaveablePartAdapter#dispose() */ @@ -79,14 +79,14 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo if(titleImage != null) { titleImage.dispose(); } - if (page != null) + if (page != null) page.dispose(); if (site != null) site.dispose(); pageConfiguration.removePropertyChangeListener(listener); super.dispose(); } - + /* (non-Javadoc) * @see org.eclipse.ui.IWorkbenchPart#getTitleImage() */ @@ -112,7 +112,7 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo @Override public boolean isDirty() { if (participant instanceof ModelSynchronizeParticipant) { - ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) participant; + ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) participant; SaveableComparison currentBuffer = msp.getActiveSaveable(); if (currentBuffer != null) { return currentBuffer.isDirty(); @@ -120,7 +120,7 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo } return super.isDirty(); } - + /* (non-Javadoc) * @see org.eclipse.compare.IContentChangeListener#contentChanged(org.eclipse.compare.IContentChangeNotifier) */ @@ -136,7 +136,7 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo Utils.handle(e); } } - + /* (non-Javadoc) * @see org.eclipse.ui.ISaveablePart#doSave(org.eclipse.core.runtime.IProgressMonitor) */ @@ -158,7 +158,7 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo } } } - + /* (non-Javadoc) * @see org.eclipse.team.ui.PageSaveablePart#createPage(org.eclipse.swt.widgets.Composite, org.eclipse.jface.action.ToolBarManager) */ @@ -185,13 +185,13 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo } page.createControl(parent); - + initializeDiffViewer(((ISynchronizePage)page).getViewer()); - + page.setActionBars(site.getActionBars()); toolBarManager.update(true); viewer = ((ISynchronizePage)page).getViewer(); - + setNavigator(pageConfiguration); return page.getControl(); } @@ -203,14 +203,14 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo protected final ISelectionProvider getSelectionProvider() { return ((ISynchronizePage)page).getViewer(); } - + private void updateDescription() { String description = (String)pageConfiguration.getProperty(ISynchronizePageConfiguration.P_PAGE_DESCRIPTION); if (description != null) { setPageDescription(description); } } - + /** * Initialize the diff viewer created for this compare input. If a subclass * overrides the <code>createDiffViewer(Composite)</code> method, it should @@ -237,7 +237,7 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo }); } } - + /** * {@inheritDoc} * @since 3.2 @@ -282,7 +282,7 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo private ISynchronizationCompareInput asModelCompareInput(ICompareInput input) { return (ISynchronizationCompareInput)Utils.getAdapter(input, ISynchronizationCompareInput.class); } - + private SyncInfoModelElement getElement(ISelection selection) { ICompareInput input = getCompareInput(selection); if(input instanceof SyncInfoModelElement) { @@ -290,7 +290,7 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo } return null; } - + private static void commit(IProgressMonitor pm, DiffNode node) throws CoreException { ITypedElement left = node.getLeft(); if (left instanceof LocalResourceTypedElement) @@ -299,25 +299,25 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo ITypedElement right = node.getRight(); if (right instanceof LocalResourceTypedElement) ((LocalResourceTypedElement) right).commit(pm); - + IDiffElement[] children = node.getChildren(); for (int i = 0; i < children.length; i++) { - commit(pm, (DiffNode)children[i]); + commit(pm, (DiffNode)children[i]); } } - + /** * Return the synchronize page configuration for this part - * + * * @return Returns the pageConfiguration. */ public ISynchronizePageConfiguration getPageConfiguration() { return pageConfiguration; } - + /** * Return the Synchronize participant for this part - * + * * @return Returns the participant. */ public ISynchronizeParticipant getParticipant() { @@ -333,7 +333,7 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo ICompareInput compareInput = super.getCompareInput(selection); if (compareInput != null) return compareInput; - + if (selection != null && selection instanceof IStructuredSelection) { IStructuredSelection ss= (IStructuredSelection) selection; if (ss.size() == 1) { @@ -346,7 +346,7 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo } return null; } - - + + } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantSynchronizeWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantSynchronizeWizard.java index 5b119fcbf..c9c1d5615 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantSynchronizeWizard.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantSynchronizeWizard.java @@ -4,7 +4,7 @@ * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ @@ -20,14 +20,14 @@ import org.eclipse.team.ui.TeamImages; /** * This is a convenience class for creating wizards for use with the * <code>org.eclipse.team.ui.synchronizeWizard</code> extension point. - * + * * @since 3.2 */ public abstract class ParticipantSynchronizeWizard extends Wizard { private WizardPage selectionPage; private IWizard importWizard; - + /** * Create the wizard. */ @@ -35,15 +35,15 @@ public abstract class ParticipantSynchronizeWizard extends Wizard { setDefaultPageImageDescriptor(TeamImages.getImageDescriptor(ITeamUIImages.IMG_WIZBAN_SHARE)); setNeedsProgressMonitor(false); } - + /* (non-Javadoc) * @see org.eclipse.jface.wizard.Wizard#getWindowTitle() */ @Override public String getWindowTitle() { - return TeamUIMessages.GlobalRefreshSubscriberPage_0; + return TeamUIMessages.GlobalRefreshSubscriberPage_0; } - + /* (non-Javadoc) * @see org.eclipse.jface.wizard.Wizard#addPages() */ @@ -56,14 +56,14 @@ public abstract class ParticipantSynchronizeWizard extends Wizard { importWizard.addPages(); IWizardPage startingPage = importWizard.getStartingPage(); if (startingPage != null) { - startingPage.setTitle(NLS.bind(TeamUIMessages.SubscriberParticipantWizard_0, new String[] { getPageTitle() })); - startingPage.setDescription(NLS.bind(TeamUIMessages.SubscriberParticipantWizard_1, new String[] { importWizard.getWindowTitle() })); + startingPage.setTitle(NLS.bind(TeamUIMessages.SubscriberParticipantWizard_0, new String[] { getPageTitle() })); + startingPage.setDescription(NLS.bind(TeamUIMessages.SubscriberParticipantWizard_1, new String[] { importWizard.getWindowTitle() })); } } } else { selectionPage = createScopeSelectionPage(); - selectionPage.setTitle(NLS.bind(TeamUIMessages.GlobalRefreshSubscriberPage_1, new String[] { getPageTitle() })); - selectionPage.setMessage(TeamUIMessages.GlobalRefreshSubscriberPage_2); + selectionPage.setTitle(NLS.bind(TeamUIMessages.GlobalRefreshSubscriberPage_1, new String[] { getPageTitle() })); + selectionPage.setMessage(TeamUIMessages.GlobalRefreshSubscriberPage_2); addPage(selectionPage); } } @@ -80,7 +80,7 @@ public abstract class ParticipantSynchronizeWizard extends Wizard { return true; } } - + /* (non-Javadoc) * @see org.eclipse.jface.wizard.Wizard#getNextPage(org.eclipse.jface.wizard.IWizardPage) */ @@ -91,7 +91,7 @@ public abstract class ParticipantSynchronizeWizard extends Wizard { } return super.getNextPage(page); } - + /* (non-Javadoc) * @see org.eclipse.jface.wizard.Wizard#performCancel() */ @@ -102,7 +102,7 @@ public abstract class ParticipantSynchronizeWizard extends Wizard { } return super.performCancel(); } - + /* (non-Javadoc) * @see org.eclipse.jface.wizard.Wizard#canFinish() */ @@ -113,7 +113,7 @@ public abstract class ParticipantSynchronizeWizard extends Wizard { } return super.canFinish(); } - + /* (non-Javadoc) * @see org.eclipse.jface.wizard.Wizard#getStartingPage() */ @@ -130,14 +130,14 @@ public abstract class ParticipantSynchronizeWizard extends Wizard { * @return the page title for the page used by this wizard */ protected abstract String getPageTitle(); - + /** * Return a wizard that can be used to populate the workspace * if there are no resources returned from {@link #getRootResources()}. * @return a wizard that can be used to populate the workspace */ protected abstract IWizard getImportWizard(); - + /** * Return the resources that are the roots of the resource * trees that can be considered for inclusion. @@ -145,7 +145,7 @@ public abstract class ParticipantSynchronizeWizard extends Wizard { * trees that can be considered for inclusion */ protected abstract IResource[] getRootResources(); - + /** * Create the page which allows the user to select the scope * for the operation. @@ -153,12 +153,12 @@ public abstract class ParticipantSynchronizeWizard extends Wizard { * for the operation */ protected abstract WizardPage createScopeSelectionPage(); - + /** * Method called from {@link #performFinish()} to create * a participant. This participant will be added to the * Synchronize view. */ protected abstract void createParticipant(); - + } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ResourceScope.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ResourceScope.java index 25d9de7c3..b08355176 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ResourceScope.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ResourceScope.java @@ -22,51 +22,51 @@ import org.eclipse.ui.IMemento; /** * A synchronize scope whose roots are a set of resources. - * + * * @since 3.0 * @noextend This class is not intended to be subclassed by clients. */ public class ResourceScope extends AbstractSynchronizeScope { - + /* * Constants used to save and restore this scope */ private final static String CTX_ROOT = "resource_scope_roots"; //$NON-NLS-1$ private final static String CTX_ROOT_PATH = "resource_scope_root_resource"; //$NON-NLS-1$ - + /* * The resources that define this scope */ private IResource[] resources; - + /** * Create the resource scope for the given resources - * + * * @param resources the resources that define this scope */ public ResourceScope(IResource[] resources) { this.resources = resources; } - - /** + + /** * Create this scope from it's previously saved state - * + * * @param memento persisted state that can be restored */ protected ResourceScope(IMemento memento) { super(memento); } - + /** * Set the resources that define this scope - * + * * @param resources the resources that define this scope */ public void setResources(IResource[] resources) { this.resources = resources; fireRootsChanges(); } - + /* (non-Javadoc) * @see org.eclipse.team.internal.ui.synchronize.ScopableSubscriberParticipant.ISynchronizeScope#getName() */ @@ -74,7 +74,7 @@ public class ResourceScope extends AbstractSynchronizeScope { public String getName() { return Utils.convertSelection(resources); } - + /* (non-Javadoc) * @see org.eclipse.team.internal.ui.synchronize.ScopableSubscriberParticipant.ISynchronizeScope#getRoots() */ @@ -82,7 +82,7 @@ public class ResourceScope extends AbstractSynchronizeScope { public IResource[] getRoots() { return resources; } - + /* (non-Javadoc) * @see org.eclipse.team.internal.ui.synchronize.ScopableSubscriberParticipant.ISynchronizeScope#dispose() */ @@ -90,7 +90,7 @@ public class ResourceScope extends AbstractSynchronizeScope { public void dispose() { // Nothing to dispose } - + /* (non-Javadoc) * @see org.eclipse.team.internal.ui.synchronize.ScopableSubscriberParticipant.ISynchronizeScope#saveState(org.eclipse.ui.IMemento) */ @@ -104,7 +104,7 @@ public class ResourceScope extends AbstractSynchronizeScope { } } } - + /* (non-Javadoc) * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeScope#init(org.eclipse.ui.IMemento) */ @@ -115,7 +115,7 @@ public class ResourceScope extends AbstractSynchronizeScope { List resources = new ArrayList(); for (int i = 0; i < rootNodes.length; i++) { IMemento rootNode = rootNodes[i]; - IPath path = new Path(rootNode.getString(CTX_ROOT_PATH)); + IPath path = new Path(rootNode.getString(CTX_ROOT_PATH)); IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(path, true /* include phantoms */); if(resource != null) { resources.add(resource); diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SaveableCompareEditorInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SaveableCompareEditorInput.java index e7fdca5dd..cfe334c20 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SaveableCompareEditorInput.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SaveableCompareEditorInput.java @@ -55,7 +55,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl private final ListenerList inputChangeListeners = new ListenerList(ListenerList.IDENTITY); private Saveable saveable; private IPropertyListener propertyListener; - + /** * Return a typed element that represents a local file. If the element * returned from this method is used as the left contributor of the compare @@ -67,7 +67,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl public static ITypedElement createFileElement(IFile file) { return new LocalResourceTypedElement(file); } - + private static ITypedElement getFileElement(ICompareInput input, CompareEditorInput editorInput) { if (input.getLeft() instanceof LocalResourceTypedElement) { @@ -78,7 +78,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl } return null; } - + private class InternalResourceSaveableComparison extends LocalResourceSaveableComparison implements ISharedDocumentAdapterListener { private LocalResourceTypedElement lrte; private boolean connected = false; @@ -114,7 +114,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl if (lrte != null) lrte.setSharedDocumentListener(null); } - + private void registerSaveable(boolean init) { ICompareContainer container = getContainer(); IWorkbenchPart part = container.getWorkbenchPart(); @@ -148,7 +148,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl // Ignore } } - + /** * Creates a <code>LocalResourceCompareEditorInput</code> which is initialized with the given * compare configuration. @@ -193,7 +193,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl } }; getCompareInput().addCompareInputChangeListener(compareInputChangeListener); - + if (getSaveable() instanceof SaveableComparison) { SaveableComparison scm = (SaveableComparison) saveable; propertyListener = new IPropertyListener() { @@ -216,7 +216,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl listener = (ISaveablesLifecycleListener) part.getSite().getService(ISaveablesLifecycleListener.class); return listener; } - + /* (non-Javadoc) * @see org.eclipse.compare.CompareEditorInput#handleDispose() */ @@ -254,7 +254,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl ((IDisposable) getCompareResult()).dispose(); } } - + private void logStackTrace() { new Exception("<Fake exception> in " + getClass().getName()).printStackTrace(System.out); //$NON-NLS-1$ } @@ -283,7 +283,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl /** * Method called from {@link #prepareInput(IProgressMonitor)} to obtain the input. Its purpose * is to ensure that the input is an instance of {@link ICompareInput}. - * + * * @param monitor a progress monitor * @return the compare input * @throws InvocationTargetException @@ -291,7 +291,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl */ protected abstract ICompareInput prepareCompareInput(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException; - + /** * Return the compare input of this editor input. * @return the compare input of this editor input @@ -299,7 +299,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl protected final ICompareInput getCompareInput() { return (ICompareInput)getCompareResult(); } - + /** * Callback from the resource saveable that is invoked when the resource is * saved so that this input can fire a change event for its input. Subclasses @@ -307,7 +307,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl * an element returned from {@link #createFileElement(IFile)}. */ protected abstract void fireInputChange(); - + /** * Close the editor if it is not dirty. If it is still dirty, let the * content merge viewer handle the compare input change. @@ -346,13 +346,13 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl return true; } } - + private IWorkbenchPage getPage() { if (page == null) return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); return page; } - + /* package */ void propogateInputChange() { if (!inputChangeListeners.isEmpty()) { Object[] allListeners = inputChangeListeners.getListeners(); @@ -386,7 +386,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl } return saveable; } - + /** * Create the saveable that provides the save behavior for this compare editor input. * By default, a saveable that handles local files is returned @@ -415,7 +415,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl public Saveable[] getSaveables() { return getActiveSaveables(); } - + /* (non-Javadoc) * @see org.eclipse.compare.CompareEditorInput#addCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInput, org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener) */ @@ -428,7 +428,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl super.addCompareInputChangeListener(input, listener); } } - + /* (non-Javadoc) * @see org.eclipse.compare.CompareEditorInput#removeCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInput, org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener) */ @@ -441,7 +441,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl super.removeCompareInputChangeListener(input, listener); } } - + /* (non-Javadoc) * @see org.eclipse.compare.CompareEditorInput#getAdapter(java.lang.Class) */ @@ -455,7 +455,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl } return super.getAdapter(adapter); } - + /* * (non-Javadoc) * @see org.eclipse.compare.CompareEditorInput#getTitleImage() @@ -479,7 +479,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl public ImageDescriptor getImageDescriptor() { return TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_SYNC_VIEW); } - + /* (non-Javadoc) * @see org.eclipse.compare.CompareEditorInput#findContentViewer(org.eclipse.jface.viewers.Viewer, org.eclipse.compare.structuremergeviewer.ICompareInput, org.eclipse.swt.widgets.Composite) */ @@ -512,14 +512,14 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl public boolean canRunAsJob() { return true; } - + @Override public boolean isDirty() { if (saveable != null) return saveable.isDirty(); return super.isDirty(); } - + @Override public void registerContextMenu(final MenuManager menu, final ISelectionProvider selectionProvider) { @@ -535,5 +535,5 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl }); } } - + } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipant.java index bcc2b0cd7..c0e7137db 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipant.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipant.java @@ -34,7 +34,7 @@ import org.eclipse.ui.part.IPageBookViewPage; import org.eclipse.ui.progress.IProgressConstants2; /** - * A synchronize participant that displays synchronization information for local resources that are + * A synchronize participant that displays synchronization information for local resources that are * managed via a {@link Subscriber}. It maintains a dynamic collection of all out-of-sync resources * by listening to workspace resource changes and remote changes thus creating a live view of * changes in the workspace. @@ -47,32 +47,32 @@ import org.eclipse.ui.progress.IProgressConstants2; * <li>initializeConfiguration: participants can add toolbar actions, configure the context menu, decorator. * <li>saveState and init: persist settings between sessions. * </ul> - * This class is intended to be subclassed. + * This class is intended to be subclassed. * </p> * @since 3.0 */ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipant implements IPropertyChangeListener { - + /* * Collects and maintains set of all out-of-sync resources of the subscriber */ private SubscriberSyncInfoCollector collector; - + /* * Controls the automatic synchronization of this participant */ private SubscriberRefreshSchedule refreshSchedule; - + /* * Provides the resource scope for this participant */ private ISynchronizeScope scope; - + /* * Key for settings in memento */ private static final String CTX_SUBSCRIBER_PARTICIPANT_SETTINGS = TeamUIPlugin.ID + ".TEAMSUBSRCIBERSETTINGS"; //$NON-NLS-1$ - + /* * Key for schedule in memento */ @@ -89,9 +89,9 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa return new IRefreshable() { @Override public RefreshParticipantJob createJob(String interval) { - return new RefreshSubscriberParticipantJob(SubscriberParticipant.this, - TeamUIMessages.RefreshSchedule_14, - NLS.bind(TeamUIMessages.RefreshSchedule_15, new String[] { SubscriberParticipant.this.getName(), interval }), getResources(), + return new RefreshSubscriberParticipantJob(SubscriberParticipant.this, + TeamUIMessages.RefreshSchedule_14, + NLS.bind(TeamUIMessages.RefreshSchedule_15, new String[] { SubscriberParticipant.this.getName(), interval }), getResources(), new RefreshUserNotificationPolicy(SubscriberParticipant.this)); } @Override @@ -106,14 +106,14 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa public SubscriberRefreshSchedule getRefreshSchedule() { return SubscriberParticipant.this.getRefreshSchedule(); } - + }; } - + /** * Constructor which should be called when creating a participant whose resources * are to be scoped. - * + * * @param scope a synchronize scope */ public SubscriberParticipant(ISynchronizeScope scope) { @@ -121,7 +121,7 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa this.scope = scope; scope.addPropertyChangeListener(this); } - + /* (non-Javadoc) * @see org.eclipse.team.ui.sync.ISynchronizeViewPage#createPage(org.eclipse.team.ui.sync.ISynchronizeView) */ @@ -130,37 +130,37 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa validateConfiguration(configuration); return new SubscriberParticipantPage(configuration, getSubscriberSyncInfoCollector()); } - + /** * Returns the resources supervised by this participant. It will * either be the roots of the subscriber or the resource scope * provided when the subscriber was set. - * + * * @return the resources supervised by this participant. */ public IResource[] getResources() { return collector.getRoots(); } - + /* * Set the resources supervised by this participant. If <code>null</code>, * the participant will include all roots of its subscriber - * + * * @param roots the root resources to consider or <code>null</code> * to consider all roots of the subscriber */ private void setResources(IResource[] roots) { collector.setRoots(roots); } - + /** - * Refresh this participants synchronization state and displays the result in a model dialog. - * @param shell - * + * Refresh this participants synchronization state and displays the result in a model dialog. + * @param shell + * * @param resources - * @param jobName + * @param jobName * @param taskName - * @param configuration + * @param configuration * @param site */ public final void refreshInDialog(Shell shell, IResource[] resources, String jobName, String taskName, ISynchronizePageConfiguration configuration, IWorkbenchSite site) { @@ -169,13 +169,13 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa } /** - * Refresh a participant in the background the result of the refresh are shown in the progress view. Refreshing + * Refresh a participant in the background the result of the refresh are shown in the progress view. Refreshing * can also be considered synchronizing, or refreshing the synchronization state. Basically this is a long * running operation that will update the participants sync info sets with new changes detected on the * server. Either or both of the <code>shortTaskName</code> and <code>longTaskName</code> can be <code>null</code> * in which case, the default values for these are returned by the methods <code>getShortTaskName()</code> and * <code>getLongTaskName(IResource[])</code> will be used. - * + * * @param resources the resources to be refreshed. * @param shortTaskName the taskName of the background job that will run the synchronize or <code>null</code> * if the default job name is desired. @@ -191,9 +191,9 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa /** * Refresh a participant. The returned status describes the result of the refresh. - * @param resources - * @param taskName - * @param monitor + * @param resources + * @param taskName + * @param monitor * @return a status */ public final IStatus refreshNow(IResource[] resources, String taskName, IProgressMonitor monitor) { @@ -201,30 +201,30 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa RefreshParticipantJob job = new RefreshSubscriberParticipantJob(this, taskName, taskName, resources, null); return job.run(monitor); } - + /* (non-Javadoc) * @see org.eclipse.team.ui.sync.AbstractSynchronizeViewPage#dispose() */ @Override public void dispose() { Job.getJobManager().cancel(this); - refreshSchedule.dispose(); + refreshSchedule.dispose(); TeamUI.removePropertyChangeListener(this); collector.dispose(); scope.dispose(); } - + /* (non-Javadoc) * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant#getName() */ @Override public String getName() { String name = super.getName(); - return NLS.bind(TeamUIMessages.SubscriberParticipant_namePattern, new String[] { name, scope.getName() }); + return NLS.bind(TeamUIMessages.SubscriberParticipant_namePattern, new String[] { name, scope.getName() }); } - + /** - * Return the name of the participant as specified in the plugin manifest file. + * Return the name of the participant as specified in the plugin manifest file. * This method is provided to give access to this name since it is masked by * the <code>getName()</code> method defined in this class. * @return the name of the participant as specified in the plugin manifest file @@ -233,33 +233,33 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa protected final String getShortName() { return super.getName(); } - + /** * Returns the <code>SyncInfoTree</code> for this participant. This set - * contains the out-of-sync resources supervised by this participant. - * + * contains the out-of-sync resources supervised by this participant. + * * @return the sync info set that contains the out-of-sync resources * for this participant. */ public SyncInfoTree getSyncInfoSet() { return getSubscriberSyncInfoCollector().getSyncInfoSet(); } - + /** * Return the <code>Subscriber</code> associated with this this participant. This * method will only return <code>null</code> if the participant has not been initialized - * yet. - * + * yet. + * * @return the <code>Subscriber</code> associated with this this participant. */ public Subscriber getSubscriber() { if (collector == null) return null; return collector.getSubscriber(); } - + /** * Returns a participant that matches the given resource scoping - * + * * @param ID the type id of participants to match * @param resources the resources to match in the scope * @return a participant that matches the given resource scoping @@ -285,7 +285,7 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa } return null; } - + /* (non-Javadoc) * @see IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent) */ @@ -303,7 +303,7 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa firePropertyChange(this, IBasicPropertyConstants.P_TEXT, null, getName()); } } - + /* (non-Javadoc) * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#init(org.eclipse.ui.IMemento) */ @@ -338,12 +338,12 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa public void reset() { getSubscriberSyncInfoCollector().reset(); } - + /** * Return the <code>SubscriberSyncInfoCollector</code> for the participant. * This collector maintains the set of all out-of-sync resources for the * subscriber. - * + * * @return the <code>SubscriberSyncInfoCollector</code> for this participant * @noreference This method is not intended to be referenced by clients. * @nooverride This method is not intended to be re-implemented or extended @@ -352,7 +352,7 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa public SubscriberSyncInfoCollector getSubscriberSyncInfoCollector() { return collector; } - + /** * @noreference This method is not intended to be referenced by clients. * @nooverride This method is not intended to be re-implemented or extended by clients. @@ -367,7 +367,7 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa // Always fir the event since the schedule may have been changed firePropertyChange(this, AbstractSynchronizeParticipant.P_SCHEDULED, schedule, schedule); } - + /** * @noreference This method is not intended to be referenced by clients. * @nooverride This method is not intended to be re-implemented or extended by clients. @@ -375,7 +375,7 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa public SubscriberRefreshSchedule getRefreshSchedule() { return refreshSchedule; } - + /* (non-Javadoc) * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant#initializeConfiguration(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration) */ @@ -383,7 +383,7 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa protected void initializeConfiguration(ISynchronizePageConfiguration configuration) { configuration.setProperty(SynchronizePageConfiguration.P_PARTICIPANT_SYNC_INFO_SET, collector.getSyncInfoSet()); } - + /* (non-Javadoc) * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#run(org.eclipse.ui.IWorkbenchPart) */ @@ -391,31 +391,31 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa public void run(IWorkbenchPart part) { refresh(getResources(), null, null, part != null ? part.getSite() : null); } - + /** * Returns the short task name (e.g. no more than 25 characters) to describe the behavior of the * refresh operation to the user. This is typically shown in the status line when this subscriber is refreshed * in the background. When refreshed in the foreground, only the long task name is shown. - * + * * @return the short task name to show in the status line. */ protected String getShortTaskName() { - return TeamUIMessages.Participant_synchronizing; + return TeamUIMessages.Participant_synchronizing; } - + /** * Returns the long task name to describe the behavior of the * refresh operation to the user. This is typically shown in the status line when this subscriber is refreshed * in the background. - * + * * @return the long task name * @deprecated use <code>getLongTaskName(IResource[]) instead</code> */ @Deprecated protected String getLongTaskName() { - return TeamUIMessages.Participant_synchronizing; + return TeamUIMessages.Participant_synchronizing; } - + /** * Returns the long task name to describe the behavior of the * refresh operation to the user. This is typically shown in the status line when this subscriber is refreshed @@ -437,33 +437,33 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa resourceCount = resources.length; } if (resourceCount == 1) { - return NLS.bind(TeamUIMessages.Participant_synchronizingMoreDetails, new String[] { getShortName(), resources[0].getFullPath().toString() }); + return NLS.bind(TeamUIMessages.Participant_synchronizingMoreDetails, new String[] { getShortName(), resources[0].getFullPath().toString() }); } else if (resourceCount > 1) { - return NLS.bind(TeamUIMessages.Participant_synchronizingResources, new String[] { getShortName(), Integer.toString(resourceCount) }); + return NLS.bind(TeamUIMessages.Participant_synchronizingResources, new String[] { getShortName(), Integer.toString(resourceCount) }); } // A resource count of zero means that it is a non-resource scope so we can print the scope name - return NLS.bind(TeamUIMessages.Participant_synchronizingDetails, new String[] { getName() }); + return NLS.bind(TeamUIMessages.Participant_synchronizingDetails, new String[] { getName() }); } /** * This method is invoked before the given configuration is used to * create the page (see <code>createPage(ISynchronizePageConfiguration)</code>). - * The configuration would have been initialized by + * The configuration would have been initialized by * <code>initializeConfiguration(ISynchronizePageConfiguration)</code> - * but may have also been tailored further. This method gives the participant + * but may have also been tailored further. This method gives the participant * a chance to validate those changes before the page is created. - * + * * @param configuration the page configuration that is about to be used to create a page. */ protected void validateConfiguration(ISynchronizePageConfiguration configuration) { // Do nothing by default } - + /** * Subclasses must call this method to initialize the participant. Typically this * method is called in {@link #init(String, IMemento)}. This method will initialize * the sync info collector. - * + * * @param subscriber the subscriber to associate with this participant. */ protected void setSubscriber(Subscriber subscriber) { @@ -471,20 +471,20 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa scope = new WorkspaceScope(); } collector = new SubscriberSyncInfoCollector(subscriber, scope.getRoots()); - + // listen for global ignore changes TeamUI.addPropertyChangeListener(this); - + // Start collecting changes collector.start(); - + // Start the refresh now that a subscriber has been added SubscriberRefreshSchedule schedule = getRefreshSchedule(); if(schedule.isEnabled()) { getRefreshSchedule().startJob(); } } - + /** * Provide a filter that is used to filter the contents of the sync info set for the participant. Normally, all out-of-sync * resources from the subscriber will be included in the participant's set. However, a filter can be used to exclude @@ -497,10 +497,10 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa protected void setSyncInfoFilter(SyncInfoFilter filter) { collector.setFilter(filter); } - + /* - * Create and schedule a subscriber refresh job. - * + * Create and schedule a subscriber refresh job. + * * @param resources resources to be synchronized * @param taskName the task name to be shown to the user * @param site the site in which to run the refresh @@ -516,21 +516,21 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa job.setUser(true); job.setProperty(IProgressConstants2.SHOW_IN_TASKBAR_ICON_PROPERTY, Boolean.TRUE); Utils.schedule(job, site); - + // Remember the last participant synchronized TeamUIPlugin.getPlugin().getPreferenceStore().setValue(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT, getId()); TeamUIPlugin.getPlugin().getPreferenceStore().setValue(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT_SEC_ID, getSecondaryId()); } - + /** * Return the scope that defines the resources displayed by this participant. - * + * * @return Returns the scope. */ public ISynchronizeScope getScope() { return scope; } - + /* (non-Javadoc) * @see org.eclipse.core.runtime.PlatformObject#getAdapter(java.lang.Class) */ @@ -538,7 +538,7 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa public Object getAdapter(Class adapter) { if (adapter == IRefreshable.class && refreshSchedule != null) { return refreshSchedule.getRefreshable(); - + } return super.getAdapter(adapter); } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipantWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipantWizard.java index fb4a98a5b..2c41a3b5e 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipantWizard.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipantWizard.java @@ -19,13 +19,13 @@ import org.eclipse.team.ui.TeamUI; * This is a convenience class for creating wizards for use with the * <code>org.eclipse.team.ui.synchronizeWizard</code> extension point * that create a {@link SubscriberParticipant}. - * + * * @since 3.2 */ public abstract class SubscriberParticipantWizard extends ParticipantSynchronizeWizard { private GlobalRefreshResourceSelectionPage selectionPage; - + /* (non-Javadoc) * @see org.eclipse.team.ui.synchronize.ParticipantSynchronizeWizard#createScopeSelectionPage() */ @@ -34,7 +34,7 @@ public abstract class SubscriberParticipantWizard extends ParticipantSynchronize selectionPage = new GlobalRefreshResourceSelectionPage(getRootResources()); return selectionPage; } - + /* (non-Javadoc) * @see org.eclipse.team.ui.synchronize.ParticipantSynchronizeWizard#createParticipant() */ @@ -48,11 +48,11 @@ public abstract class SubscriberParticipantWizard extends ParticipantSynchronize participant.run(null /* no site */); } } - + /** * Method called from {@link #createParticipant()} to create a * {@link SubscriberParticipant} for the given scope. - * + * * @param scope the selected scope * @return a synchronize participant that will be added to the Synchronize * view diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberTeamStateProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberTeamStateProvider.java index 3e4748f8b..e18ada731 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberTeamStateProvider.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberTeamStateProvider.java @@ -29,7 +29,7 @@ import org.eclipse.team.ui.mapping.*; * provider, they must adapt their {@link RepositoryProviderType} class to an appropriate {@link ITeamStateProvider}. * <p> * Clients may subclass this class. - * + * * @since 3.2 */ public class SubscriberTeamStateProvider extends TeamStateProvider implements ISubscriberChangeListener { @@ -37,7 +37,7 @@ public class SubscriberTeamStateProvider extends TeamStateProvider implements IS private Subscriber subscriber; /** - * Create a provider that determines the synchronization state + * Create a provider that determines the synchronization state * from the subscriber. This method registers this provider as a listener * on the subscriber in order to know when to fire state change events. * @param subscriber the subscriber for this provider @@ -75,7 +75,7 @@ public class SubscriberTeamStateProvider extends TeamStateProvider implements IS * ISynchronizationCompareAdapter, then the adapter is used to determine the * synchronization state. Others, the state is obtained from the subscriber * using {@link Subscriber#getState(ResourceMapping, int, IProgressMonitor)} - * + * * @param element the element * @param stateMask the state mask that indicates which state flags are desired * @param monitor a progress monitor @@ -90,7 +90,7 @@ public class SubscriberTeamStateProvider extends TeamStateProvider implements IS } return IDiff.NO_CHANGE; } - + private int getSynchronizationState(ResourceMapping mapping, int stateMask, IProgressMonitor monitor) throws CoreException { ISynchronizationCompareAdapter compareAdapter = (ISynchronizationCompareAdapter)Utils.getAdapter(mapping.getModelProvider(), ISynchronizationCompareAdapter.class); try { @@ -133,10 +133,10 @@ public class SubscriberTeamStateProvider extends TeamStateProvider implements IS public ResourceMappingContext getResourceMappingContext(Object element) { return new SubscriberResourceMappingContext(subscriber, false); } - + /** * Return the subscriber associated with this tester. - * + * * @return the subscriber associated with this tester. */ protected final Subscriber getSubscriber() { diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoCompareInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoCompareInput.java index 70bd4276c..04a9037c1 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoCompareInput.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoCompareInput.java @@ -28,10 +28,10 @@ import org.eclipse.team.internal.ui.synchronize.SynchronizePageConfiguration; import org.eclipse.ui.progress.UIJob; /** - * A {@link SyncInfo} editor input used as input to a two-way or three-way - * compare viewer. It defines methods for accessing the three sides for the + * A {@link SyncInfo} editor input used as input to a two-way or three-way + * compare viewer. It defines methods for accessing the three sides for the * compare, and a name and image which is used when displaying the three way input - * in an editor. This input can alternately be used to show compare results in + * in an editor. This input can alternately be used to show compare results in * a dialog by calling {@link CompareUI#openCompareDialog(org.eclipse.compare.CompareEditorInput)}. * <p> * The editor will not update when the elements in the sync info are changed. @@ -41,7 +41,7 @@ import org.eclipse.ui.progress.UIJob; * when the local resources is changed. * </p> * @see SyncInfo - * @since 3.0 + * @since 3.0 */ public final class SyncInfoCompareInput extends SaveableCompareEditorInput implements IResourceChangeListener { @@ -66,10 +66,10 @@ public final class SyncInfoCompareInput extends SaveableCompareEditorInput imple super.fireChange(); } } - + /** * Creates a compare editor input based on an existing <code>SyncInfo</code>. - * + * * @param description a description of the context of this sync info. This * is displayed to the user. * @param sync the <code>SyncInfo</code> used as the base for the compare input. @@ -83,22 +83,22 @@ public final class SyncInfoCompareInput extends SaveableCompareEditorInput imple this.node = new MyDiffNode(null, sync); setTitle(NLS.bind(TeamUIMessages.SyncInfoCompareInput_title, new String[] { sync.getLocal().getName() })); } - + /** * Creates a compare editor input based on an existing <code>SyncInfo</code> * from the given participant. - * + * * @param participant the participant from which the sync info was obtained. The * name of the participant is used as the description which is displayed to the user. * @param sync the <code>SyncInfo</code> used as the base for the compare input. - * + * * @since 3.1 */ public SyncInfoCompareInput(ISynchronizeParticipant participant, SyncInfo sync) { this(participant.getName(), sync); this.participant = participant; } - + public SyncInfoCompareInput(ISynchronizePageConfiguration configuration, SyncInfo info) { this(configuration.getParticipant(), info); @@ -133,13 +133,13 @@ public final class SyncInfoCompareInput extends SaveableCompareEditorInput imple } return super.getAdapter(adapter); } - + private static CompareConfiguration getDefaultCompareConfiguration() { CompareConfiguration cc = new CompareConfiguration(); //cc.setProperty(CompareConfiguration.USE_OUTLINE_VIEW, true); return cc; } - + /** * Note that until the compare editor inputs can be part of the compare editors lifecycle we * can't register as a listener because there is no dispose() method to remove the listener. @@ -197,7 +197,7 @@ public final class SyncInfoCompareInput extends SaveableCompareEditorInput imple */ @Override public String getToolTipText() { - return NLS.bind(TeamUIMessages.SyncInfoCompareInput_tooltip, new String[] { Utils.shortenText(30, description), node.getResource().getFullPath().toString() }); + return NLS.bind(TeamUIMessages.SyncInfoCompareInput_tooltip, new String[] { Utils.shortenText(30, description), node.getResource().getFullPath().toString() }); } /* @@ -211,9 +211,9 @@ public final class SyncInfoCompareInput extends SaveableCompareEditorInput imple if (other instanceof SyncInfoCompareInput) { SyncInfo otherSyncInfo = ((SyncInfoCompareInput) other).getSyncInfo(); SyncInfo thisSyncInfo = getSyncInfo(); - // Consider the inputs equal if the sync info are equal and the + // Consider the inputs equal if the sync info are equal and the // left nodes are equal (i.e they have the same timestamp) - return thisSyncInfo.equals(otherSyncInfo) + return thisSyncInfo.equals(otherSyncInfo) && node.getLeft().equals(((SyncInfoCompareInput) other).node.getLeft()); } return false; @@ -221,7 +221,7 @@ public final class SyncInfoCompareInput extends SaveableCompareEditorInput imple /* * (non-Javadoc) - * + * * @see java.lang.Object#hashCode() */ @Override @@ -232,7 +232,7 @@ public final class SyncInfoCompareInput extends SaveableCompareEditorInput imple public SyncInfo getSyncInfo() { return node.getSyncInfo(); } - + /* (non-Javadoc) * @see org.eclipse.compare.CompareEditorInput#canRunInBackground() */ @@ -240,7 +240,7 @@ public final class SyncInfoCompareInput extends SaveableCompareEditorInput imple public boolean canRunAsJob() { return true; } - + /* (non-Javadoc) * @see org.eclipse.compare.CompareEditorInput#getNavigator() */ diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelAction.java index e8ade4c6d..226ef8164 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelAction.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelAction.java @@ -30,32 +30,32 @@ import org.eclipse.ui.ide.IDE; * instances. Subclasses can use this support to filter the selection in order * to determine action enablement and generate the input for a * {@link SynchronizeModelOperation}. - * + * * @see SyncInfo * @see SyncInfoSet * @see SynchronizeModelOperation * @since 3.0 */ public abstract class SynchronizeModelAction extends BaseSelectionListenerAction { - + private ISynchronizePageConfiguration configuration; /** * Create an action with the given text and configuration. By default, - * the action registers for selection change with the selection provider + * the action registers for selection change with the selection provider * from the configuration's site. - * + * * @param text the action's text * @param configuration the actions synchronize page configuration */ protected SynchronizeModelAction(String text, ISynchronizePageConfiguration configuration) { this(text, configuration, configuration.getSite().getSelectionProvider()); } - + /** * Create an action with the given text and configuration. By default, * the action registers for selection change with the given selection provider. - * + * * @param text the action's text * @param configuration the actions synchronize page configuration * @param selectionProvider a selection provider @@ -65,12 +65,12 @@ public abstract class SynchronizeModelAction extends BaseSelectionListenerAction this.configuration = configuration; initialize(configuration, selectionProvider); } - + /** * Method invoked from the constructor. * The default implementation registers the action as a selection change * listener. Subclasses may override. - * + * * @param configuration the synchronize page configuration * @param selectionProvider a selection provider */ @@ -107,7 +107,7 @@ public abstract class SynchronizeModelAction extends BaseSelectionListenerAction * Create and run the operation for this action. By default, the operation is created * by calling <code>getSubscriberOperation</code> and then run. Subclasses may * override. - * + * * @throws InvocationTargetException * @throws InterruptedException * @since 3.1 @@ -119,7 +119,7 @@ public abstract class SynchronizeModelAction extends BaseSelectionListenerAction /** * Return whether dirty editor should be saved before this action is run. * Default is <code>true</code>. - * + * * @return whether dirty editor should be saved before this action is run */ protected boolean needsToSaveDirtyEditors() { @@ -129,20 +129,20 @@ public abstract class SynchronizeModelAction extends BaseSelectionListenerAction /** * Returns whether the user should be prompted to save dirty editors. The * default is <code>true</code>. - * + * * @return whether the user should be prompted to save dirty editors */ protected boolean confirmSaveOfDirtyEditor() { return true; } - + /** * Return the subscriber operation associated with this action. This * operation will be run when the action is run. Subclass may implement this * method and provide an operation subclass or may override the * <code>run(IAction)</code> method directly if they choose not to * implement a <code>SynchronizeModelOperation</code>. - * + * * @param configuration the synchronize page configuration for the page to * which this action is associated * @param elements the selected diff element for which this action is @@ -150,17 +150,17 @@ public abstract class SynchronizeModelAction extends BaseSelectionListenerAction * @return the subscriber operation to be run by this action. */ protected abstract SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements); - + /** * Generic error handling code that uses an error dialog to show the error * to the user. Subclasses can use this method and/or override it. - * + * * @param e the exception that occurred. */ protected void handle(Exception e) { Utils.handle(e); } - + /* (non-Javadoc) * @see org.eclipse.ui.actions.BaseSelectionListenerAction#updateSelection(org.eclipse.jface.viewers.IStructuredSelection) */ @@ -169,7 +169,7 @@ public abstract class SynchronizeModelAction extends BaseSelectionListenerAction super.updateSelection(selection); return isEnabledForSelection(selection); } - + private boolean isEnabledForSelection(IStructuredSelection selection) { return Utils.hasMatchingDescendant(selection, getSyncInfoFilter()); } @@ -177,7 +177,7 @@ public abstract class SynchronizeModelAction extends BaseSelectionListenerAction /** * This method returns all instances of IDiffElement that are in the current * selection. - * + * * @return the selected elements */ protected final IDiffElement[] getSelectedDiffElements() { @@ -188,7 +188,7 @@ public abstract class SynchronizeModelAction extends BaseSelectionListenerAction * Filter uses to filter the user selection to contain only those elements * for which this action is enabled. Default filter includes all out-of-sync * elements in the current selection. Subclasses may override. - * + * * @return a sync info filter which selects all out-of-sync resources. */ protected FastSyncInfoFilter getSyncInfoFilter() { @@ -217,7 +217,7 @@ public abstract class SynchronizeModelAction extends BaseSelectionListenerAction /** * Set the selection of this action to the given selection - * + * * @param selection the selection */ public void selectionChanged(ISelection selection) { @@ -226,24 +226,24 @@ public abstract class SynchronizeModelAction extends BaseSelectionListenerAction } else { super.selectionChanged(StructuredSelection.EMPTY); } - + } - + /** * Returns the configuration showing this action. - * + * * @return the configuration showing this action. */ public ISynchronizePageConfiguration getConfiguration() { return configuration; } - + /** * Save all dirty editors in the workbench that are open on files that may * be affected by this operation. Opens a dialog to prompt the user if * <code>confirm</code> is true. Return true if successful. Return false * if the user has canceled the command. Must be called from the UI thread. - * + * * @param confirm prompt the user if true * @return boolean false if the operation was canceled. */ diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelOperation.java index 10bcc0616..60530a3c7 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelOperation.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelOperation.java @@ -28,15 +28,15 @@ import org.eclipse.ui.IWorkbenchPart; * the operation is run in the background the elements the operation is created * with will be updated to show that they are busy while the operation is * running and will be marked un-busy after the operation completes. - * + * * @see SyncInfoSet * @see SynchronizeModelAction * @since 3.0 */ public abstract class SynchronizeModelOperation extends TeamOperation { - + private IDiffElement[] elements; - + /* * Helper method for extracting the part safely from a configuration */ @@ -49,7 +49,7 @@ public abstract class SynchronizeModelOperation extends TeamOperation { } return null; } - + /* * Helper method for extracting the runnable context safely from a configuration */ @@ -59,10 +59,10 @@ public abstract class SynchronizeModelOperation extends TeamOperation { } return null; } - + /** * Create an operation that will operate on the given diff elements. - * + * * @param configuration the participant configuration in which this * operation is run * @param elements the model elements this operation will run with @@ -75,7 +75,7 @@ public abstract class SynchronizeModelOperation extends TeamOperation { /** * Returns a sync info set that contains the {@link SyncInfo}for the * elements of this operations. - * + * * @return the sync info set that contains the elements this operation is * operating on. */ @@ -91,7 +91,7 @@ public abstract class SynchronizeModelOperation extends TeamOperation { super.scheduled(event); markBusy(elements, true); } - + /* (non-Javadoc) * @see org.eclipse.core.runtime.jobs.JobChangeAdapter#done(org.eclipse.core.runtime.jobs.IJobChangeEvent) */ @@ -100,7 +100,7 @@ public abstract class SynchronizeModelOperation extends TeamOperation { markBusy(elements, false); super.done(event); } - + private void markBusy(IDiffElement[] elements, boolean isBusy) { for (int i = 0; i < elements.length; i++) { IDiffElement element = elements[i]; @@ -109,10 +109,10 @@ public abstract class SynchronizeModelOperation extends TeamOperation { } } } - + /* * Return the selected SyncInfo for which this action is enabled. - * + * * @return the selected SyncInfo for which this action is enabled. */ private SyncInfo[] getSyncInfos() { @@ -125,11 +125,11 @@ public abstract class SynchronizeModelOperation extends TeamOperation { } return (SyncInfo[]) filtered.toArray(new SyncInfo[filtered.size()]); } - + /* * Return a sync info set that contains the given sync info */ private SyncInfoSet makeSyncInfoSetFromSelection(SyncInfo[] infos) { - return new SyncInfoSet(infos); + return new SyncInfoSet(infos); } } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizePageActionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizePageActionGroup.java index a2d8b7f93..7f645d640 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizePageActionGroup.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizePageActionGroup.java @@ -23,15 +23,15 @@ import org.eclipse.ui.IKeyBindingService; import org.eclipse.ui.actions.ActionGroup; /** - * Used to add one or more actions to the context menu, toolbar or view menu + * Used to add one or more actions to the context menu, toolbar or view menu * of an {@link ISynchronizePage}. An action group is added to a synchronize * page by adding the group to the {@link ISynchronizePageConfiguration} after - * configuration has been created by the page but before the page is created. + * configuration has been created by the page but before the page is created. * <p> * The life cycle of an action group is: * <ul> * <li>the <code>initialize(ISynchronizePageConfiguration}</code> method is - * invoked before the methods to populate menus. This is done to give clients + * invoked before the methods to populate menus. This is done to give clients * a change to create and initialize the actions of the action group. * <li>The <code>fillActionBars(IActionBars)</code> method is invoked * to populate the page's action bars (view menu and toolbar). It is @@ -39,12 +39,12 @@ import org.eclipse.ui.actions.ActionGroup; * so clients are expected to check for <code>null</code> when accessing * the menus from the action bars. * <li>The <code>fillContextMenu(IMenuManager)</code> method is invoked each time - * the context menu is shown. Before this method is called, the + * the context menu is shown. Before this method is called, the * action group will be provided with an <code>ActionContext</code> * containing the view selection. Clients can access the context using * <code>getContext()</code>. * <li>The <code>updateActionBars()</code> method is invoked whenever the - * page's selection changes. Before this method is called, the + * page's selection changes. Before this method is called, the * action group will be provided with an <code>ActionContext</code> * containing the view selection. Clients can access the context using * <code>getContext()</code>. @@ -59,9 +59,9 @@ import org.eclipse.ui.actions.ActionGroup; public abstract class SynchronizePageActionGroup extends ActionGroup { private ISynchronizePageConfiguration configuration; - + private Map menuContributions = new HashMap(); - + private VisibleRootsSelectionProvider visibleRootSelectionProvider; /* @@ -77,7 +77,7 @@ public abstract class SynchronizePageActionGroup extends ActionGroup { protected VisibleRootsSelectionProvider(ISynchronizeModelElement element) { modelChanged(element); } - + /* (non-Javadoc) * @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#modelChanged(org.eclipse.team.ui.synchronize.ISynchronizeModelElement) */ @@ -89,15 +89,15 @@ public abstract class SynchronizePageActionGroup extends ActionGroup { setSelection(new StructuredSelection(root)); } } - + /* (non-Javadoc) * Method declared on ISelectionProvider. */ @Override public void addSelectionChangedListener(ISelectionChangedListener listener) { - selectionChangedListeners.add(listener); + selectionChangedListeners.add(listener); } - + /* (non-Javadoc) * Method declared on ISelectionProvider. */ @@ -105,7 +105,7 @@ public abstract class SynchronizePageActionGroup extends ActionGroup { public void removeSelectionChangedListener(ISelectionChangedListener listener) { selectionChangedListeners.remove(listener); } - + /* (non-Javadoc) * Method declared on ISelectionProvider. */ @@ -113,7 +113,7 @@ public abstract class SynchronizePageActionGroup extends ActionGroup { public ISelection getSelection() { return selection; } - + /* (non-Javadoc) * Method declared on ISelectionProvider. */ @@ -122,7 +122,7 @@ public abstract class SynchronizePageActionGroup extends ActionGroup { this.selection = selection; selectionChanged(new SelectionChangedEvent(this, getSelection())); } - + private void selectionChanged(final SelectionChangedEvent event) { // pass on the notification to listeners Object[] listeners = selectionChangedListeners.getListeners(); @@ -133,11 +133,11 @@ public abstract class SynchronizePageActionGroup extends ActionGroup { public void run() { l.selectionChanged(event); } - }); + }); } } } - + /** * Initialize the actions of this contribution. This method will be invoked * once before any calls are made to <code>filleContextMenu</code> or @@ -145,7 +145,7 @@ public abstract class SynchronizePageActionGroup extends ActionGroup { * created. As a result of this, the site of the configuration can be * accessed. Subclasses may override this method but must invoke the * overridden method. - * + * * @param configuration the configuration for the part to which the * contribution is associated */ @@ -155,20 +155,20 @@ public abstract class SynchronizePageActionGroup extends ActionGroup { configuration.addActionContribution(visibleRootSelectionProvider); } } - + /** * This method is invoked whenever the model being displayed in the view * changes. This includes when the input to the view changes and when the * children of the input change. The default implementation of this method * does nothing. Subclasses may override. - * + * * @param root the root of the model being viewed */ public void modelChanged(ISynchronizeModelElement root) { // Do nothing by default } - - /** + + /** * Dispose of the action group. Subclasses may override but must * invoke the overridden method. */ @@ -185,7 +185,7 @@ public abstract class SynchronizePageActionGroup extends ActionGroup { * with the configuration of this action group. The id of the returned group * will not match that of the provided id since the group must be modified * to ensure that groups are unique across pages. - * + * * @param menu the menu * @param groupId the id of the group being searched for * @return the group for the given id or <code>null</code> @@ -199,12 +199,12 @@ public abstract class SynchronizePageActionGroup extends ActionGroup { } return item; } - + /** * Helper method to add an action to a group in a menu. The action is only * added to the menu if the group exists in the menu. Calling this method * also has no effect if either the menu or action are <code>null</code>. - * + * * @param manager the menu manager * @param groupId the group to append the action to * @param action the action to add @@ -218,7 +218,7 @@ public abstract class SynchronizePageActionGroup extends ActionGroup { } return false; } - + private boolean internalAppendToGroup(IContributionManager manager, String groupId, IAction action) { if (manager == null || action == null) return false; IContributionItem group = findGroup(manager, groupId); @@ -228,13 +228,13 @@ public abstract class SynchronizePageActionGroup extends ActionGroup { } return false; } - + /** * Helper method to add a contribution item to a group in a menu. The item * is only added to the menu if the group exists in the menu. Calling this * method also has no effect if either the menu or item are * <code>null</code>. - * + * * @param manager the menu manager * @param groupId the group to append the action to * @param item the item to add @@ -250,13 +250,13 @@ public abstract class SynchronizePageActionGroup extends ActionGroup { } return false; } - + /** * Helper method that can be invoked during initialization to add an action * to a particular menu (one of P_TOOLBAR_MENU, P_VIEW_MENU, P_CONTEXT_MENU * from ISynchronizePageConfiguration). The action is added to the given * group if it is present. Otherwise the action is not added to the menu. - * + * * @param menuId the menu id (one of P_TOOLBAR_MENU, P_VIEW_MENU, * P_CONTEXT_MENU from ISynchronizePageConfiguration) * @param groupId the group id in the menu to which the action is to be @@ -267,11 +267,11 @@ public abstract class SynchronizePageActionGroup extends ActionGroup { registerActionWithWorkbench(action); internalAppendToGroup(menuId, groupId, action); } - + /** * Register this action with the workbench so that it can participate in keybindings and * retargetable actions. - * + * * @param action the action to register */ private void registerActionWithWorkbench(IAction action) { @@ -290,7 +290,7 @@ public abstract class SynchronizePageActionGroup extends ActionGroup { * a particular menu (one of P_TOOLBAR_MENU, P_VIEW_MENU, P_CONTEXT_MENU * from ISynchronizePageConfiguration). The item is added to the given group * if it is present. Otherwise the item is not added to the menu. - * + * * @param menuId the menu id (one of P_TOOLBAR_MENU, P_VIEW_MENU, * P_CONTEXT_MENU from ISynchronizePageConfiguration) * @param groupId the group id in the menu to which the item is to be added @@ -299,12 +299,12 @@ public abstract class SynchronizePageActionGroup extends ActionGroup { protected void appendToGroup(String menuId, String groupId, IContributionItem item) { internalAppendToGroup(menuId, groupId, item); } - + /** * Return a selection provider whose selection includes all roots of the * elements visible in the page. Selection change events are fired when the * elements visible in the view change. - * + * * @return a selection provider whose selection is the roots of all * elements visible in the page */ @@ -321,7 +321,7 @@ public abstract class SynchronizePageActionGroup extends ActionGroup { } return visibleRootSelectionProvider; } - + /* (non-Javadoc) * @see org.eclipse.ui.actions.ActionGroup#fillContextMenu(org.eclipse.jface.action.IMenuManager) */ @@ -330,7 +330,7 @@ public abstract class SynchronizePageActionGroup extends ActionGroup { super.fillContextMenu(menu); fillMenu(menu, ISynchronizePageConfiguration.P_CONTEXT_MENU); } - + /* (non-Javadoc) * @see org.eclipse.ui.actions.ActionGroup#fillActionBars(org.eclipse.ui.IActionBars) */ @@ -342,7 +342,7 @@ public abstract class SynchronizePageActionGroup extends ActionGroup { fillMenu(actionBars.getToolBarManager(), ISynchronizePageConfiguration.P_TOOLBAR_MENU); } } - + private void fillMenu(IContributionManager menu, String menuId) { Map groups = (Map)menuContributions.get(menuId); if (menu != null && groups != null) { @@ -379,13 +379,13 @@ public abstract class SynchronizePageActionGroup extends ActionGroup { } actions.add(action); } - + /** * Return the configuration for the page to which the action group * is associated. * @return the configuration for the page to which the action group * is associated - * + * * @since 3.1 */ public ISynchronizePageConfiguration getConfiguration() { diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateChangeEvent.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateChangeEvent.java index f7f2cbc71..712acf963 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateChangeEvent.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateChangeEvent.java @@ -21,7 +21,7 @@ import org.eclipse.team.ui.mapping.ITeamStateChangeEvent; * An implementation of {@link ITeamStateChangeEvent}. * <p> * This class is not intended to be subclassed by clients. - * + * * @since 3.2 */ public class TeamStateChangeEvent implements ITeamStateChangeEvent { @@ -29,11 +29,11 @@ public class TeamStateChangeEvent implements ITeamStateChangeEvent { private Set changes = new HashSet(); private Set addedRoots = new HashSet(); private Set removedRoots = new HashSet(); - + public TeamStateChangeEvent() { super(); } - + /** * Convenience constructor for creating an event from a subscriber change. * @param deltas the set of subscriber changes @@ -42,11 +42,11 @@ public class TeamStateChangeEvent implements ITeamStateChangeEvent { for (int i = 0; i < deltas.length; i++) { ISubscriberChangeEvent event = deltas[i]; IResource resource = event.getResource(); - if ((event.getFlags() & ISubscriberChangeEvent.ROOT_ADDED) != 0) + if ((event.getFlags() & ISubscriberChangeEvent.ROOT_ADDED) != 0) rootAdded(resource); - if ((event.getFlags() & ISubscriberChangeEvent.ROOT_REMOVED) != 0) + if ((event.getFlags() & ISubscriberChangeEvent.ROOT_REMOVED) != 0) rootRemoved(resource); - if ((event.getFlags() & ISubscriberChangeEvent.SYNC_CHANGED) != 0) + if ((event.getFlags() & ISubscriberChangeEvent.SYNC_CHANGED) != 0) changed(resource); // Indicate that the ancestors may have changed as well while (resource.getType() != IResource.PROJECT) { diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateDescription.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateDescription.java index ecdbaa480..6cfecf84c 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateDescription.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateDescription.java @@ -67,7 +67,7 @@ public class TeamStateDescription implements ITeamStateDescription { public String[] getPropertyNames() { return (String[]) properties.keySet().toArray(new String[properties.size()]); } - + /* (non-Javadoc) * @see org.eclipse.team.ui.mapping.ITeamStateDescription#getProperty(java.lang.String) */ @@ -75,7 +75,7 @@ public class TeamStateDescription implements ITeamStateDescription { public Object getProperty(String property) { return properties.get(property); } - + /** * Set the given property to the given value * @param property the property @@ -84,7 +84,7 @@ public class TeamStateDescription implements ITeamStateDescription { public void setProperty(String property, Object value) { properties.put(property, value); } - + /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateProvider.java index e90c45d6e..b920c25da 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateProvider.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateProvider.java @@ -31,7 +31,7 @@ import org.eclipse.ui.PlatformUI; * team state provider that uses the subscriber of the type is provided. * <p> * Clients may subclass this class. - * + * * @see IAdapterManager * @see RepositoryProviderType * @since 3.2 @@ -39,13 +39,13 @@ import org.eclipse.ui.PlatformUI; public abstract class TeamStateProvider implements ITeamStateProvider { private ListenerList listeners = new ListenerList(ListenerList.IDENTITY); - + /** * Determine if the decorator for the element is enabled by consulting the * <code>teamDecorator</code> extension point to determine the decorator * id associated with the resources the element maps to. Subclasses may * override. - * + * * @see org.eclipse.team.ui.mapping.ITeamStateProvider#isDecorationEnabled(java.lang.Object) */ @Override @@ -57,13 +57,13 @@ public abstract class TeamStateProvider implements ITeamStateProvider { } return false; } - + /** * Determine the decorated state for the element by consulting the * <code>teamDecorator</code> extension point to get the decorated state * mask associated with the resources the element maps to. Subclasses may * override. - * + * * @see org.eclipse.team.ui.mapping.ITeamStateProvider#getDecoratedStateMask(java.lang.Object) */ @Override @@ -75,7 +75,7 @@ public abstract class TeamStateProvider implements ITeamStateProvider { } return 0; } - + /* (non-Javadoc) * @see org.eclipse.team.ui.mapping.ITeamStateProvider#addDecoratedStateChangeListener(org.eclipse.team.ui.mapping.ITeamStateChangeListener) */ @@ -83,7 +83,7 @@ public abstract class TeamStateProvider implements ITeamStateProvider { public void addDecoratedStateChangeListener(ITeamStateChangeListener listener) { listeners.add(listener); } - + /* (non-Javadoc) * @see org.eclipse.team.ui.mapping.ITeamStateProvider#removeDecoratedStateChangeListener(org.eclipse.team.ui.mapping.ITeamStateChangeListener) */ @@ -91,7 +91,7 @@ public abstract class TeamStateProvider implements ITeamStateProvider { public void removeDecoratedStateChangeListener(ITeamStateChangeListener listener) { listeners.remove(listener); } - + /** * Fire the change event to all listeners. * @param event the change event @@ -112,7 +112,7 @@ public abstract class TeamStateProvider implements ITeamStateProvider { }); } } - + private int internalGetDecoratedStateMask(IProject[] projects) { int stateMask = 0; String[] providerIds = getProviderIds(projects); diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkingSetScope.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkingSetScope.java index 6c09fbd72..c02384432 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkingSetScope.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkingSetScope.java @@ -21,59 +21,59 @@ import org.eclipse.ui.*; /** * A synchronize scope whose roots are defined by a working set. - * + * * @since 3.0 * @noextend This class is not intended to be subclassed by clients. */ public class WorkingSetScope extends AbstractSynchronizeScope implements IPropertyChangeListener { - + /* * Constants used to save and restore this scope */ private final static String CTX_SETS = "workingset_scope_sets"; //$NON-NLS-1$ private final static String CTX_SET_NAME = "workingset_scope_name"; //$NON-NLS-1$ - + /* * The working sets associated with this scope */ private IWorkingSet[] sets; - + /** * Create the scope for the working sets - * + * * @param sets the working sets that defines this scope */ public WorkingSetScope(IWorkingSet[] sets) { setWorkingSets(sets); } - + /** * Create this scope from it's previously saved state - * + * * @param memento the memento containing a previous scope information * that is used to initialize this scope. */ protected WorkingSetScope(IMemento memento) { super(memento); } - + /** * Initialize this working set scope with the provided working sets. - * + * * @since 3.1 */ protected void setWorkingSets(IWorkingSet[] sets) { this.sets = sets; PlatformUI.getWorkbench().getWorkingSetManager().addPropertyChangeListener(this); } - + /* (non-Javadoc) * @see org.eclipse.team.ui.synchronize.ISynchronizeScope#getName() */ @Override public String getName() { if (sets.length == 0) { - return TeamUIMessages.WorkingSetScope_0; + return TeamUIMessages.WorkingSetScope_0; } StringBuffer name = new StringBuffer(); for (int i = 0; i < sets.length; i++) { @@ -85,7 +85,7 @@ public class WorkingSetScope extends AbstractSynchronizeScope implements IProper } return name.toString(); } - + /* (non-Javadoc) * @see org.eclipse.team.ui.synchronize.ISynchronizeScope#getRoots() */ @@ -102,7 +102,7 @@ public class WorkingSetScope extends AbstractSynchronizeScope implements IProper } return (IResource[]) roots.toArray(new IResource[roots.size()]); } - + private void addNonOverlapping(HashSet roots, IResource[] resources) { for (int i = 0; i < resources.length; i++) { IResource newResource = resources[i]; @@ -127,7 +127,7 @@ public class WorkingSetScope extends AbstractSynchronizeScope implements IProper if (add) { roots.add(newResource); } - } + } } /* (non-Javadoc) @@ -148,7 +148,7 @@ public class WorkingSetScope extends AbstractSynchronizeScope implements IProper firePropertyChangedEvent(new PropertyChangeEvent(this, NAME, null, event.getNewValue())); } } - + /* (non-Javadoc) * @see org.eclipse.team.ui.synchronize.ISynchronizeScope#dispose() */ @@ -158,7 +158,7 @@ public class WorkingSetScope extends AbstractSynchronizeScope implements IProper if (PlatformUI.isWorkbenchRunning()) PlatformUI.getWorkbench().getWorkingSetManager().removePropertyChangeListener(this); } - + /* (non-Javadoc) * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeScope#saveState(org.eclipse.ui.IMemento) */ @@ -171,7 +171,7 @@ public class WorkingSetScope extends AbstractSynchronizeScope implements IProper rootNode.putString(CTX_SET_NAME, set.getName()); } } - + /* * (non-Javadoc) * @see org.eclipse.team.ui.synchronize.AbstractSynchronizeScope#init(org.eclipse.ui.IMemento) diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkspaceScope.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkspaceScope.java index 790ed3d89..7ba69ce1f 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkspaceScope.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkspaceScope.java @@ -15,26 +15,26 @@ import org.eclipse.team.internal.ui.TeamUIMessages; /** * A synchronize scope whose roots are the workspace. - * + * * @since 3.0 * @noextend This class is not intended to be subclassed by clients. */ public class WorkspaceScope extends AbstractSynchronizeScope { - + /** * Create the resource scope that indicates that the subscriber roots should be used */ public WorkspaceScope() { } - + /* (non-Javadoc) * @see org.eclipse.team.internal.ui.synchronize.ScopableSubscriberParticipant.ISynchronizeScope#getName() */ @Override public String getName() { - return TeamUIMessages.WorkspaceScope_0; + return TeamUIMessages.WorkspaceScope_0; } - + /* (non-Javadoc) * @see org.eclipse.team.internal.ui.synchronize.ScopableSubscriberParticipant.ISynchronizeScope#getRoots() */ |