Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] Re: the new folding code: constantly layouting?

what i find weird is that additions is constantly filled
Why is that filled there are no additions (at least not as long as i didnt type anything!)

if i do this right before that context call:

additions.clear();

then it is also fine (but again the initial state is then also not correct)

But shouldnt additions be much smaller or added to changes? (because it could be changes)

johan


On Tue, Mar 10, 2009 at 15:35, Johan Compagner <jcompagner@xxxxxxxxx> wrote:
if i go further then this:

ctx.getModel().modifyAnnotations(removals, additions, changes);

in

AbstractASTFoldingStructureProvider.update(FoldingStructureComputationContext ctx) {

can also be commented and then it is also gone (but ofcourse then everything is gone including the initial)

so somehow removals/additions/changes are wrongly generated or the ctx getmodel impl does a bit to much


On Tue, Mar 10, 2009 at 15:24, Jae Gangemi <jgangemi@xxxxxxxxx> wrote:

  i know why the _javascript_ /** */ isn't folding, i'll explain in a few minutes.

  great find - i'm having the same problem in my plugin (and the python one) - i don't seem to notice it in the tcl or ruby plugins, so perhaps something in their impls is different.

On Tue, Mar 10, 2009 at 10:18 AM, Johan Compagner <jcompagner@xxxxxxxxx> wrote:
if i comment out a line from class: AbstractASTFoldingStructureProvider

then the flickering is gone :


private class ElementChangedListener implements IElementChangedListener {
        /*
         * @see
         * org.eclipse.dltk.core.IElementChangedListener#elementChanged(org.
         * eclipse.dltk.core.ElementChangedEvent)
         */
        public void elementChanged(ElementChangedEvent e) {
            IModelElementDelta delta = findElement(fInput, e.getDelta());
            if (delta != null
                    && (delta.getFlags() & (IModelElementDelta.F_CONTENT | IModelElementDelta.F_CHILDREN)) != 0) {
                // update(createContext(false)); <<<<<<<<<<<<<<<
            }
        }


Ofcourse new comment area's i create then are not updated as folding blocks (need to reopen the editor)
But somewhere in that code is the culprit

johan


On Tue, Mar 10, 2009 at 14:53, Johan Compagner <jcompagner@xxxxxxxxx> wrote:
Hi,

in js the new folding code doesnt work quite right.

if i have 3 comment lines like this:

// test 1
// test 2
// test 3

and i fold them then if i type below them. like copy paste or create a new line i see the editor redrawing itself
and my line where i am on (thats below the 3 lines above) looks quickly to be 2 lines below it where it is and then jumps back
This is very fast but very noticeable :(

It seems that the editor expands the comments when i am typing and then collapses it again.

Could be that this is only a js problem, there is also another problem with js and that is that header comments are not matched
I guess this is because in our case headers comments are always js doc (/** xxx */) and not just comments (// xxx )
I will investigate this if i can map it a bit better.

johan


_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev




--
-jae

_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev




Back to the top