Java Doc for ExtSyntaxSupport.java in  » Swing-Library » abeille-forms-designer » org » netbeans » editor » ext » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Swing Library » abeille forms designer » org.netbeans.editor.ext 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.netbeans.editor.SyntaxSupport
      org.netbeans.editor.ext.ExtSyntaxSupport

All known Subclasses:   org.netbeans.editor.ext.html.HTMLSyntaxSupport,  org.netbeans.editor.ext.java.JavaSyntaxSupport,
ExtSyntaxSupport
public class ExtSyntaxSupport extends SyntaxSupport (Code)
Support methods for syntax analyzes
author:
   Miloslav Metelka
version:
   1.00

Inner Class :public interface DeclarationTokenProcessor extends TokenProcessor
Inner Class :public interface VariableMapTokenProcessor extends TokenProcessor
Inner Class :public class BracketFinder extends FinderFactory.GenericFinder
Inner Class :final class TokenItemTP implements TokenProcessor
Inner Class :class CommentOrWhitespaceTP implements TokenProcessor
Inner Class :class FirstTokenTP implements TokenProcessor

Field Summary
final public static  intCOMPLETION_CANCEL
    
final public static  intCOMPLETION_HIDE
    
final public static  intCOMPLETION_POPUP
    
final public static  intCOMPLETION_POST_REFRESH
    
final public static  intCOMPLETION_REFRESH
    

Constructor Summary
public  ExtSyntaxSupport(BaseDocument doc)
    

Method Summary
protected  MapbuildGlobalVariableMap(int offset)
    
protected  MapbuildLocalVariableMap(int offset)
    
public  intcheckCompletion(JTextComponent target, String typedText, boolean visible)
    
protected  DeclarationTokenProcessorcreateDeclarationTokenProcessor(String varName, int startPos, int endPos)
    
protected  VariableMapTokenProcessorcreateVariableMapTokenProcessor(int startPos, int endPos)
    
protected  voiddocumentModified(DocumentEvent evt)
     Called when the document was modified by either the insert or removal.
Parameters:
  evt - event received with the modification notification.
public  intfindDeclarationPosition(String varName, int varPos)
     Find either the local or global declaration position.
public  intfindGlobalDeclarationPosition(String varName, int varPos)
     Get the position of the global declaration of a given variable.
public  intfindLocalDeclarationPosition(String varName, int varPos)
    
public  int[]findMatchingBlock(int offset, boolean simpleSearch)
     Find matching bracket or more generally block that matches with the current position.
Parameters:
  offset - position of the starting bracket
Parameters:
  simple - whether the search should skip comment and possibly otherareas.
public  ObjectfindType(String varName, int varPos)
     Find the type of the variable.
protected  TokenID[]getBracketSkipTokens()
     Get the array of token IDs that should be skipped when searching for matching bracket.
public  int[]getCommentBlocks(int startPos, int endPos)
     Get the blocks consisting of comments in a specified document area.
public  TokenID[]getCommentTokens()
     Get the array of token IDs that denote the comments.
public  int[]getFunctionBlock(int[] identifierBlock)
     Is the identifier at the position a function call? It first checks whether there is a identifier under the cursor and then it searches for the function call character - usually '('.
public  int[]getFunctionBlock(int offset)
    
public  MapgetGlobalVariableMap(int offset)
    
public  MapgetLocalVariableMap(int offset)
    
protected  BracketFindergetMatchingBracketFinder(char bracketChar)
     Get the bracket finder that will search for the matching bracket or null if the bracket character doesn't belong to bracket characters.
protected  intgetMethodStartPosition(int offset)
     Get the start position of the method or the area where the declaration can start.
public  intgetRowLastValidChar(int offset)
     Gets the last non-blank and non-comment character on the given line.
public  TokenItemgetTokenChain(int startOffset, int endOffset)
     Get the chain of the tokens for the given block of text.
