| Summary: | New PHP File wizard | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Ivan Shumkov <ivan> |
| Component: | PDT | Assignee: | PHP UI <php.ui-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P2 | CC: | bask8625, jb_bugzilla |
| Version: | unspecified | Keywords: | plan |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Ivan Shumkov
This seems to be more of a usability issue regarding the "new PHP file" wizard, and is present in 0.2.4 and 0.2.5 as well. I also find it a bit of a nuisance that the "file name" field is not given focus by default.
While I'm not sure how to propose a patch to this, here's my solution:
in PHPFileCreationWizardPage.java, in the org.eclipse.php.ui.wizards package, the setInitialFileName method should have two lines added:
protected void setInitialFileName(final String fileName) {
fileText.setText(fileName); // this line already exists
fileText.setSelection(0, fileText.getText().indexOf(".")); // add
fileText.forceFocus(); // add
}
This will highlight the initial file name before the .php extension, allowing a user to type in "index" or whatever file name they'd like, right after launching the wizard.
Of course, this fix won't work correctly if the default filename (as set by the wizard) ever contains more than one period, but it's a start.
I agree about the focus issue. I think I'll report it as a separate bug since it seems more like broken behavior than a missing feature. See bug 163223. File: org.eclipse.php.internal.ui.wizards.PHPFileCreationWizardPage.java highlight the newfile word in the file name input Wizard exists for a while now |