C# 클래스 _3PA.MainFeatures.AutoCompletion.AutoComplete

This class handles the AutoCompletionForm
파일 보기 프로젝트 열기: jcaillon/3P 1 사용 예제들

Private Properties

프로퍼티 타입 설명
OnInsertSuggestion void
RememberUseOf void
SetCurrentItems void
ShowSuggestionList void

공개 메소드들

메소드 설명
Close ( ) : void

Closes the form

CorrectKeywordCase ( string keyword, int lastWordPos ) : string

Returns a keyword from the autocompletion list with the correct case

FindInCompletionData ( string keyword, int position, bool dontCheckLine = false ) : List

Find a list of items in the completion and return it Uses the position to filter the list the same way the autocompletion form would

FindInSavedItems ( string keyword, int line ) : CompletionItem

try to match the keyword with an item in the autocomplete list

FindRankingOfDatabaseItem ( string displayText ) : int

Find ranking of a database item

FindRankingOfParsedItem ( string displayText ) : int

Find ranking of a parsed item

ForceClose ( ) : void

Forces the form to close, only when leaving npp

GetCurrentSuggestion ( ) : CompletionItem

returns the keyword currently selected in the completion list

IsMouseIn ( ) : bool

Returns true if the cursor is within the form window

OnKeyDown ( Keys key ) : bool

Passes the OnKey input of the CharAdded or w/e event to the auto completion form

OnShowCompleteSuggestionList ( ) : void

Called from CTRL + Space shortcut

RefreshDynamicItems ( ) : void

Method called when the event OnParseEnded triggers, i.e. when we just parsed the document and need to refresh the autocompletion

RefreshStaticItems ( ) : void

this method should be called at the plugin's start and when we change the current database It refreshed the "static" items of the autocompletion : keywords, snippets, databases, tables, sequences

RememberUseOfDatabaseItem ( string displayText ) : void

remember the use of a particular item in the completion list (for database items!)

RememberUseOfParsedItem ( string displayText ) : void

remember the use of a particular item in the completion list (for dynamic items = parsed items)

UpdateAutocompletion ( ) : void

Updates the CURRENT ITEMS LIST, handles the opening or the closing of the autocompletion form on key input, it is only called when the user adds or delete a char

비공개 메소드들

메소드 설명
OnInsertSuggestion ( CompletionItem data ) : void

Method called by the form when the user accepts a suggestion (tab or enter or doubleclick)

RememberUseOf ( CompletionItem item ) : void

Increase ranking of a given CompletionItem

SetCurrentItems ( List currentItems ) : void

Set the list of current items, handles the lock

ShowSuggestionList ( string keyword ) : void

This function handles the display of the autocomplete form, create or update it

메소드 상세

Close() 공개 정적인 메소드

Closes the form
public static Close ( ) : void
리턴 void

CorrectKeywordCase() 공개 정적인 메소드

Returns a keyword from the autocompletion list with the correct case
public static CorrectKeywordCase ( string keyword, int lastWordPos ) : string
keyword string
lastWordPos int
리턴 string

FindInCompletionData() 공개 정적인 메소드

Find a list of items in the completion and return it Uses the position to filter the list the same way the autocompletion form would
public static FindInCompletionData ( string keyword, int position, bool dontCheckLine = false ) : List
keyword string
position int
dontCheckLine bool
리턴 List

FindInSavedItems() 공개 정적인 메소드

try to match the keyword with an item in the autocomplete list
public static FindInSavedItems ( string keyword, int line ) : CompletionItem
keyword string
line int
리턴 CompletionItem

FindRankingOfDatabaseItem() 공개 정적인 메소드

Find ranking of a database item
public static FindRankingOfDatabaseItem ( string displayText ) : int
displayText string
리턴 int

FindRankingOfParsedItem() 공개 정적인 메소드

Find ranking of a parsed item
public static FindRankingOfParsedItem ( string displayText ) : int
displayText string
리턴 int

ForceClose() 공개 정적인 메소드

Forces the form to close, only when leaving npp
public static ForceClose ( ) : void
리턴 void

GetCurrentSuggestion() 공개 정적인 메소드

returns the keyword currently selected in the completion list
public static GetCurrentSuggestion ( ) : CompletionItem
리턴 CompletionItem

IsMouseIn() 공개 정적인 메소드

Returns true if the cursor is within the form window
public static IsMouseIn ( ) : bool
리턴 bool

OnKeyDown() 공개 정적인 메소드

Passes the OnKey input of the CharAdded or w/e event to the auto completion form
public static OnKeyDown ( Keys key ) : bool
key Keys
리턴 bool

OnShowCompleteSuggestionList() 공개 정적인 메소드

Called from CTRL + Space shortcut
public static OnShowCompleteSuggestionList ( ) : void
리턴 void

RefreshDynamicItems() 공개 정적인 메소드

Method called when the event OnParseEnded triggers, i.e. when we just parsed the document and need to refresh the autocompletion
public static RefreshDynamicItems ( ) : void
리턴 void

RefreshStaticItems() 공개 정적인 메소드

this method should be called at the plugin's start and when we change the current database It refreshed the "static" items of the autocompletion : keywords, snippets, databases, tables, sequences
public static RefreshStaticItems ( ) : void
리턴 void

RememberUseOfDatabaseItem() 공개 정적인 메소드

remember the use of a particular item in the completion list (for database items!)
public static RememberUseOfDatabaseItem ( string displayText ) : void
displayText string
리턴 void

RememberUseOfParsedItem() 공개 정적인 메소드

remember the use of a particular item in the completion list (for dynamic items = parsed items)
public static RememberUseOfParsedItem ( string displayText ) : void
displayText string
리턴 void

UpdateAutocompletion() 공개 정적인 메소드

Updates the CURRENT ITEMS LIST, handles the opening or the closing of the autocompletion form on key input, it is only called when the user adds or delete a char
public static UpdateAutocompletion ( ) : void
리턴 void