X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=bundles%2Forg.simantics.scl.ui%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fui%2Feditor2%2FDebugPartionTokenScanner.java;fp=bundles%2Forg.simantics.scl.ui%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fui%2Feditor2%2FDebugPartionTokenScanner.java;h=a87ed51073ff7332df91724a5db29d5973ea9ade;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hp=2a69dc87434daf4584ec93ae5ed02cb230d101fa;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/editor2/DebugPartionTokenScanner.java b/bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/editor2/DebugPartionTokenScanner.java index 2a69dc874..a87ed5107 100644 --- a/bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/editor2/DebugPartionTokenScanner.java +++ b/bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/editor2/DebugPartionTokenScanner.java @@ -1,48 +1,48 @@ -package org.simantics.scl.ui.editor2; - -import org.eclipse.jface.text.IDocument; -import org.eclipse.jface.text.rules.IPartitionTokenScanner; -import org.eclipse.jface.text.rules.IToken; - -public class DebugPartionTokenScanner implements IPartitionTokenScanner { - IPartitionTokenScanner base; - - public DebugPartionTokenScanner(IPartitionTokenScanner base) { - this.base = base; - } - - @Override - public void setRange(IDocument document, int offset, int length) { - System.out.println(">>> setRange(" + offset + ", " + length + ")"); - base.setRange(document, offset, length); - } - - @Override - public IToken nextToken() { - IToken result = base.nextToken(); - System.out.println(">>> nextToken -> " + result + " " + result.getData()); - return result; - } - - @Override - public int getTokenOffset() { - int result = base.getTokenOffset(); - System.out.println(">>> getTokenOffset -> " + result); - return result; - } - - @Override - public int getTokenLength() { - int result = base.getTokenLength(); - System.out.println(">>> getTokenLength -> " + result); - return result; - } - - @Override - public void setPartialRange(IDocument document, int offset, int length, String contentType, int partitionOffset) { - System.out.println(">>> setPartialRange(" + offset + ", " + length + ", " + contentType + ", " + partitionOffset + ")"); - base.setPartialRange(document, offset, length, contentType, partitionOffset); - } - - -} +package org.simantics.scl.ui.editor2; + +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.rules.IPartitionTokenScanner; +import org.eclipse.jface.text.rules.IToken; + +public class DebugPartionTokenScanner implements IPartitionTokenScanner { + IPartitionTokenScanner base; + + public DebugPartionTokenScanner(IPartitionTokenScanner base) { + this.base = base; + } + + @Override + public void setRange(IDocument document, int offset, int length) { + System.out.println(">>> setRange(" + offset + ", " + length + ")"); + base.setRange(document, offset, length); + } + + @Override + public IToken nextToken() { + IToken result = base.nextToken(); + System.out.println(">>> nextToken -> " + result + " " + result.getData()); + return result; + } + + @Override + public int getTokenOffset() { + int result = base.getTokenOffset(); + System.out.println(">>> getTokenOffset -> " + result); + return result; + } + + @Override + public int getTokenLength() { + int result = base.getTokenLength(); + System.out.println(">>> getTokenLength -> " + result); + return result; + } + + @Override + public void setPartialRange(IDocument document, int offset, int length, String contentType, int partitionOffset) { + System.out.println(">>> setPartialRange(" + offset + ", " + length + ", " + contentType + ", " + partitionOffset + ")"); + base.setPartialRange(document, offset, length, contentType, partitionOffset); + } + + +}