Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 160485 - Filename vs. logical name in UI
Summary: Filename vs. logical name in UI
Status: CLOSED WORKSFORME
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Bozier jerome CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 166025
  Show dependency tree
 
Reported: 2006-10-11 10:46 EDT by Alex Bernstein CLA
Modified: 2016-05-05 10:29 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Bernstein CLA 2006-10-11 10:46:11 EDT
TestNavigator displays internal assets' names instead of physical filenames. This is by design, but users get confused in the folloowing situation:

1. Rename an asset in TestNavigator.
2. Open any Dialog/Wizard that requires user to select an asset. The standard Eclipse page displays filenames. User cannot recognise the just-renamed file.

Suggestion:
TPTP should provide a way to switch between physical filenames display and logical assets' names display, whenever user us presented with file selection wizard page or a dialog. Perhaps the logicla names should be used when Test Perspective is active.

When renaming an asset in TestNavigator, TPTP code needs to prompt/ask user whether they want to rename the file as well.
Comment 1 Mark D Dunn CLA 2006-10-11 11:09:08 EDT
Reassign to Jerome.
Comment 2 Jerome Gout CLA 2006-10-23 03:25:36 EDT
The rename action has been wholly rewritten (in ordre to propagate the rename to other dependent assets).
It has been decided to change the file name of the test asset as well as the internal name, to reduce the confusion.

Do you suggest to add a new action in the test navigator to switch the display  of nodes that stand for files (either physical or logical names) ?

Anyway, this won't address the problem for wizard or dialog display.
In this case we need to provide an API to access to names shown in the test nav.
This is the target of the enhancement 161126.
Comment 3 Paul Slauenwhite CLA 2006-10-23 10:50:35 EDT
Please target to 4.4 and review the priority according to http://www.eclipse.org/tptp/home/documents/process/development/bugzilla.html.
Comment 4 Jerome Gout CLA 2007-01-16 09:01:15 EST
According to the description, this is not a valid bug.

Feel free to open a more detailed defect or enhancement.
Comment 5 Alex Bernstein CLA 2007-01-16 09:32:45 EST
The original request was about displaying "logical" names everywhere in TPTP UI (TestNavigator, Dialogs and Wizards). I am re-opening this defect, since it is still an issue with our customers.
Comment 6 Paul Slauenwhite CLA 2007-01-26 08:25:25 EST
Targeting to future since not containable in 4.4.
Comment 7 Paul Slauenwhite CLA 2007-01-26 08:59:30 EST
As discussed on this week's Test Project call (January 22, 2007), the Test Project will focus on existing P1 - P2/Blocker - Major and P1/Normal and test creation/automation defects (omitting defects dependant on outstanding features) in TPTP 4.4.  All other Test Project defects have been targeted to future.

If this defect has been targeted to future and you/originator feel it should be completed in 4.4, please provide the necessary reason as a reply to this comment or a post to the Test Project mailing list (tptp-test-tooling-dev@eclipse.org).  We will collectively triage and assess our resources to determine a case-by-case decision. 
Comment 8 Paul Slauenwhite CLA 2007-01-26 09:01:08 EST
As discussed on this week's Test Project call (January 22, 2007), the Test Project will focus on existing P1 - P2/Blocker - Major and P1/Normal and test creation/automation defects (omitting defects dependant on outstanding features) in TPTP 4.4.  All other Test Project defects have been targeted to future.

If this defect has been targeted to future and you/originator feel it should be completed in 4.4, please provide the necessary reason as a reply to this comment or a post to the Test Project mailing list (tptp-test-tooling-dev@eclipse.org).  We will collectively triage and assess our resources to determine a case-by-case decision. 
Comment 9 Paul Slauenwhite CLA 2007-01-26 09:03:28 EST
Correction:  The Test Project mailing list is tptp-testing-tools-dev@eclipse.org.
Comment 10 Paul Slauenwhite CLA 2008-01-24 08:39:58 EST
The API for querying UI names from Test Navigator (see 161126) is not required to resolve the confusion.  Instead, defect 215236 is required.

