Bug 117866 - Home and End key must behave like the Java editor
Summary: Home and End key must behave like the Java editor
Status: CLOSED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.sse (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows XP
: P2 normal with 1 vote (vote)
Target Milestone: 2.0 M3   Edit
Assignee: Amy Wu CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 109681 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-11-24 05:15 EST by Missing name CLA
Modified: 2007-03-15 18:15 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Missing name CLA 2005-11-24 05:15:41 EST
In the xml, html and all WTP provided editors the Home and End key must behave like the Java editor i.e.

 Home key takes you to the first non-whitespace char
 End key takes you to the last non-whitespace char.

I am using WTP 1.0 M8

cheers
Comment 1 David Williams CLA 2005-12-07 01:19:34 EST
Thanks, I persoanlly hate that behavior :) ... but you're right, we should be consistent. 
Comment 2 Bill Lund CLA 2006-06-19 10:35:59 EDT
Come on, this is still an issue in 1.5 and must be an incredibly easy fix.  It's also very annoying, which suggests that the priority of this bug is too low.  Current assignee (Amy) can you please consider bumping this up in priority?

To be clear the Home key would jump to the first non-whitespace character or to the first column if it was already there.
Comment 3 Amy Wu CLA 2006-06-20 16:46:57 EDT
Opened bug 147941 on the Text editor to see if they will move this functionality to the text editor since it is practically there already.  If they don't do it soon enough, we'll just add this to our editors.  I'd prefer Text editor add it though, just to reduce preference clutter.
Comment 4 Amy Wu CLA 2006-09-19 17:10:53 EDT
According to WTP 1.5.x UI policy (http://wiki.eclipse.org/index.php/WTP_Release_1.5.x_Maintenance_Plan_and_Policies)
UI changes need to be kept to a minimum, and adding the smart home/end functionality would be a UI change (adding to preference page)  So this bug will not be fixed in 1.5.x.  However, from the comments in bug 147941, it sounds like the Text editor component may be fixing this for Eclipse 3.3.  If this is the case, then this will be fixed for WTP 2.0.

In the meantime, there is a trick to enable smart home/end under the covers for all text editors.  Add the following line:
AbstractTextEditor.Navigation.SmartHomeEnd=true

to <your workspace directory>/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs

Please note this is just an official trick, but it should get the job done, and when the base adds UI to surface this preference, it should work seamlessly.
Comment 5 Amy Wu CLA 2006-09-19 17:11:44 EDT
Sorry, I meant "unofficial trick"
Comment 6 Amy Wu CLA 2006-11-02 15:49:48 EST
The base text editor fixed bug 147941 and added this preference General->Editors->Text Editors->"Smart caret positioning at line start and end"
and sse editors obey this preference.

It was added for Eclipse 3.3M3, so this will be in WTP 2.0M3.
Comment 7 Amy Wu CLA 2007-02-14 13:42:15 EST
*** Bug 109681 has been marked as a duplicate of this bug. ***
Comment 8 Amy Wu CLA 2007-03-15 18:15:50 EDT
verified in wtp2.0 M6 200703150647