站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

MutableTextInput (Lexer) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.lexer/2 1.19.0 1

org.netbeans.spi.lexer
Class MutableTextInput<I>

java.lang.Object
  extended by org.netbeans.spi.lexer.MutableTextInput<I>

public abstract class MutableTextInput<I>
extends Object

Mutable attributed character sequence allowing to listen for changes in its text.

The input can temporarily be made inactive which leads to dropping of all the present tokens for the input until the input becomes active again.


Constructor Summary
MutableTextInput()
           
 
Method Summary
protected abstract  InputAttributes inputAttributes()
          Get lexer-specific information about this input or null if there is no specific information.
protected abstract  I inputSource()
          Get object that logically provides the text for this mutable text input.
protected abstract  Language<? extends TokenId> language()
          Get the language suitable for lexing of this input.
protected abstract  CharSequence text()
          Get the character sequence provided and maintained by this input.
 TokenHierarchyControl<I> tokenHierarchyControl()
          Get token hierarchy control for this mutable text input.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MutableTextInput

public MutableTextInput()
Method Detail

language

protected abstract Language<? extends TokenId> language()
Get the language suitable for lexing of this input.

Returns:
language language by which the text of this input should be lexed.
This method is only checked upon creation of token hierarchy.
If this method returns null the token hierarchy cannot be created and will be returned as null upon asking until this method will return non-null value.

text

protected abstract CharSequence text()
Get the character sequence provided and maintained by this input.


inputAttributes

protected abstract InputAttributes inputAttributes()
Get lexer-specific information about this input or null if there is no specific information.
The attributes are typically retrieved by the lexer.


inputSource

protected abstract I inputSource()
Get object that logically provides the text for this mutable text input.
For example it may be a swing text document instance Document in case the result of text() is the content of the document.

Returns:
non-null mutable input source.

tokenHierarchyControl

public final TokenHierarchyControl<I> tokenHierarchyControl()
Get token hierarchy control for this mutable text input.
Each mutable text input can hold it in a specific way e.g. swing document can use getProperty(TokenHierarchyControl.class).


org.netbeans.modules.lexer/2 1.19.0 1

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.