Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316122 - [api] AbstractCharacterPairInserter should allow extenders to override the used IExitPolicy
Summary: [api] AbstractCharacterPairInserter should allow extenders to override the us...
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.sse (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.1   Edit
Assignee: Ian Tewksbury CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard: WI 49025
Keywords:
Depends on:
Blocks: 241363 276702
  Show dependency tree
 
Reported: 2010-06-08 09:09 EDT by Ian Tewksbury CLA
Modified: 2010-06-29 11:41 EDT (History)
1 user (show)

See Also:
nsand.dev: review+
thatnitind: review+


Attachments
Patch (1.19 KB, patch)
2010-06-08 09:11 EDT, Ian Tewksbury CLA
nsand.dev: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Tewksbury CLA 2010-06-08 09:09:56 EDT
While implementing AbstractCharacterPairInserter for script regions in HTML and JSP documents for Bug 276702 I have discovered a need to change the IExitPolicy that is used.

The specific case is for the {|} case where the user after entering { then presses enter.  With the provided exit policy the cursor then moves to the exit point so the end result is {}| but really the user wanted
{
|
}

This can easily be accomplished if the exit policy can be changed by extenders of the AbstractCharacterPairInserter.

Suggested patch to follow.
Comment 1 Ian Tewksbury CLA 2010-06-08 09:11:19 EDT
Created attachment 171399 [details]
Patch

Patch adds a protected getExitPolicy method to AbstractCharacterPairInserter allowing extenders to implement their own exit policy if they so choose.
Comment 2 Nick Sandonato CLA 2010-06-08 11:50:51 EDT
Patch looks good.
Comment 3 Nick Sandonato CLA 2010-06-15 16:28:59 EDT
Nitin, could you please review for 3.2.1?
Comment 4 Nick Sandonato CLA 2010-06-29 11:41:22 EDT
Released to Maintenance and HEAD.