Jerome B., can you integrate this defect with your work on enhancement 166025?
Comment 11 Paul Slauenwhite CLA 2008-03-03 10:51:09 EST
(In reply to comment #10)
> The API for querying UI names from Test Navigator (see 161126) is not required
> to resolve the confusion.  Instead, defect 215236 is required.

Defect 215236 is invalid.  Instead, this defect will provide a preference to allow the user to select between displaying the logical (default) or file name of a test asset in the Test Perspective, views, wizards, dialogs, etc..

In addition, when renaming an asset in Test Navigator, we need prompt user
whether they want to rename the file as well.

Jerome B., can you integrate this defect with your work on enhancement 166025?
Comment 12 Bozier jerome CLA 2008-03-13 11:32:53 EDT
tested with 166025 patch
renaming, moving or pasting a test asset change both logical and physical name
Comment 13 Alex Bernstein CLA 2008-03-13 11:44:41 EDT
So, the logical rename would fail if there is another file with the same name (i.e. physical name)?
Comment 14 Bozier jerome CLA 2008-03-13 13:09:48 EDT
"ok" button from rename wizard is enable if :
. target name is not empty
. target name is different than original name
. there is no ressource with same name that target name
so 3rd test will avoid problem

the only problem remaining is if you make theses steps :
. create a test "foo"
. rename it in the editor in "foo2"
. create a test "foo3"
. rename it on contextual menu as "foo2"
=>you now have 2 test with same name, but stored with different file name....

i have to find a way so that rename inside the editor call the rename from contextual menu. that would ensure that test name and file name stay the same
Comment 15 Alex Bernstein CLA 2008-03-13 13:43:03 EDT
Or at least rename from inside an editor calls the same validation routine as the rename from inside testnav?
Comment 16 Bozier jerome CLA 2008-03-14 10:43:06 EDT
ok, finally found where is the code that deal rename inside editor :
org.eclipse.hyades.test.ui.editor.form.util.NamedElementSection.java : 249 
it look like this :

	public void modifyText(ModifyEvent e)
	{
		if(e.widget == nameText)
		{
			getNamedElement().setName(nameText.getText());
			getEditorForm().updateTitle();
			getEditorForm().getBaseEditorExtension().markDirty();
		}

as you can see, this rename is actually directly done, without any control.
it mean that you can either put a name that already exists, or even an empty name.
as it is (in an editor), i don't really see a way to check if name is valid or not. 
i'd see two way to change this :
. change name field to be not editable, with a "rename" button (so that rename wizard can be trigger)
. let it like it is and put a consistency check on saving, with an error window if name is invalid (and then disable the save in this case)

i don't really like any of theses solutions, but i am open to any sugestion that could solve this problem
Comment 17 Alex Bernstein CLA 2008-03-14 10:58:31 EDT
If you have an API that "knows" how to handle rename (checking for duplicates), you could add a call to that API from inside this method:

public void modifyText(ModifyEvent e)
        {
                if(e.widget == nameText && isValidName(nameText.getText()))
                {
                        getNamedElement().setName(nameText.getText());
                        getEditorForm().updateTitle();
                        getEditorForm().getBaseEditorExtension().markDirty();
                }


Of course, that same API needs to be called by anybody (like me in RPT test editor) who wants to allow renaming and do NOT use the above method.
Comment 18 Bozier jerome CLA 2008-03-17 06:37:25 EDT
fixed with patch V11 from bugzilla 166025 (see comment inside)
Comment 19 Paul Slauenwhite CLA 2008-03-31 12:14:01 EDT
Deferring to I7 as discussed by PMC/AG (http://wiki.eclipse.org/TPTP-AG-20080331#Test_Project).
Comment 20 Paul Slauenwhite CLA 2008-04-21 13:27:00 EDT
(In reply to comment #11)
> (In reply to comment #10)
> > The API for querying UI names from Test Navigator (see 161126) is not required
> > to resolve the confusion.  Instead, defect 215236 is required.
> 
> Defect 215236 is invalid.  Instead, this defect will provide a preference to
> allow the user to select between displaying the logical (default) or file name
> of a test asset in the Test Perspective, views, wizards, dialogs, etc..
> 
> In addition, when renaming an asset in Test Navigator, we need prompt user
> whether they want to rename the file as well.

Jerome has handled/eliminated inconsistent logical names under enhancement 166025 and now we consistently use logical names for test assets in all
wizards (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=163150), there is no need for this preference.  


Comment 21 Paul Slauenwhite CLA 2009-02-25 11:59:01 EST
Closing by default since not closed by the originator in the 7+ months since
being resolved.  

Please reopen if the issue is still present in the latest TPTP release or the
resolution is not correct.