1 19 20 package org.netbeans.spi.lexer; 21 22 import org.netbeans.api.lexer.InputAttributes; 23 import org.netbeans.api.lexer.Language; 24 import org.netbeans.api.lexer.TokenId; 25 26 38 39 public abstract class MutableTextInput<I> { 40 41 private TokenHierarchyControl<I> thc; 42 43 54 protected abstract Language<? extends TokenId> language(); 55 56 59 protected abstract CharSequence text(); 60 61 67 protected abstract InputAttributes inputAttributes(); 68 69 79 protected abstract I inputSource(); 80 81 88 public final TokenHierarchyControl<I> tokenHierarchyControl() { 89 synchronized (this) { 90 if (thc == null) { 91 thc = new TokenHierarchyControl<I>(this); 92 } 93 return thc; 94 } 95 } 96 97 } 98 | Popular Tags |