diff options
33 files changed, 319 insertions, 582 deletions
diff --git a/bundles/org.eclipse.team.core/plugin.xml b/bundles/org.eclipse.team.core/plugin.xml index 0e8fd5c76..44edc6e40 100644 --- a/bundles/org.eclipse.team.core/plugin.xml +++ b/bundles/org.eclipse.team.core/plugin.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> <plugin id="org.eclipse.team.core" name="%pluginName" diff --git a/bundles/org.eclipse.team.cvs.core/plugin.xml b/bundles/org.eclipse.team.cvs.core/plugin.xml index 57def4e55..5fbb6d7bb 100644 --- a/bundles/org.eclipse.team.cvs.core/plugin.xml +++ b/bundles/org.eclipse.team.cvs.core/plugin.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> <plugin id="org.eclipse.team.cvs.core" name="%pluginName" diff --git a/bundles/org.eclipse.team.cvs.ssh/plugin.xml b/bundles/org.eclipse.team.cvs.ssh/plugin.xml index bfd1d9b88..c378af1dc 100644 --- a/bundles/org.eclipse.team.cvs.ssh/plugin.xml +++ b/bundles/org.eclipse.team.cvs.ssh/plugin.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> <plugin id="org.eclipse.team.cvs.ssh" name="%pluginName" diff --git a/bundles/org.eclipse.team.cvs.ui/.project b/bundles/org.eclipse.team.cvs.ui/.project index 49e69c4d8..a5f4d5fc7 100644 --- a/bundles/org.eclipse.team.cvs.ui/.project +++ b/bundles/org.eclipse.team.cvs.ui/.project @@ -7,11 +7,16 @@ <project>org.eclipse.core.boot</project> <project>org.eclipse.core.resources</project> <project>org.eclipse.core.runtime</project> + <project>org.eclipse.jface.text</project> <project>org.eclipse.team.core</project> <project>org.eclipse.team.cvs.core</project> <project>org.eclipse.team.ui</project> <project>org.eclipse.ui</project> <project>org.eclipse.ui.console</project> + <project>org.eclipse.ui.editors</project> + <project>org.eclipse.ui.ide</project> + <project>org.eclipse.ui.views</project> + <project>org.eclipse.ui.workbench.texteditor</project> </projects> <buildSpec> <buildCommand> diff --git a/bundles/org.eclipse.team.cvs.ui/plugin.xml b/bundles/org.eclipse.team.cvs.ui/plugin.xml index 1ffc98a96..f41bb5290 100644 --- a/bundles/org.eclipse.team.cvs.ui/plugin.xml +++ b/bundles/org.eclipse.team.cvs.ui/plugin.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> <plugin id="org.eclipse.team.cvs.ui" name="%pluginName" @@ -13,6 +14,11 @@ </library> </runtime> <requires> + <import plugin="org.eclipse.ui.ide" optional="true"/> + <import plugin="org.eclipse.ui.views" optional="true"/> + <import plugin="org.eclipse.jface.text" optional="true"/> + <import plugin="org.eclipse.ui.workbench.texteditor" optional="true"/> + <import plugin="org.eclipse.ui.editors" optional="true"/> <import plugin="org.eclipse.core.runtime"/> <import plugin="org.eclipse.core.resources"/> <import plugin="org.eclipse.ui"/> diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AnnotateView.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AnnotateView.java index 8917530db..10b284938 100644 --- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AnnotateView.java +++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AnnotateView.java @@ -17,39 +17,15 @@ import java.util.Collection; import java.util.Iterator; import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.jface.text.BadLocationException; -import org.eclipse.jface.text.IDocument; -import org.eclipse.jface.text.ITextSelection; -import org.eclipse.jface.viewers.ArrayContentProvider; -import org.eclipse.jface.viewers.IPostSelectionProvider; -import org.eclipse.jface.viewers.ISelectionChangedListener; -import org.eclipse.jface.viewers.ISelectionProvider; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.viewers.LabelProvider; -import org.eclipse.jface.viewers.ListViewer; -import org.eclipse.jface.viewers.SelectionChangedEvent; -import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.text.*; +import org.eclipse.jface.viewers.*; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Label; -import org.eclipse.team.internal.ccvs.core.CVSAnnotateBlock; -import org.eclipse.team.internal.ccvs.core.CVSException; -import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile; -import org.eclipse.team.internal.ccvs.core.ICVSResource; +import org.eclipse.swt.widgets.*; +import org.eclipse.team.internal.ccvs.core.*; import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot; -import org.eclipse.ui.IEditorDescriptor; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IEditorRegistry; -import org.eclipse.ui.IReusableEditor; -import org.eclipse.ui.IWorkbenchPage; -import org.eclipse.ui.PartInitException; +import org.eclipse.ui.*; import org.eclipse.ui.help.WorkbenchHelp; -import org.eclipse.ui.internal.IWorkbenchConstants; -import org.eclipse.ui.internal.WorkbenchPlugin; -import org.eclipse.ui.internal.registry.EditorDescriptor; import org.eclipse.ui.part.ViewPart; import org.eclipse.ui.texteditor.IDocumentProvider; import org.eclipse.ui.texteditor.ITextEditor; @@ -285,9 +261,7 @@ public class AnnotateView extends ViewPart implements ISelectionChangedListener } /** - * Try and open the correct registered editor type for the file. If the registered - * editor is *not* an ITextEditor then open the source in a default text editor. - * @return + * Try and open the correct registered editor type for the file. * @throws InvocationTargetException */ private IEditorPart openEditor() throws InvocationTargetException { @@ -305,29 +279,10 @@ public class AnnotateView extends ViewPart implements ISelectionChangedListener IEditorDescriptor descriptor = registry.getDefaultEditor(file.getName()); - // Determine if the registered editor is an ITextEditor. - - String id; - - if (descriptor == null || !(descriptor instanceof EditorDescriptor) || !(((EditorDescriptor)descriptor).isInternal())) { - id = IWorkbenchConstants.DEFAULT_EDITOR_ID; //$NON-NLS-1$ - } else { - try { - Object obj = WorkbenchPlugin.createExtension(((EditorDescriptor) descriptor).getConfigurationElement(), "class"); //$NON-NLS-1$ - if (obj instanceof ITextEditor) { - id = descriptor.getId(); - } else { - id = IWorkbenchConstants.DEFAULT_EDITOR_ID; - } - } catch (CoreException e) { - id = IWorkbenchConstants.DEFAULT_EDITOR_ID; - } - } - // Either reuse an existing editor or open a new editor of the correct type. try { try { - if (editor != null && editor instanceof IReusableEditor && page.isPartVisible(editor) && editor.getSite().getId().equals(id)) { + if (editor != null && editor instanceof IReusableEditor && page.isPartVisible(editor) && editor.getSite().getId().equals(descriptor.getId())) { // We can reuse the editor ((IReusableEditor) editor).setInput(new RemoteAnnotationEditorInput(file, contents)); part = editor; @@ -337,15 +292,10 @@ public class AnnotateView extends ViewPart implements ISelectionChangedListener page.closeEditor(editor, false); editor = null; } - part = page.openEditor(new RemoteAnnotationEditorInput(file, contents), id); + part = page.openEditor(new RemoteAnnotationEditorInput(file, contents), descriptor.getId()); } } catch (PartInitException e) { - if (id.equals(IWorkbenchConstants.DEFAULT_EDITOR_ID)) { - throw e; - } else { - // Could not open desired editor, try a default text editor. - part = page.openEditor(new RemoteAnnotationEditorInput(file, contents), IWorkbenchConstants.DEFAULT_EDITOR_ID); //$NON-NLS-1$ - } + throw e; } } catch (PartInitException e) { // Total failure. diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java index 6614fac76..e6978876c 100644 --- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java +++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java @@ -18,23 +18,12 @@ import java.net.URL; import java.util.ArrayList; import java.util.List; -import org.eclipse.core.resources.IContainer; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Path; +import org.eclipse.core.resources.*; +import org.eclipse.core.runtime.*; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.jface.viewers.DoubleClickEvent; -import org.eclipse.jface.viewers.IDoubleClickListener; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.ISelectionChangedListener; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.viewers.SelectionChangedEvent; -import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.jface.viewers.*; import org.eclipse.jface.wizard.Wizard; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.swt.SWT; @@ -42,24 +31,13 @@ import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.FileDialog; -import org.eclipse.swt.widgets.Group; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Listener; -import org.eclipse.swt.widgets.Text; +import org.eclipse.swt.widgets.*; import org.eclipse.team.internal.ccvs.core.client.Diff; import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption; -import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin; -import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants; -import org.eclipse.team.internal.ccvs.ui.IHelpContextIds; -import org.eclipse.team.internal.ccvs.ui.Policy; +import org.eclipse.team.internal.ccvs.ui.*; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.help.WorkbenchHelp; -import org.eclipse.ui.internal.misc.ContainerContentProvider; -import org.eclipse.ui.internal.misc.ResourceAndContainerGroup; +import org.eclipse.ui.internal.ide.misc.ContainerContentProvider; import org.eclipse.ui.model.WorkbenchLabelProvider; /** @@ -78,9 +56,6 @@ public class GenerateDiffFileWizard extends Wizard { * entering a file name that already exists. */ private class PatchFileSelectionPage extends WizardPage { - - private IStructuredSelection currentSelection; - private ResourceAndContainerGroup resourceGroup; private Text filenameCombo; private Button browseButton; @@ -101,7 +76,6 @@ public class GenerateDiffFileWizard extends Wizard { PatchFileSelectionPage(String pageName, String title, ImageDescriptor image, IStructuredSelection selection) { super(pageName, title, image); - this.currentSelection = selection; setPageComplete(false); } diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RepositorySelectionPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RepositorySelectionPage.java index 7ce1652a4..9f59a5a5e 100644 --- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RepositorySelectionPage.java +++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RepositorySelectionPage.java @@ -13,29 +13,14 @@ package org.eclipse.team.internal.ccvs.ui.wizards; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.jface.viewers.ColumnWeightData; -import org.eclipse.jface.viewers.ISelectionChangedListener; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.viewers.SelectionChangedEvent; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.jface.viewers.TableLayout; -import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.jface.viewers.*; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; -import org.eclipse.swt.widgets.Table; -import org.eclipse.swt.widgets.TableColumn; +import org.eclipse.swt.widgets.*; import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation; -import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin; -import org.eclipse.team.internal.ccvs.ui.IHelpContextIds; -import org.eclipse.team.internal.ccvs.ui.Policy; +import org.eclipse.team.internal.ccvs.ui.*; import org.eclipse.ui.help.WorkbenchHelp; -import org.eclipse.ui.internal.model.AdaptableList; -import org.eclipse.ui.model.WorkbenchContentProvider; -import org.eclipse.ui.model.WorkbenchLabelProvider; +import org.eclipse.ui.model.*; /** * First wizard page for importing a project into a CVS repository. diff --git a/bundles/org.eclipse.team.ui/.project b/bundles/org.eclipse.team.ui/.project index 98a3aebac..3581bf525 100644 --- a/bundles/org.eclipse.team.ui/.project +++ b/bundles/org.eclipse.team.ui/.project @@ -7,8 +7,13 @@ <project>org.eclipse.core.boot</project> <project>org.eclipse.core.resources</project> <project>org.eclipse.core.runtime</project> + <project>org.eclipse.jface.text</project> <project>org.eclipse.team.core</project> <project>org.eclipse.ui</project> + <project>org.eclipse.ui.editors</project> + <project>org.eclipse.ui.ide</project> + <project>org.eclipse.ui.views</project> + <project>org.eclipse.ui.workbench.texteditor</project> </projects> <buildSpec> <buildCommand> diff --git a/bundles/org.eclipse.team.ui/plugin.xml b/bundles/org.eclipse.team.ui/plugin.xml index 838d26abc..702a155ae 100644 --- a/bundles/org.eclipse.team.ui/plugin.xml +++ b/bundles/org.eclipse.team.ui/plugin.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> <plugin id="org.eclipse.team.ui" name="%pluginName" @@ -13,6 +14,11 @@ </library> </runtime> <requires> + <import plugin="org.eclipse.ui.ide" optional="true"/> + <import plugin="org.eclipse.ui.views" optional="true"/> + <import plugin="org.eclipse.jface.text" optional="true"/> + <import plugin="org.eclipse.ui.workbench.texteditor" optional="true"/> + <import plugin="org.eclipse.ui.editors" optional="true"/> <import plugin="org.eclipse.core.resources"/> <import plugin="org.eclipse.team.core"/> <import plugin="org.eclipse.ui"/> diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java index 1244ce180..c16308606 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java @@ -27,6 +27,63 @@ import org.eclipse.team.ui.TeamImages; public class Utils { /** + * The SortOperation takes a collection of objects and returns + * a sorted collection of these objects. Concrete instances of this + * class provide the criteria for the sorting of the objects based on + * the type of the objects. + */ + static public abstract class Sorter { + /** + * Returns true is elementTwo is 'greater than' elementOne + * This is the 'ordering' method of the sort operation. + * Each subclass overides this method with the particular + * implementation of the 'greater than' concept for the + * objects being sorted. + */ + public abstract boolean compare(Object elementOne, Object elementTwo); + /** + * Sort the objects in sorted collection and return that collection. + */ + private Object[] quickSort(Object[] sortedCollection, int left, int right) { + int originalLeft = left; + int originalRight = right; + Object mid = sortedCollection[ (left + right) / 2]; + do { + while (compare(sortedCollection[left], mid)) + left++; + while (compare(mid, sortedCollection[right])) + right--; + if (left <= right) { + Object tmp = sortedCollection[left]; + sortedCollection[left] = sortedCollection[right]; + sortedCollection[right] = tmp; + left++; + right--; + } + } while (left <= right); + if (originalLeft < right) + sortedCollection = quickSort(sortedCollection, originalLeft, right); + if (left < originalRight) + sortedCollection = quickSort(sortedCollection, left, originalRight); + return sortedCollection; + } + /** + * Return a new sorted collection from this unsorted collection. + * Sort using quick sort. + */ + public Object[] sort(Object[] unSortedCollection) { + int size = unSortedCollection.length; + Object[] sortedCollection = new Object[size]; + //copy the array so can return a new sorted collection + System.arraycopy(unSortedCollection, 0, sortedCollection, 0, size); + if (size > 1) + quickSort(sortedCollection, 0, size - 1); + return sortedCollection; + } + } + + + /** * Shows the given errors to the user. * * @param Exception the exception containing the error diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialogWithProjects.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialogWithProjects.java index 8993d5299..30dcc23c6 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialogWithProjects.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialogWithProjects.java @@ -15,10 +15,7 @@ import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.*; /** * Display a message with a details that can contain a list of projects @@ -28,8 +25,6 @@ public class DetailsDialogWithProjects extends DetailsDialog { private String message; private String detailsTitle; private IProject[] projects; - - private Button actionButton; private org.eclipse.swt.widgets.List detailsList; private boolean includeCancelButton; diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/TextPreferencePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/TextPreferencePage.java index 57da7bcb9..7aca276af 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/TextPreferencePage.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/TextPreferencePage.java @@ -11,43 +11,19 @@ package org.eclipse.team.internal.ui.preferences; -import java.util.ArrayList; -import java.util.Iterator; +import java.util.*; import java.util.List; +import org.eclipse.jface.dialogs.*; import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.jface.dialogs.IDialogConstants; -import org.eclipse.jface.dialogs.InputDialog; -import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.preference.PreferencePage; -import org.eclipse.jface.viewers.CellEditor; -import org.eclipse.jface.viewers.ColumnWeightData; -import org.eclipse.jface.viewers.ComboBoxCellEditor; -import org.eclipse.jface.viewers.DoubleClickEvent; -import org.eclipse.jface.viewers.ICellModifier; -import org.eclipse.jface.viewers.IDoubleClickListener; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredContentProvider; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.viewers.ITableLabelProvider; -import org.eclipse.jface.viewers.LabelProvider; -import org.eclipse.jface.viewers.TableLayout; -import org.eclipse.jface.viewers.TableViewer; -import org.eclipse.jface.viewers.Viewer; -import org.eclipse.jface.viewers.ViewerSorter; +import org.eclipse.jface.viewers.*; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.TableEditor; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Listener; -import org.eclipse.swt.widgets.Table; -import org.eclipse.swt.widgets.TableColumn; +import org.eclipse.swt.widgets.*; import org.eclipse.team.core.IFileTypeInfo; import org.eclipse.team.core.Team; import org.eclipse.team.internal.ui.IHelpContextIds; @@ -65,9 +41,6 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref private static final String TEXT = Policy.bind("TextPreferencePage.text"); //$NON-NLS-1$ private static final String BINARY = Policy.bind("TextPreferencePage.binary"); //$NON-NLS-1$ - // The name of the parameter in the file registry - private static final String TYPE = "type"; //$NON-NLS-1$ - // The input for the table viewer private List input; diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/RegistryReader.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/RegistryReader.java index 59ce6034c..5768755f7 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/RegistryReader.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/RegistryReader.java @@ -12,13 +12,9 @@ package org.eclipse.team.internal.ui.registry; import java.util.Hashtable; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.IExtension; -import org.eclipse.core.runtime.IExtensionPoint; -import org.eclipse.core.runtime.IPluginDescriptor; -import org.eclipse.core.runtime.IPluginRegistry; +import org.eclipse.core.runtime.*; +import org.eclipse.team.internal.ui.Utils.Sorter; import org.eclipse.ui.internal.WorkbenchPlugin; -import org.eclipse.ui.internal.misc.Sorter; public abstract class RegistryReader { protected static final String TAG_DESCRIPTION = "description"; //$NON-NLS-1$ diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantDescriptor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantDescriptor.java index a722b3468..c52c42e59 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantDescriptor.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantDescriptor.java @@ -10,14 +10,11 @@ *******************************************************************************/ package org.eclipse.team.internal.ui.registry; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.*; import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.team.ui.synchronize.*; +import org.eclipse.team.internal.ui.TeamUIPlugin; +import org.eclipse.team.ui.synchronize.ISynchronizeParticipantDescriptor; import org.eclipse.ui.IViewPart; -import org.eclipse.ui.internal.WorkbenchImages; import org.eclipse.ui.internal.WorkbenchPlugin; public class SynchronizeParticipantDescriptor implements ISynchronizeParticipantDescriptor { @@ -81,7 +78,7 @@ public class SynchronizeParticipantDescriptor implements ISynchronizeParticipant String iconName = configElement.getAttribute(ATT_ICON); if (iconName == null) return null; - imageDescriptor = WorkbenchImages.getImageDescriptorFromExtension(configElement.getDeclaringExtension(), iconName); + imageDescriptor = TeamUIPlugin.getImageDescriptorFromExtension(configElement.getDeclaringExtension(), iconName); return imageDescriptor; } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizePartnerDescriptor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizePartnerDescriptor.java deleted file mode 100644 index 5d456d5a2..000000000 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizePartnerDescriptor.java +++ /dev/null @@ -1,120 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2003 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Common Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/cpl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.team.internal.ui.registry; - -import org.eclipse.core.runtime.*; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.IViewPart; -import org.eclipse.ui.internal.WorkbenchImages; -import org.eclipse.ui.internal.WorkbenchPlugin; - -public class SynchronizePartnerDescriptor { - private QualifiedName id; - private ImageDescriptor imageDescriptor; - public static final String ATT_QUALIFIED_NAME = "qualified_name"; //$NON-NLS-1$ - public static final String ATT_LOCAL_NAME = "local_name"; //$NON-NLS-1$ - public static final String ATT_NAME = "name"; //$NON-NLS-1$ - public static final String ATT_ICON = "icon"; //$NON-NLS-1$ - public static final String ATT_CLASS = "class"; //$NON-NLS-1$ - private static final String ATT_TYPE = "type"; //$NON-NLS-1$ - - private static final String TYPE_STATIC = "static"; - - private String label; - private String className; - private String type; - private IConfigurationElement configElement; - private String description; - - /** - * Create a new ViewDescriptor for an extension. - */ - public SynchronizePartnerDescriptor(IConfigurationElement e, String desc) throws CoreException { - configElement = e; - description = desc; - loadFromExtension(); - } - /** - * Return an instance of the declared view. - */ - public IViewPart createView() throws CoreException { - Object obj = WorkbenchPlugin.createExtension(configElement, ATT_CLASS); - return (IViewPart) obj; - } - - public IConfigurationElement getConfigurationElement() { - return configElement; - } - - /** - * Returns this view's description. This is the value of its <code>"description"</code> - * attribute. - * - * @return the description - */ - public String getDescription() { - return description; - } - - public QualifiedName getId() { - return id; - } - - public String getType() { - return type; - } - - public ImageDescriptor getImageDescriptor() { - if (imageDescriptor != null) - return imageDescriptor; - String iconName = configElement.getAttribute(ATT_ICON); - if (iconName == null) - return null; - imageDescriptor = WorkbenchImages.getImageDescriptorFromExtension(configElement.getDeclaringExtension(), iconName); - return imageDescriptor; - } - - public String getLabel() { - return label; - } - - public boolean isStatic() { - if(type == null) return true; - return type.equals(TYPE_STATIC); - } - - /** - * load a view descriptor from the registry. - */ - private void loadFromExtension() throws CoreException { - String qualified_name = configElement.getAttribute(ATT_QUALIFIED_NAME); - String local_name = configElement.getAttribute(ATT_LOCAL_NAME); - label = configElement.getAttribute(ATT_NAME); - className = configElement.getAttribute(ATT_CLASS); - type = configElement.getAttribute(ATT_TYPE); - - // Sanity check. - if ((label == null) || (className == null) || (local_name == null)) { - throw new CoreException(new Status(IStatus.ERROR, configElement.getDeclaringExtension().getDeclaringPluginDescriptor().getUniqueIdentifier(), 0, "Invalid extension (missing label or class name): " + id, //$NON-NLS-1$ - null)); - } - - id = new QualifiedName(qualified_name, local_name); - } - - /** - * Returns a string representation of this descriptor. For debugging - * purposes only. - */ - public String toString() { - return "Synchronize Participant(" + getId() + ")"; //$NON-NLS-2$//$NON-NLS-1$ - } -}
\ No newline at end of file diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/SyncView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/SyncView.java index af58d79ab..19c5ac67d 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/SyncView.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/SyncView.java @@ -13,22 +13,12 @@ package org.eclipse.team.internal.ui.sync; import java.lang.reflect.InvocationTargetException; -import org.eclipse.compare.CompareEditorInput; -import org.eclipse.compare.IPropertyChangeNotifier; -import org.eclipse.compare.NavigationAction; +import org.eclipse.compare.*; import org.eclipse.compare.structuremergeviewer.DiffNode; import org.eclipse.compare.structuremergeviewer.IDiffElement; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.OperationCanceledException; -import org.eclipse.core.runtime.Status; -import org.eclipse.jface.action.Action; -import org.eclipse.jface.action.IMenuManager; -import org.eclipse.jface.action.IToolBarManager; -import org.eclipse.jface.dialogs.ErrorDialog; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.dialogs.ProgressMonitorDialog; +import org.eclipse.core.runtime.*; +import org.eclipse.jface.action.*; +import org.eclipse.jface.dialogs.*; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.util.IPropertyChangeListener; @@ -36,28 +26,15 @@ import org.eclipse.jface.util.PropertyChangeEvent; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.*; import org.eclipse.team.core.TeamException; -import org.eclipse.team.internal.ui.IHelpContextIds; -import org.eclipse.team.internal.ui.Policy; -import org.eclipse.team.internal.ui.TeamUIPlugin; +import org.eclipse.team.internal.ui.*; import org.eclipse.team.ui.ISharedImages; -import org.eclipse.ui.IActionBars; -import org.eclipse.ui.IPartListener; -import org.eclipse.ui.ISaveablePart; -import org.eclipse.ui.IViewPart; -import org.eclipse.ui.IWorkbenchActionConstants; -import org.eclipse.ui.IWorkbenchPage; -import org.eclipse.ui.IWorkbenchPart; -import org.eclipse.ui.PartInitException; +import org.eclipse.ui.*; +import org.eclipse.ui.actions.ActionFactory; import org.eclipse.ui.actions.WorkspaceModifyOperation; import org.eclipse.ui.help.WorkbenchHelp; -import org.eclipse.ui.part.IShowInSource; -import org.eclipse.ui.part.ShowInContext; -import org.eclipse.ui.part.ViewPart; +import org.eclipse.ui.part.*; /** * <b>Note:</b> This class/interface is part of an interim API that is still under @@ -233,8 +210,8 @@ public class SyncView extends ViewPart implements ISaveablePart, IPropertyChange previous = new NavigationAction(false); IActionBars actionBars = getViewSite().getActionBars(); if (actionBars != null) { - actionBars.setGlobalActionHandler(IWorkbenchActionConstants.NEXT, next); - actionBars.setGlobalActionHandler(IWorkbenchActionConstants.PREVIOUS, previous); + actionBars.setGlobalActionHandler(ActionFactory.NEXT.getId(), next); + actionBars.setGlobalActionHandler(ActionFactory.PREVIOUS.getId(), previous); actionBars.updateActionBars(); } } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/NavigateAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/NavigateAction.java index 062c9232e..ce9ebd7f4 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/NavigateAction.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/NavigateAction.java @@ -18,10 +18,8 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.team.core.subscribers.SyncInfo; import org.eclipse.team.internal.ui.Utils; import org.eclipse.team.ui.synchronize.TeamSubscriberParticipantPage; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IKeyBindingService; -import org.eclipse.ui.IViewPart; -import org.eclipse.ui.IWorkbenchActionConstants; +import org.eclipse.ui.*; +import org.eclipse.ui.actions.ActionFactory; /** * Action to navigate the changes shown in the Synchronize View. This @@ -41,10 +39,10 @@ public class NavigateAction extends Action { IKeyBindingService kbs = part.getSite().getKeyBindingService(); if(direction == INavigableControl.NEXT) { Utils.initAction(this, "action.navigateNext."); //$NON-NLS-1$ - page.getSite().getActionBars().setGlobalActionHandler(IWorkbenchActionConstants.NEXT, this); + page.getSite().getActionBars().setGlobalActionHandler(ActionFactory.NEXT.getId(), this); } else { Utils.initAction(this, "action.navigatePrevious."); //$NON-NLS-1$ - page.getSite().getActionBars().setGlobalActionHandler(IWorkbenchActionConstants.PREVIOUS, this); + page.getSite().getActionBars().setGlobalActionHandler(ActionFactory.PREVIOUS.getId(), this); } } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java index f0d17f0bd..f9bb7786a 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java @@ -50,7 +50,7 @@ public class StatusLineContributionGroup extends ActionGroup implements ISyncSet this.outgoing = createStatusLineContribution(OUTGOING_ID, TeamSubscriberParticipant.OUTGOING_MODE, "0", TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_DLG_SYNC_OUTGOING).createImage()); //$NON-NLS-1$ this.conflicting = createStatusLineContribution(CONFLICTING_ID, TeamSubscriberParticipant.CONFLICTING_MODE, "0", TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_DLG_SYNC_CONFLICTING).createImage()); //$NON-NLS-1$ this.workingSet = new StatusLineCLabelContribution(WORKINGSET_ID, 25); - this.workingSet.setTooltip(Policy.bind("StatisticsPanel.workingSetTooltip")); + this.workingSet.setTooltip(Policy.bind("StatisticsPanel.workingSetTooltip")); //$NON-NLS-1$ updateWorkingSetText(); this.workingSet.addListener(SWT.MouseDoubleClick, new Listener() { @@ -72,11 +72,11 @@ public class StatusLineContributionGroup extends ActionGroup implements ISyncSet private void updateWorkingSetText() { IWorkingSet set = participant.getWorkingSet(); if (set == null) { - workingSet.setText(Policy.bind("StatisticsPanel.noWorkingSet")); + workingSet.setText(Policy.bind("StatisticsPanel.noWorkingSet")); //$NON-NLS-1$ } else { String name = set.getName(); if (name.length() > WORKING_SET_FIELD_SIZE) { - name = name.substring(0, WORKING_SET_FIELD_SIZE - 3) + "..."; + name = name.substring(0, WORKING_SET_FIELD_SIZE - 3) + "..."; //$NON-NLS-1$ } workingSet.setText(name); } @@ -126,18 +126,18 @@ public class StatusLineContributionGroup extends ActionGroup implements ISyncSet incoming.setText(Policy.bind("StatisticsPanel.changeNumbers", new Integer(workingSetIncoming).toString(), new Integer(workspaceIncoming).toString())); //$NON-NLS-1$ outgoing.setText(Policy.bind("StatisticsPanel.changeNumbers", new Integer(workingSetOutgoing).toString(), new Integer(workspaceOutgoing).toString())); //$NON-NLS-1$ - conflicting.setTooltip(Policy.bind("StatisticsPanel.numbersWorkingSetTooltip", Policy.bind("StatisticsPanel.conflicting"), set.getName())); - outgoing.setTooltip(Policy.bind("StatisticsPanel.numbersWorkingSetTooltip", Policy.bind("StatisticsPanel.outgoing"), set.getName())); - incoming.setTooltip(Policy.bind("StatisticsPanel.numbersWorkingSetTooltip", Policy.bind("StatisticsPanel.incoming"), set.getName())); + conflicting.setTooltip(Policy.bind("StatisticsPanel.numbersWorkingSetTooltip", Policy.bind("StatisticsPanel.conflicting"), set.getName())); //$NON-NLS-1$ //$NON-NLS-2$ + outgoing.setTooltip(Policy.bind("StatisticsPanel.numbersWorkingSetTooltip", Policy.bind("StatisticsPanel.outgoing"), set.getName())); //$NON-NLS-1$ //$NON-NLS-2$ + incoming.setTooltip(Policy.bind("StatisticsPanel.numbersWorkingSetTooltip", Policy.bind("StatisticsPanel.incoming"), set.getName())); //$NON-NLS-1$ //$NON-NLS-2$ } else { conflicting.setText(new Integer(workspaceConflicting).toString()); //$NON-NLS-1$ incoming.setText(new Integer(workspaceIncoming).toString()); //$NON-NLS-1$ outgoing.setText(new Integer(workspaceOutgoing).toString()); //$NON-NLS-1$ - conflicting.setTooltip(Policy.bind("StatisticsPanel.numbersTooltip", Policy.bind("StatisticsPanel.conflicting"))); - outgoing.setTooltip(Policy.bind("StatisticsPanel.numbersTooltip", Policy.bind("StatisticsPanel.outgoing"))); - incoming.setTooltip(Policy.bind("StatisticsPanel.numbersTooltip", Policy.bind("StatisticsPanel.incoming"))); + conflicting.setTooltip(Policy.bind("StatisticsPanel.numbersTooltip", Policy.bind("StatisticsPanel.conflicting"))); //$NON-NLS-1$ //$NON-NLS-2$ + outgoing.setTooltip(Policy.bind("StatisticsPanel.numbersTooltip", Policy.bind("StatisticsPanel.outgoing"))); //$NON-NLS-1$ //$NON-NLS-2$ + incoming.setTooltip(Policy.bind("StatisticsPanel.numbersTooltip", Policy.bind("StatisticsPanel.incoming"))); //$NON-NLS-1$ //$NON-NLS-2$ } } }); diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/WorkingSetMenuContributionItem.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/WorkingSetMenuContributionItem.java index f61d98c30..43d42c558 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/WorkingSetMenuContributionItem.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/WorkingSetMenuContributionItem.java @@ -39,7 +39,7 @@ public class WorkingSetMenuContributionItem extends ContributionItem { * @param actionGroup the action group this contribution item is created in */ public WorkingSetMenuContributionItem(String id, WorkingSetFilterActionGroup actionGroup) { - super(id + TeamUIPlugin.ID + "working_set_contribution"); + super(id + TeamUIPlugin.ID + "working_set_contribution"); //$NON-NLS-1$ Assert.isNotNull(actionGroup); this.actionGroup = actionGroup; } @@ -69,7 +69,6 @@ public class WorkingSetMenuContributionItem extends ContributionItem { IWorkingSetManager manager = PlatformUI.getWorkbench().getWorkingSetManager(); actionGroup.setWorkingSet(workingSet); manager.addRecentWorkingSet(workingSet); - System.out.println(((MenuItem)e.widget).getText() + ": selected working set is: " + workingSet.getName()); } }); } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigurationWizardElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigurationWizardElement.java index 83a7eeda3..ba17383a1 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigurationWizardElement.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigurationWizardElement.java @@ -11,14 +11,11 @@ package org.eclipse.team.internal.ui.wizards; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.*; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.team.internal.ui.TeamUIPlugin; -import org.eclipse.ui.internal.model.WorkbenchAdapter; import org.eclipse.ui.model.IWorkbenchAdapter; +import org.eclipse.ui.model.WorkbenchAdapter; /** * ConfigurationWizardElement represents an item in the configuration wizard table, diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizard.java index 407c0fc0a..0de5120b7 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizard.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizard.java @@ -12,21 +12,14 @@ package org.eclipse.team.internal.ui.wizards; import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.IExtension; -import org.eclipse.core.runtime.IExtensionPoint; -import org.eclipse.core.runtime.IPluginRegistry; -import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.*; import org.eclipse.jface.wizard.IWizardPage; import org.eclipse.jface.wizard.Wizard; import org.eclipse.team.internal.ui.Policy; import org.eclipse.team.internal.ui.TeamUIPlugin; -import org.eclipse.team.ui.IConfigurationWizard; -import org.eclipse.team.ui.ISharedImages; -import org.eclipse.team.ui.ITeamUIConstants; +import org.eclipse.team.ui.*; import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.internal.model.AdaptableList; +import org.eclipse.ui.model.AdaptableList; /** * The wizard for associating projects with team providers diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java index 7974af079..b0849aa9a 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java @@ -15,29 +15,19 @@ import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.jface.viewers.DoubleClickEvent; -import org.eclipse.jface.viewers.IDoubleClickListener; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.ISelectionChangedListener; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.viewers.SelectionChangedEvent; -import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.jface.viewers.*; import org.eclipse.jface.wizard.IWizardPage; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Table; +import org.eclipse.swt.widgets.*; import org.eclipse.team.internal.ui.IHelpContextIds; import org.eclipse.team.internal.ui.Policy; import org.eclipse.team.ui.IConfigurationWizard; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.help.WorkbenchHelp; -import org.eclipse.ui.internal.model.AdaptableList; -import org.eclipse.ui.model.WorkbenchContentProvider; -import org.eclipse.ui.model.WorkbenchLabelProvider; +import org.eclipse.ui.model.*; /** * The main page of the configure project wizard. It contains a table diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipant.java index 40aa44e0c..02aacc59f 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipant.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipant.java @@ -37,7 +37,7 @@ public abstract class TeamSubscriberParticipant extends AbstractSynchronizeParti /** * Key for settings in memento */ - private static final String CTX_SUBSCRIBER_PARTICIPANT_SETTINGS = TeamUIPlugin.ID + ".TEAMSUBSRCIBERSETTINGS"; + private static final String CTX_SUBSCRIBER_PARTICIPANT_SETTINGS = TeamUIPlugin.ID + ".TEAMSUBSRCIBERSETTINGS"; //$NON-NLS-1$ /** * Property constant indicating the mode of a page has changed. diff --git a/examples/org.eclipse.team.examples.filesystem/.project b/examples/org.eclipse.team.examples.filesystem/.project index 287f4b363..9da70a2ed 100644 --- a/examples/org.eclipse.team.examples.filesystem/.project +++ b/examples/org.eclipse.team.examples.filesystem/.project @@ -6,9 +6,14 @@ <project>org.eclipse.core.boot</project> <project>org.eclipse.core.resources</project> <project>org.eclipse.core.runtime</project> + <project>org.eclipse.jface.text</project> <project>org.eclipse.team.core</project> <project>org.eclipse.team.ui</project> <project>org.eclipse.ui</project> + <project>org.eclipse.ui.editors</project> + <project>org.eclipse.ui.ide</project> + <project>org.eclipse.ui.views</project> + <project>org.eclipse.ui.workbench.texteditor</project> </projects> <buildSpec> <buildCommand> diff --git a/examples/org.eclipse.team.examples.filesystem/plugin.xml b/examples/org.eclipse.team.examples.filesystem/plugin.xml index dcc8ba6ae..847e0eeb1 100644 --- a/examples/org.eclipse.team.examples.filesystem/plugin.xml +++ b/examples/org.eclipse.team.examples.filesystem/plugin.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> <plugin id="org.eclipse.team.examples.filesystem" name="%pluginName" @@ -13,6 +14,11 @@ </library> </runtime> <requires> + <import plugin="org.eclipse.ui.ide" optional="true"/> + <import plugin="org.eclipse.ui.views" optional="true"/> + <import plugin="org.eclipse.jface.text" optional="true"/> + <import plugin="org.eclipse.ui.workbench.texteditor" optional="true"/> + <import plugin="org.eclipse.ui.editors" optional="true"/> <import plugin="org.eclipse.core.resources"/> <import plugin="org.eclipse.team.core"/> <import plugin="org.eclipse.team.ui"/> diff --git a/tests/org.eclipse.team.tests.core/.project b/tests/org.eclipse.team.tests.core/.project index afb169441..69eceaa7f 100644 --- a/tests/org.eclipse.team.tests.core/.project +++ b/tests/org.eclipse.team.tests.core/.project @@ -8,11 +8,16 @@ <project>org.eclipse.core.resources</project> <project>org.eclipse.core.runtime</project> <project>org.eclipse.core.tests.harness</project> + <project>org.eclipse.jface.text</project> <project>org.eclipse.team.core</project> <project>org.eclipse.team.cvs.core</project> <project>org.eclipse.team.cvs.ui</project> <project>org.eclipse.team.ui</project> <project>org.eclipse.ui</project> + <project>org.eclipse.ui.editors</project> + <project>org.eclipse.ui.ide</project> + <project>org.eclipse.ui.views</project> + <project>org.eclipse.ui.workbench.texteditor</project> <project>org.junit</project> </projects> <buildSpec> diff --git a/tests/org.eclipse.team.tests.core/plugin.xml b/tests/org.eclipse.team.tests.core/plugin.xml index a11a75dcd..7f818cb6b 100644 --- a/tests/org.eclipse.team.tests.core/plugin.xml +++ b/tests/org.eclipse.team.tests.core/plugin.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> <plugin id="org.eclipse.team.tests.core" name="Eclipse Team Core Tests" @@ -13,6 +14,11 @@ </library> </runtime> <requires> + <import plugin="org.eclipse.ui.ide" optional="true"/> + <import plugin="org.eclipse.ui.views" optional="true"/> + <import plugin="org.eclipse.jface.text" optional="true"/> + <import plugin="org.eclipse.ui.workbench.texteditor" optional="true"/> + <import plugin="org.eclipse.ui.editors" optional="true"/> <import plugin="org.eclipse.core.tests.harness"/> <import plugin="org.eclipse.core.resources"/> <import plugin="org.eclipse.core.boot"/> diff --git a/tests/org.eclipse.team.tests.cvs.core/.project b/tests/org.eclipse.team.tests.cvs.core/.project index b226dd0df..240a37370 100644 --- a/tests/org.eclipse.team.tests.cvs.core/.project +++ b/tests/org.eclipse.team.tests.cvs.core/.project @@ -8,6 +8,7 @@ <project>org.eclipse.core.resources</project> <project>org.eclipse.core.runtime</project> <project>org.eclipse.core.tests.harness</project> + <project>org.eclipse.jface.text</project> <project>org.eclipse.swt</project> <project>org.eclipse.team.core</project> <project>org.eclipse.team.cvs.core</project> @@ -15,6 +16,10 @@ <project>org.eclipse.team.tests.core</project> <project>org.eclipse.team.ui</project> <project>org.eclipse.ui</project> + <project>org.eclipse.ui.editors</project> + <project>org.eclipse.ui.ide</project> + <project>org.eclipse.ui.views</project> + <project>org.eclipse.ui.workbench.texteditor</project> <project>org.eclipse.update.core</project> <project>org.junit</project> </projects> diff --git a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS UI Tests.launch b/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS UI Tests.launch index c549b4406..564b0dfcf 100644 --- a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS UI Tests.launch +++ b/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS UI Tests.launch @@ -1,13 +1,144 @@ <?xml version="1.0" encoding="UTF-8"?> <launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig"> <booleanAttribute key="clearws" value="true"/> -<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.team.tests.ccvs.core.AllTests"/> +<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.team.tests.ccvs.core.subscriber.AllTestsTeamSubscriber"/> +<booleanAttribute key="tracing" value="true"/> <listAttribute key="org.eclipse.debug.ui.favoriteGroups"> <listEntry value="org.eclipse.debug.ui.launchGroup.debug"/> </listAttribute> <stringAttribute key="vmargs" value="-Declipse.cvs.properties=c:\eclipse\repository.properties -Declipse.cvs.testName2=testFileAdditions"/> <booleanAttribute key="default" value="true"/> <stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/> +<mapAttribute key="tracingOptions"> +<mapEntry key="org.eclipse.core.resources/build/delta" value="false"/> +<mapEntry key="org.eclipse.ui/trace/graphics" value="false"/> +<mapEntry key="org.eclipse.jdt.debug.ui/debug" value="true"/> +<mapEntry key="org.eclipse.help/debug/search" value="false"/> +<mapEntry key="org.eclipse.ui/trace/part.create" value="false"/> +<mapEntry key="org.eclipse.jdt.core/debug/postaction" value="false"/> +<mapEntry key="org.eclipse.core.resources/monitor/listeners" value="false"/> +<mapEntry key="org.eclipse.ui/trace/part.activate" value="false"/> +<mapEntry key="org.eclipse.team.ftp/requests" value="true"/> +<mapEntry key="org.eclipse.help/debug/context" value="false"/> +<mapEntry key="org.eclipse.core.runtime/registry/debug/resolve" value="false"/> +<mapEntry key="org.eclipse.team.cvs.core/debug" value="true"/> +<mapEntry key="org.eclipse.jdt.core/debug/javadelta" value="false"/> +<mapEntry key="org.eclipse.help.ui/debug/ieadapter/inprocess" value="false"/> +<mapEntry key="org.eclipse.core.resources/build/invoking" value="false"/> +<mapEntry key="org.eclipse.update.core/debug/warning" value="false"/> +<mapEntry key="org.eclipse.help.ui/debug/infopop" value="false"/> +<mapEntry key="org.eclipse.jdt.core/debug" value="true"/> +<mapEntry key="org.eclipse.core.resources/restore/syncinfo" value="false"/> +<mapEntry key="org.eclipse.core.runtime/registry/debug" value="false"/> +<mapEntry key="org.eclipse.team.cvs.ssh/ssh_protocol" value="false"/> +<mapEntry key="org.eclipse.core.runtime/loader/debug/prefixes/success" value="false"/> +<mapEntry key="org.eclipse.team.cvs.core/metafiles" value="false"/> +<mapEntry key="org.eclipse.core.resources/natures" value="false"/> +<mapEntry key="org.eclipse.update.core/debug/install" value="false"/> +<mapEntry key="org.eclipse.core.runtime/loader/debug/filter/resource" value="*"/> +<mapEntry key="org.eclipse.core.resources/restore/metainfo" value="false"/> +<mapEntry key="org.eclipse.update.core/debug/type" value="false"/> +<mapEntry key="org.eclipse.team.ftp/responses" value="true"/> +<mapEntry key="org.eclipse.core.resources/build/failure" value="false"/> +<mapEntry key="org.eclipse.core.runtime/loader/debug/filter/loader" value="*"/> +<mapEntry key="org.eclipse.core.runtime/url/debug/cachelookup" value="false"/> +<mapEntry key="org.eclipse.core.runtime/loader/debug/prefixes/failure" value="false"/> +<mapEntry key="org.eclipse.core.boot/monitor/plugins" value="false"/> +<mapEntry key="org.eclipse.core.resources/save/markers" value="false"/> +<mapEntry key="org.eclipse.core.runtime/loader/debug/actions" value="false"/> +<mapEntry key="org.eclipse.core.resources/restore" value="false"/> +<mapEntry key="org.eclipse.core.runtime/registry/debug/dump" value=""/> +<mapEntry key="org.eclipse.jdt.core/debug/builder" value="false"/> +<mapEntry key="org.eclipse.core.runtime/url/debug/cachecopy" value="false"/> +<mapEntry key="org.eclipse.jdt.core/debug/javamodel" value="false"/> +<mapEntry key="org.eclipse.core.resources/save/mastertable" value="false"/> +<mapEntry key="org.eclipse.core.resources/build/needbuild" value="false"/> +<mapEntry key="org.eclipse.jdt.core/debug/buffermanager" value="false"/> +<mapEntry key="org.eclipse.team.cvs.ui/debug" value="false"/> +<mapEntry key="org.eclipse.jdt.core/debug/cpresolution" value="false"/> +<mapEntry key="org.eclipse.team.cvs.core/threading" value="false"/> +<mapEntry key="org.eclipse.core.resources/restore/tree" value="false"/> +<mapEntry key="org.eclipse.core.runtime/loader/debug/activateplugin" value="false"/> +<mapEntry key="org.eclipse.update.core/debug" value="true"/> +<mapEntry key="org.eclipse.core.resources/save" value="false"/> +<mapEntry key="org.eclipse.help.ui/debug/ieadapter" value="false"/> +<mapEntry key="org.eclipse.core.runtime/config/debug" value="false"/> +<mapEntry key="org.eclipse.core.runtime/registry/debug/events/plugin" value="false"/> +<mapEntry key="org.eclipse.jface/trace/actions" value="false"/> +<mapEntry key="org.eclipse.core.runtime/jobs/timing" value="false"/> +<mapEntry key="org.eclipse.update.core/debug/configuration" value="false"/> +<mapEntry key="org.eclipse.jdt.core/debug/completion" value="false"/> +<mapEntry key="org.eclipse.help/debug/protocols" value="false"/> +<mapEntry key="org.eclipse.core.boot/trace/classLoading" value="false"/> +<mapEntry key="org.eclipse.core.boot/trace/filename" value="runtime.traces"/> +<mapEntry key="org.eclipse.core.runtime/loader/debug/failure" value="false"/> +<mapEntry key="org.eclipse.team.core/debug" value="false"/> +<mapEntry key="org.eclipse.team.cvs.ui/consolebuffering" value="false"/> +<mapEntry key="org.eclipse.help.ui/debug" value="true"/> +<mapEntry key="org.eclipse.core.runtime/loader/debug/filter/class" value="*"/> +<mapEntry key="org.eclipse.core.runtime/loader/debug/success" value="false"/> +<mapEntry key="org.eclipse.update.core/debug/parsing" value="false"/> +<mapEntry key="org.eclipse.help.webapp/debug/workingsets" value="false"/> +<mapEntry key="org.eclipse.core.resources/restore/mastertable" value="false"/> +<mapEntry key="org.eclipse.core.runtime/jobs" value="false"/> +<mapEntry key="org.eclipse.core.runtime/url/debug" value="false"/> +<mapEntry key="org.eclipse.core.runtime/loader/debug/create" value="false"/> +<mapEntry key="org.eclipse.jdt.core/debug/compiler" value="false"/> +<mapEntry key="org.eclipse.team.cvs.core/cvsprotocol" value="true"/> +<mapEntry key="org.eclipse.debug.ui/debug" value="true"/> +<mapEntry key="org.eclipse.core.resources/restore/markers" value="false"/> +<mapEntry key="org.eclipse.ui/trace/workbench.restore" value="false"/> +<mapEntry key="org.eclipse.jdt.core/debug/search" value="false"/> +<mapEntry key="org.eclipse.jdt.debug/debug" value="true"/> +<mapEntry key="org.eclipse.core.resources/save/syncinfo" value="false"/> +<mapEntry key="org.eclipse.core.runtime/debug/context" value="false"/> +<mapEntry key="org.eclipse.team.core/refreshjob" value="false"/> +<mapEntry key="org.eclipse.jdt.core/debug/hierarchy" value="false"/> +<mapEntry key="org.eclipse.core.runtime/preferences/debug" value="false"/> +<mapEntry key="org.eclipse.ui/trace/workbench.start" value="false"/> +<mapEntry key="org.eclipse.ui/debug" value="true"/> +<mapEntry key="org.eclipse.core.resources/history" value="false"/> +<mapEntry key="org.eclipse.team.core/streams" value="false"/> +<mapEntry key="org.eclipse.core.resources/save/metainfo" value="false"/> +<mapEntry key="org.eclipse.core.boot/trace/pluginActivation" value="false"/> +<mapEntry key="org.eclipse.core.runtime/loader/debug/properties" value="false"/> +<mapEntry key="org.eclipse.core.runtime/timing/shutdown" value="false"/> +<mapEntry key="org.eclipse.help/debug" value="true"/> +<mapEntry key="org.eclipse.team.cvs.core/dirtycaching" value="false"/> +<mapEntry key="org.eclipse.help.webapp/debug" value="true"/> +<mapEntry key="org.eclipse.update.core/debug/reconciler" value="false"/> +<mapEntry key="org.eclipse.team.ftp/debug" value="false"/> +<mapEntry key="org.eclipse.core.resources/save/snapshots" value="false"/> +<mapEntry key="org.eclipse.update.core/debug/installhandler" value="false"/> +<mapEntry key="org.eclipse.core.runtime/loader/debug/prefixes" value="false"/> +<mapEntry key="org.eclipse.core.boot/monitor/classes" value="false"/> +<mapEntry key="org.eclipse.team.cvs.core/syncchangeevents" value="false"/> +<mapEntry key="org.eclipse.core.resources/save/tree" value="false"/> +<mapEntry key="org.eclipse.core.resources/monitor/builders" value="false"/> +<mapEntry key="org.eclipse.core.boot/trace/filters" value="trace.properties"/> +<mapEntry key="org.eclipse.debug.core/debug" value="true"/> +<mapEntry key="org.eclipse.core.runtime/url/debug/connect" value="false"/> +<mapEntry key="org.eclipse.core.boot/monitor/bundles" value="false"/> +<mapEntry key="org.eclipse.core.resources/restore/snapshots" value="false"/> +<mapEntry key="org.eclipse.ant.core/buildfile/timing" value="false"/> +<mapEntry key="org.eclipse.ant.core/debug" value="true"/> +<mapEntry key="org.eclipse.core.runtime/registry/debug/events/extension" value="false"/> +<mapEntry key="org.eclipse.team.cvs.ssh/debug" value="false"/> +<mapEntry key="org.eclipse.core.runtime/loader/debug" value="false"/> +<mapEntry key="org.eclipse.core.runtime/loader/debug/filter/native" value="*"/> +<mapEntry key="org.eclipse.team.ftp/list" value="true"/> +<mapEntry key="org.eclipse.ui/debug/internalerror/openDialog" value="false"/> +<mapEntry key="org.eclipse.ui/trace/perspective" value="false"/> +<mapEntry key="org.eclipse.core.runtime/debug" value="false"/> +<mapEntry key="org.eclipse.jdt.core/debug/zipaccess" value="false"/> +<mapEntry key="org.eclipse.core.runtime/jobs/beginend" value="false"/> +<mapEntry key="org.eclipse.core.resources/debug" value="false"/> +<mapEntry key="org.eclipse.update.core/debug/web" value="false"/> +<mapEntry key="org.eclipse.core.runtime/timing/startup" value="false"/> +<mapEntry key="org.eclipse.jdt.core/debug/indexmanager" value="false"/> +<mapEntry key="org.eclipse.jdt.core/debug/selection" value="false"/> +<mapEntry key="org.eclipse.ui/trace/part.listeners" value="false"/> +</mapAttribute> <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/> <booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/> <stringAttribute key="progargs" value="-os win32 -ws win32 -arch x86 -nl en_CA"/> diff --git a/tests/org.eclipse.team.tests.cvs.core/plugin.xml b/tests/org.eclipse.team.tests.cvs.core/plugin.xml index 957b7c5df..8692ebb1f 100644 --- a/tests/org.eclipse.team.tests.cvs.core/plugin.xml +++ b/tests/org.eclipse.team.tests.cvs.core/plugin.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> <plugin id="org.eclipse.team.tests.cvs.core" name="Eclipse CVS Tests Core" @@ -12,6 +13,11 @@ </library> </runtime> <requires> + <import plugin="org.eclipse.ui.ide" optional="true"/> + <import plugin="org.eclipse.ui.views" optional="true"/> + <import plugin="org.eclipse.jface.text" optional="true"/> + <import plugin="org.eclipse.ui.workbench.texteditor" optional="true"/> + <import plugin="org.eclipse.ui.editors" optional="true"/> <import plugin="org.eclipse.core.tests.harness"/> <import plugin="org.eclipse.core.resources"/> <import plugin="org.eclipse.team.core"/> diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/old/EclipseUITestHarnessApplication.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/old/EclipseUITestHarnessApplication.java deleted file mode 100644 index f944872e4..000000000 --- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/old/EclipseUITestHarnessApplication.java +++ /dev/null @@ -1,191 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2003 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Common Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/cpl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.team.tests.ccvs.ui.old; - - -import java.io.BufferedOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.InputStream; -import java.io.PrintStream; -import java.net.URL; -import java.util.ArrayList; -import java.util.List; -import java.util.Properties; - -import junit.framework.Test; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IWorkspace; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.Platform; -import org.eclipse.core.tests.harness.EclipseTestHarnessApplication; -import org.eclipse.jface.window.Window; -import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.internal.Workbench; - -/** - * A test harness with UI and logging support. - * <pre> - * Supported arguments: - * -test <suite> : id of suite to run (must be plugged into extension point) - * -log <file> : specify a file for logging - * -nolog : do not write a log file - * -repeat <n> : number of iterations to run - * -ignorefirst : ignore (do not record) results from first iteration - * -purge : purge all projects from the workspace before each iteration - * <anything else> : passed verbatim to the org.eclipse.ui.workbench application - * </pre> - */ -public class EclipseUITestHarnessApplication extends EclipseTestHarnessApplication { - protected boolean purgeWorkspace; - protected boolean ignoreFirst; - protected int repeatCount; - protected LoggingTestResult logResult; - - /** - * Application entry point. - */ - public Object run(Object userArgs) throws Exception { - PrintStream logStream = System.err; - String logFilename = null; - purgeWorkspace = false; - ignoreFirst = false; - repeatCount = 1; - if (userArgs instanceof String[]) { - // parse args, no error handling - String[] args = (String[]) userArgs; - List argsList = new ArrayList(args.length); - for (int i = 0; i < args.length; ++i) { - if ("-repeat".equals(args[i])) { - repeatCount = Integer.parseInt(args[++i]); - } else if ("-ignorefirst".equals(args[i])) { - ignoreFirst = true; - } else if ("-nolog".equals(args[i])) { - logStream = null; - } else if ("-log".equals(args[i])) { - logFilename = args[++i]; - } else if ("-purge".equals(args[i])) { - purgeWorkspace = true; - } else { - argsList.add(args[i]); - } - } - userArgs = argsList.toArray(new String[argsList.size()]); - } - // setup logging - if (logFilename != null) { - File file = new File(logFilename); - logStream = new PrintStream(new BufferedOutputStream(new FileOutputStream(logFilename))); - } - logResult = new LoggingTestResult(logStream); - try { - logResult.startLog(System.currentTimeMillis(), getSDKBuildId()); - return launchWorkbench(userArgs); - } finally { - logResult.endLog(); - if (logFilename != null) logStream.close(); - } - } - - /** - * Launches the Workbench UI. - */ - protected Object launchWorkbench(final Object userArgs) throws Exception { - final Exception[] exception = new Exception[1]; - Workbench workbench = new Workbench() { - /*** this code should be kept in sync with Workbench.runEventLoop() ***/ - protected void runEventLoop(Window.IExceptionHandler handler) { - // Dispatch all events. - Display display = Display.getCurrent(); - while (true) { - try { - if (!display.readAndDispatch()) - break; - } catch (Throwable e) { - break; - } - } - - // Run our hook. - try { - workbenchHook(this); - } catch (Exception e) { - exception[0] = e; - } - - // Close the workbench. - close(); - } - }; - Object result = workbench.run(userArgs); - if (exception[0] != null) throw exception[0]; - return result; - } - - /** - * Callback from Workbench if it launched successfully. - */ - protected Object workbenchHook(Workbench workbench) throws Exception { - // run the underlying non-ui test launcher to locate and start the test cases - return super.run(workbench.getCommandLineArgs()); - } - - /** - * Runs the specified test. Called from the non-ui test launcher. - */ - protected void run(Test test) { - for (int i = 0; i < repeatCount; ++i) { - if (purgeWorkspace) purgeWorkspaceProjects(); - LoggingTestRunner runner = new LoggingTestRunner(); - runner.doRun(test, (i == 0 && ignoreFirst) ? null : logResult, false); - } - } - - /** - * Purges the projects in the workspace. - */ - public static void purgeWorkspaceProjects() { - IWorkspace workspace = ResourcesPlugin.getWorkspace(); - // purge all known projects from the workspace - IProject[] projects = workspace.getRoot().getProjects(); - for (int i = 0; i < projects.length; ++i) { - IProject project = projects[i]; - try { - project.delete(true, true, null); - } catch (CoreException e) { - System.err.println("Could not purge project: " + project.getName()); - } - } - } - - /** - * Gets the SDK build id. - */ - public static String getSDKBuildId() { - try { - URL url = Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.sdk").getInstallURL(); - url = new URL(url, "platform.ini"); - InputStream is = url.openStream(); - try { - Properties sdkProperties = new Properties(); - sdkProperties.load(is); - String buildId = sdkProperties.getProperty("buildID"); - if (buildId != null) return buildId; - } finally { - is.close(); - } - } catch (Exception e) { - } - return "unknown"; - } -} diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/old/Utils.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/old/Utils.java index fdccc453a..4ef55baba 100644 --- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/old/Utils.java +++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/old/Utils.java @@ -11,48 +11,26 @@ package org.eclipse.team.tests.ccvs.ui.old; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; +import java.io.*; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Comparator; +import java.util.*; import java.util.List; import java.util.zip.ZipException; import java.util.zip.ZipFile; import junit.framework.Assert; -import org.eclipse.compare.structuremergeviewer.DiffNode; -import org.eclipse.compare.structuremergeviewer.IDiffContainer; -import org.eclipse.compare.structuremergeviewer.IDiffElement; -import org.eclipse.core.resources.IContainer; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IFolder; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IProjectDescription; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.core.runtime.Path; + +import org.eclipse.compare.structuremergeviewer.*; +import org.eclipse.core.resources.*; +import org.eclipse.core.runtime.*; import org.eclipse.jface.dialogs.ErrorDialog; import org.eclipse.jface.wizard.IWizard; import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Widget; +import org.eclipse.swt.widgets.*; import org.eclipse.team.internal.ccvs.core.CVSStatus; -import org.eclipse.ui.internal.dialogs.InternalErrorDialog; +import org.eclipse.ui.internal.ide.dialogs.InternalErrorDialog; import org.eclipse.ui.wizards.datatransfer.ImportOperation; import org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider; |