Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 366956

Summary: Support content assist escapePosition without linked mode
Product: [ECD] Orion Reporter: John Arthorne <john.arthorne>
Component: EditorAssignee: John Arthorne <john.arthorne>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: eclipse.felipe, mamacdon
Version: 0.4   
Target Milestone: 0.4 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description John Arthorne CLA 2011-12-16 11:45:34 EST
0.4 M1

The editor content assist support takes an input object that supplies a proposal string, an array of positions, and an escape position (see editorFeatures.js, line 737). I would like the provide HTML content assist where I support an escape position, but I do *not* want to enter linked mode at all. Something like this:

{proposal: "<title></title>", escapePosition: selection.offset+7}

I.e., insert the string <title></title> and leave the cursor inside the element
This doesn't seem to work. I need to provide the linked mode positions as well as the escape position.
Comment 1 John Arthorne CLA 2011-12-16 12:05:49 EST
Felipe, I don't know if you and Silenio work in this area or Mark. If you are familiar with the code could you comment on this suggested fix:

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?h=bug366956&id=013e8bbdcfb45e25c87320c2f7de8cd281225031

It is working well for me but maybe there is a better way to do it.
Comment 2 Felipe Heidrich CLA 2011-12-16 12:24:46 EST
(In reply to comment #1)
> Felipe, I don't know if you and Silenio work in this area or Mark. 

not us, i think Mark.
> 
> http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?h=bug366956&id=013e8bbdcfb45e25c87320c2f7de8cd281225031
> 

the code looks good to me
Comment 3 John Arthorne CLA 2011-12-16 13:24:39 EST
I will just release and Mark can sanity check when he gets back.
Comment 4 John Arthorne CLA 2011-12-16 13:37:17 EST
Pushed to master.
Comment 5 Mark Macdonald CLA 2011-12-19 11:07:50 EST
Looks good. 

Hopefully the HTML content assist will let us flush out some more use cases where the content assist API needs to be improved.