Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiklos Hartmann2017-05-22 07:22:05 +0000
committerMarvin Mueller2017-07-19 08:58:03 +0000
commitca2bd6550c2a74f3a30547e469e1ef3f3306e938 (patch)
treec752e4527e38e75677d8d386981125d427c2906d
parent8de4510bdcd806df350cd4da1af01a62470f1996 (diff)
downloadorg.eclipse.jubula.core-ca2bd6550c2a74f3a30547e469e1ef3f3306e938.tar.gz
org.eclipse.jubula.core-ca2bd6550c2a74f3a30547e469e1ef3f3306e938.tar.xz
org.eclipse.jubula.core-ca2bd6550c2a74f3a30547e469e1ef3f3306e938.zip
JUB 1877: Selecting the category where new SpecTC is added in case of Save As New and Extract Test Case.
Change-Id: I516623f26958d79bc18c334fb4df3c0ea20ae256 Signed-off-by: Miklos Hartmann <miklos.hartmann@z-consulting.eu>
-rw-r--r--org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/i18n/messages.properties2
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/dialogs/InputDialog.java18
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/dialogs/TestCaseTreeDialog.java176
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/AbstractRefactorHandler.java130
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/ExtractTestCaseHandler.java32
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/SaveAsNewTestCaseHandler.java80
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/open/OpenTestCase.java1
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/i18n/Messages.java3
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/i18n/messages.properties5
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/provider/contentprovider/TestCaseTreeCompositeContentProvider.java63
-rw-r--r--org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/widgets/TestCaseTreeComposite.java60
-rw-r--r--org.eclipse.jubula.documentation/releasenotes/en/docbook/8.6.0/features.xml36
-rw-r--r--org.eclipse.jubula.documentation/userManual/en/docbook/tasks/workWithEditors/sectionExtractingTestCasesFromEditors.xml9
-rw-r--r--org.eclipse.jubula.documentation/userManual/en/docbook/tasks/workWithEditors/sectionSavingTestCasesFromAnEditorAsNewTestCase.xml5
14 files changed, 459 insertions, 161 deletions
diff --git a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/i18n/messages.properties b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/i18n/messages.properties
index 7bf25402e..e548f28f8 100644
--- a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/i18n/messages.properties
+++ b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/i18n/messages.properties
@@ -363,7 +363,7 @@ TheSecondNameMustNotBeNull=The second name must not be null
TheUniqueIdMustNotBeNull=The unique id must not be null
TimeoutCalled=timeout() called
TimeoutExpired=timeout expired
-TimeoutOccuredGettingCompAUT=timeout occurred getting all components from AUT
+TimeoutOccurredGettingCompAUT=timeout occurred getting all components from AUT
Timestamp=Timestamp
TooltipWarningInChildren=Warning in Children
TooltipErrorInChildren=Error in Children
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/dialogs/InputDialog.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/dialogs/InputDialog.java
index f89e36fb9..9dd950864 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/dialogs/InputDialog.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/dialogs/InputDialog.java
@@ -246,13 +246,7 @@ public class InputDialog extends TitleAreaDialog {
* @return false, if the name field contents an error: the name starts or end with a blank, or the field is empty
*/
boolean modifyNameFieldAction() {
- boolean isCorrect = true;
- int nameLength = m_nameField.getText().length();
- if ((nameLength == 0) || (m_nameField.getText().startsWith(
- StringConstants.SPACE))
- || (m_nameField.getText().charAt(nameLength - 1) == ' ')) {
- isCorrect = false;
- }
+ boolean isCorrect = validateTCName(m_nameField.getText());
if (isCorrect) {
enableOKButton();
if (!isInputAllowed()) {
@@ -269,6 +263,16 @@ public class InputDialog extends TitleAreaDialog {
}
/**
+ * A simple TC name validator - should not be empty or start / end with space
+ * @param name the TC name
+ * @return whether the name is valid
+ */
+ public static boolean validateTCName(String name) {
+ return name.length() > 0 && !name.startsWith(StringConstants.SPACE)
+ && !name.endsWith(StringConstants.SPACE);
+ }
+
+ /**
* @return False, if the input name already exists.
*/
protected boolean isInputAllowed() {
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/dialogs/TestCaseTreeDialog.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/dialogs/TestCaseTreeDialog.java
index d2d536e5f..148b8ed18 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/dialogs/TestCaseTreeDialog.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/dialogs/TestCaseTreeDialog.java
@@ -10,27 +10,38 @@
*******************************************************************************/
package org.eclipse.jubula.client.ui.rcp.dialogs;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jubula.client.core.model.INodePO;
import org.eclipse.jubula.client.core.model.ISpecTestCasePO;
import org.eclipse.jubula.client.ui.constants.IconConstants;
import org.eclipse.jubula.client.ui.rcp.i18n.Messages;
import org.eclipse.jubula.client.ui.rcp.widgets.TestCaseTreeComposite;
import org.eclipse.jubula.client.ui.utils.LayoutUtil;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.ISelectionListener;
@@ -68,14 +79,38 @@ public class TestCaseTreeDialog extends TitleAreaDialog {
/** the TestCase which should be parent of the shown TestCases */
private ISpecTestCasePO m_parentTestCase;
-
+
+ /** The last selection to allow simple (non-listener) usage of the dialog */
+ private ISelection m_lastSel;
+
/** the style of the tree */
private int m_treeStyle = SWT.SINGLE;
/** the add button */
private Button m_addButton;
/** the image of the title area */
- private Image m_image = IconConstants.ADD_TC_DIALOG_IMAGE;
-
+ private Image m_image = IconConstants.ADD_TC_DIALOG_IMAGE;
+
+ /** Whether to show only categories */
+ private boolean m_onlyCategories = false;
+
+ /** Whether to show reused projects */
+ private boolean m_reuseds = true;
+
+ /** The node to select upon opening the dialog */
+ private Object m_preSelect = null;
+
+ /**
+ * The text shown above the optional Text field.
+ * If null, the text field is not shown.
+ */
+ private String m_enterTextLabel = null;
+
+ /** The text entered into the optional text field */
+ private String m_enteredText = null;
+
+ /** The preset text */
+ private String m_presetText = null;
+
/**
* <code>testcaseTreeComposite</code>
*/
@@ -156,10 +191,44 @@ public class TestCaseTreeDialog extends TitleAreaDialog {
parent.setLayout(gridLayoutParent);
LayoutUtil.createSeparator(parent);
+ if (m_enterTextLabel != null) {
+ Composite textPar = new Composite(parent, SWT.NONE);
+ textPar.setLayoutData(
+ new GridData(SWT.FILL, SWT.FILL, true, false));
+ GridLayout gr = new GridLayout();
+ gr.numColumns = NUM_COLUMNS_1;
+ gr.marginWidth = 5;
+ textPar.setLayout(gr);
+ Label lab = new Label(textPar, SWT.NONE);
+ lab.setText(m_enterTextLabel);
+ Text text = new Text(textPar, SWT.SINGLE | SWT.BORDER);
+ GridData dat = new GridData(SWT.FILL, SWT.FILL, true, false);
+ LayoutUtil.addToolTipAndMaxWidth(dat, text);
+ text.setLayoutData(dat);
+ if (m_presetText != null) {
+ text.setText(m_presetText);
+ m_enteredText = m_presetText;
+ }
+ text.addModifyListener(new ModifyListener() {
- m_testcaseTreeComposite = new TestCaseTreeComposite(parent,
- m_treeStyle, m_parentTestCase);
+ @Override
+ public void modifyText(ModifyEvent e) {
+ m_enteredText = ((Text) e.getSource()).getText();
+ m_addButton.setEnabled(
+ checkDataValidityAndSetErrorMessage());
+ }
+
+ });
+ LayoutUtil.createSeparator(parent);
+ }
+ if (m_parentTestCase != null) {
+ m_testcaseTreeComposite = new TestCaseTreeComposite(parent,
+ m_treeStyle, m_parentTestCase);
+ } else {
+ m_testcaseTreeComposite = new TestCaseTreeComposite(parent,
+ m_treeStyle, m_reuseds, m_onlyCategories);
+ }
LayoutUtil.createSeparator(parent);
return m_testcaseTreeComposite;
}
@@ -171,7 +240,6 @@ public class TestCaseTreeDialog extends TitleAreaDialog {
protected void createButtonsForButtonBar(Composite parent) {
// Add-Button
m_addButton = createButton(parent, ADD, m_addButtonText, true);
- m_addButton.setEnabled(false);
m_addButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
notifyListener();
@@ -179,7 +247,8 @@ public class TestCaseTreeDialog extends TitleAreaDialog {
close();
}
});
- m_testcaseTreeComposite.getTreeViewer().addSelectionChangedListener(
+ TreeViewer tv = m_testcaseTreeComposite.getTreeViewer();
+ tv.addSelectionChangedListener(
new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent e) {
if (e.getSelection() != null) {
@@ -188,14 +257,14 @@ public class TestCaseTreeDialog extends TitleAreaDialog {
}
});
- m_testcaseTreeComposite.getTreeViewer().addSelectionChangedListener(
+ tv.addSelectionChangedListener(
new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
- m_addButton.setEnabled(m_testcaseTreeComposite
- .hasValidSelection());
+ m_addButton.setEnabled(
+ checkDataValidityAndSetErrorMessage());
}
});
- m_testcaseTreeComposite.getTreeViewer().addDoubleClickListener(
+ tv.addDoubleClickListener(
new IDoubleClickListener() {
public void doubleClick(DoubleClickEvent event) {
if (!m_addButton.getEnabled()) {
@@ -207,6 +276,10 @@ public class TestCaseTreeDialog extends TitleAreaDialog {
}
});
+ if (m_preSelect != null) {
+ tv.getControl().setFocus();
+ tv.setSelection(new StructuredSelection(m_preSelect));
+ }
// Cancel-Button
Button cancelButton = createButton(parent, CANCEL,
Messages.TestCaseTableDialogCancel, false);
@@ -216,7 +289,24 @@ public class TestCaseTreeDialog extends TitleAreaDialog {
close();
}
});
- }
+ m_addButton.setEnabled(checkDataValidityAndSetErrorMessage());
+ }
+
+ /**
+ * @return whether the data entered to the dialog is valid.
+ */
+ private boolean checkDataValidityAndSetErrorMessage() {
+ boolean nameValid = true;
+ if (m_enterTextLabel != null) {
+ nameValid = InputDialog.validateTCName(m_enteredText);
+ if (!nameValid) {
+ setErrorMessage(Messages.RenameActionTCError);
+ } else {
+ setErrorMessage(null);
+ }
+ }
+ return nameValid && m_testcaseTreeComposite.hasValidSelection();
+ }
/**
* Adds the given ISelectionListener to this dialog
@@ -242,9 +332,67 @@ public class TestCaseTreeDialog extends TitleAreaDialog {
* Note: The IWorkbenchPart-Parameter of the listener is set to null!
*/
void notifyListener() {
+ m_lastSel = m_testcaseTreeComposite.getTreeViewer().getSelection();
for (ISelectionListener listener : m_selectionListenerList) {
- listener.selectionChanged(null, m_testcaseTreeComposite
- .getTreeViewer().getSelection());
+ listener.selectionChanged(null, m_lastSel);
}
}
+
+ /**
+ * @param onlyCats whether to show only categories
+ */
+ public void setOnlyCategories(boolean onlyCats) {
+ m_onlyCategories = onlyCats;
+ }
+
+ /**
+ * @param reuseds whether to show reused projects
+ */
+ public void setReuseds(boolean reuseds) {
+ m_reuseds = reuseds;
+ }
+
+ /**
+ * Sets the node to be selected upon opening the dialog
+ * @param pre the Node to be pre-selected.
+ */
+ public void setPreSelect(Object pre) {
+ m_preSelect = pre;
+ }
+
+ /**
+ * Sets the label text above the optional Text field.
+ * If null, no Text field is shown.
+ * @param label the label text
+ * @param preset text to preset the text field
+ */
+ public void setEnterTextLabel(String label, String preset) {
+ m_enterTextLabel = label;
+ m_presetText = preset;
+ }
+
+ /**
+ * @return the list of the selected nodes
+ */
+ public List<INodePO> getSelection() {
+ List<INodePO> res = new ArrayList<>();
+ if (m_lastSel instanceof IStructuredSelection) {
+ for (Iterator it = ((IStructuredSelection) m_lastSel).iterator();
+ it.hasNext(); ) {
+ Object next = it.next();
+ if (next instanceof INodePO) {
+ res.add((INodePO) next);
+ }
+ }
+ }
+ return res;
+ }
+
+ /**
+ * Returns the optional entered text (can be null)
+ * @return the text
+ */
+ public String getEnteredText() {
+ return m_enteredText;
+ }
} \ No newline at end of file
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/AbstractRefactorHandler.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/AbstractRefactorHandler.java
index 69abebebf..bc58eff2d 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/AbstractRefactorHandler.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/AbstractRefactorHandler.java
@@ -19,19 +19,19 @@ import org.eclipse.jface.window.Window;
import org.eclipse.jubula.client.core.businessprocess.ParamNameBPDecorator;
import org.eclipse.jubula.client.core.constants.InitialValueConstants;
import org.eclipse.jubula.client.core.model.IExecTestCasePO;
+import org.eclipse.jubula.client.core.model.INodePO;
import org.eclipse.jubula.client.core.model.IParamDescriptionPO;
import org.eclipse.jubula.client.core.model.ISpecTestCasePO;
import org.eclipse.jubula.client.core.model.ITcParamDescriptionPO;
-import org.eclipse.jubula.client.ui.constants.ContextHelpIds;
+import org.eclipse.jubula.client.core.persistence.GeneralStorage;
import org.eclipse.jubula.client.ui.constants.IconConstants;
import org.eclipse.jubula.client.ui.handlers.AbstractSelectionBasedHandler;
-import org.eclipse.jubula.client.ui.rcp.Plugin;
-import org.eclipse.jubula.client.ui.rcp.dialogs.InputDialog;
+import org.eclipse.jubula.client.ui.rcp.dialogs.TestCaseTreeDialog;
import org.eclipse.jubula.client.ui.rcp.editors.AbstractTestCaseEditor;
import org.eclipse.jubula.client.ui.rcp.i18n.Messages;
-import org.eclipse.jubula.client.ui.utils.DialogUtils;
import org.eclipse.jubula.client.ui.utils.ErrorHandlingUtil;
import org.eclipse.jubula.tools.internal.messagehandling.MessageIDs;
+import org.eclipse.swt.SWT;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.handlers.HandlerUtil;
@@ -41,55 +41,19 @@ import org.eclipse.ui.handlers.HandlerUtil;
*/
public abstract class AbstractRefactorHandler
extends AbstractSelectionBasedHandler {
- /**
- * @param event
- * the execution event
- * @return the new name for the test case or <code>null</code> to indicate
- * that this action has been canceled
- */
- protected String getNewTestCaseName(ExecutionEvent event) {
- String newTcName = null;
- IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
- if (activePart instanceof AbstractTestCaseEditor) {
- final AbstractTestCaseEditor editor = (AbstractTestCaseEditor)
- activePart;
- if (editor.isDirty()) {
- Dialog editorDirtyDlg = ErrorHandlingUtil
- .createMessageDialog(MessageIDs.Q_SAVE_AND_EXTRACT);
- if (editorDirtyDlg.getReturnCode() != Window.OK) {
- return null;
- }
- editor.doSave(new NullProgressMonitor());
- }
- String extractedTCName = getNewName(editor);
- InputDialog dialog = new InputDialog(getActiveShell(),
- Messages.NewTestCaseActionTCTitle, extractedTCName,
- Messages.NewTestCaseActionTCMessage,
- Messages.RenameActionTCLabel, Messages.RenameActionTCError,
- Messages.NewTestCaseActionDoubleTCName,
- IconConstants.NEW_TC_DIALOG_STRING,
- Messages.NewTestCaseActionTCShell, false);
- dialog.setHelpAvailable(true);
- dialog.create();
- DialogUtils.setWidgetNameForModalDialog(dialog);
- Plugin.getHelpSystem().setHelp(dialog.getShell(),
- ContextHelpIds.DIALOG_TESTCASE_EXTRACT);
- dialog.open();
- int retCode = dialog.getReturnCode();
- dialog.close();
- if (retCode == Window.OK) {
- newTcName = dialog.getName();
- }
- }
- return newTcName;
- }
-
+
+ /** The name of the new TC */
+ private String m_newTCName = null;
+
+ /** The category where to store the new TC */
+ private INodePO m_selectedCategory = null;
+
/**
* @param editor
* the current editor
* @return the new extracted test case name
*/
- private String getNewName(AbstractTestCaseEditor editor) {
+ private String getSuggestedName(AbstractTestCaseEditor editor) {
String newName = InitialValueConstants.DEFAULT_TEST_CASE_NAME;
final IStructuredSelection cs = (IStructuredSelection) editor
.getTreeViewer().getSelection();
@@ -117,4 +81,74 @@ public abstract class AbstractRefactorHandler
mapper.registerParamDescriptions((ITcParamDescriptionPO) desc);
}
}
+
+ /**
+ * Asks from the user the new TC name and the category where to save it.
+ * Includes business logic to handle 'Back' button when choosing Category.
+ * @param editor the Test Case Editor
+ * @return whether the operation can commence
+ */
+ protected boolean askNewNameAndCategory(AbstractTestCaseEditor editor) {
+ TestCaseTreeDialog dialog = new TestCaseTreeDialog(
+ getActiveShell(),
+ Messages.SelectCategoryDialogTitle,
+ Messages.SelectCategoryDialogMessage,
+ null,
+ Messages.SelectCategoryDialogTitle,
+ SWT.SINGLE, IconConstants.OPEN_TC_DIALOG_IMAGE);
+ dialog.setReuseds(false);
+ dialog.setOnlyCategories(true);
+ dialog.setEnterTextLabel(Messages.RefactorTCOptTextLabel,
+ getSuggestedName(editor));
+ // not very nice, but at this point we make use of the knowledge
+ // that what nodes are in the TreeViewer (we told this to the Dialog...)
+ dialog.setPreSelect(GeneralStorage.getInstance().
+ getProject().getSpecObjCont());
+ dialog.open();
+ if (dialog.getReturnCode() != TestCaseTreeDialog.ADD
+ || dialog.getSelection().isEmpty()) {
+ return false;
+ }
+ m_newTCName = dialog.getEnteredText();
+ m_selectedCategory = dialog.getSelection().get(0);
+ return m_newTCName != null && m_selectedCategory != null;
+ }
+
+ /**
+ * @return the name of the new TC
+ */
+ protected String getNewTCName() {
+ return m_newTCName;
+ }
+
+ /**
+ * @return the category where to save the new TC
+ */
+ protected INodePO getCategory() {
+ return m_selectedCategory;
+ }
+
+ /**
+ * Performs preliminary checks
+ * @param event the ExecutionEvent
+ * @return whether the operation can commence
+ */
+ protected boolean prepareForRefactoring(ExecutionEvent event) {
+ String newTcName = null;
+ IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
+ if (!(activePart instanceof AbstractTestCaseEditor)) {
+ return false;
+ }
+ final AbstractTestCaseEditor editor = (AbstractTestCaseEditor)
+ activePart;
+ if (editor.isDirty()) {
+ Dialog editorDirtyDlg = ErrorHandlingUtil
+ .createMessageDialog(MessageIDs.Q_SAVE_AND_EXTRACT);
+ if (editorDirtyDlg.getReturnCode() != Window.OK) {
+ return false;
+ }
+ editor.doSave(new NullProgressMonitor());
+ }
+ return true;
+ }
}
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/ExtractTestCaseHandler.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/ExtractTestCaseHandler.java
index a3fbc0b3f..44c0b39cb 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/ExtractTestCaseHandler.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/ExtractTestCaseHandler.java
@@ -58,20 +58,23 @@ import org.eclipse.ui.handlers.HandlerUtil;
public class ExtractTestCaseHandler extends AbstractRefactorHandler {
/** {@inheritDoc} */
public Object executeImpl(ExecutionEvent event) {
+ if (!prepareForRefactoring(event)) {
+ return null;
+ }
final AbstractTestCaseEditor editor = (AbstractTestCaseEditor)
HandlerUtil.getActivePart(event);
- String newTestCaseName = getNewTestCaseName(event);
- if (newTestCaseName == null) {
+ if (!askNewNameAndCategory(editor)) {
return null;
}
-
+ // we have a non-null name and category
+
editor.getEditorHelper().getClipboard().clearContents();
final INodePO node = (INodePO) editor.getEditorHelper()
.getEditSupport().getOriginal();
if (node != null) {
validateNode(node);
- IExecTestCasePO exec = performExtraction(newTestCaseName, node,
- getSelection());
+ IExecTestCasePO exec = performExtraction(getNewTCName(), node,
+ getSelection(), getCategory());
try {
editor.reOpenEditor(node);
editor.getTreeViewer().setSelection(
@@ -131,27 +134,28 @@ public class ExtractTestCaseHandler extends AbstractRefactorHandler {
private ParamNameBPDecorator m_mapper = new ParamNameBPDecorator(
ParamNameBP.getInstance());
- /** The SpecObjCont */
- private INodePO m_cont = GeneralStorage.getInstance().
- getProject().getSpecObjCont();
+ /** The category where the new SpecTC should be added */
+ private INodePO m_category;
/**
* Constructor
* @param owner the Spec TC containing the extracted nodes
* @param modNodes the extracted nodes (they must have the same parent)
* @param name the name of the new Spec TC
+ * @param category the category where the new Spec TC should be added
*/
public ExtractOperation(INodePO owner, List<INodePO> modNodes,
- String name) {
+ String name, INodePO category) {
m_modNodes = modNodes;
m_owner = owner;
m_specName = name;
+ m_category = category;
}
/** {@inheritDoc} */
public Collection<? extends IPersistentObject> getToLock() {
m_lock = new ArrayList<>(2);
- m_lock.add(m_cont);
+ m_lock.add(m_category);
m_lock.add(m_owner);
return m_lock;
}
@@ -180,7 +184,7 @@ public class ExtractTestCaseHandler extends AbstractRefactorHandler {
m_mapper.persist(sess, GeneralStorage.getInstance().getProject()
.getId());
NativeSQLUtils.addNodeAFFECTS(sess, m_exec.getSpecTestCase(),
- m_cont);
+ m_category);
}
/**
@@ -233,10 +237,12 @@ public class ExtractTestCaseHandler extends AbstractRefactorHandler {
* the edited {@link INodePO} from which to extract
* @param selection
* the nodes to be extracted
+ * @param category the category to put the new node into
* @return an error message or null.
*/
private IExecTestCasePO performExtraction(final String newTcName,
- final INodePO node, final IStructuredSelection selection) {
+ final INodePO node, final IStructuredSelection selection,
+ final INodePO category) {
final List<INodePO> modNodes = new ArrayList<INodePO>(
selection.size());
@@ -252,7 +258,7 @@ public class ExtractTestCaseHandler extends AbstractRefactorHandler {
}
ExtractOperation op = new ExtractOperation(node, modNodes,
- newTcName);
+ newTcName, category);
boolean succ = TransactionWrapper.executeOperation(op);
if (!succ) {
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/SaveAsNewTestCaseHandler.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/SaveAsNewTestCaseHandler.java
index a20bb96b7..e8d7bfbd7 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/SaveAsNewTestCaseHandler.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/SaveAsNewTestCaseHandler.java
@@ -40,15 +40,17 @@ import org.eclipse.jubula.client.core.model.ISpecTestCasePO;
import org.eclipse.jubula.client.core.model.NodeMaker;
import org.eclipse.jubula.client.core.model.PoMaker;
import org.eclipse.jubula.client.core.model.TDCell;
-import org.eclipse.jubula.client.core.persistence.TransactionSupport.ITransaction;
import org.eclipse.jubula.client.core.persistence.GeneralStorage;
import org.eclipse.jubula.client.core.persistence.PMException;
+import org.eclipse.jubula.client.core.persistence.TransactionSupport.ITransaction;
import org.eclipse.jubula.client.core.utils.ModelParamValueConverter;
import org.eclipse.jubula.client.core.utils.NativeSQLUtils;
import org.eclipse.jubula.client.core.utils.RefToken;
import org.eclipse.jubula.client.ui.rcp.actions.TransactionWrapper;
import org.eclipse.jubula.client.ui.rcp.controllers.MultipleTCBTracker;
+import org.eclipse.jubula.client.ui.rcp.editors.AbstractTestCaseEditor;
import org.eclipse.jubula.client.ui.rcp.views.TestCaseBrowser;
+import org.eclipse.ui.handlers.HandlerUtil;
/**
* @author Markus Tiede
@@ -76,7 +78,8 @@ public class SaveAsNewTestCaseHandler extends AbstractRefactorHandler {
/** The editor root node */
private IPersistentObject m_oldRoot = null;
-
+ /** the category where the new Spec TC should be added */
+ private INodePO m_category;
/**
* Constructor
*
@@ -84,12 +87,14 @@ public class SaveAsNewTestCaseHandler extends AbstractRefactorHandler {
* the name of the new test case
* @param nodesToClone
* the param nodes to clone
+ * @param cat the category where the new Spec TC should be added
*/
public CloneTransaction(String newTestCaseName,
- List<INodePO> nodesToClone) {
+ List<INodePO> nodesToClone, INodePO cat) {
m_newTestCaseName = newTestCaseName;
m_nodesToClone = nodesToClone;
m_oldRoot = m_nodesToClone.get(0).getSpecAncestor();
+ m_category = cat;
}
/** {@inheritDoc} */
@@ -107,8 +112,7 @@ public class SaveAsNewTestCaseHandler extends AbstractRefactorHandler {
s.merge(newTc);
pMapper.persist(s, GeneralStorage.getInstance().getProject()
.getId());
- NativeSQLUtils.addNodeAFFECTS(s, newTc,
- GeneralStorage.getInstance().getProject().getSpecObjCont());
+ NativeSQLUtils.addNodeAFFECTS(s, newTc, m_category);
setNewSpecTC(newTc);
}
@@ -288,8 +292,7 @@ public class SaveAsNewTestCaseHandler extends AbstractRefactorHandler {
/** {@inheritDoc} */
public Collection<? extends IPersistentObject> getToLock() {
List<IPersistentObject> list = new ArrayList<>();
- list.add(GeneralStorage.getInstance().getProject().
- getSpecObjCont());
+ list.add(m_category);
list.add(m_oldRoot);
return list;
}
@@ -297,8 +300,7 @@ public class SaveAsNewTestCaseHandler extends AbstractRefactorHandler {
/** {@inheritDoc} */
public Collection<? extends IPersistentObject> getToRefresh() {
List<IPersistentObject> list = new ArrayList<>();
- list.add(GeneralStorage.getInstance().getProject().
- getSpecObjCont());
+ list.add(m_category);
return list;
}
@@ -312,31 +314,37 @@ public class SaveAsNewTestCaseHandler extends AbstractRefactorHandler {
/** {@inheritDoc} */
public Object executeImpl(ExecutionEvent event) {
- String newTestCaseName = getNewTestCaseName(event);
- if (newTestCaseName != null) {
- ISpecTestCasePO newSpecTC = null;
- IStructuredSelection ss = getSelection();
- final List<INodePO> nodesToClone =
- new ArrayList<INodePO>(ss.size());
- Iterator it = ss.iterator();
- while (it.hasNext()) {
- nodesToClone.add((INodePO) it.next());
- }
- newSpecTC = createAndPerformNodeDuplication(newTestCaseName,
- nodesToClone);
- if (newSpecTC == null) {
- return null;
- }
- newSpecTC = GeneralStorage.getInstance().getMasterSession().find(
- newSpecTC.getClass(), newSpecTC.getId());
+ if (!prepareForRefactoring(event)) {
+ return null;
+ }
+ final AbstractTestCaseEditor editor = (AbstractTestCaseEditor)
+ HandlerUtil.getActivePart(event);
+ if (!askNewNameAndCategory(editor)) {
+ return null;
+ }
- DataEventDispatcher.getInstance().fireDataChangedListener(
- newSpecTC, DataState.Added, UpdateState.all);
- TestCaseBrowser tcb = MultipleTCBTracker.getInstance().getMainTCB();
- if (tcb != null) {
- tcb.getTreeViewer().setSelection(
- new StructuredSelection(newSpecTC), true);
- }
+ ISpecTestCasePO newSpecTC = null;
+ IStructuredSelection ss = getSelection();
+ final List<INodePO> nodesToClone =
+ new ArrayList<INodePO>(ss.size());
+ Iterator it = ss.iterator();
+ while (it.hasNext()) {
+ nodesToClone.add((INodePO) it.next());
+ }
+ newSpecTC = createAndPerformNodeDuplication(getNewTCName(),
+ nodesToClone, getCategory());
+ if (newSpecTC == null) {
+ return null;
+ }
+ newSpecTC = GeneralStorage.getInstance().getMasterSession().find(
+ newSpecTC.getClass(), newSpecTC.getId());
+
+ DataEventDispatcher.getInstance().fireDataChangedListener(
+ newSpecTC, DataState.Added, UpdateState.all);
+ TestCaseBrowser tcb = MultipleTCBTracker.getInstance().getMainTCB();
+ if (tcb != null) {
+ tcb.getTreeViewer().setSelection(
+ new StructuredSelection(newSpecTC), true);
}
return null;
}
@@ -346,13 +354,15 @@ public class SaveAsNewTestCaseHandler extends AbstractRefactorHandler {
* the new test case name
* @param nodesToClone
* the nodes to clone
+ * @param category the category where the new Spec TC should be added
* @return the new spec test case with cloned param nodes
* or null if something went wrong
*/
private ISpecTestCasePO createAndPerformNodeDuplication(
- String newTestCaseName, List<INodePO> nodesToClone) {
+ String newTestCaseName, List<INodePO> nodesToClone,
+ INodePO category) {
final CloneTransaction op =
- new CloneTransaction(newTestCaseName, nodesToClone);
+ new CloneTransaction(newTestCaseName, nodesToClone, category);
if (TransactionWrapper.executeOperation(op)) {
return op.getNewSpecTC();
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/open/OpenTestCase.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/open/OpenTestCase.java
index fe4828244..bb83386a2 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/open/OpenTestCase.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/open/OpenTestCase.java
@@ -58,6 +58,7 @@ public class OpenTestCase extends AbstractOpenHandler {
Messages.OpenTestCaseTableDialogShellTitle,
SWT.MULTI, IconConstants.OPEN_TC_DIALOG_IMAGE,
Messages.OpenTestCaseTableDialogAddButtonText);
+ dialog.setReuseds(false);
dialog.addSelectionListener(listener);
dialog.setHelpAvailable(true);
dialog.create();
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/i18n/Messages.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/i18n/Messages.java
index 83c980de1..f1769ca78 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/i18n/Messages.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/i18n/Messages.java
@@ -678,6 +678,7 @@ public class Messages extends NLS {
public static String RecordTestCaseActionTCMessage;
public static String RecordTestCaseActionTCShell;
public static String RecordTestCaseActionTCTitle;
+ public static String RefactorTCOptTextLabel;
public static String RefreshProjectOperationRefreshing;
public static String RefreshTSBrowserActionProgressMessage;
public static String RefTestSuiteGUIPropertySourceAutIdName;
@@ -778,6 +779,8 @@ public class Messages extends NLS {
public static String SearchResultPageResultPageLabel;
public static String SearchResultPageElementLabel;
public static String SelectAll;
+ public static String SelectCategoryDialogTitle;
+ public static String SelectCategoryDialogMessage;
public static String ServerLogViewerName;
public static String ServerName;
public static String ServerObjectMustNotBeNull;
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/i18n/messages.properties b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/i18n/messages.properties
index e40218a7a..a62b000f8 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/i18n/messages.properties
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/i18n/messages.properties
@@ -663,6 +663,7 @@ RecordTestCaseActionTCLabel=Test Case name
RecordTestCaseActionTCMessage=Enter a valid name for the Test Case.
RecordTestCaseActionTCShell=Observe a Test Case
RecordTestCaseActionTCTitle=Enter name for the observed Test Case
+RefactorTCOptTextLabel=Enter name for the new Test Case
RefreshProjectOperationRefreshing=Refreshing Project...
RefreshTSBrowserActionProgressMessage=Please wait while refreshing Project...
RefTestSuiteGUIPropertySourceAutIdName=AUT ID
@@ -686,7 +687,7 @@ RenameActionDoubleCatName=Category name already exists. Please type another one.
RenameActionDoubleTCName=Test Case name already exists. Please type another one.
RenameActionDoubleTJName=Test Job name already exists. Please type another one.
RenameActionDoubleTSName=Test Suite name already exists. Please type another one.
-RenameActionTCError=Test Case name invalid. A Test Case name must not begin or end with a space.
+RenameActionTCError=A Test Case name cannot be empty and must not begin or end with a space.
RenameActionTCLabel=Test Case name\:
RenameActionTCMessage=Rename a Test Case.
RenameActionTCShell=Rename Test Case
@@ -763,6 +764,8 @@ SearchingIn=Searching in
SearchResultPageResultPageLabel={0} search result(s)\: {1}
SearchResultPageElementLabel={0} / {1}
SelectAll=Select All
+SelectCategoryDialogTitle=Enter name and select category
+SelectCategoryDialogMessage=Enter the name of the new Test Case and select the category where it should be added.
ServerLogViewerName=AUT Agent Log Viewer
ServerName=Server Name
ServerObjectMustNotBeNull=Server object must not be null
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/provider/contentprovider/TestCaseTreeCompositeContentProvider.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/provider/contentprovider/TestCaseTreeCompositeContentProvider.java
index d5efae6e3..fc55d8c64 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/provider/contentprovider/TestCaseTreeCompositeContentProvider.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/provider/contentprovider/TestCaseTreeCompositeContentProvider.java
@@ -15,6 +15,7 @@ import java.util.List;
import org.apache.commons.lang.ArrayUtils;
import org.eclipse.jubula.client.core.model.ICategoryPO;
+import org.eclipse.jubula.client.core.model.INodePO;
import org.eclipse.jubula.client.core.model.IProjectPO;
import org.eclipse.jubula.client.core.model.IReusedProjectPO;
import org.eclipse.jubula.client.core.persistence.ProjectPM;
@@ -27,6 +28,24 @@ import org.eclipse.jubula.tools.internal.exception.JBException;
*/
public class TestCaseTreeCompositeContentProvider
extends AbstractTreeViewContentProvider {
+
+ /** Whether to show only categories */
+ private boolean m_onlyCategories = false;
+
+ /** Whether to show reused projects */
+ private boolean m_showReusedProjects = true;
+
+ /**
+ * Constructor
+ * @param reuseds whether to show reused projects
+ * @param categories whether to only show categories
+ */
+ public TestCaseTreeCompositeContentProvider(boolean reuseds,
+ boolean categories) {
+ m_showReusedProjects = reuseds;
+ m_onlyCategories = categories;
+ }
+
/**
* {@inheritDoc}
*/
@@ -34,14 +53,32 @@ public class TestCaseTreeCompositeContentProvider
if (parentElement instanceof IProjectPO) {
IProjectPO project = (IProjectPO)parentElement;
List<Object> elements = new ArrayList<Object>();
- elements.addAll(project.getUnmodSpecList());
- elements.addAll(project.getUsedProjects());
+ if (m_onlyCategories) {
+ elements.add(((IProjectPO) parentElement).getSpecObjCont());
+ } else {
+ for (INodePO child : project.getUnmodSpecList()) {
+ elements.add(child);
+ }
+ }
+ if (m_showReusedProjects) {
+ elements.addAll(project.getUsedProjects());
+ }
return elements.toArray();
}
if (parentElement instanceof ICategoryPO) {
- return ((ICategoryPO)parentElement)
- .getUnmodifiableNodeList().toArray();
+ List<INodePO> allChildren = ((ICategoryPO)parentElement)
+ .getUnmodifiableNodeList();
+ if (!m_onlyCategories) {
+ return allChildren.toArray();
+ }
+ List<INodePO> onlyCategories = new ArrayList<>();
+ for (INodePO child : allChildren) {
+ if (child instanceof ICategoryPO) {
+ onlyCategories.add(child);
+ }
+ }
+ return onlyCategories.toArray();
}
if (parentElement instanceof IReusedProjectPO) {
@@ -50,17 +87,21 @@ public class TestCaseTreeCompositeContentProvider
ProjectPM.loadReusedProjectInMasterSession(
(IReusedProjectPO)parentElement);
- if (reusedProject != null) {
- return reusedProject.getUnmodSpecList().toArray();
+ if (reusedProject == null) {
+ return ArrayUtils.EMPTY_OBJECT_ARRAY;
}
- return ArrayUtils.EMPTY_OBJECT_ARRAY;
+ List<Object> res = new ArrayList<>();
+ for (INodePO spec : reusedProject.getUnmodSpecList()) {
+ if (!m_onlyCategories || (spec instanceof ICategoryPO)) {
+ res.add(spec);
+ }
+ }
+ return res.toArray();
} catch (JBException e) {
ErrorHandlingUtil.createMessageDialog(e, null, null);
- return ArrayUtils.EMPTY_OBJECT_ARRAY;
}
}
-
return ArrayUtils.EMPTY_OBJECT_ARRAY;
- }
-} \ No newline at end of file
+ }
+}
diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/widgets/TestCaseTreeComposite.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/widgets/TestCaseTreeComposite.java
index fb16694a7..b5646edca 100644
--- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/widgets/TestCaseTreeComposite.java
+++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/widgets/TestCaseTreeComposite.java
@@ -49,6 +49,10 @@ import org.eclipse.ui.dialogs.FilteredTree;
/**
+ * A tree viewer wrapper to show a mildly configurable subtree of the
+ * SpecTC tree
+ * Currently either SpecTestCases referencable from certain SpecTCs are shown
+ * or only categories either including reused projects or not
* @author Markus Tiede
* @created Jul 20, 2011
*/
@@ -60,14 +64,16 @@ public class TestCaseTreeComposite extends Composite {
private TreeViewer m_treeViewer;
/**
- * <code>m_parentTestCase</code>
- */
- private INodePO m_setOfParentTestCase;
-
- /**
* <code>m_parentTestCases</code>
+ * Used to exclude TestCases which might cause circular dependencies.
*/
private Set<INodePO> m_parentTestCases;
+
+ /** Whether to show only categories */
+ private boolean m_onlyCategories = false;
+
+ /** Whether to show reused projects */
+ private boolean m_reusedProjects = true;
/** a list with the item numbers of circular dependend test cases */
private Set < INodePO > m_circDependList = new HashSet < INodePO > ();
@@ -134,7 +140,22 @@ public class TestCaseTreeComposite extends Composite {
public TestCaseTreeComposite(Composite parent, int treeStyle,
INodePO parentTestCase) {
this(parent, treeStyle);
- m_setOfParentTestCase = parentTestCase;
+ m_parentTestCases = new HashSet<INodePO>();
+ m_parentTestCases.add(parentTestCase);
+ initTreeViewer();
+ }
+
+ /**
+ * @param parent the parent composite
+ * @param treeStyle the style of the tre
+ * @param reuseds whether to show reused projects
+ * @param onlyCategories whether to show only categories
+ */
+ public TestCaseTreeComposite(Composite parent, int treeStyle,
+ boolean reuseds, boolean onlyCategories) {
+ this(parent, treeStyle);
+ m_reusedProjects = reuseds;
+ m_onlyCategories = onlyCategories;
initTreeViewer();
}
/**
@@ -145,7 +166,8 @@ public class TestCaseTreeComposite extends Composite {
getInitialInput();
m_treeViewer.setLabelProvider(new LabelProvider());
m_treeViewer.setContentProvider(
- new TestCaseTreeCompositeContentProvider());
+ new TestCaseTreeCompositeContentProvider(
+ m_reusedProjects, m_onlyCategories));
m_treeViewer.setInput(GeneralStorage.getInstance().getProject());
m_treeViewer.setComparator(new NodeNameViewerSorter());
}
@@ -169,13 +191,6 @@ public class TestCaseTreeComposite extends Composite {
m_circDependList.addAll(op.getDependentNodes());
}
}
- } else if (m_setOfParentTestCase != null) {
- DependencyFinderOp op =
- new DependencyFinderOp(m_setOfParentTestCase);
- TreeTraverser traverser = new TreeTraverser(GeneralStorage.
- getInstance().getProject(), op, true);
- traverser.traverse(true);
- m_circDependList = op.getDependentNodes();
}
}
@@ -192,7 +207,11 @@ public class TestCaseTreeComposite extends Composite {
*/
public boolean hasValidSelection() {
IStructuredSelection selection =
- (IStructuredSelection)getTreeViewer().getSelection();
+ (IStructuredSelection)getTreeViewer().getSelection();
+ if (m_onlyCategories) {
+ return (selection.size() == 1)
+ && (selection.getFirstElement() instanceof ICategoryPO);
+ }
for (Object selectedObj : selection.toArray()) {
if (m_circDependList.contains(selectedObj)
|| selectedObj instanceof ICategoryPO
@@ -200,7 +219,7 @@ public class TestCaseTreeComposite extends Composite {
return false;
}
}
- return true;
+ return !selection.isEmpty();
}
/**
@@ -252,6 +271,15 @@ public class TestCaseTreeComposite extends Composite {
* {@inheritDoc}
*/
public String getText(Object element) {
+ if (element instanceof INodePO
+ && ((INodePO) element).isSpecObjCont()) {
+ // A bit weird, but the GeneralLabelProvider is
+ // designed for the TSB / TCB, so its returned String
+ // (Test Cases:) is not suitable here - we'll rather use
+ // the project's name
+ return GeneralLabelProvider.getTextImpl(
+ ((INodePO) element).getParentNode());
+ }
return GeneralLabelProvider.getTextImpl(element);
}
diff --git a/org.eclipse.jubula.documentation/releasenotes/en/docbook/8.6.0/features.xml b/org.eclipse.jubula.documentation/releasenotes/en/docbook/8.6.0/features.xml
index c2504bd18..2b6c2e88c 100644
--- a/org.eclipse.jubula.documentation/releasenotes/en/docbook/8.6.0/features.xml
+++ b/org.eclipse.jubula.documentation/releasenotes/en/docbook/8.6.0/features.xml
@@ -62,23 +62,33 @@
<para>
SWT Tree Tables support the following table-like actions from now on:
<itemizedlist>
- <listitem>Check Editability (Specify Cell)</listitem>
- <listitem>Check Existence of a Column</listitem>
- <listitem>Check Existence of Value in Column</listitem>
- <listitem>Check Existence of Value in Row</listitem>
- <listitem>Check Text (Specify Cell)</listitem>
- <listitem>Check Text (Mouse Position)</listitem>
- <listitem>Select Cell</listitem>
- <listitem>Select Value from Column</listitem>
- <listitem>Select Value from Row</listitem>
- <listitem>Store Value (Specify Cell)</listitem>
- <listitem>Store Value at Mouse Position</listitem>
+ <listitem><para>Check Editability (Specify Cell)</para></listitem>
+ <listitem><para>Check Existence of a Column</para></listitem>
+ <listitem><para>Check Existence of Value in Column</para></listitem>
+ <listitem><para>Check Existence of Value in Row</para></listitem>
+ <listitem><para>Check Text (Specify Cell)</para></listitem>
+ <listitem><para>Check Text (Mouse Position)</para></listitem>
+ <listitem><para>Select Cell</para></listitem>
+ <listitem><para>Select Value from Column</para></listitem>
+ <listitem><para>Select Value from Row</para></listitem>
+ <listitem><para>Store Value (Specify Cell)</para></listitem>
+ <listitem><para>Store Value at Mouse Position</para></listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
- We also corrected the <literal>Check Property at Mouse Position</literal> and <literal>Check Text (Mouse Position)</literal> actions.
+ <para>We also corrected the <literal>Check Property at Mouse Position</literal> and <literal>Check Text (Mouse Position)</literal> actions.</para>
+ </listitem>
+</itemizedlist>
+<para>
+ <emphasis role="strong">Improving the Save As New / Extract Test Case operations</emphasis>
+</para>
+<itemizedlist>
+ <listitem>
+ <para>
+ We added the possibility to choose the Category where the new Test Case should be added for
+ these operations.
+ </para>
</listitem>
</itemizedlist>
-
</section>
diff --git a/org.eclipse.jubula.documentation/userManual/en/docbook/tasks/workWithEditors/sectionExtractingTestCasesFromEditors.xml b/org.eclipse.jubula.documentation/userManual/en/docbook/tasks/workWithEditors/sectionExtractingTestCasesFromEditors.xml
index 1dd96483a..3977cedc7 100644
--- a/org.eclipse.jubula.documentation/userManual/en/docbook/tasks/workWithEditors/sectionExtractingTestCasesFromEditors.xml
+++ b/org.eclipse.jubula.documentation/userManual/en/docbook/tasks/workWithEditors/sectionExtractingTestCasesFromEditors.xml
@@ -49,8 +49,13 @@
</listitem>
<listitem>
<para>
- The Test Cases you selected will be extracted into this new
- Test Case.
+ In the following dialog, select the Category where the new Test Case should be added.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The Test Cases you selected will be extracted into the new
+ Test Case and will be added to the selected Category.
</para>
</listitem>
<listitem>
diff --git a/org.eclipse.jubula.documentation/userManual/en/docbook/tasks/workWithEditors/sectionSavingTestCasesFromAnEditorAsNewTestCase.xml b/org.eclipse.jubula.documentation/userManual/en/docbook/tasks/workWithEditors/sectionSavingTestCasesFromAnEditorAsNewTestCase.xml
index 6ab1b067e..80da70d1b 100644
--- a/org.eclipse.jubula.documentation/userManual/en/docbook/tasks/workWithEditors/sectionSavingTestCasesFromAnEditorAsNewTestCase.xml
+++ b/org.eclipse.jubula.documentation/userManual/en/docbook/tasks/workWithEditors/sectionSavingTestCasesFromAnEditorAsNewTestCase.xml
@@ -51,6 +51,11 @@
</listitem>
<listitem>
<para>
+ In the following dialog, select the Category where the new Test Case should be added.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
A new Test Case will be created containing the Test Cases
you selected, with the data and component names they used in
the current editor.

Back to the top