mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 23:25:26 +02:00
[cleanup] organize imports: make not-exported classes internal in tests.framework
This commit is contained in:
parent
407435a206
commit
786f1d6fc7
19 changed files with 253 additions and 245 deletions
|
@ -2,10 +2,10 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %pluginName
|
||||
Bundle-SymbolicName: org.eclipse.rse.tests.framework.examples;singleton:=true
|
||||
Bundle-Version: 1.0.1.qualifier
|
||||
Bundle-Version: 1.0.100.qualifier
|
||||
Bundle-Vendor: %providerName
|
||||
Bundle-Localization: plugin
|
||||
Require-Bundle: org.junit,
|
||||
org.eclipse.rse.tests.framework
|
||||
Eclipse-LazyStart: true
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.4
|
||||
Export-Package: org.eclipse.rse.tests.framework.examples
|
||||
|
|
|
@ -2,11 +2,14 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %pluginName
|
||||
Bundle-SymbolicName: org.eclipse.rse.tests.framework;singleton:=true
|
||||
Bundle-Version: 1.0.2.qualifier
|
||||
Bundle-Activator: org.eclipse.rse.tests.framework.TestFrameworkPlugin
|
||||
Bundle-Version: 2.0.0.qualifier
|
||||
Bundle-Activator: org.eclipse.rse.internal.tests.framework.TestFrameworkPlugin
|
||||
Bundle-Vendor: %providerName
|
||||
Bundle-Localization: plugin
|
||||
Export-Package: org.eclipse.rse.tests.framework,
|
||||
Export-Package: org.eclipse.rse.internal.tests.framework;x-internal:=true,
|
||||
org.eclipse.rse.internal.tests.framework.actions;x-internal:=true,
|
||||
org.eclipse.rse.internal.tests.framework.ui;x-internal:=true,
|
||||
org.eclipse.rse.tests.framework,
|
||||
org.eclipse.rse.tests.framework.scripting
|
||||
Require-Bundle: org.eclipse.core.runtime,
|
||||
org.eclipse.ui,
|
||||
|
|
|
@ -15,7 +15,9 @@ bin.includes = META-INF/,\
|
|||
html/,\
|
||||
icons/,\
|
||||
schema/,\
|
||||
.
|
||||
.,\
|
||||
about.html
|
||||
jars.compile.order = .
|
||||
source.. = src/
|
||||
output.. = bin/
|
||||
src.includes = about.html
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</category>
|
||||
<view
|
||||
icon="icons/HolderView.gif"
|
||||
class="org.eclipse.rse.tests.framework.ui.TestSuiteHolderView"
|
||||
class="org.eclipse.rse.internal.tests.framework.ui.TestSuiteHolderView"
|
||||
category="org.eclipse.rse.projects.testing"
|
||||
name="%TestSuiteHolderView.view.name"
|
||||
id="org.eclipse.rse.tests.framework.HolderView">
|
||||
|
@ -41,7 +41,7 @@
|
|||
<action
|
||||
enablesFor="*"
|
||||
label="%SelectAllHoldersDelegate.label"
|
||||
class="org.eclipse.rse.tests.framework.actions.SelectAllHoldersDelegate"
|
||||
class="org.eclipse.rse.internal.tests.framework.actions.SelectAllHoldersDelegate"
|
||||
menubarPath="additions"
|
||||
id="org.eclipse.rse.tests.framework.SelectAllHolders"/>
|
||||
</viewerContribution>
|
||||
|
@ -51,13 +51,13 @@
|
|||
<action
|
||||
enablesFor="+"
|
||||
label="%ResetHolderDelegate.label"
|
||||
class="org.eclipse.rse.tests.framework.actions.ResetHolderDelegate"
|
||||
class="org.eclipse.rse.internal.tests.framework.actions.ResetHolderDelegate"
|
||||
menubarPath="additions"
|
||||
id="org.eclipse.rse.tests.framework.ResetHolder"/>
|
||||
<action
|
||||
enablesFor="+"
|
||||
label="%RunHolderDelegate.label"
|
||||
class="org.eclipse.rse.tests.framework.actions.RunHolderDelegate"
|
||||
class="org.eclipse.rse.internal.tests.framework.actions.RunHolderDelegate"
|
||||
menubarPath="additions"
|
||||
id="org.eclipse.rse.tests.framework.RunHolder"/>
|
||||
</objectContribution>
|
||||
|
@ -68,7 +68,7 @@
|
|||
id="org.eclipse.rse.tests.framework.HolderViewActions"
|
||||
targetID="org.eclipse.rse.tests.framework.HolderView">
|
||||
<action
|
||||
class="org.eclipse.rse.tests.framework.actions.ToggleRunInBackgroundDelegate"
|
||||
class="org.eclipse.rse.internal.tests.framework.actions.ToggleRunInBackgroundDelegate"
|
||||
icon="icons/GreenDot.gif"
|
||||
id="org.eclipse.rse.tests.framework.runInBackgroundToggle"
|
||||
label="%ToggleRunInBackgroundDelegate.label"
|
||||
|
@ -101,10 +101,10 @@
|
|||
<extension
|
||||
point="org.eclipse.rse.tests.framework.suites">
|
||||
<type
|
||||
class="org.eclipse.rse.tests.framework.impl.StandardTestSuiteHolder"
|
||||
class="org.eclipse.rse.internal.tests.framework.StandardTestSuiteHolder"
|
||||
name="standard"/>
|
||||
<type
|
||||
class="org.eclipse.rse.tests.framework.impl.TestSuiteGeneratorHolder"
|
||||
class="org.eclipse.rse.internal.tests.framework.TestSuiteGeneratorHolder"
|
||||
name="generated"/>
|
||||
<!--
|
||||
<type
|
||||
|
|
|
@ -62,6 +62,9 @@
|
|||
<documentation>
|
||||
The class of the test suite. This must be an extension of <code>junit.framework.TestSuite</code>.
|
||||
</documentation>
|
||||
<appInfo>
|
||||
<meta.attribute kind="java" basedOn="junit.framework.TestSuite"/>
|
||||
</appInfo>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="name" type="string" use="required">
|
||||
|
@ -157,7 +160,7 @@
|
|||
<meta.section type="copyright"/>
|
||||
</appInfo>
|
||||
<documentation>
|
||||
(c) Copyright IBM Corporation 2004, 2006.
|
||||
(c) Copyright 2004, 2007 IBM Corporation and others.
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
|
|
|
@ -1,42 +1,42 @@
|
|||
/* *******************************************************************************
|
||||
* Copyright (c) 2006 IBM Corporation. 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:
|
||||
* David Dykstal (IBM) - initial contribution.
|
||||
* *******************************************************************************/
|
||||
package org.eclipse.rse.tests.framework.impl;
|
||||
|
||||
import org.eclipse.rse.tests.framework.AbstractTestSuiteHolder;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
/**
|
||||
* A BasicHolder provides a simple wrapper for a test suite. Use this if you just want to contribute a JUnit
|
||||
* test suite that you already have without defining it in an extension point.
|
||||
*/
|
||||
public class BasicTestSuiteHolder extends AbstractTestSuiteHolder {
|
||||
|
||||
private TestSuite testSuite;
|
||||
|
||||
public BasicTestSuiteHolder(TestSuite testSuite) {
|
||||
this.testSuite = testSuite;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getName()
|
||||
*/
|
||||
public String getName() {
|
||||
return testSuite.getName();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getTestSuite()
|
||||
*/
|
||||
public TestSuite getTestSuite() {
|
||||
return testSuite;
|
||||
}
|
||||
|
||||
/* *******************************************************************************
|
||||
* Copyright (c) 2006 IBM Corporation. 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:
|
||||
* David Dykstal (IBM) - initial contribution.
|
||||
* *******************************************************************************/
|
||||
package org.eclipse.rse.internal.tests.framework;
|
||||
|
||||
import org.eclipse.rse.tests.framework.AbstractTestSuiteHolder;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
/**
|
||||
* A BasicHolder provides a simple wrapper for a test suite. Use this if you just want to contribute a JUnit
|
||||
* test suite that you already have without defining it in an extension point.
|
||||
*/
|
||||
public class BasicTestSuiteHolder extends AbstractTestSuiteHolder {
|
||||
|
||||
private TestSuite testSuite;
|
||||
|
||||
public BasicTestSuiteHolder(TestSuite testSuite) {
|
||||
this.testSuite = testSuite;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getName()
|
||||
*/
|
||||
public String getName() {
|
||||
return testSuite.getName();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.tests.framework.AbstractTestSuiteHolder#getTestSuite()
|
||||
*/
|
||||
public TestSuite getTestSuite() {
|
||||
return testSuite;
|
||||
}
|
||||
|
||||
}
|
|
@ -7,7 +7,7 @@
|
|||
* Contributors:
|
||||
* David Dykstal (IBM) - initial contribution.
|
||||
* *******************************************************************************/
|
||||
package org.eclipse.rse.tests.framework.impl;
|
||||
package org.eclipse.rse.internal.tests.framework;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
* Contributors:
|
||||
* David Dykstal (IBM) - initial contribution.
|
||||
* *******************************************************************************/
|
||||
package org.eclipse.rse.tests.framework;
|
||||
package org.eclipse.rse.internal.tests.framework;
|
||||
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
|
@ -7,7 +7,7 @@
|
|||
* Contributors:
|
||||
* David Dykstal (IBM) - initial contribution.
|
||||
* *******************************************************************************/
|
||||
package org.eclipse.rse.tests.framework.impl;
|
||||
package org.eclipse.rse.internal.tests.framework;
|
||||
|
||||
import junit.framework.TestSuite;
|
||||
|
|
@ -1,61 +1,61 @@
|
|||
/* *******************************************************************************
|
||||
* Copyright (c) 2006 IBM Corporation. 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:
|
||||
* David Dykstal (IBM) - initial contribution.
|
||||
* *******************************************************************************/
|
||||
package org.eclipse.rse.tests.framework.actions;
|
||||
|
||||
import java.util.Iterator;
|
||||
import org.eclipse.jface.action.IAction;
|
||||
import org.eclipse.jface.viewers.ISelection;
|
||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
import org.eclipse.rse.tests.framework.AbstractTestSuiteHolder;
|
||||
import org.eclipse.ui.IObjectActionDelegate;
|
||||
import org.eclipse.ui.IWorkbenchPart;
|
||||
|
||||
/**
|
||||
* This implements the delegate for the "Reset Test Suite" action presented in the UI.
|
||||
* The UI Proxy invokes this delegate.
|
||||
* @see IObjectActionDelegate
|
||||
*/
|
||||
public class ResetHolderDelegate implements IObjectActionDelegate {
|
||||
|
||||
private ISelection selection;
|
||||
|
||||
/**
|
||||
* The constructor.
|
||||
*/
|
||||
public ResetHolderDelegate() {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
|
||||
*/
|
||||
public void run(IAction action) {
|
||||
if (selection instanceof IStructuredSelection) {
|
||||
IStructuredSelection ss = (IStructuredSelection) selection;
|
||||
for (Iterator z = ss.iterator(); z.hasNext();) {
|
||||
AbstractTestSuiteHolder holder = (AbstractTestSuiteHolder) z.next();
|
||||
holder.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
|
||||
*/
|
||||
public void selectionChanged(IAction action, ISelection selection) {
|
||||
this.selection = selection;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart)
|
||||
*/
|
||||
public void setActivePart(IAction action, IWorkbenchPart targetPart) {
|
||||
}
|
||||
|
||||
/* *******************************************************************************
|
||||
* Copyright (c) 2006 IBM Corporation. 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:
|
||||
* David Dykstal (IBM) - initial contribution.
|
||||
* *******************************************************************************/
|
||||
package org.eclipse.rse.internal.tests.framework.actions;
|
||||
|
||||
import java.util.Iterator;
|
||||
import org.eclipse.jface.action.IAction;
|
||||
import org.eclipse.jface.viewers.ISelection;
|
||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
import org.eclipse.rse.tests.framework.AbstractTestSuiteHolder;
|
||||
import org.eclipse.ui.IObjectActionDelegate;
|
||||
import org.eclipse.ui.IWorkbenchPart;
|
||||
|
||||
/**
|
||||
* This implements the delegate for the "Reset Test Suite" action presented in the UI.
|
||||
* The UI Proxy invokes this delegate.
|
||||
* @see IObjectActionDelegate
|
||||
*/
|
||||
public class ResetHolderDelegate implements IObjectActionDelegate {
|
||||
|
||||
private ISelection selection;
|
||||
|
||||
/**
|
||||
* The constructor.
|
||||
*/
|
||||
public ResetHolderDelegate() {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
|
||||
*/
|
||||
public void run(IAction action) {
|
||||
if (selection instanceof IStructuredSelection) {
|
||||
IStructuredSelection ss = (IStructuredSelection) selection;
|
||||
for (Iterator z = ss.iterator(); z.hasNext();) {
|
||||
AbstractTestSuiteHolder holder = (AbstractTestSuiteHolder) z.next();
|
||||
holder.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
|
||||
*/
|
||||
public void selectionChanged(IAction action, ISelection selection) {
|
||||
this.selection = selection;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart)
|
||||
*/
|
||||
public void setActivePart(IAction action, IWorkbenchPart targetPart) {
|
||||
}
|
||||
|
||||
}
|
|
@ -7,7 +7,7 @@
|
|||
* Contributors:
|
||||
* David Dykstal (IBM) - initial contribution.
|
||||
* *******************************************************************************/
|
||||
package org.eclipse.rse.tests.framework.actions;
|
||||
package org.eclipse.rse.internal.tests.framework.actions;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.Iterator;
|
||||
|
@ -22,8 +22,8 @@ import org.eclipse.jface.operation.IRunnableWithProgress;
|
|||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.viewers.ISelection;
|
||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
import org.eclipse.rse.internal.tests.framework.TestFrameworkPlugin;
|
||||
import org.eclipse.rse.tests.framework.AbstractTestSuiteHolder;
|
||||
import org.eclipse.rse.tests.framework.TestFrameworkPlugin;
|
||||
import org.eclipse.ui.IObjectActionDelegate;
|
||||
import org.eclipse.ui.IWorkbenchPart;
|
||||
import org.eclipse.ui.IWorkbenchPartSite;
|
|
@ -1,52 +1,52 @@
|
|||
/* *******************************************************************************
|
||||
* Copyright (c) 2006 IBM Corporation. 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:
|
||||
* David Dykstal (IBM) - initial contribution.
|
||||
* *******************************************************************************/
|
||||
package org.eclipse.rse.tests.framework.actions;
|
||||
|
||||
import org.eclipse.jface.action.IAction;
|
||||
import org.eclipse.jface.viewers.ISelection;
|
||||
import org.eclipse.rse.tests.framework.ui.TestSuiteHolderView;
|
||||
import org.eclipse.ui.IViewActionDelegate;
|
||||
import org.eclipse.ui.IViewPart;
|
||||
|
||||
/**
|
||||
* This implements the delegate for the "Select All" action presented in the UI.
|
||||
* The UI Proxy invokes this delegate.
|
||||
* @see IViewActionDelegate
|
||||
*/
|
||||
public class SelectAllHoldersDelegate implements IViewActionDelegate {
|
||||
|
||||
private IViewPart view;
|
||||
|
||||
/**
|
||||
* The constructor.
|
||||
*/
|
||||
public SelectAllHoldersDelegate() {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
|
||||
*/
|
||||
public void run(IAction action) {
|
||||
((TestSuiteHolderView)view).selectAll();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
|
||||
*/
|
||||
public void selectionChanged(IAction action, ISelection selection) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
|
||||
*/
|
||||
public void init(IViewPart view) {
|
||||
this.view = view;
|
||||
}
|
||||
/* *******************************************************************************
|
||||
* Copyright (c) 2006 IBM Corporation. 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:
|
||||
* David Dykstal (IBM) - initial contribution.
|
||||
* *******************************************************************************/
|
||||
package org.eclipse.rse.internal.tests.framework.actions;
|
||||
|
||||
import org.eclipse.jface.action.IAction;
|
||||
import org.eclipse.jface.viewers.ISelection;
|
||||
import org.eclipse.rse.internal.tests.framework.ui.TestSuiteHolderView;
|
||||
import org.eclipse.ui.IViewActionDelegate;
|
||||
import org.eclipse.ui.IViewPart;
|
||||
|
||||
/**
|
||||
* This implements the delegate for the "Select All" action presented in the UI.
|
||||
* The UI Proxy invokes this delegate.
|
||||
* @see IViewActionDelegate
|
||||
*/
|
||||
public class SelectAllHoldersDelegate implements IViewActionDelegate {
|
||||
|
||||
private IViewPart view;
|
||||
|
||||
/**
|
||||
* The constructor.
|
||||
*/
|
||||
public SelectAllHoldersDelegate() {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
|
||||
*/
|
||||
public void run(IAction action) {
|
||||
((TestSuiteHolderView)view).selectAll();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
|
||||
*/
|
||||
public void selectionChanged(IAction action, ISelection selection) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
|
||||
*/
|
||||
public void init(IViewPart view) {
|
||||
this.view = view;
|
||||
}
|
||||
}
|
|
@ -7,12 +7,12 @@
|
|||
* Contributors:
|
||||
* David Dykstal (IBM) - initial contribution.
|
||||
* *******************************************************************************/
|
||||
package org.eclipse.rse.tests.framework.actions;
|
||||
package org.eclipse.rse.internal.tests.framework.actions;
|
||||
|
||||
import org.eclipse.jface.action.IAction;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.viewers.ISelection;
|
||||
import org.eclipse.rse.tests.framework.TestFrameworkPlugin;
|
||||
import org.eclipse.rse.internal.tests.framework.TestFrameworkPlugin;
|
||||
import org.eclipse.ui.IViewActionDelegate;
|
||||
import org.eclipse.ui.IViewPart;
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
* Contributors:
|
||||
* David Dykstal (IBM) - initial contribution.
|
||||
* *******************************************************************************/
|
||||
package org.eclipse.rse.tests.framework.ui;
|
||||
package org.eclipse.rse.internal.tests.framework.ui;
|
||||
|
||||
import org.eclipse.ui.IPageLayout;
|
||||
import org.eclipse.ui.IPerspectiveFactory;
|
|
@ -7,7 +7,7 @@
|
|||
* Contributors:
|
||||
* David Dykstal (IBM) - initial contribution.
|
||||
* *******************************************************************************/
|
||||
package org.eclipse.rse.tests.framework.ui;
|
||||
package org.eclipse.rse.internal.tests.framework.ui;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
|
@ -7,7 +7,7 @@
|
|||
* Contributors:
|
||||
* David Dykstal (IBM) - initial contribution.
|
||||
* *******************************************************************************/
|
||||
package org.eclipse.rse.tests.framework.ui;
|
||||
package org.eclipse.rse.internal.tests.framework.ui;
|
||||
|
||||
import java.net.URL;
|
||||
import java.text.DateFormat;
|
||||
|
@ -31,11 +31,11 @@ import org.eclipse.jface.viewers.StructuredSelection;
|
|||
import org.eclipse.jface.viewers.TableViewer;
|
||||
import org.eclipse.jface.viewers.Viewer;
|
||||
import org.eclipse.jface.viewers.ViewerSorter;
|
||||
import org.eclipse.rse.internal.tests.framework.TestFrameworkPlugin;
|
||||
import org.eclipse.rse.tests.framework.AbstractTestSuiteHolder;
|
||||
import org.eclipse.rse.tests.framework.DelegatingTestSuiteHolder;
|
||||
import org.eclipse.rse.tests.framework.ITestSuiteHolder;
|
||||
import org.eclipse.rse.tests.framework.ITestSuiteHolderListener;
|
||||
import org.eclipse.rse.tests.framework.TestFrameworkPlugin;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
import org.eclipse.swt.events.SelectionListener;
|
|
@ -1,65 +1,65 @@
|
|||
/* *******************************************************************************
|
||||
* Copyright (c) 2006 IBM Corporation. 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:
|
||||
* David Dykstal (IBM) - initial contribution.
|
||||
* *******************************************************************************/
|
||||
package org.eclipse.rse.tests.framework.ui;
|
||||
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.eclipse.swt.widgets.Canvas;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.ui.part.ViewPart;
|
||||
|
||||
/**
|
||||
* Provides a view of any image that needs to be displayed by a test case.
|
||||
*/
|
||||
public class TestSuiteImageView extends ViewPart {
|
||||
|
||||
private Canvas imageCanvas;
|
||||
private Image image;
|
||||
private Color backgroundColor;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
|
||||
*/
|
||||
public void createPartControl(Composite parent) {
|
||||
imageCanvas = new Canvas(parent, SWT.H_SCROLL | SWT.V_SCROLL);
|
||||
backgroundColor = new Color(parent.getDisplay(), new RGB(255, 255, 255));
|
||||
clearImage();
|
||||
}
|
||||
|
||||
public void setImage(ImageDescriptor descriptor) {
|
||||
clearImage();
|
||||
image = descriptor.createImage();
|
||||
imageCanvas.setBackgroundImage(image);
|
||||
}
|
||||
|
||||
public void clearImage() {
|
||||
if (imageCanvas != null) {
|
||||
imageCanvas.setBackground(backgroundColor);
|
||||
}
|
||||
if (image != null) {
|
||||
image.dispose();
|
||||
}
|
||||
image = null;
|
||||
}
|
||||
|
||||
public void setFocus() {
|
||||
}
|
||||
|
||||
public void dispose() {
|
||||
clearImage();
|
||||
backgroundColor.dispose();
|
||||
}
|
||||
|
||||
/* *******************************************************************************
|
||||
* Copyright (c) 2006 IBM Corporation. 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:
|
||||
* David Dykstal (IBM) - initial contribution.
|
||||
* *******************************************************************************/
|
||||
package org.eclipse.rse.internal.tests.framework.ui;
|
||||
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.eclipse.swt.widgets.Canvas;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.ui.part.ViewPart;
|
||||
|
||||
/**
|
||||
* Provides a view of any image that needs to be displayed by a test case.
|
||||
*/
|
||||
public class TestSuiteImageView extends ViewPart {
|
||||
|
||||
private Canvas imageCanvas;
|
||||
private Image image;
|
||||
private Color backgroundColor;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
|
||||
*/
|
||||
public void createPartControl(Composite parent) {
|
||||
imageCanvas = new Canvas(parent, SWT.H_SCROLL | SWT.V_SCROLL);
|
||||
backgroundColor = new Color(parent.getDisplay(), new RGB(255, 255, 255));
|
||||
clearImage();
|
||||
}
|
||||
|
||||
public void setImage(ImageDescriptor descriptor) {
|
||||
clearImage();
|
||||
image = descriptor.createImage();
|
||||
imageCanvas.setBackgroundImage(image);
|
||||
}
|
||||
|
||||
public void clearImage() {
|
||||
if (imageCanvas != null) {
|
||||
imageCanvas.setBackground(backgroundColor);
|
||||
}
|
||||
if (image != null) {
|
||||
image.dispose();
|
||||
}
|
||||
image = null;
|
||||
}
|
||||
|
||||
public void setFocus() {
|
||||
}
|
||||
|
||||
public void dispose() {
|
||||
clearImage();
|
||||
backgroundColor.dispose();
|
||||
}
|
||||
|
||||
}
|
|
@ -12,9 +12,9 @@ package org.eclipse.rse.tests.framework.scripting;
|
|||
import java.net.URL;
|
||||
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.eclipse.rse.tests.framework.ui.TestSuiteConsoleView;
|
||||
import org.eclipse.rse.tests.framework.ui.TestSuiteHolderView;
|
||||
import org.eclipse.rse.tests.framework.ui.TestSuiteImageView;
|
||||
import org.eclipse.rse.internal.tests.framework.ui.TestSuiteConsoleView;
|
||||
import org.eclipse.rse.internal.tests.framework.ui.TestSuiteHolderView;
|
||||
import org.eclipse.rse.internal.tests.framework.ui.TestSuiteImageView;
|
||||
import org.eclipse.ui.IViewPart;
|
||||
import org.eclipse.ui.IViewReference;
|
||||
import org.eclipse.ui.IViewSite;
|
||||
|
|
|
@ -15,7 +15,7 @@ import org.eclipse.core.runtime.ILog;
|
|||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Plugin;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.rse.tests.framework.TestFrameworkPlugin;
|
||||
import org.eclipse.rse.internal.tests.framework.TestFrameworkPlugin;
|
||||
import org.osgi.framework.Bundle;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue