Community
Participate
Working Groups
Build Identifier: TPTP-4.7.0-201005251601 related to: Test.UI.TestNavigator_bugzilla_262150 Reproducible: Always Steps to Reproduce: 1.Create a java project, an artifact "art", an deployment "dpl" 2.Open "art" in its editor, from the file menu, select "Save as", put "dpl" as name and click ok, notice that the action is granted. 3.Change the name of "art" in its editor to "art1", test navigator shows the name of the artifact is changed accordingly, from file menu, select "Save as", put "art1" as name and click ok, notice that the action is granted 4.Keep the editor open, from file menu, select "Save as", put invalid characters such as "-" in the name, or "(space)" as the start of the name, click ok, notice the action is granted 5.Note: if "#" is in the name in step 4, the test asset would not get saved and sometimes the following exception is seen: java.lang.IllegalArgumentException: Path must include project and resource name: /Prj/ at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63) at org.eclipse.core.internal.resources.Workspace.newResource(Workspace.java:1801) at org.eclipse.core.internal.resources.Container.getFile(Container.java:207) at org.eclipse.hyades.models.hierarchy.util.HierarchyURIConverterImpl$WorkbenchHelper.createPlatformResourceOutputStream(HierarchyURIConverterImpl.java:311) at org.eclipse.hyades.models.hierarchy.util.HierarchyURIConverterImpl.createPlatformResourceOutputStream(HierarchyURIConverterImpl.java:335) at org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createOutputStream(URIConverterImpl.java:268) at org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createOutputStream(URIConverterImpl.java:284) at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:990) at org.eclipse.hyades.test.core.util.EMFUtil$1.run(EMFUtil.java:142) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1957) at org.eclipse.hyades.test.core.util.EMFUtil.save(EMFUtil.java:150) at org.eclipse.hyades.test.ui.editor.extension.BaseEditorExtension.performSaveAs(BaseEditorExtension.java:669) at org.eclipse.hyades.test.ui.editor.extension.BaseEditorExtension.doSaveAs(BaseEditorExtension.java:601) at org.eclipse.hyades.ui.internal.editor.HyadesEditorPart.doSaveAs(HyadesEditorPart.java:319) at org.eclipse.ui.internal.SaveAsAction.run(SaveAsAction.java:64) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:600) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1407) at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
The save as dialog (org.eclipse.ui.dialogs.SaveAsDialog) does not contain the shared location wizard page (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=309165), which provides error handling. Since save as dialog (org.eclipse.ui.dialogs.SaveAsDialog) is not configurable for error handling (that is, org.eclipse.ui.dialogs.SaveAsDialog.validatePage() is private), we need to implement our own save as dialog using the common location wizard page (org.eclipse.tptp.platform.common.ui.wizard.LocationPage) for the following: org.eclipse.hyades.test.ui.forms.editor.BaseFormEditor.doSaveAs() org.eclipse.hyades.test.ui.editor.extension.BaseEditorExtension.performSaveAs(IProgressMonitor) For the Test Project, we would extend this new implementation of the save as dialog and replace the common location wizard page (org.eclipse.tptp.platform.common.ui.wizard.LocationPage) with the test wizard location page (org.eclipse.hyades.test.ui.wizard.TestLocationPage). Requires new strings/translation/icons for the new implementation of the save as dialog. Requires new test cases for each of the test asset types (added to either /org.eclipse.hyades.test.ui.navigator.tests/manual/Test.UI.TestNavigator_bugzilla_309165.testsuite or /org.eclipse.hyades.test.ui.navigator.tests/manual/Test.UI.TestNavigator_bugzilla_235836.testsuite).
In addition, we should not display the resource name (or file extension) in the save as dialog. Again, this is handled by the common location wizard page.
Insufficient resources to complete.
This defect had been resolved as WONTFIX for more than 1 month. Closing this on the reporter's behalf. Please re-open if you have further comment on this issue.
Closed in TPTP 4.7.2.