diff options
12 files changed, 205 insertions, 173 deletions
diff --git a/org.eclipse.jubula.app.testexec/src/org/eclipse/jubula/app/testexec/core/ExecutionController.java b/org.eclipse.jubula.app.testexec/src/org/eclipse/jubula/app/testexec/core/ExecutionController.java index 262d5dec2..9c0669ce3 100644 --- a/org.eclipse.jubula.app.testexec/src/org/eclipse/jubula/app/testexec/core/ExecutionController.java +++ b/org.eclipse.jubula.app.testexec/src/org/eclipse/jubula/app/testexec/core/ExecutionController.java @@ -62,6 +62,7 @@ import org.eclipse.jubula.client.core.model.IExecStackModificationListener; import org.eclipse.jubula.client.core.model.IExecTestCasePO; import org.eclipse.jubula.client.core.model.INodePO; import org.eclipse.jubula.client.core.model.IProjectPO; +import org.eclipse.jubula.client.core.model.IRefTestSuitePO; import org.eclipse.jubula.client.core.model.ITestSuitePO; import org.eclipse.jubula.client.core.model.ReentryProperty; import org.eclipse.jubula.client.core.persistence.GeneralStorage; @@ -69,6 +70,7 @@ import org.eclipse.jubula.client.core.persistence.Persistor; import org.eclipse.jubula.client.core.persistence.ProjectPM; import org.eclipse.jubula.client.core.utils.AbstractNonPostOperatingTreeNodeOperation; import org.eclipse.jubula.client.core.utils.ITreeTraverserContext; +import org.eclipse.jubula.client.core.utils.NodeNameUtil; import org.eclipse.jubula.client.core.utils.TreeTraverser; import org.eclipse.jubula.client.internal.AutAgentConnection; import org.eclipse.jubula.toolkit.common.exception.ToolkitPluginException; @@ -419,7 +421,7 @@ public class ExecutionController implements IAUTServerEventListener, m_job.getLanguage(), m_startedAutId != null ? m_startedAutId : m_job .getAutId(), m_job.isAutoScreenshot(), null, - m_job.getNoRunOptMode()); + m_job.getNoRunOptMode(), null); } } } @@ -938,21 +940,25 @@ public class ExecutionController implements IAUTServerEventListener, */ public void stackIncremented(INodePO node) { String nodeType = StringConstants.EMPTY; + String name = String.valueOf(node.getName()); if (node instanceof IEventExecTestCasePO) { IEventExecTestCasePO evPo = (IEventExecTestCasePO)node; if (evPo.getReentryProp() != ReentryProperty.RETRY) { setNoErrorWhileExecution(false); } nodeType = Messages.EventHandler; - } else if (node instanceof ITestSuitePO) { + } else if (node instanceof IRefTestSuitePO) { nodeType = Messages.TestSuite; + name = NodeNameUtil.getText((IRefTestSuitePO)node); } else if (node instanceof IExecTestCasePO) { nodeType = Messages.TestCase; + name = NodeNameUtil.getText((IExecTestCasePO)node, false); } + StringBuilder sb = new StringBuilder(nodeType); sb.append(StringConstants.COLON); sb.append(StringConstants.SPACE); - sb.append(String.valueOf(node.getName())); + sb.append(name); sysOut(sb.toString()); } diff --git a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/ClientTestImpl.java b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/ClientTestImpl.java index d088efdc4..497ee1fa5 100644 --- a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/ClientTestImpl.java +++ b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/ClientTestImpl.java @@ -80,6 +80,7 @@ import org.eclipse.jubula.client.core.model.TestResult; import org.eclipse.jubula.client.core.model.TestResultNode; import org.eclipse.jubula.client.core.persistence.TestResultPM; import org.eclipse.jubula.client.core.persistence.TestResultSummaryPM; +import org.eclipse.jubula.client.core.utils.NodeNameUtil; import org.eclipse.jubula.client.internal.AutAgentConnection; import org.eclipse.jubula.client.internal.BaseConnection; import org.eclipse.jubula.client.internal.BaseConnection.NotConnectedException; @@ -514,9 +515,16 @@ public class ClientTestImpl implements IClientTest { final Locale locale, final AutIdentifier autId, final boolean autoScreenshot, final Map<String, String> externalVars, - final String noRunOptMode) { - final String jobName = NLS.bind(Messages.StartWorkingWithTestSuite, - execTestSuite.getName()); + final String noRunOptMode, + String jobDesc) { + final String jobName; + if (jobDesc == null) { + jobName = NLS.bind(Messages.StartWorkingWithTestSuite, + execTestSuite.getName()); + } else { + jobName = NLS.bind(Messages.StartWorkingWithTestSuite, + jobDesc); + } Job runningTestSuite = new Job(jobName) { protected IStatus run(IProgressMonitor monitor) { monitor.beginTask(jobName, @@ -596,7 +604,8 @@ public class ClientTestImpl implements IClientTest { AutIdentifier autId = new AutIdentifier(refTestSuite .getTestSuiteAutID()); startTestSuite(refTestSuite.getTestSuite(), locale, autId, - autoScreenshot, null, noRunOptMode); + autoScreenshot, null, noRunOptMode, + NodeNameUtil.getText(refTestSuite)); while (!isTestExecutionFinished.get()) { TimeUtil.delay(500); } diff --git a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/IClientTest.java b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/IClientTest.java index a3cf3b61e..e61fefc30 100644 --- a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/IClientTest.java +++ b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/IClientTest.java @@ -139,10 +139,13 @@ public interface IClientTest { * a map of externally set variables; may be <code>null</code> * @param noRunOptMode * The value of no-run option argument if no-run mode was specified, null otherwise + * @param jobDesc + * The displayed TS name or null for using of execTestSuite name. */ public abstract void startTestSuite(ITestSuitePO execTestSuite, Locale locale, AutIdentifier autId, boolean autoScreenshot, - Map<String, String> externalVars, String noRunOptMode); + Map<String, String> externalVars, String noRunOptMode, + String jobDesc); /** * Starts the given Test Job. diff --git a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/businessprocess/TestExecution.java b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/businessprocess/TestExecution.java index af2a9b389..5cf20e953 100644 --- a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/businessprocess/TestExecution.java +++ b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/businessprocess/TestExecution.java @@ -329,9 +329,6 @@ public class TestExecution { setPaused(false); Validate.notNull(testSuite, Messages.TestsuiteMustNotBeNull); m_executionLanguage = locale; - //prepare test execution - monitor.subTask(NLS.bind(Messages.PreparingTestSuiteExecution, - testSuite.getName())); m_externalTestDataBP.clearExternalData(); if (TestExecution.shouldExecutionStop (noRunOptMode, TestExecutionConstants.RunSteps.PTE)) { diff --git a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/i18n/Messages.java b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/i18n/Messages.java index 7a86ae990..423ad6560 100644 --- a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/i18n/Messages.java +++ b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/i18n/Messages.java @@ -310,7 +310,6 @@ public class Messages extends NLS { public static String StartingObjectMapping; public static String StartingRecordModus; public static String StartingTransaction; - public static String PreparingTestSuiteExecution; public static String StartingTestSuite; public static String StartingTestSuite_buildingTestExecutionTree; public static String StartingTestSuite_resolvingTestStepsToExecute; @@ -373,6 +372,7 @@ public class Messages extends NLS { public static String UnknownObject; public static String UnknownSourceType; public static String UnknownState; + public static String UnnamedNode; public static String UnsupportedINodePOSubclass; public static String UnsupportedReentryProperty; public static String UpdateOfTimestampFailed; 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 e61bd2c41..f0105aaff 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 @@ -171,7 +171,6 @@ GeneralDatabaseErrorFor=general database error for GeneralFailure=general failure GettingAllComponentsFromAUT=getting all components from AUT PersistenceLoadFailed=Persistence load failed -PreparingTestSuiteExecution=Preparing execution of Test Suite "{0}"... ImplementingMethodHasThrownAnException=implementing method has thrown an exception IncompatibleType=Incompatible Type IncompleteTestdata=Incomplete testdata @@ -296,14 +295,14 @@ SpecifiedLanguageNotSupported=Specified language is not supported by AUT StartAUTServerMessageSend=StartAUTServerMessage send StartingObjectMapping=starting object mapping StartingRecordModus=starting record modus -StartingTestSuite=Test Suite "{0}" execution... +StartingTestSuite=Start Test Suite execution: {0} StartingTestSuite_activatingAUT=Activating AUT... StartingTestSuite_buildingTestExecutionTree=Building test execution tree StartingTestSuite_resettingMonitoringData=Checking Monitoring information... StartingTestSuite_resolvingPredefinedVariables=Resolving predefined variables StartingTestSuite_resolvingTestStepsToExecute=Resolving Test Steps to execute... StartingTransaction=Starting transaction -StartWorkingWithTestSuite=Start working with Test Suite "{0}"... +StartWorkingWithTestSuite=Start working with Test Suite\: {0} StoppingTest=stopping test StoringOfMetadataFailed=storing of metadata failed. StoringOfTestResultsFailed=storing of test results failed. @@ -360,6 +359,7 @@ UnknownErrorGettingAllCompsAUT=unknown error reason getting all components from UnknownObject=Unknown object UnknownSourceType=Unknown data source type for UnknownState=unknown state +UnnamedNode=Unnamed node UnsupportedINodePOSubclass=Unsupported INodePO subclass UnsupportedReentryProperty=Unsupported re-entry property with value UpdateOfTimestampFailed=Update of timestamp failed diff --git a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/utils/NodeNameUtil.java b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/utils/NodeNameUtil.java new file mode 100644 index 000000000..7cc181e00 --- /dev/null +++ b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/utils/NodeNameUtil.java @@ -0,0 +1,170 @@ +package org.eclipse.jubula.client.core.utils; + +import java.util.Iterator; + +import org.apache.commons.lang.StringUtils; +import org.eclipse.jubula.client.core.i18n.Messages; +import org.eclipse.jubula.client.core.model.IExecTestCasePO; +import org.eclipse.jubula.client.core.model.IParamDescriptionPO; +import org.eclipse.jubula.client.core.model.IParamNodePO; +import org.eclipse.jubula.client.core.model.IRefTestSuitePO; +import org.eclipse.jubula.client.core.model.ISpecTestCasePO; +import org.eclipse.jubula.client.core.model.ITestSuitePO; +import org.eclipse.jubula.tools.internal.constants.StringConstants; + +/** + * @author BREDEX GmbH + * @created 18.06.2015 + */ +public class NodeNameUtil { + + + /** close bracked */ + protected static final String CLOSE_BRACKET = "]"; //$NON-NLS-1$ + + /** open bracked */ + protected static final String OPEN_BRACKET = " ["; //$NON-NLS-1$ + + /** <code>SEPARATOR</code> */ + protected static final String SEPARATOR = "; "; //$NON-NLS-1$ + + /** + * <code>UNNAMED_NODE</code> + */ + private static final String UNNAMED_NODE = + Messages.UnnamedNode; + + /** + * Construktor + */ + private NodeNameUtil() { + + } + + /** + * + * @param testSuitRef The Reference Test Suit to examine. + * @return label text for the given Reference Test Suit. + */ + public static String getText(IRefTestSuitePO testSuitRef) { + StringBuilder nameBuilder = new StringBuilder(); + + String refRealName = testSuitRef.getRealName(); + + if (!StringUtils.isBlank(refRealName)) { + nameBuilder.append(refRealName); + ITestSuitePO testSuite = testSuitRef.getTestSuite(); + String testSuiteName = testSuite != null + ? testSuite.getName() + : StringUtils.EMPTY; + appendSpecName(nameBuilder, testSuiteName); + } else { + String testSuiteRefName = testSuitRef != null ? testSuitRef + .getTestSuite().getName() : UNNAMED_NODE; + createSpecName(nameBuilder, testSuiteRefName); + + } + return nameBuilder.toString(); + } + + /** + * + * @param testCaseRef The Test Case Reference to examine. + * @param params Bool if params should be added to label. + * @return label text for the given Test Case Reference. + */ + public static String getText(IExecTestCasePO testCaseRef, boolean params) { + StringBuilder nameBuilder = new StringBuilder(); + + String realName = testCaseRef.getRealName(); + if (!StringUtils.isBlank(realName)) { + nameBuilder.append(realName); + ISpecTestCasePO testCase = testCaseRef.getSpecTestCase(); + String testCaseName = testCase != null + ? testCase.getName() + : StringUtils.EMPTY; + appendSpecName(nameBuilder, testCaseName); + + } else { + ISpecTestCasePO testCase = testCaseRef.getSpecTestCase(); + String testCaseName = testCase != null + ? testCase.getName() + : StringUtils.EMPTY; + createSpecName(nameBuilder, testCaseName); + } + + if (params) { + nameBuilder.append(getParameterString(testCaseRef)); + } + + return nameBuilder.toString(); + } + + /** + * + * @param testCase The Test Case to examine. + * @param params Bool if params should be added to label. + * @return label text for the given Test Case. + */ + public static String getText(ISpecTestCasePO testCase, boolean params) { + if (params) { + return testCase.getName(); + } + return testCase.getName() + getParameterString(testCase); + } + + /** + * + * @param paramNode The Parameter Node to examine. + * @return a label representing all Parameters used by the given node. + */ + private static String getParameterString(IParamNodePO paramNode) { + StringBuilder nameBuilder = new StringBuilder(); + Iterator<IParamDescriptionPO> iter = + paramNode.getParameterList().iterator(); + boolean parameterExist = false; + if (iter.hasNext()) { + parameterExist = true; + nameBuilder.append(NodeNameUtil.OPEN_BRACKET); + } + if (iter.hasNext()) { + while (iter.hasNext()) { + IParamDescriptionPO descr = iter.next(); + nameBuilder.append(descr.getName()); + if (iter.hasNext()) { + nameBuilder.append(NodeNameUtil.SEPARATOR); + } + } + } + if (parameterExist) { + nameBuilder.append(NodeNameUtil.CLOSE_BRACKET); + } + + return nameBuilder.toString(); + } + + /** + * helper method to have same appearance for TS and TC + * @param nameBuilder {@link StringBuilder} where the name should be appended + * @param refName ref TC or TS string + */ + private static void createSpecName(StringBuilder nameBuilder, + String refName) { + nameBuilder.append(StringConstants.LEFT_INEQUALITY_SING) + .append(refName) + .append(StringConstants.RIGHT_INEQUALITY_SING); + } + + /** + * helper method to have same appearance for TS and TC + * @param nameBuilder {@link StringBuilder} where the name should be appended + * @param specName spec TC or TS string + */ + private static void appendSpecName(StringBuilder nameBuilder, + String specName) { + nameBuilder.append(StringConstants.SPACE) + .append(StringConstants.LEFT_PARENTHESES) + .append(specName) + .append(StringConstants.RIGHT_PARENTHESES); + } +} diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/controllers/TestExecutionContributor.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/controllers/TestExecutionContributor.java index 67cd24b80..aa911c6e6 100644 --- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/controllers/TestExecutionContributor.java +++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/controllers/TestExecutionContributor.java @@ -751,7 +751,7 @@ public class TestExecutionContributor TimeUtil.delay(TimingConstantsClient.START_TEST_SUITE_DELAY); getClientTest().startTestSuite(ts, WorkingLanguageBP.getInstance() .getWorkingLanguage(), autId, autoScreenshot, null, - TestExecutionConstants.RunSteps.NORMAL.getStepValue()); + TestExecutionConstants.RunSteps.NORMAL.getStepValue(), null); } /** diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/preferences/PrefPageBasic.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/preferences/PrefPageBasic.java index c227bf320..6a0b9dfb0 100644 --- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/preferences/PrefPageBasic.java +++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/preferences/PrefPageBasic.java @@ -77,8 +77,6 @@ public class PrefPageBasic extends PreferencePage implements /** widgets used in preference page to define preference values private */ private Button m_minimize; /** widgets used in preference page to define preference values private */ - private Button m_showOrigName; - /** widgets used in preference page to define preference values private */ private Button m_treeScroll; /** widgets used in preference page to define preference values private */ private Button m_askStopAUT; @@ -170,7 +168,6 @@ public class PrefPageBasic extends PreferencePage implements createTreeScrollButton(composite); createMinimizeClientButton(composite); createAskStopAUTButton(composite); - createShowOrigTestCaseName(composite); createShowCAPInfosCheckbox(composite); createShowTransientChildrensCheckbox(composite); createDefaultProjectCheckbox(composite); @@ -198,16 +195,6 @@ public class PrefPageBasic extends PreferencePage implements return scrollComposite; } - - /** - * @param composite the composite - */ - private void createShowOrigTestCaseName(Composite composite) { - m_showOrigName = new Button(composite, SWT.CHECK); - m_showOrigName.setText(Messages.JubulaPrefPageBasicShowOrig); - m_showOrigName.setSelection(getPreferenceStore() - .getBoolean(Constants.SHOWORIGINALNAME_KEY)); - } /** * @param composite the parent composite @@ -548,8 +535,6 @@ public class PrefPageBasic extends PreferencePage implements .getDefaultBoolean(Constants.TREEAUTOSCROLL_KEY)); m_askStopAUT.setSelection(m_store .getDefaultBoolean(Constants.ASKSTOPAUT_KEY)); - m_showOrigName.setSelection(m_store - .getDefaultBoolean(Constants.SHOWORIGINALNAME_KEY)); m_capInfoCheckbox.setSelection(m_store .getDefaultBoolean(Constants.SHOWCAPINFO_KEY)); m_showTransientChildrenCheckBox.setSelection(m_store @@ -595,8 +580,6 @@ public class PrefPageBasic extends PreferencePage implements m_dataDirIsWorkspaceValue); getPreferenceStore().setValue(Constants.DATADIR_PATH_KEY, m_dataDirPathTextfield.getText()); - getPreferenceStore().setValue(Constants.SHOWORIGINALNAME_KEY, - m_showOrigName.getSelection()); getPreferenceStore().setValue(Constants.SHOWCAPINFO_KEY, m_capInfoCheckbox.getSelection()); getPreferenceStore().setValue(Constants.SHOW_TRANSIENT_CHILDREN_KEY, diff --git a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/provider/labelprovider/GeneralLabelProvider.java b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/provider/labelprovider/GeneralLabelProvider.java index 37e2a66e9..d1bc18d10 100644 --- a/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/provider/labelprovider/GeneralLabelProvider.java +++ b/org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/provider/labelprovider/GeneralLabelProvider.java @@ -10,7 +10,6 @@ *******************************************************************************/ package org.eclipse.jubula.client.ui.rcp.provider.labelprovider; -import java.util.Iterator; import java.util.Locale; import java.util.Map; @@ -32,7 +31,6 @@ import org.eclipse.jubula.client.core.model.IExecObjContPO; 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.IParamNodePO; import org.eclipse.jubula.client.core.model.IProjectPO; import org.eclipse.jubula.client.core.model.IRefTestSuitePO; import org.eclipse.jubula.client.core.model.IReusedProjectPO; @@ -42,6 +40,7 @@ import org.eclipse.jubula.client.core.model.ITestDataCubePO; import org.eclipse.jubula.client.core.model.ITestJobPO; import org.eclipse.jubula.client.core.model.ITestSuitePO; import org.eclipse.jubula.client.core.persistence.GeneralStorage; +import org.eclipse.jubula.client.core.utils.NodeNameUtil; import org.eclipse.jubula.client.core.utils.StringHelper; import org.eclipse.jubula.client.ui.constants.Constants; import org.eclipse.jubula.client.ui.constants.IconConstants; @@ -221,15 +220,15 @@ public class GeneralLabelProvider extends ColumnLabelProvider } if (node instanceof IRefTestSuitePO) { - name = getText((IRefTestSuitePO)node); + name = NodeNameUtil.getText((IRefTestSuitePO)node); } else if (node.getName() == null) { name = UNNAMED_NODE; } else if (node instanceof ICapPO) { name = getText((ICapPO)node); } else if (node instanceof IExecTestCasePO) { - name = getText((IExecTestCasePO)node); + name = NodeNameUtil.getText((IExecTestCasePO)node, true); } else if (node instanceof ISpecTestCasePO) { - name = getText((ISpecTestCasePO)node); + name = NodeNameUtil.getText((ISpecTestCasePO)node, true); } else { name = node.getName(); } @@ -404,48 +403,6 @@ public class GeneralLabelProvider extends ColumnLabelProvider } /** - * - * @param testCaseRef The Test Case Reference to examine. - * @return label text for the given Test Case Reference. - */ - public static String getText(IExecTestCasePO testCaseRef) { - StringBuilder nameBuilder = new StringBuilder(); - - String realName = testCaseRef.getRealName(); - if (!StringUtils.isBlank(realName)) { - nameBuilder.append(realName); - if (Plugin.getDefault().getPreferenceStore().getBoolean( - Constants.SHOWORIGINALNAME_KEY)) { - ISpecTestCasePO testCase = testCaseRef.getSpecTestCase(); - String testCaseName = testCase != null - ? testCase.getName() - : StringUtils.EMPTY; - appendSpecName(nameBuilder, testCaseName); - } - - } else { - ISpecTestCasePO testCase = testCaseRef.getSpecTestCase(); - String testCaseName = testCase != null - ? testCase.getName() - : StringUtils.EMPTY; - createSpecName(nameBuilder, testCaseName); - } - - nameBuilder.append(getParameterString(testCaseRef)); - - return nameBuilder.toString(); - } - - /** - * - * @param testCase The Test Case to examine. - * @return label text for the given Test Case. - */ - private static String getText(ISpecTestCasePO testCase) { - return testCase.getName() + getParameterString(testCase); - } - - /** * @param paramDesc The parameter description. * @return The short type name of the given parameter description, e.g. * the name <code>String</code>, if the parameter has the type @@ -467,89 +424,4 @@ public class GeneralLabelProvider extends ColumnLabelProvider + getShortTypeName(paramDesc) + CLOSE_BRACKED; } - - /** - * - * @param paramNode The Parameter Node to examine. - * @return a label representing all Parameters used by the given node. - */ - private static String getParameterString(IParamNodePO paramNode) { - StringBuilder nameBuilder = new StringBuilder(); - Iterator<IParamDescriptionPO> iter = - paramNode.getParameterList().iterator(); - boolean parameterExist = false; - if (iter.hasNext()) { - parameterExist = true; - nameBuilder.append(GeneralLabelProvider.OPEN_BRACKED); - } - if (iter.hasNext()) { - while (iter.hasNext()) { - IParamDescriptionPO descr = iter.next(); - nameBuilder.append(descr.getName()); - if (iter.hasNext()) { - nameBuilder.append(GeneralLabelProvider.SEPARATOR); - } - } - } - if (parameterExist) { - nameBuilder.append(GeneralLabelProvider.CLOSE_BRACKED); - } - - return nameBuilder.toString(); - } - - /** - * - * @param testSuitRef The Reference Test Suit to examine. - * @return label text for the given Reference Test Suit. - */ - private static String getText(IRefTestSuitePO testSuitRef) { - StringBuilder nameBuilder = new StringBuilder(); - - String refRealName = testSuitRef.getRealName(); - - if (!StringUtils.isBlank(refRealName)) { - nameBuilder.append(refRealName); - if (Plugin.getDefault().getPreferenceStore().getBoolean( - Constants.SHOWORIGINALNAME_KEY)) { - ITestSuitePO testSuite = testSuitRef.getTestSuite(); - String testSuiteName = testSuite != null - ? testSuite.getName() - : StringUtils.EMPTY; - appendSpecName(nameBuilder, testSuiteName); - } - - } else { - String testSuiteRefName = testSuitRef != null ? testSuitRef - .getTestSuite().getName() : UNNAMED_NODE; - createSpecName(nameBuilder, testSuiteRefName); - - } - return nameBuilder.toString(); - } - - /** - * helper method to have same appearance for TS and TC - * @param nameBuilder {@link StringBuilder} where the name should be appended - * @param refName ref TC or TS string - */ - private static void createSpecName(StringBuilder nameBuilder, - String refName) { - nameBuilder.append(StringConstants.LEFT_INEQUALITY_SING) - .append(refName) - .append(StringConstants.RIGHT_INEQUALITY_SING); - } - - /** - * helper method to have same appearance for TS and TC - * @param nameBuilder {@link StringBuilder} where the name should be appended - * @param specName spec TC or TS string - */ - private static void appendSpecName(StringBuilder nameBuilder, - String specName) { - nameBuilder.append(StringConstants.SPACE) - .append(StringConstants.LEFT_PARENTHESES) - .append(specName) - .append(StringConstants.RIGHT_PARENTHESES); - } }
\ No newline at end of file diff --git a/org.eclipse.jubula.client.ui/src/org/eclipse/jubula/client/ui/constants/Constants.java b/org.eclipse.jubula.client.ui/src/org/eclipse/jubula/client/ui/constants/Constants.java index bcb3f040d..dc9a64534 100644 --- a/org.eclipse.jubula.client.ui/src/org/eclipse/jubula/client/ui/constants/Constants.java +++ b/org.eclipse.jubula.client.ui/src/org/eclipse/jubula/client/ui/constants/Constants.java @@ -237,9 +237,6 @@ public interface Constants { /** Key for m_text value to be stored as a resource property */ public static final String MINIMIZEONSUITESTART_KEY = "MINIMIZEONSUITESTART_PREF_KEY"; //$NON-NLS-1$ - /** Key for preferences to show the original test case name for overridden names at test case references */ - public static final String SHOWORIGINALNAME_KEY = "SHOWORIGINALNAME_PREF_KEY"; //$NON-NLS-1$ - /** Key for m_text value to be stored as a resource property */ public static final String TREEAUTOSCROLL_KEY = "TREEAUTOSCROLL_PREF_KEY"; //$NON-NLS-1$ @@ -437,9 +434,6 @@ public interface Constants { public static final boolean MINIMIZEONSUITESTART_KEY_DEFAULT = true; /** Key for boolean value to be stored as a resource property */ - public static final boolean SHOWORIGINALNAME_KEY_DEFAULT = true; - - /** Key for boolean value to be stored as a resource property */ public static final boolean TREEAUTOSCROLL_KEY_DEFAULT = true; /** Value for default preferred JRE to be stored as a resource property */ diff --git a/org.eclipse.jubula.client.ui/src/org/eclipse/jubula/client/ui/preferences/PreferenceInitializer.java b/org.eclipse.jubula.client.ui/src/org/eclipse/jubula/client/ui/preferences/PreferenceInitializer.java index 675f9ca62..26918f397 100644 --- a/org.eclipse.jubula.client.ui/src/org/eclipse/jubula/client/ui/preferences/PreferenceInitializer.java +++ b/org.eclipse.jubula.client.ui/src/org/eclipse/jubula/client/ui/preferences/PreferenceInitializer.java @@ -71,8 +71,6 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer { Constants.TREEAUTOSCROLL_KEY_DEFAULT); prefStore.setDefault(Constants.MINIMIZEONSUITESTART_KEY, Constants.MINIMIZEONSUITESTART_KEY_DEFAULT); - prefStore.setDefault(Constants.SHOWORIGINALNAME_KEY, - Constants.SHOWORIGINALNAME_KEY_DEFAULT); prefStore.setDefault( Constants.MILLIS_TO_OPEN_COMP_NAMES_CONTENT_PROPOSAL, Constants.MILLIS_TO_OPEN_COMP_NAMES_CONTENT_PROPOSAL_DEFAULT); |