|
From: <caw...@us...> - 2006-12-15 15:29:08
|
Revision: 1703
http://svn.sourceforge.net/rubyeclipse/?rev=1703&view=rev
Author: cawilliams
Date: 2006-12-15 07:29:06 -0800 (Fri, 15 Dec 2006)
Log Message:
-----------
add a new test case wizard
Added Paths:
-----------
trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/wizards/
trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/wizards/MethodStubsSelectionButtonGroup.java
trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/wizards/NewTestCaseCreationWizard.java
trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/wizards/WizardMessages.java
trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/wizards/WizardMessages.properties
Added: trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/wizards/MethodStubsSelectionButtonGroup.java
===================================================================
--- trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/wizards/MethodStubsSelectionButtonGroup.java (rev 0)
+++ trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/wizards/MethodStubsSelectionButtonGroup.java 2006-12-15 15:29:06 UTC (rev 1703)
@@ -0,0 +1,419 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.rubypeople.rdt.internal.testunit.wizards;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+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.Display;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.rubypeople.rdt.internal.testunit.util.LayoutUtil;
+
+
+/**
+ * A group of controls used in the JUnit TestCase and TestSuite wizards
+ * for selecting method stubs to create.
+ */
+public class MethodStubsSelectionButtonGroup {
+
+ private Label fLabel;
+ protected String fLabelText;
+
+ private SelectionButtonGroupListener fGroupListener;
+
+ private boolean fEnabled;
+
+ private Composite fButtonComposite;
+
+ private Button[] fButtons;
+ private String[] fButtonNames;
+ private boolean[] fButtonsSelected;
+ private boolean[] fButtonsEnabled;
+
+ private int fGroupBorderStyle;
+ private int fGroupNumberOfColumns;
+ private int fButtonsStyle;
+
+
+ public interface SelectionButtonGroupListener {
+ /**
+ * The dialog field has changed.
+ * @param field The changed dialog field
+ */
+ void groupChanged(MethodStubsSelectionButtonGroup field);
+ }
+
+ /**
+ * Creates a group without border.
+ */
+ public MethodStubsSelectionButtonGroup(int buttonsStyle, String[] buttonNames, int nColumns) {
+ this(buttonsStyle, buttonNames, nColumns, SWT.NONE);
+ }
+
+ /**
+ * Creates a group with border (label in border).
+ * Accepted button styles are: SWT.RADIO, SWT.CHECK, SWT.TOGGLE
+ * For border styles see <code>Group</code>
+ */
+ public MethodStubsSelectionButtonGroup(int buttonsStyle, String[] buttonNames, int nColumns, int borderStyle) {
+ fEnabled= true;
+ fLabel= null;
+ fLabelText= ""; //$NON-NLS-1$
+
+ Assert.isTrue(buttonsStyle == SWT.RADIO || buttonsStyle == SWT.CHECK || buttonsStyle == SWT.TOGGLE);
+ fButtonNames= buttonNames;
+
+ int nButtons= buttonNames.length;
+ fButtonsSelected= new boolean[nButtons];
+ fButtonsEnabled= new boolean[nButtons];
+ for (int i= 0; i < nButtons; i++) {
+ fButtonsSelected[i]= false;
+ fButtonsEnabled[i]= true;
+ }
+
+ if (buttonsStyle == SWT.RADIO) {
+ fButtonsSelected[0]= true;
+ }
+
+ fGroupBorderStyle= borderStyle;
+ fGroupNumberOfColumns= (nColumns <= 0) ? nButtons : nColumns;
+
+ fButtonsStyle= buttonsStyle;
+ }
+
+ /*
+ * @see DialogField#doFillIntoGrid
+ */
+ public Control[] doFillIntoGrid(Composite parent, int nColumns) {
+ assertEnoughColumns(nColumns);
+
+ if (fGroupBorderStyle == SWT.NONE) {
+ Label label= getLabelControl(parent);
+ label.setLayoutData(gridDataForLabel(1));
+
+ Composite buttonsgroup= getSelectionButtonsGroup(parent);
+ GridData gd= new GridData();
+ gd.horizontalSpan= nColumns - 1;
+ buttonsgroup.setLayoutData(gd);
+ return new Control[] { label, buttonsgroup };
+ } else {
+ Composite buttonsgroup= getSelectionButtonsGroup(parent);
+ GridData gd= new GridData();
+ gd.horizontalSpan= nColumns;
+ buttonsgroup.setLayoutData(gd);
+ return new Control[] { buttonsgroup };
+ }
+ }
+
+ /*
+ * @see DialogField#doFillIntoGrid
+ */
+ public int getNumberOfControls() {
+ return (fGroupBorderStyle == SWT.NONE) ? 2 : 1;
+ }
+
+ private Button createSelectionButton(int index, Composite group, SelectionListener listener) {
+ Button button= new Button(group, fButtonsStyle | SWT.LEFT);
+ button.setFont(group.getFont());
+ button.setText(fButtonNames[index]);
+ button.setEnabled(isEnabled() && isEnabled(index));
+ button.setSelection(isSelected(index));
+ button.addSelectionListener(listener);
+ return button;
+ }
+
+
+ /**
+ * Returns the group widget. When called the first time, the widget will be created.
+ * @param parent composite when called the first time, or <code>null</code>
+ * after.
+ */
+ public Composite getSelectionButtonsGroup(Composite parent) {
+ if (fButtonComposite == null) {
+ assertCompositeNotNull(parent);
+
+ GridLayout layout= new GridLayout();
+ //layout.makeColumnsEqualWidth= true;
+ layout.numColumns= fGroupNumberOfColumns;
+
+ if (fGroupBorderStyle != SWT.NONE) {
+ Group group= new Group(parent, fGroupBorderStyle);
+ if (fLabelText != null && fLabelText.length() > 0) {
+ group.setText(fLabelText);
+ }
+ fButtonComposite= group;
+ } else {
+ fButtonComposite= new Composite(parent, SWT.NULL);
+ layout.marginHeight= 0;
+ layout.marginWidth= 0;
+ }
+ fButtonComposite.setLayout(layout);
+
+ SelectionListener listener= new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ doWidgetSelected(e);
+ }
+ public void widgetSelected(SelectionEvent e) {
+ doWidgetSelected(e);
+ }
+ };
+ int nButtons= fButtonNames.length;
+ fButtons= new Button[nButtons];
+
+ for (int i= 0; i < nButtons; i++) {
+ fButtons[i]= createSelectionButton(i, fButtonComposite, listener);
+ }
+ int nRows= nButtons / fGroupNumberOfColumns;
+ int nFillElements= nRows * fGroupNumberOfColumns - nButtons;
+ for (int i= 0; i < nFillElements; i++) {
+ createEmptySpace(fButtonComposite);
+ }
+ setSelectionGroupListener(new SelectionButtonGroupListener() {
+ public void groupChanged(MethodStubsSelectionButtonGroup field) {
+ field.setEnabled(1, isEnabled() && field.isSelected(0));
+ }
+ });
+ }
+ return fButtonComposite;
+ }
+
+ /**
+ * Returns a button from the group or <code>null</code> if not yet created.
+ */
+ public Button getSelectionButton(int index) {
+ if (index >= 0 && index < fButtons.length) {
+ return fButtons[index];
+ }
+ return null;
+ }
+
+ private void doWidgetSelected(SelectionEvent e) {
+ Button button= (Button)e.widget;
+ for (int i= 0; i < fButtons.length; i++) {
+ if (fButtons[i] == button) {
+ fButtonsSelected[i]= button.getSelection();
+ dialogFieldChanged();
+ return;
+ }
+ }
+ }
+
+ /**
+ * Returns the selection state of a button contained in the group.
+ * @param index of the button
+ */
+ public boolean isSelected(int index) {
+ if (index >= 0 && index < fButtonsSelected.length) {
+ return fButtonsSelected[index] && fButtonsEnabled[index];
+ }
+ return false;
+ }
+
+ /**
+ * Sets the selection state of a button contained in the group.
+ */
+ public void setSelection(int index, boolean selected) {
+ if (index >= 0 && index < fButtonsSelected.length) {
+ if (fButtonsSelected[index] != selected) {
+ fButtonsSelected[index]= selected;
+ if (fButtons != null) {
+ Button button= fButtons[index];
+ if (isOkToUse(button) && button.isEnabled()) {
+ button.setSelection(selected);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Returns the enabled state of a button contained in the group.
+ * @param index of the button
+ */
+ public boolean isEnabled(int index) {
+ if (index >= 0 && index < fButtonsEnabled.length) {
+ return fButtonsEnabled[index];
+ }
+ return false;
+ }
+
+ /**
+ * Sets the selection state of a button contained in the group.
+ */
+ public void setEnabled(int index, boolean enabled) {
+ if (index >= 0 && index < fButtonsEnabled.length) {
+ if (fButtonsEnabled[index] != enabled) {
+ fButtonsEnabled[index]= enabled;
+ if (fButtons != null) {
+ Button button= fButtons[index];
+ if (isOkToUse(button)) {
+ button.setEnabled(enabled);
+ if (!enabled) {
+ button.setSelection(false);
+ } else {
+ button.setSelection(fButtonsSelected[index]);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ protected void updateEnableState() {
+ if (fLabel != null) {
+ fLabel.setEnabled(fEnabled);
+ }
+ if (fButtons != null) {
+ boolean enabled= isEnabled();
+ for (int i= 0; i < fButtons.length; i++) {
+ Button button= fButtons[i];
+ if (isOkToUse(button)) {
+ button.setEnabled(enabled && fButtonsEnabled[i]);
+ }
+ }
+ }
+ }
+
+ /**
+ * Sets the label of the dialog field.
+ */
+ public void setLabelText(String labeltext) {
+ fLabelText= labeltext;
+ }
+
+ /**
+ * Defines the listener for this dialog field.
+ */
+ public final void setSelectionGroupListener(SelectionButtonGroupListener listener) {
+ fGroupListener= listener;
+ }
+
+ /**
+ * A dialog field has changed.
+ */
+ public void dialogFieldChanged() {
+ if (fGroupListener != null) {
+ fGroupListener.groupChanged(this);
+ }
+ }
+
+ /**
+ * Tries to set the focus to the dialog field.
+ * Returns <code>true</code> if the dialog field can take focus.
+ * To be re-implemented by dialog field implementors.
+ */
+ public boolean setFocus() {
+ return false;
+ }
+
+ /**
+ * Posts <code>setFocus</code> to the display event queue.
+ */
+ public void postSetFocusOnDialogField(Display display) {
+ if (display != null) {
+ display.asyncExec(
+ new Runnable() {
+ public void run() {
+ setFocus();
+ }
+ }
+ );
+ }
+ }
+
+ protected static GridData gridDataForLabel(int span) {
+ GridData gd= new GridData();
+ gd.horizontalSpan= span;
+ return gd;
+ }
+
+ /**
+ * Creates or returns the created label widget.
+ * @param parent The parent composite or <code>null</code> if the widget has
+ * already been created.
+ */
+ public Label getLabelControl(Composite parent) {
+ if (fLabel == null) {
+ assertCompositeNotNull(parent);
+
+ fLabel= new Label(parent, SWT.LEFT | SWT.WRAP);
+ fLabel.setFont(parent.getFont());
+ fLabel.setEnabled(fEnabled);
+ if (fLabelText != null && !"".equals(fLabelText)) { //$NON-NLS-1$
+ fLabel.setText(fLabelText);
+ } else {
+ // XXX: to avoid a 16 pixel wide empty label - revisit
+ fLabel.setText("."); //$NON-NLS-1$
+ fLabel.setVisible(false);
+ }
+ }
+ return fLabel;
+ }
+
+ /**
+ * Creates a spacer control.
+ * @param parent The parent composite
+ */
+ public static Control createEmptySpace(Composite parent) {
+ return createEmptySpace(parent, 1);
+ }
+
+ /**
+ * Creates a spacer control with the given span.
+ * The composite is assumed to have <code>MGridLayout</code> as
+ * layout.
+ * @param parent The parent composite
+ */
+ public static Control createEmptySpace(Composite parent, int span) {
+ return LayoutUtil.createEmptySpace(parent, span);
+ }
+
+ /**
+ * Tests is the control is not <code>null</code> and not disposed.
+ */
+ protected final boolean isOkToUse(Control control) {
+ return (control != null) && !(control.isDisposed());
+ }
+
+ // --------- enable / disable management
+
+ /**
+ * Sets the enable state of the dialog field.
+ */
+ public final void setEnabled(boolean enabled) {
+ if (enabled != fEnabled) {
+ fEnabled= enabled;
+ updateEnableState();
+ }
+ }
+
+ /**
+ * Gets the enable state of the dialog field.
+ */
+ public final boolean isEnabled() {
+ return fEnabled;
+ }
+
+ protected final void assertCompositeNotNull(Composite comp) {
+ Assert.isNotNull(comp, "uncreated control requested with composite null"); //$NON-NLS-1$
+ }
+
+ protected final void assertEnoughColumns(int nColumns) {
+ Assert.isTrue(nColumns >= getNumberOfControls(), "given number of columns is too small"); //$NON-NLS-1$
+ }
+}
Added: trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/wizards/NewTestCaseCreationWizard.java
===================================================================
--- trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/wizards/NewTestCaseCreationWizard.java (rev 0)
+++ trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/wizards/NewTestCaseCreationWizard.java 2006-12-15 15:29:06 UTC (rev 1703)
@@ -0,0 +1,252 @@
+package org.rubypeople.rdt.internal.testunit.wizards;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+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.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWizard;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+import org.rubypeople.rdt.core.RubyCore;
+import org.rubypeople.rdt.core.formatter.Indents;
+import org.rubypeople.rdt.internal.testunit.ui.TestunitPlugin;
+import org.rubypeople.rdt.internal.ui.RubyPluginImages;
+import org.rubypeople.rdt.internal.ui.actions.WorkbenchRunnableAdapter;
+import org.rubypeople.rdt.internal.ui.util.ExceptionHandler;
+import org.rubypeople.rdt.internal.ui.wizards.NewWizardMessages;
+import org.rubypeople.rdt.testunit.wizards.RubyNewTestCaseWizardPage;
+
+public class NewTestCaseCreationWizard extends Wizard implements INewWizard {
+
+ private static final String RUBY_FILE_EXTENSION = ".rb";
+ private RubyNewTestCaseWizardPage page;
+ private IStructuredSelection selection;
+
+ /**
+ * Constructor for SampleNewWizard.
+ */
+ public NewTestCaseCreationWizard() {
+ super();
+ setWindowTitle(WizardMessages.Wizard_title_new_testcase);
+ setDefaultPageImageDescriptor(RubyPluginImages.DESC_WIZBAN_NEWCLASS);
+ setNeedsProgressMonitor(true);
+ }
+
+ /**
+ * Adding the page to the wizard.
+ */
+
+ public void addPages() {
+ page = new RubyNewTestCaseWizardPage(selection);
+ page.init(selection);
+ addPage(page);
+ }
+
+ /**
+ * This method is called when 'Finish' button is pressed in the wizard. We
+ * will create an operation and run it using wizard as execution context.
+ */
+ public boolean performFinish() {
+ IWorkspaceRunnable op= new IWorkspaceRunnable() {
+ public void run(IProgressMonitor monitor) throws CoreException, OperationCanceledException {
+ try {
+ finishPage(monitor);
+ } catch (InterruptedException e) {
+ throw new OperationCanceledException(e.getMessage());
+ }
+ }
+ };
+ try {
+ ISchedulingRule rule= null;
+ Job job= Platform.getJobManager().currentJob();
+ if (job != null)
+ rule= job.getRule();
+ IRunnableWithProgress runnable= null;
+ if (rule != null)
+ runnable= new WorkbenchRunnableAdapter(op, rule, true);
+ else
+ runnable= new WorkbenchRunnableAdapter(op, getSchedulingRule());
+ getContainer().run(canRunForked(), true, runnable);
+ } catch (InvocationTargetException e) {
+ handleFinishException(getShell(), e);
+ return false;
+ } catch (InterruptedException e) {
+ return false;
+ }
+ return true;
+ }
+
+ protected boolean canRunForked() {
+ return true;
+ }
+
+ /**
+ * Returns the scheduling rule for creating the element.
+ */
+ protected ISchedulingRule getSchedulingRule() {
+ return ResourcesPlugin.getWorkspace().getRoot(); // look all by default
+ }
+
+ protected void handleFinishException(Shell shell, InvocationTargetException e) {
+ String title= NewWizardMessages.NewElementWizard_op_error_title;
+ String message= NewWizardMessages.NewElementWizard_op_error_message;
+ ExceptionHandler.handle(e, shell, title, message);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jdt.internal.ui.wizards.NewElementWizard#finishPage(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ protected void finishPage(IProgressMonitor monitor) throws InterruptedException, CoreException {
+ page.createType(monitor); // use the full progress monitor
+ }
+
+ /**
+ * The worker method. It will find the container, create the file if missing
+ * or just replace its contents, and open the editor on the newly created
+ * file.
+ * @param superclassName
+ */
+
+ private void doFinish(String containerName, String className, String superclassName, IProgressMonitor monitor)
+ throws CoreException {
+ // create a sample file
+ monitor.beginTask("Creating " + className, 2);
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ IResource resource = root.findMember(new Path(containerName));
+ if (!resource.exists() || !(resource instanceof IContainer)) {
+ throwCoreException("Container \"" + containerName + "\" does not exist.");
+ }
+ IContainer container = (IContainer) resource;
+ String fileName = classNameToFileName(className) + RUBY_FILE_EXTENSION;
+
+ final IFile file = container.getFile(new Path(fileName));
+ try {
+ InputStream stream = openContentStream(className, superclassName);
+ if (file.exists()) {
+ file.setContents(stream, true, true, monitor);
+ } else {
+ file.create(stream, true, monitor);
+ }
+ stream.close();
+ } catch (IOException e) {
+ }
+ monitor.worked(1);
+ monitor.setTaskName("Opening file for editing...");
+ getShell().getDisplay().asyncExec(new Runnable() {
+
+ public void run() {
+ IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
+ .getActivePage();
+ try {
+ IDE.openEditor(page, file, true);
+ } catch (PartInitException e) {
+ }
+ }
+ });
+ monitor.worked(1);
+ }
+
+ /**
+ * Convert a Constant Class Name (in camels) to a file name (all lowercase,
+ * uppercase characters get downcased and have underscores put in front,
+ * except first character.)
+ *
+ * @param className
+ * @return
+ */
+ private String classNameToFileName(String className) {
+ className = stripNamespace(className);
+ StringBuffer buffer = new StringBuffer();
+ for (int i = 0; i < className.length(); i++) {
+ char c = className.charAt(i);
+ if (Character.isUpperCase(c)) {
+ if (i != 0) buffer.append('_');
+ buffer.append(Character.toLowerCase(c));
+ } else {
+ buffer.append(c);
+ }
+ }
+ return buffer.toString();
+ }
+
+ private String stripNamespace(String className) {
+ if (className == null || className.length() == 0) return className;
+ if (className.lastIndexOf("::") != -1) {
+ return className.substring(className.lastIndexOf("::") + 2);
+ }
+ return className;
+ }
+
+ /**
+ * We will initialize file contents with a sample text.
+ *
+ * @param className
+ * The Filename chosen by the user
+ * @param superclassName
+ */
+
+ private InputStream openContentStream(String className, String superclassName) {
+ StringBuffer contents = new StringBuffer();
+ String endLine = System.getProperty("line.separator");
+ if (endLine == null) endLine = "\n";
+ contents.append("require 'test/unit'");
+ contents.append(endLine);
+
+ contents.append("class ");
+ contents.append(className);
+ contents.append(" < ");
+ contents.append(superclassName);
+ contents.append(endLine);
+
+ contents.append(Indents.createIndentString(1, RubyCore.getOptions()));
+ contents.append(endLine);
+
+ contents.append(Indents.createIndentString(1, RubyCore.getOptions()));
+ contents.append(endLine);
+
+ contents.append("end");
+ contents.append(endLine);
+ return new ByteArrayInputStream(contents.toString().getBytes());
+ }
+
+ private void throwCoreException(String message) throws CoreException {
+ IStatus status = new Status(IStatus.ERROR, TestunitPlugin.PLUGIN_ID, IStatus.OK, message, null);
+ throw new CoreException(status);
+ }
+
+ /**
+ * We will accept the selection in the workbench to see if we can initialize
+ * from it.
+ *
+ * @see IWorkbenchWizard#init(IWorkbench, IStructuredSelection)
+ */
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.selection = selection;
+ }
+}
\ No newline at end of file
Added: trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/wizards/WizardMessages.java
===================================================================
--- trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/wizards/WizardMessages.java (rev 0)
+++ trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/wizards/WizardMessages.java 2006-12-15 15:29:06 UTC (rev 1703)
@@ -0,0 +1,30 @@
+package org.rubypeople.rdt.internal.testunit.wizards;
+
+import org.eclipse.osgi.util.NLS;
+
+public class WizardMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.rubypeople.rdt.internal.testunit.wizards.WizardMessages";//$NON-NLS-1$
+ public static String NewTestCaseWizardPage_title;
+ public static String NewTestCaseWizardPage_description;
+ public static String Wizard_title_new_testcase;
+
+ public static String NewTestCaseWizardPage_method_Stub_label;
+ public static String NewTestCaseWizardPage_methodStub_setUp;
+ public static String NewTestCaseWizardPage_methodStub_tearDown;
+ public static String NewTestCaseWizardPage_methodStub_constructor;
+ public static String NewTestCaseWizardPage_class_to_test_label;
+ public static String NewTestCaseWizardPage_class_to_test_browse;
+ public static String NewTestCaseWizardPage_class_to_test_dialog_title;
+ public static String NewTestCaseWizardPage_class_to_test_dialog_message;
+ public static String NewTestCaseWizardPage_error_class_to_test_not_valid;
+ public static String NewTestCaseWizardPage_error_class_to_test_not_exist;
+ public static String NewTestCaseWizardPage_warning_class_to_test_is_interface;
+
+ private WizardMessages() {
+ // Do not instantiate
+ }
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, WizardMessages.class);
+ }
+}
Added: trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/wizards/WizardMessages.properties
===================================================================
--- trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/wizards/WizardMessages.properties (rev 0)
+++ trunk/org.rubypeople.rdt.testunit/src/org/rubypeople/rdt/internal/testunit/wizards/WizardMessages.properties 2006-12-15 15:29:06 UTC (rev 1703)
@@ -0,0 +1,16 @@
+NewTestCaseWizardPage_title=Test::Unit Test Case
+NewTestCaseWizardPage_description=This wizard creates a new Test::Unit Test case
+Wizard_title_new_testcase=New Test::Unit Test Case
+
+NewTestCaseWizardPage_method_Stub_label=Which method stubs would you like to create?
+NewTestCaseWizardPage_methodStub_setUp=set&Up()
+NewTestCaseWizardPage_methodStub_tearDown=&tearDown()
+NewTestCaseWizardPage_methodStub_constructor=&constructor
+
+NewTestCaseWizardPage_class_to_test_label=C&lass under test:
+NewTestCaseWizardPage_class_to_test_browse=B&rowse...
+NewTestCaseWizardPage_class_to_test_dialog_title=Class Under Test
+NewTestCaseWizardPage_class_to_test_dialog_message=Test stubs will be generated for class:
+NewTestCaseWizardPage_error_class_to_test_not_valid=Class under test is not valid.
+NewTestCaseWizardPage_error_class_to_test_not_exist=Class under test does not exist in current project.
+NewTestCaseWizardPage_warning_class_to_test_is_interface=Warning: Class under test ''{0}'' is an interface.
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|