Community
Participate
Working Groups
Using tptp.runtime-TPTP-4.6.1-200908150100.zip If a test asset has its logical name changed in the editor, then any modification other than logical name change done to this test asset in its editor would invoke the error message: "Invalid test element name" when user tries to save. If the modifications include logical name change, then the action is granted upon saving. If the physical name of the test asset is changed via "F2" or right click -> rename, then modifications would be saved as well. No error message is shown in the error log
Required by a consuming product.
Regression caused by https://bugs.eclipse.org/bugs/show_bug.cgi?id=262150 in org.eclipse.hyades.test.ui.editor.extension.BaseEditorExtension.isValidToSave().
The problem is that the resource is not updated in the editor object when changing the test asset name and saving. As such, the old test asset is being resolved in org.eclipse.hyades.test.ui.editor.extension.BaseEditorExtension.isValidToSave() (see EMFUtil.getWorkspaceFile(resource)), causing the method think that the user is trying to rename the test asset (to the current name).
This symptom is not reproducible in TPTP-4.5.2.1-200908191232 since the regression is caused by https://bugs.eclipse.org/bugs/show_bug.cgi?id=262150, which was delivered in TPTP 4.6. This defect is no longer required by a consuming product since a bug was in the consuming product code. The root cause of this defect is captured in Comment 3. The editor does not update the resource name of the test asset when the user changes the logical name of the test asset in the editor. This behavior is correct since the logical and resource names are intended to be different, in that the logical name allows customization of the test asset name without affecting the file name within the workspace (see [1] in http://help.eclipse.org/galileo/topic/org.eclipse.hyades.test.doc.user/concepts/cartifacteditor.htm). However, the save validation code (org.eclipse.hyades.test.ui.editor.extension.BaseEditorExtension.isValidToSave()) determines that the logical name has changed (compared to the old resource name) and displays the error message since the logical Note, defect 290254 has been opened to fix the issues with the other refactoring scenarios (e.g. rename, copy/cut/paste, etc.) synchronizing the logical and resource names.
(In reply to comment #4) > The root cause of this defect is captured in Comment 3. The editor does not > update the resource name of the test asset when the user changes the logical > name of the test asset in the editor. This behavior is correct since the > logical and resource names are intended to be different, in that the logical > name allows customization of the test asset name without affecting the file > name within the workspace (see [1] in > http://help.eclipse.org/galileo/topic/org.eclipse.hyades.test.doc.user/concepts/cartifacteditor.htm). > However, the save validation code > (org.eclipse.hyades.test.ui.editor.extension.BaseEditorExtension.isValidToSave()) > determines that the logical name has changed (compared to the old resource > name) and displays the error message since the logical name already exists (or appears to exist) as the resource name. This validation will be resolved under https://bugs.eclipse.org/bugs/show_bug.cgi?id=290254. For this defect, we will relax the save validation constraints.
Created attachment 148028 [details] Patch.
The attached patch checked in to CVS (HEAD). Added a new test case to the following test suite: /org.eclipse.hyades.test.java.tests/manual/regressionTests/Test.Execution.JUnitRunner.testsuite
*** Bug 293090 has been marked as a duplicate of this bug. ***
Issue does not occur in TPTP-4.7.0M7-201005041505
Closing after verification