diff options
Diffstat (limited to 'bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionDialog.java')
-rw-r--r-- | bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionDialog.java | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionDialog.java index 8f3920571..1e23aec62 100644 --- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionDialog.java +++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSelectionDialog.java @@ -58,17 +58,17 @@ public class TagSelectionDialog extends TrayDialog implements IPropertyChangeLis private static final int SIZING_DIALOG_WIDTH = 90; private static final int SIZING_DIALOG_HEIGHT = 25; - private CVSTag selection; + private CVSTag selection; - private TagSource tagSource; + private TagSource tagSource; - private String message; + private String message; - private int includeFlags; + private int includeFlags; - private String helpContext; + private String helpContext; - private boolean showRecurse; + private boolean showRecurse; public static CVSTag getTagToCompareWith(Shell shell, TagSource tagSource, int includeFlags) { TagSelectionDialog dialog = new TagSelectionDialog(shell, tagSource, @@ -107,12 +107,12 @@ public class TagSelectionDialog extends TrayDialog implements IPropertyChangeLis newShell.setText(title); } - protected Point getInitialSize() { - final Point size= super.getInitialSize(); - size.x= convertWidthInCharsToPixels(SIZING_DIALOG_WIDTH); - size.y= convertHeightInCharsToPixels(SIZING_DIALOG_HEIGHT); - return size; - } + protected Point getInitialSize() { + final Point size= super.getInitialSize(); + size.x= convertWidthInCharsToPixels(SIZING_DIALOG_WIDTH); + size.y= convertHeightInCharsToPixels(SIZING_DIALOG_HEIGHT); + return size; + } /** * Creates this window's widgetry. @@ -164,7 +164,7 @@ public class TagSelectionDialog extends TrayDialog implements IPropertyChangeLis final Composite top = (Composite)super.createDialogArea(parent); // Delegate most of the dialog to the tag selection area - tagSelectionArea = new TagSelectionArea(getShell(), tagSource, includeFlags, helpContext) { + tagSelectionArea = new TagSelectionArea(getShell(), tagSource, includeFlags, helpContext) { protected void createCustomArea(Composite parent) { if(showRecurse) { final Button recurseCheck = new Button(parent, SWT.CHECK); @@ -172,10 +172,10 @@ public class TagSelectionDialog extends TrayDialog implements IPropertyChangeLis recurseCheck.addListener(SWT.Selection, event -> recurse = recurseCheck.getSelection()); recurseCheck.setSelection(true); } - } + } }; if (message != null) - tagSelectionArea.setTagAreaLabel(message); + tagSelectionArea.setTagAreaLabel(message); tagSelectionArea.addPropertyChangeListener(this); tagSelectionArea.createArea(top); tagSelectionArea.setRunnableContext(getRunnableContext()); @@ -187,8 +187,8 @@ public class TagSelectionDialog extends TrayDialog implements IPropertyChangeLis seperator.setLayoutData(data); updateEnablement(); - applyDialogFont(parent); - + applyDialogFont(parent); + return top; } @@ -241,23 +241,23 @@ public class TagSelectionDialog extends TrayDialog implements IPropertyChangeLis } } - public void propertyChange(PropertyChangeEvent event) { - String property = event.getProperty(); - if (property.equals(TagSelectionArea.SELECTED_TAG)) { - selection = (CVSTag)event.getNewValue(); - updateEnablement(); - } else if (property.equals(TagSelectionArea.OPEN_SELECTED_TAG)) { - okPressed(); - } - } - - /** - * Creates a runnable context that allows refreshing the tags in the background. - * - * @since 3.1 - */ - private IRunnableContext getRunnableContext() { - return (fork, cancelable, runnable) -> { + public void propertyChange(PropertyChangeEvent event) { + String property = event.getProperty(); + if (property.equals(TagSelectionArea.SELECTED_TAG)) { + selection = (CVSTag)event.getNewValue(); + updateEnablement(); + } else if (property.equals(TagSelectionArea.OPEN_SELECTED_TAG)) { + okPressed(); + } + } + + /** + * Creates a runnable context that allows refreshing the tags in the background. + * + * @since 3.1 + */ + private IRunnableContext getRunnableContext() { + return (fork, cancelable, runnable) -> { final Job refreshJob = new Job(CVSUIMessages.TagSelectionDialog_7) { protected IStatus run(IProgressMonitor monitor) { if (monitor.isCanceled()) @@ -283,19 +283,19 @@ public class TagSelectionDialog extends TrayDialog implements IPropertyChangeLis getShell().addDisposeListener(e -> refreshJob.cancel()); refreshJob.schedule(); }; - } - - private void setBusy(final boolean busy) { + } + + private void setBusy(final boolean busy) { final Shell shell = getShell(); if (shell != null && !shell.isDisposed()) { shell.getDisplay().asyncExec(() -> { - if (!shell.isDisposed()) { + if (!shell.isDisposed()) { Cursor cursor = null; if (busy) { cursor = shell.getDisplay().getSystemCursor(SWT.CURSOR_APPSTARTING); } shell.setCursor(cursor); - } + } }); } } |