@Override
            public void run() {
                if (TokenList.this.cancel.get()) {
                    return ;
                }
                topLevel = TokenHierarchy.get(doc).tokenSequence();
                topLevelIsJava = topLevel.language() == JavaTokenId.language();
                if (topLevelIsJava) {
                    ts = topLevel;
                    ts.moveStart();
                    ts.moveNext(); //XXX: what about empty document
                }
            }
@Override
            public void run() {
                if (TokenList.this.cancel.get()) {
                    return ;
                }
                topLevel = TokenHierarchy.get(doc).tokenSequence();
                topLevelIsJava = topLevel.language() == JavaTokenId.language();
                if (topLevelIsJava) {
                    ts = topLevel;
                    ts.moveStart();
                    ts.moveNext();
                }
            }
@override public void run() { if (tokenlist.this.cancel.get()) { return ; } toplevel = tokenhierarchy.get(doc).tokensequence(); toplevelisjava = toplevel.language() == javatokenid.language(); if (toplevelisjava) { ts = toplevel; ts.movestart(); ts.movenext(); } }