public  TokenIDgetTokenID(int offset)
     Gets the token-id of the token at the given position.
Parameters:
  offset - position at which the token should be returned token-id of the token at the requested position.
public  booleanisCommentOrWhitespace(int startPos, int endPos)
    
public  booleanisPrepared()
    
public  booleanisRowValid(int offset)
    
public  booleanisWhitespaceToken(TokenID tokenID, char[] buffer, int offset, int tokenLength)
    

Field Detail
COMPLETION_CANCEL
final public static int COMPLETION_CANCEL(Code)



COMPLETION_HIDE
final public static int COMPLETION_HIDE(Code)



COMPLETION_POPUP
final public static int COMPLETION_POPUP(Code)



COMPLETION_POST_REFRESH
final public static int COMPLETION_POST_REFRESH(Code)



COMPLETION_REFRESH
final public static int COMPLETION_REFRESH(Code)




Constructor Detail
ExtSyntaxSupport
public ExtSyntaxSupport(BaseDocument doc)(Code)




Method Detail
buildGlobalVariableMap
protected Map buildGlobalVariableMap(int offset)(Code)



buildLocalVariableMap
protected Map buildLocalVariableMap(int offset)(Code)



checkCompletion
public int checkCompletion(JTextComponent target, String typedText, boolean visible)(Code)
Check and possibly popup, hide or refresh the completion



createDeclarationTokenProcessor
protected DeclarationTokenProcessor createDeclarationTokenProcessor(String varName, int startPos, int endPos)(Code)



createVariableMapTokenProcessor
protected VariableMapTokenProcessor createVariableMapTokenProcessor(int startPos, int endPos)(Code)



documentModified
protected void documentModified(DocumentEvent evt)(Code)
Called when the document was modified by either the insert or removal.
Parameters:
  evt - event received with the modification notification. getType()can be used to obtain the type of the event.



findDeclarationPosition
public int findDeclarationPosition(String varName, int varPos)(Code)
Find either the local or global declaration position. First try the local declaration and if it doesn't succeed, then try the global declaration.



findGlobalDeclarationPosition
public int findGlobalDeclarationPosition(String varName, int varPos)(Code)
Get the position of the global declaration of a given variable. By default it's implemented to use the same token processor as for the local variables but the whole file is searched.



findLocalDeclarationPosition
public int findLocalDeclarationPosition(String varName, int varPos)(Code)



findMatchingBlock
public int[] findMatchingBlock(int offset, boolean simpleSearch) throws BadLocationException(Code)
Find matching bracket or more generally block that matches with the current position.
Parameters:
  offset - position of the starting bracket
Parameters:
  simple - whether the search should skip comment and possibly otherareas. This can be useful when the speed is critical, becausethe simple search is faster. array of integers containing starting and ending position of theblock in the document. Null is returned if there's no matchingblock.



findType
public Object findType(String varName, int varPos)(Code)
Find the type of the variable. The default behavior is to first search for the local variable declaration and then possibly for the global declaration and if the declaration position is found to get the first word on that position. it returns Object to enable the custom implementations to returnthe appropriate instances.



getBracketSkipTokens
protected TokenID[] getBracketSkipTokens()(Code)
Get the array of token IDs that should be skipped when searching for matching bracket. It usually includes comments and character and string constants. Returns empty array by default.



getCommentBlocks
public int[] getCommentBlocks(int startPos, int endPos) throws BadLocationException(Code)
Get the blocks consisting of comments in a specified document area.
Parameters:
  doc - document to work with
Parameters:
  startPos - starting position of the searched document area
Parameters:
  endPos - ending position of the searched document area



getCommentTokens
public TokenID[] getCommentTokens()(Code)
Get the array of token IDs that denote the comments. Returns empty array by default.



getFunctionBlock
public int[] getFunctionBlock(int[] identifierBlock) throws BadLocationException(Code)
Is the identifier at the position a function call? It first checks whether there is a identifier under the cursor and then it searches for the function call character - usually '('.
Parameters:
  identifierBlock - int[2] block delimiting the identifier int[2] block or null if there's no function call



