From e7778297e5c5b2db9a6a7f679996f0b1a3b21b14 Mon Sep 17 00:00:00 2001 From: Andrew M Finkbeiner Date: Mon, 6 Aug 2012 16:13:46 -0700 Subject: feature[ats_342ZC]: Remove svn batch checkout functionality --- .../test/manager/batches/TestBatchDecorator.java | 72 ------- .../manager/batches/TestBatchProjectNature.java | 240 --------------------- .../batches/actions/AddTestBatchProjectNature.java | 107 --------- .../actions/RemoveTestBatchProjectNature.java | 97 --------- .../batches/navigate/ITestBatchDataListener.java | 21 -- .../manager/batches/navigate/ProjectSetupItem.java | 48 ----- .../batches/navigate/RefreshOteNavigator.java | 53 ----- .../manager/batches/navigate/TestBatchData.java | 56 ----- .../batches/navigate/TestBatchRegistry.java | 102 --------- .../batches/navigate/TestBatchSetupItem.java | 90 -------- .../batches/navigate/TestBatchSetupViewItems.java | 55 ----- .../test/manager/batches/util/ResourceFinder.java | 103 --------- .../test/manager/batches/util/SelectionUtil.java | 66 ------ 13 files changed, 1110 deletions(-) delete mode 100644 plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/TestBatchDecorator.java delete mode 100644 plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/TestBatchProjectNature.java delete mode 100644 plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/actions/AddTestBatchProjectNature.java delete mode 100644 plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/actions/RemoveTestBatchProjectNature.java delete mode 100644 plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/ITestBatchDataListener.java delete mode 100644 plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/ProjectSetupItem.java delete mode 100644 plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/RefreshOteNavigator.java delete mode 100644 plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/TestBatchData.java delete mode 100644 plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/TestBatchRegistry.java delete mode 100644 plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/TestBatchSetupItem.java delete mode 100644 plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/TestBatchSetupViewItems.java delete mode 100644 plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/util/ResourceFinder.java delete mode 100644 plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/util/SelectionUtil.java (limited to 'plugins/org.eclipse.osee.ote.ui.test.manager') diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/TestBatchDecorator.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/TestBatchDecorator.java deleted file mode 100644 index 8f95ef2d284..00000000000 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/TestBatchDecorator.java +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2007 Boeing. - * All rights reserved. This program and the accompanying materials - * 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: - * Boeing - initial API and implementation - *******************************************************************************/ -package org.eclipse.osee.ote.ui.test.manager.batches; - -import java.util.logging.Level; -import org.eclipse.core.resources.IProject; -import org.eclipse.jdt.core.IJavaProject; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.jface.viewers.IBaseLabelProvider; -import org.eclipse.jface.viewers.IDecoration; -import org.eclipse.jface.viewers.ILightweightLabelDecorator; -import org.eclipse.jface.viewers.LabelProvider; -import org.eclipse.jface.viewers.LabelProviderChangedEvent; -import org.eclipse.osee.framework.logging.OseeLog; -import org.eclipse.osee.framework.ui.swt.Displays; -import org.eclipse.osee.framework.ui.swt.ImageManager; -import org.eclipse.osee.ote.ui.test.manager.OteTestManagerImage; -import org.eclipse.osee.ote.ui.test.manager.batches.util.SelectionUtil; -import org.eclipse.osee.ote.ui.test.manager.internal.TestManagerPlugin; -import org.eclipse.ui.IDecoratorManager; - -/** - * @author Roberto E. Escobar - */ -public class TestBatchDecorator extends LabelProvider implements ILightweightLabelDecorator { - private static final String DECORATOR_ID = "org.eclipse.osee.ote.ui.test.manager.decorator"; - private static final ImageDescriptor IMAGE = ImageManager.getImageDescriptor(OteTestManagerImage.TEST); - - @Override - public void decorate(Object element, IDecoration decoration) { - try { - IProject project = null; - if (element instanceof IJavaProject) { - project = ((IJavaProject) element).getProject(); - } else { - project = (IProject) element; - } - if (project.isOpen() && project.hasNature(TestBatchProjectNature.NATURE_ID)) { - decoration.addOverlay(IMAGE); - } - } catch (Exception ex) { - OseeLog.log(TestManagerPlugin.class, Level.SEVERE, SelectionUtil.getStatusMessages(ex)); - } - } - - private void startDecoratorUpdate(IProject project) { - final LabelProviderChangedEvent evnt = new LabelProviderChangedEvent(this, project); - Displays.ensureInDisplayThread(new Runnable() { - @Override - public void run() { - fireLabelProviderChanged(evnt); - } - }); - } - - public static void performLabelDecoratorUpdate(IProject project) { - IDecoratorManager decoratorManager = TestManagerPlugin.getInstance().getWorkbench().getDecoratorManager(); - IBaseLabelProvider provider = decoratorManager.getBaseLabelProvider(DECORATOR_ID); - if (provider != null) { - TestBatchDecorator decorator = (TestBatchDecorator) provider; - decorator.startDecoratorUpdate(project); - } - } -} diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/TestBatchProjectNature.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/TestBatchProjectNature.java deleted file mode 100644 index a8934aad0fa..00000000000 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/TestBatchProjectNature.java +++ /dev/null @@ -1,240 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2007 Boeing. - * All rights reserved. This program and the accompanying materials - * 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: - * Boeing - initial API and implementation - *******************************************************************************/ -package org.eclipse.osee.ote.ui.test.manager.batches; - -import java.util.logging.Level; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IProjectNature; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.IResourceChangeEvent; -import org.eclipse.core.resources.IResourceChangeListener; -import org.eclipse.core.resources.IResourceDelta; -import org.eclipse.core.resources.IWorkspace; -import org.eclipse.core.resources.IWorkspaceRunnable; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.osee.framework.jdk.core.type.Pair; -import org.eclipse.osee.framework.logging.OseeLog; -import org.eclipse.osee.framework.ui.swt.Displays; -import org.eclipse.osee.ote.ui.test.manager.batches.navigate.TestBatchRegistry; -import org.eclipse.osee.ote.ui.test.manager.batches.navigate.TestBatchSetupViewItems; -import org.eclipse.osee.ote.ui.test.manager.batches.util.ResourceFinder; -import org.eclipse.osee.ote.ui.test.manager.internal.TestManagerPlugin; - -/** - * @author Roberto E. Escobar - */ -public class TestBatchProjectNature implements IProjectNature { - public static final String NATURE_ID = "org.eclipse.osee.ote.ui.test.manager.TestBatchProjectNature"; - private IProject project; - private final ResourceFinder resourceFinder; - private final IResourceChangeListener resourceChangeListener; - private final IResourceChangeListener projectClosedListener; - private final IResourceChangeListener projectDeletedListener; - private final FindResourceWorker worker; - - public TestBatchProjectNature() { - this.resourceFinder = new ResourceFinder(); - this.resourceChangeListener = new TestBatchResourceChangeListener(); - this.projectClosedListener = new TestBatchProjectClosedListener(); - this.projectDeletedListener = new TestBatchProjectDeletedListener(); - this.worker = new FindResourceWorker(this); - } - - @Override - public void configure() throws CoreException { - IWorkspace workspace = ResourcesPlugin.getWorkspace(); - workspace.addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE); - workspace.addResourceChangeListener(projectClosedListener, IResourceChangeEvent.PRE_CLOSE); - workspace.addResourceChangeListener(projectDeletedListener, IResourceChangeEvent.PRE_DELETE); - ResourcesPlugin.getWorkspace().getRoot().getWorkspace().run(worker, new NullProgressMonitor()); - } - - @Override - public void deconfigure() throws CoreException { - TestBatchRegistry registry = TestBatchSetupViewItems.getInstance().getRegistry(); - for (String key : resourceFinder.getIds()) { - registry.deregisterTestBatch(key); - } - TestBatchDecorator.performLabelDecoratorUpdate(project); - IWorkspace workspace = ResourcesPlugin.getWorkspace(); - workspace.removeResourceChangeListener(resourceChangeListener); - workspace.removeResourceChangeListener(projectClosedListener); - workspace.removeResourceChangeListener(projectDeletedListener); - } - - @Override - public IProject getProject() { - return this.project; - } - - @Override - public void setProject(IProject project) { - this.project = project; - } - - public ResourceFinder getResourceFinder() { - return resourceFinder; - } - - public FindResourceWorker getWorker() { - return worker; - } - - public static void initializeProjectSet() { - Displays.ensureInDisplayThread(new Runnable() { - @Override - public void run() { - IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects(); - for (IProject project : projects) { - try { - if (project != null && project.isOpen() == true) { - IProjectNature nature = project.getNature(TestBatchProjectNature.NATURE_ID); - if (nature != null) { - nature.configure(); - } - } - } catch (CoreException ex) { - OseeLog.log(TestManagerPlugin.class, Level.SEVERE, "Error initializing project nature", ex); - } - } - } - }); - } - - private final class TestBatchProjectDeletedListener implements IResourceChangeListener { - - @Override - public void resourceChanged(IResourceChangeEvent event) { - try { - IResource resource = event.getResource(); - if (resource != null) { - IProject project = resource.getProject(); - if (project != null) { - final IProjectNature nature = project.getNature(NATURE_ID); - if (nature != null) { - Displays.ensureInDisplayThread(new Runnable() { - @Override - public void run() { - TestBatchProjectNature batchProjectNature = (TestBatchProjectNature) nature; - TestBatchRegistry registry = TestBatchSetupViewItems.getInstance().getRegistry(); - for (String key : batchProjectNature.getResourceFinder().getIds()) { - registry.deregisterTestBatch(key); - } - } - }); - } - } - } - } catch (CoreException ex) { - OseeLog.log(TestManagerPlugin.class, Level.SEVERE, "Error during resource change event", ex); - } - } - - } - - private final class TestBatchProjectClosedListener implements IResourceChangeListener { - @Override - public void resourceChanged(IResourceChangeEvent event) { - try { - IResource resource = event.getResource(); - if (resource != null) { - IProject project = resource.getProject(); - if (project != null) { - final IProjectNature nature = project.getNature(NATURE_ID); - if (nature != null) { - Displays.ensureInDisplayThread(new Runnable() { - @Override - public void run() { - TestBatchProjectNature tbpNature = (TestBatchProjectNature) nature; - TestBatchRegistry registry = TestBatchSetupViewItems.getInstance().getRegistry(); - for (String key : tbpNature.getResourceFinder().getIds()) { - registry.deregisterTestBatch(key); - } - } - }); - } - } - } - } catch (CoreException ex) { - OseeLog.log(TestManagerPlugin.class, Level.SEVERE, "Error during resource change event", ex); - } - } - } - - private final class TestBatchResourceChangeListener implements IResourceChangeListener { - @Override - public void resourceChanged(IResourceChangeEvent event) { - try { - IResourceDelta delta = event.getDelta(); - IResourceDelta[] children = delta.getAffectedChildren(); - for (IResourceDelta childDelta : children) { - IResource resource = childDelta.getResource(); - if (resource != null) { - IProject project = resource.getProject(); - if (project != null) { - if (project.isOpen() != false && project.isNatureEnabled(NATURE_ID)) { - final IProjectNature nature = project.getNature(NATURE_ID); - if (nature != null) { - handleProjectFilesChanging((TestBatchProjectNature) nature); - } - } - } - } - } - } catch (CoreException ex) { - OseeLog.log(TestManagerPlugin.class, Level.SEVERE, "Error during resource change event", ex); - } - } - - private void handleProjectFilesChanging(final TestBatchProjectNature nature) { - Displays.ensureInDisplayThread(new Runnable() { - @Override - public void run() { - try { - nature.getWorker().run(new NullProgressMonitor()); - } catch (CoreException ex) { - OseeLog.log(TestManagerPlugin.class, Level.SEVERE, ex); - } - } - }); - } - }; - - private final class FindResourceWorker implements IWorkspaceRunnable { - - private final TestBatchProjectNature nature; - - public FindResourceWorker(TestBatchProjectNature nature) { - this.nature = nature; - } - - @Override - public void run(IProgressMonitor monitor) throws CoreException { - ResourceFinder finder = nature.getResourceFinder(); - finder.findBatchAndProjectFiles(nature.getProject()); - TestBatchRegistry registry = TestBatchSetupViewItems.getInstance().getRegistry(); - for (String key : finder.getIds()) { - Pair fileSet = finder.getFileSet(key); - registry.registerTestBatch(key, fileSet.getFirst().getLocationURI(), fileSet.getSecond().getLocationURI()); - } - Displays.ensureInDisplayThread(new Runnable() { - @Override - public void run() { - TestBatchDecorator.performLabelDecoratorUpdate(nature.getProject()); - } - }); - } - } -} diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/actions/AddTestBatchProjectNature.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/actions/AddTestBatchProjectNature.java deleted file mode 100644 index ed719c04294..00000000000 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/actions/AddTestBatchProjectNature.java +++ /dev/null @@ -1,107 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2007 Boeing. - * All rights reserved. This program and the accompanying materials - * 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: - * Boeing - initial API and implementation - *******************************************************************************/ -package org.eclipse.osee.ote.ui.test.manager.batches.actions; - -import java.util.logging.Level; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IProjectDescription; -import org.eclipse.core.resources.IResource; -import org.eclipse.jdt.core.IJavaProject; -import org.eclipse.jdt.core.JavaCore; -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.window.ApplicationWindow; -import org.eclipse.osee.framework.logging.OseeLog; -import org.eclipse.osee.ote.ui.test.manager.batches.TestBatchProjectNature; -import org.eclipse.osee.ote.ui.test.manager.batches.util.SelectionUtil; -import org.eclipse.osee.ote.ui.test.manager.internal.TestManagerPlugin; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Cursor; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IObjectActionDelegate; -import org.eclipse.ui.IWorkbenchPart; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.PlatformUI; - -/** - * @author Roberto E. Escobar - */ -public class AddTestBatchProjectNature implements IObjectActionDelegate { - private static final String NATURE_ADDED = "Test Batch Nature Added"; - private static final String ADDING_NATURE = "Adding Test Batch Nature"; - - private IJavaProject currentJavaProject; - private IProject currentProject; - - @Override - public void setActivePart(IAction action, IWorkbenchPart targetPart) { - // Do Nothing - } - - @Override - public void run(IAction action) { - IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); - Cursor waitCursor = new Cursor(window.getShell().getDisplay(), SWT.CURSOR_WAIT); - try { - window.getShell().setCursor(waitCursor); - ((ApplicationWindow) window).setStatus(ADDING_NATURE); - - //new way - if (currentJavaProject == null) { - // if the java nature is not present - // it must be added, along with the test batch nature - IProjectDescription description = currentProject.getDescription(); - String[] natureIds = description.getNatureIds(); - String[] newNatures = new String[natureIds.length + 2]; - System.arraycopy(natureIds, 0, newNatures, 0, natureIds.length); - newNatures[newNatures.length - 2] = JavaCore.NATURE_ID; - newNatures[newNatures.length - 1] = TestBatchProjectNature.NATURE_ID; - description.setNatureIds(newNatures); - currentProject.setDescription(description, null); - - currentJavaProject = JavaCore.create(currentProject); - } else { - //add the test batch nature, the java nature is already present - IProjectDescription description = currentJavaProject.getProject().getDescription(); - String[] natures = description.getNatureIds(); - String[] newNatures = new String[natures.length + 1]; - System.arraycopy(natures, 0, newNatures, 0, natures.length); - newNatures[natures.length] = TestBatchProjectNature.NATURE_ID; - description.setNatureIds(newNatures); - currentJavaProject.getProject().setDescription(description, null); - } - - // refresh project so user sees new files, libraries, etc - currentJavaProject.getProject().refreshLocal(IResource.DEPTH_INFINITE, null); - ((ApplicationWindow) window).setStatus(NATURE_ADDED); - - } catch (Exception ex) { - OseeLog.logf(TestManagerPlugin.class, Level.SEVERE, ex, "Error adding test batch nature on [%s]", - currentJavaProject.getProject().getName()); - Shell shell = new Shell(); - MessageDialog.openInformation(shell, TestManagerPlugin.PLUGIN_ID, - "Error adding test batch nature:\n" + SelectionUtil.getStatusMessages(ex)); - } finally { - window.getShell().setCursor(null); - waitCursor.dispose(); - } - } - - @Override - public void selectionChanged(IAction action, ISelection selection) { - currentJavaProject = SelectionUtil.findSelectedJavaProject(selection); - if (currentJavaProject == null) { - currentProject = SelectionUtil.findSelectedProject(selection); - } - - } -} diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/actions/RemoveTestBatchProjectNature.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/actions/RemoveTestBatchProjectNature.java deleted file mode 100644 index 61b1f5e527a..00000000000 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/actions/RemoveTestBatchProjectNature.java +++ /dev/null @@ -1,97 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2007 Boeing. - * All rights reserved. This program and the accompanying materials - * 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: - * Boeing - initial API and implementation - *******************************************************************************/ -package org.eclipse.osee.ote.ui.test.manager.batches.actions; - -import java.util.ArrayList; -import java.util.List; -import java.util.logging.Level; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IProjectDescription; -import org.eclipse.core.resources.IResource; -import org.eclipse.jdt.core.IJavaProject; -import org.eclipse.jdt.core.JavaCore; -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.window.ApplicationWindow; -import org.eclipse.osee.framework.logging.OseeLog; -import org.eclipse.osee.ote.ui.test.manager.batches.TestBatchProjectNature; -import org.eclipse.osee.ote.ui.test.manager.batches.util.SelectionUtil; -import org.eclipse.osee.ote.ui.test.manager.internal.TestManagerPlugin; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IObjectActionDelegate; -import org.eclipse.ui.IWorkbenchPart; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.PlatformUI; - -/** - * @author Roberto E. Escobar - */ -public class RemoveTestBatchProjectNature implements IObjectActionDelegate { - private static final String NATURE_REMOVED = "Test Batch Nature Removed"; - private static final String REMOVING_NATURE = "Removing Test Batch Nature"; - private IJavaProject currentJavaProject; - private IProject currentProject; - - @Override - public void setActivePart(IAction action, IWorkbenchPart targetPart) { - // Do Nothing - } - - private static String[] removeTestBatchNature(String[] natures) { - List list = new ArrayList(); - - for (int i = 0; i < natures.length; i++) { - if (!natures[i].equalsIgnoreCase(TestBatchProjectNature.NATURE_ID)) { - list.add(natures[i]); - } - } - String[] newNatures = new String[list.size()]; - for (int i = 0; i < list.size(); i++) { - newNatures[i] = list.get(i); - } - return newNatures; - } - - @Override - public void run(IAction action) { - IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); - try { - ((ApplicationWindow) window).setStatus(REMOVING_NATURE); - - if (currentJavaProject == null) { - currentJavaProject = JavaCore.create(currentProject); - } - IProjectDescription description = currentJavaProject.getProject().getDescription(); - String[] natures = description.getNatureIds(); - - description.setNatureIds(removeTestBatchNature(natures)); - currentJavaProject.getProject().setDescription(description, null); - // refresh project so user sees changes - currentJavaProject.getProject().refreshLocal(IResource.DEPTH_INFINITE, null); - ((ApplicationWindow) window).setStatus(NATURE_REMOVED); - } catch (Exception ex) { - OseeLog.logf(TestManagerPlugin.class, Level.SEVERE, - ex, "Error removing test batch nature on [%s]", currentJavaProject.getProject().getName()); - Shell shell = new Shell(); - MessageDialog.openInformation(shell, TestManagerPlugin.PLUGIN_ID, - "Error removing test batch nature:\n" + SelectionUtil.getStatusMessages(ex)); - } - } - - @Override - public void selectionChanged(IAction action, ISelection selection) { - currentJavaProject = SelectionUtil.findSelectedJavaProject(selection); - if (currentJavaProject == null) { - currentProject = SelectionUtil.findSelectedProject(selection); - } - } -} diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/ITestBatchDataListener.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/ITestBatchDataListener.java deleted file mode 100644 index 64cff962f77..00000000000 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/ITestBatchDataListener.java +++ /dev/null @@ -1,21 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2007 Boeing. - * All rights reserved. This program and the accompanying materials - * 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: - * Boeing - initial API and implementation - *******************************************************************************/ -package org.eclipse.osee.ote.ui.test.manager.batches.navigate; - -/** - * @author Roberto E. Escobar - */ -public interface ITestBatchDataListener { - - public void dataAddedEvent(TestBatchData data); - - public void dataRemovedEvent(TestBatchData data); -} diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/ProjectSetupItem.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/ProjectSetupItem.java deleted file mode 100644 index 7874951779c..00000000000 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/ProjectSetupItem.java +++ /dev/null @@ -1,48 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2007 Boeing. - * All rights reserved. This program and the accompanying materials - * 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: - * Boeing - initial API and implementation - *******************************************************************************/ -package org.eclipse.osee.ote.ui.test.manager.batches.navigate; - -import java.net.MalformedURLException; -import java.net.URI; -import java.net.URL; -import java.util.logging.Level; -import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.osee.framework.logging.OseeLog; -import org.eclipse.osee.framework.svn.CheckoutProjectSetJob; -import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem; -import org.eclipse.osee.framework.ui.swt.KeyedImage; -import org.eclipse.osee.ote.ui.test.manager.internal.TestManagerPlugin; - -/** - * @author Roberto E. Escobar - */ -final class ProjectSetupItem extends XNavigateItem implements Runnable { - private final URI projectSetFile; - private final String jobName; - - public ProjectSetupItem(XNavigateItem parent, String name, KeyedImage oseeImage, URI projectSetFile) { - super(parent, name, oseeImage); - this.jobName = String.format("Project Configuration: [%s]", name); - this.projectSetFile = projectSetFile; - } - - @Override - public void run() { - try { - URL url = projectSetFile.toURL(); - Job job = new CheckoutProjectSetJob(jobName, getName(), url); - job.setUser(true); - job.schedule(); - } catch (MalformedURLException ex) { - OseeLog.log(TestManagerPlugin.class, Level.SEVERE, ex); - } - } -} diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/RefreshOteNavigator.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/RefreshOteNavigator.java deleted file mode 100644 index 75efa6f53c7..00000000000 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/RefreshOteNavigator.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2007 Boeing. - * All rights reserved. This program and the accompanying materials - * 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: - * Boeing - initial API and implementation - *******************************************************************************/ -package org.eclipse.osee.ote.ui.test.manager.batches.navigate; - -import org.eclipse.osee.ote.ui.navigate.OteNavigateView; -import org.eclipse.ui.IViewPart; -import org.eclipse.ui.IWorkbenchPage; -import org.eclipse.ui.PlatformUI; - -/** - * @author Roberto E. Escobar - */ -public class RefreshOteNavigator implements ITestBatchDataListener { - - @Override - public void dataAddedEvent(TestBatchData data) { - OteNavigateView navigator = getOteNavigator(); - if (navigator != null) { - navigator.refresh(); - } - } - - @Override - public void dataRemovedEvent(TestBatchData data) { - OteNavigateView navigator = getOteNavigator(); - if (navigator != null) { - navigator.refresh(); - } - } - - private OteNavigateView getOteNavigator() { - OteNavigateView toReturn = null; - IWorkbenchPage[] pages = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getPages(); - for (IWorkbenchPage page : pages) { - IViewPart part = page.findView(OteNavigateView.VIEW_ID); - if (part != null) { - if (part instanceof OteNavigateView) { - toReturn = (OteNavigateView) part; - break; - } - } - } - return toReturn; - } -} diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/TestBatchData.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/TestBatchData.java deleted file mode 100644 index 5d55cfed61f..00000000000 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/TestBatchData.java +++ /dev/null @@ -1,56 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2007 Boeing. - * All rights reserved. This program and the accompanying materials - * 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: - * Boeing - initial API and implementation - *******************************************************************************/ -package org.eclipse.osee.ote.ui.test.manager.batches.navigate; - -import java.net.URI; -import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem; - -/** - * @author Roberto E. Escobar - */ -public class TestBatchData { - - private final String name; - private final XNavigateItem itemFolder; - private final URI testBatchFile; - private final URI projectSetFile; - - protected TestBatchData(XNavigateItem itemFolder, String name, URI projectSetFile, URI testBatchFile) { - this.name = name; - this.testBatchFile = testBatchFile; - this.projectSetFile = projectSetFile; - this.itemFolder = itemFolder; - } - - public String getId() { - return name; - } - - public URI getTestBatchFile() { - return testBatchFile; - } - - public URI getProjectSetFile() { - return projectSetFile; - } - - public XNavigateItem getXNavigateItem() { - return itemFolder; - } - - public void dispose() { - XNavigateItem parent = itemFolder.getParent(); - if (parent != null) { - parent.removeChild(itemFolder); - itemFolder.setParent(null); - } - } -} diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/TestBatchRegistry.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/TestBatchRegistry.java deleted file mode 100644 index 07184028036..00000000000 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/TestBatchRegistry.java +++ /dev/null @@ -1,102 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2007 Boeing. - * All rights reserved. This program and the accompanying materials - * 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: - * Boeing - initial API and implementation - *******************************************************************************/ -package org.eclipse.osee.ote.ui.test.manager.batches.navigate; - -import java.net.URI; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.eclipse.osee.framework.ui.plugin.PluginUiImage; -import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem; -import org.eclipse.osee.ote.ui.test.manager.OteTestManagerImage; - -/** - * @author Roberto E. Escobar - */ -public class TestBatchRegistry { - - private final Map itemsMap; - private final Set listeners; - private final XNavigateItem parent; - - public TestBatchRegistry(XNavigateItem parent) { - this.itemsMap = new HashMap(); - this.listeners = new HashSet(); - this.parent = parent; - } - - public List getXNavigateItems() { - List toReturn = new ArrayList(); - for (TestBatchData data : itemsMap.values()) { - toReturn.add(data.getXNavigateItem()); - } - return toReturn; - } - - public void deregisterTestBatch(String id) { - TestBatchData data = this.itemsMap.get(id); - if (data != null) { - data.dispose(); - this.itemsMap.remove(id); - notifyAddEvent(data); - } - } - - public void registerTestBatch(String id, URI projectSetFile, URI testBatchFile) { - if (itemsMap.containsKey(id) != true) { - TestBatchData data = createNewTestBatchItem(id, projectSetFile, testBatchFile); - this.itemsMap.put(data.getId(), data); - notifyRemoveEvent(data); - } - } - - public void addListener(ITestBatchDataListener listener) { - synchronized (listeners) { - listeners.add(listener); - } - } - - public void removeListener(ITestBatchDataListener listener) { - synchronized (listeners) { - listeners.remove(listener); - } - } - - private void notifyAddEvent(final TestBatchData data) { - synchronized (listeners) { - for (ITestBatchDataListener listener : listeners) { - listener.dataAddedEvent(data); - } - } - } - - private void notifyRemoveEvent(final TestBatchData data) { - synchronized (listeners) { - for (ITestBatchDataListener listener : listeners) { - listener.dataRemovedEvent(data); - } - } - } - - private TestBatchData createNewTestBatchItem(String id, URI projectSetFile, URI testBatchFile) { - // Chain Items - XNavigateItem parentFolder = new XNavigateItem(parent, id, PluginUiImage.FOLDER); - new ProjectSetupItem(parentFolder, id + " Checkout", OteTestManagerImage.PROJECT_SET_IMAGE, projectSetFile); - new TestBatchSetupItem(parentFolder, id + " Test Manager Batch Config", OteTestManagerImage.TEST_BATCH_IMAGE, - testBatchFile); - - // Store into dataObject - return new TestBatchData(parentFolder, id, projectSetFile, testBatchFile); - } -} diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/TestBatchSetupItem.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/TestBatchSetupItem.java deleted file mode 100644 index be77a8444d8..00000000000 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/TestBatchSetupItem.java +++ /dev/null @@ -1,90 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2007 Boeing. - * All rights reserved. This program and the accompanying materials - * 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: - * Boeing - initial API and implementation - *******************************************************************************/ -package org.eclipse.osee.ote.ui.test.manager.batches.navigate; - -import java.io.File; -import java.net.URI; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem; -import org.eclipse.osee.framework.ui.swt.KeyedImage; -import org.eclipse.osee.ote.ui.test.manager.configuration.LoadConfigurationOperation; -import org.eclipse.osee.ote.ui.test.manager.core.TestManagerEditor; -import org.eclipse.osee.ote.ui.test.manager.internal.TestManagerPlugin; -import org.eclipse.osee.ote.ui.test.manager.util.PluginUtil; -import org.eclipse.osee.ote.ui.test.manager.util.TestManagerSelectDialog; -import org.eclipse.ui.progress.UIJob; - -/** - * @author Roberto E. Escobar - */ -final class TestBatchSetupItem extends XNavigateItem implements Runnable { - private final URI testBatchFile; - private final String jobName; - - public TestBatchSetupItem(XNavigateItem parent, String name, KeyedImage oseeImage, URI testBatchFile) { - super(parent, name, oseeImage); - this.jobName = String.format("Test Manager Configuration: [%s]", name); - this.testBatchFile = testBatchFile; - } - - @Override - public void run() { - Job job = new UIJob(jobName) { - @Override - public IStatus runInUIThread(IProgressMonitor monitor) { - IStatus status = Status.CANCEL_STATUS; - if (PluginUtil.areTestManagersAvailable() != true) { - Exception exception = - new IllegalStateException("Test Manager was not opened before this operation was selected."); - status = - new Status(IStatus.ERROR, TestManagerPlugin.PLUGIN_ID, IStatus.ERROR, - "A Test Manager must be opened for this operation to work.", exception); - } else { - TestManagerEditor[] itemsToOpen = PluginUtil.getTestManagers(); - if (itemsToOpen.length > 1) { - itemsToOpen = TestManagerSelectDialog.getTestManagerFromUser(); - } - - if (itemsToOpen.length > 0) { - boolean result = configureSelectedItems(itemsToOpen); - if (result != false) { - status = Status.OK_STATUS; - } else { - Exception exception = new IllegalStateException("Test Manager setup failed."); - status = - new Status(IStatus.ERROR, TestManagerPlugin.PLUGIN_ID, - "Test Manager configuration failed for some unknown reason. Please try again.", exception); - } - } else { - Exception exception = new IllegalStateException("No Test Manager was selected."); - status = - new Status(IStatus.ERROR, TestManagerPlugin.PLUGIN_ID, - "A Test Manager must be selected for this operation to work.", exception); - } - } - return status; - } - - private boolean configureSelectedItems(TestManagerEditor[] items) { - boolean result = true; - for (TestManagerEditor testManager : items) { - result &= LoadConfigurationOperation.load(testManager, new File(testBatchFile)); - } - return result; - } - }; - job.setUser(true); - job.schedule(); - } -} diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/TestBatchSetupViewItems.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/TestBatchSetupViewItems.java deleted file mode 100644 index a5088aa64b8..00000000000 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/navigate/TestBatchSetupViewItems.java +++ /dev/null @@ -1,55 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2007 Boeing. - * All rights reserved. This program and the accompanying materials - * 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: - * Boeing - initial API and implementation - *******************************************************************************/ -package org.eclipse.osee.ote.ui.test.manager.batches.navigate; - -import java.util.ArrayList; -import java.util.List; -import org.eclipse.osee.framework.ui.plugin.PluginUiImage; -import org.eclipse.osee.framework.ui.plugin.xnavigate.IXNavigateContainer; -import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem; -import org.eclipse.osee.ote.ui.test.manager.batches.TestBatchProjectNature; - -/** - * @author Roberto E. Escobar - */ -public class TestBatchSetupViewItems implements IXNavigateContainer { - private static final String PARENT_FOLDER_NAME = "Test Batch Setup"; - - private static TestBatchSetupViewItems instance = null; - private final TestBatchRegistry registry; - private final XNavigateItem parentFolder; - - public TestBatchSetupViewItems() { - this.parentFolder = new XNavigateItem(null, PARENT_FOLDER_NAME, PluginUiImage.FOLDER); - this.registry = new TestBatchRegistry(parentFolder); - this.registry.addListener(new RefreshOteNavigator()); - - TestBatchProjectNature.initializeProjectSet(); - } - - public static TestBatchSetupViewItems getInstance() { - if (instance == null) { - instance = new TestBatchSetupViewItems(); - } - return instance; - } - - @Override - public List getNavigateItems() { - List items = new ArrayList(); - items.add(parentFolder); - return items; - } - - public TestBatchRegistry getRegistry() { - return registry; - } -} diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/util/ResourceFinder.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/util/ResourceFinder.java deleted file mode 100644 index 4318241f8fd..00000000000 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/util/ResourceFinder.java +++ /dev/null @@ -1,103 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2007 Boeing. - * All rights reserved. This program and the accompanying materials - * 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: - * Boeing - initial API and implementation - *******************************************************************************/ -package org.eclipse.osee.ote.ui.test.manager.batches.util; - -import java.util.Collection; -import java.util.Set; -import java.util.logging.Level; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.IResourceVisitor; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.osee.framework.jdk.core.type.HashCollection; -import org.eclipse.osee.framework.jdk.core.type.Pair; -import org.eclipse.osee.framework.logging.OseeLog; -import org.eclipse.osee.ote.ui.test.manager.internal.TestManagerPlugin; - -/** - * @author Roberto E. Escobar - */ -public class ResourceFinder { - private static final String PROJECT_SET_EXTENSION = "psf"; - private static final String TEST_BATCH_SET_EXTENSION = "xml"; - - private final HashCollection resourceMap; - - public ResourceFinder() { - this.resourceMap = new HashCollection(); - } - - public Set getIds() { - return resourceMap.keySet(); - } - - public Pair getFileSet(String key) { - IFile project = null; - IFile testBatch = null; - - Collection items = this.resourceMap.getValues(key); - for (IFile file : items) { - if (file.getFileExtension().equals(PROJECT_SET_EXTENSION)) { - project = file; - } else { - testBatch = file; - } - } - return new Pair(project, testBatch); - } - - public void findBatchAndProjectFiles(IProject project) { - final HashCollection localMap = new HashCollection(); - - try { - project.accept(new IResourceVisitor() { - - @Override - public boolean visit(IResource resource) throws CoreException { - if (resource instanceof IFile) { - IFile file = (IFile) resource; - if (isValid(file) != false) { - String key = file.getName(); - key = key.replace(file.getFileExtension(), ""); - if (key.endsWith(".")) { - key = key.substring(0, key.length() - 1); - } - localMap.put(key, file); - } - } - return true; - } - }); - - } catch (CoreException ex) { - OseeLog.log(TestManagerPlugin.class, Level.SEVERE, ex); - } - // Remove incompletes - this.resourceMap.clear(); - for (String key : localMap.keySet()) { - Collection values = localMap.getValues(key); - if (values != null && values.size() == 2) { - this.resourceMap.put(key, values); - } - } - } - - private boolean isValid(IFile file) { - boolean result = false; - if (file != null && file.isAccessible() != false) { - String extension = file.getFileExtension(); - result = - extension.equalsIgnoreCase(PROJECT_SET_EXTENSION) || extension.equalsIgnoreCase(TEST_BATCH_SET_EXTENSION); - } - return result; - } -} diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/util/SelectionUtil.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/util/SelectionUtil.java deleted file mode 100644 index f791191a180..00000000000 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/batches/util/SelectionUtil.java +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2007 Boeing. - * All rights reserved. This program and the accompanying materials - * 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: - * Boeing - initial API and implementation - *******************************************************************************/ -package org.eclipse.osee.ote.ui.test.manager.batches.util; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.jdt.core.IJavaProject; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; - -/** - * @author Roberto E. Escobar - */ -public class SelectionUtil { - public static IProject findSelectedProject(ISelection selection) { - IProject currentProject = null; - if (selection != null) { - if (selection instanceof IStructuredSelection) { - IStructuredSelection ss = (IStructuredSelection) selection; - Object obj = ss.getFirstElement(); - if (obj instanceof IProject) { - currentProject = (IProject) obj; - } - } - } - return currentProject; - } - - public static IJavaProject findSelectedJavaProject(ISelection selection) { - IJavaProject currentProject = null; - if (selection != null) { - if (selection instanceof IStructuredSelection) { - IStructuredSelection ss = (IStructuredSelection) selection; - Object obj = ss.getFirstElement(); - if (obj instanceof IJavaProject) { - currentProject = (IJavaProject) obj; - } - } - } - return currentProject; - } - - public static String getStatusMessages(Exception e) { - String msg = e.getMessage(); - if (e instanceof CoreException) { - CoreException ce = (CoreException) e; - IStatus status = ce.getStatus(); - IStatus[] children = status.getChildren(); - for (int i = 0; i < children.length; i++) { - msg += "\n" + children[i].getMessage(); - } - System.err.println(msg); - ce.printStackTrace(System.err); - } - return msg; - } -} -- cgit v1.2.3