I've implemented some custom code completion with a completion 
participant. When I apply one of the completions, I want to make the 
method arguments easy to edit, the same way that JDT and PyDev do. That 
is, a border style is set for each arg, and the first one is highlighted 
with the carrot positioned at the beginning.

I have this working, but it's clunky. I'm setting styles on the 
StyledText widget for each argument. At first I did it with a 
LineStyleListener, but this blows away PyDev's syntax hightlighting. I 
had hoped that its styling was done with a LineStyleListener, but I see 
that it's not. Therefore I have to set the styles directly. I do that as 
soon as the completion proposal is selected.

However, shortly after I set the styles to highlight the args, a parse 
occurs and my styles are wiped out. I implemented a PostParseListener 
top put them back. That works, but it looks terrible because the styles 
appear, disappear almost immediately, and then re-appear a second or two 
later.

The defaul PyDev completion processor does this smoothly, but I looked 
all through the code and I can't see where it happens. Can someone tell 
me what the right way is to handle what I'm trying to do, or point me to 
the PyDev code that does it so I can follow that example?

-Mark

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
pydev-code mailing list
pydev-code@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pydev-code

Reply via email to