getFunctionBlock
public int[] getFunctionBlock(int offset) throws BadLocationException(Code)



getGlobalVariableMap
public Map getGlobalVariableMap(int offset)(Code)



getLocalVariableMap
public Map getLocalVariableMap(int offset)(Code)



getMatchingBracketFinder
protected BracketFinder getMatchingBracketFinder(char bracketChar)(Code)
Get the bracket finder that will search for the matching bracket or null if the bracket character doesn't belong to bracket characters.



getMethodStartPosition
protected int getMethodStartPosition(int offset)(Code)
Get the start position of the method or the area where the declaration can start.



getRowLastValidChar
public int getRowLastValidChar(int offset) throws BadLocationException(Code)
Gets the last non-blank and non-comment character on the given line.



getTokenChain
public TokenItem getTokenChain(int startOffset, int endOffset) throws BadLocationException(Code)
Get the chain of the tokens for the given block of text. The returned chain of token-items reflects the tokens as they occur in the text and therefore the first token can start at the slightly lower position than the requested one. The chain itself can be extended automatically when reaching the first chain item and calling getPrevious() on it. Another chunk of the tokens will be parsed and the head of the chain will be extended. However this happens only in case there was no modification performed to the document between the creation of the chain and this moment. Otherwise this call throws IllegalStateException.
Parameters:
  startOffset - starting position of the block
Parameters:
  endOffset - ending position of the block the first item of the token-item chain or null if there are notokens in the given area or the area is so small that it laysinside one token. To prevent this provide the area that spans anew-line.



getTokenID
public TokenID getTokenID(int offset) throws BadLocationException(Code)
Gets the token-id of the token at the given position.
Parameters:
  offset - position at which the token should be returned token-id of the token at the requested position. If there's nomore tokens in the text, the Syntax.INVALID isreturned.



isCommentOrWhitespace
public boolean isCommentOrWhitespace(int startPos, int endPos) throws BadLocationException(Code)



isPrepared
public boolean isPrepared()(Code)
Check if sources for code completion are already available



isRowValid
public boolean isRowValid(int offset) throws BadLocationException(Code)
Does the line contain some valid code besides of possible white space and comments?



isWhitespaceToken
public boolean isWhitespaceToken(TokenID tokenID, char[] buffer, int offset, int tokenLength)(Code)



Fields inherited from org.netbeans.editor.SyntaxSupport
protected boolean tokenNumericIDsValid(Code)(Java Doc)

Methods inherited from org.netbeans.editor.SyntaxSupport
protected SyntaxSupport createSyntaxSupport(Class syntaxSupportClass)(Code)(Java Doc)
public int findInsideBlocks(Finder finder, int startPos, int endPos, int[] blocks) throws BadLocationException(Code)(Java Doc)
public int findOutsideBlocks(Finder finder, int startPos, int endPos, int[] blocks) throws BadLocationException(Code)(Java Doc)
public synchronized SyntaxSupport get(Class syntaxSupportClass)(Code)(Java Doc)
final public BaseDocument getDocument()(Code)(Java Doc)
public synchronized int[] getTokenBlocks(int startPos, int endPos, TokenID[] tokenIDArray) throws BadLocationException(Code)(Java Doc)
public TokenItem getTokenChain(int offset) throws BadLocationException(Code)(Java Doc)
public void initSyntax(Syntax syntax, int startPos, int endPos, boolean forceLastBuffer, boolean forceNotLastBuffer) throws BadLocationException(Code)(Java Doc)
public boolean isIdentifier(String word)(Code)(Java Doc)
public void tokenizeText(TokenProcessor tp, int startOffset, int endOffset, boolean forceLastBuffer) throws BadLocationException(Code)(Java Doc)
public void tokenizeText(TokenProcessor tp, String text)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.