Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 178758 - SWT.MOVEMENT_* needs better Javadoc
Summary: SWT.MOVEMENT_* needs better Javadoc
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 trivial (vote)
Target Milestone: ---   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-22 07:03 EDT by Dani Megert CLA
Modified: 2007-06-01 15:28 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2007-03-22 07:03:35 EDT
3.3 M6

The new word movement listener uses the following movement constants:
 * @see SWT#MOVEMENT_WORD
 * @see SWT#MOVEMENT_WORD_END 
 * @see SWT#MOVEMENT_WORD_START
 * @see SWT#MOVEMENT_CHAR
 * @see SWT#MOVEMENT_CLUSTER

which are not clearly specified. Better Javadoc as outlined in the sample 138579 in bug comment 16 has to be added.

E.g. when reading: 
	/**
	 * The cluster movement type (value is 1<<1).
	 * 
	 * @see org.eclipse.swt.graphics.TextLayout#getNextOffset(int, int)
	 * @see org.eclipse.swt.graphics.TextLayout#getPreviousOffset(int, int)
	 * 
	 * @since 3.0
	 */
	public static final int MOVEMENT_CLUSTER = 1 << 1;

I have no clue what this does.
Comment 1 Felipe Heidrich CLA 2007-05-30 16:46:06 EDT
fixed in head > 20070530
Comment 2 Dani Megert CLA 2007-05-31 04:55:05 EDT
>fixed in head > 20070530
Could not see any improvements in I20070531-0010.
Comment 3 Carolyn MacLeod CLA 2007-05-31 16:09:00 EDT
The new doc is in SWT class. I have now also added a couple more @see tags to the addWordMovementListener and removeWordMovementListener methods in StyledText and the MovementListener and MovementEvent classes so that a bit more navigating can take you to the new doc in SWT class. Hope this helps.
Comment 4 Dani Megert CLA 2007-06-01 03:20:30 EDT
I can see the additional comments but I would have hoped it would also contain the text/examples that Felipe gave in bug 138579 comment 16, e.g.

  /* This method is called:
   *   word next (control right-arrow)
   *   select word next (control shift right-arrow)
   *   delete next word (control delete)
   */
   case SWT.MOVEMENT_WORD:

Comment 5 Felipe Heidrich CLA 2007-06-01 11:49:47 EDT
That comment is StyledText related. It would be wrong to have that kind of comment on SWT.java, specially because the constant is also used in TextLayout.

Dani, I will add more doc to MovementListener and MovementEvent as we had agreed on.
Comment 6 Dani Megert CLA 2007-06-01 15:28:11 EDT
Thanks a bunch Felipe.