Arma Reforger Script API
|
This plugin allows for autocompletion for common structure / code excerpts and boilerplate code. More...
Public Member Functions | |
override void | Run () |
Protected Member Functions | |
void | AutoCompleteCurrentLine () |
bool | AddCastCheck (notnull ScriptEditor scriptEditor, string indentation, string currentLine) |
bool | AddResourceLoadValidityCheck (notnull ScriptEditor scriptEditor, string indentation, string currentLine) |
bool | AddPrintLogLevel (notnull ScriptEditor scriptEditor, string indentation, string currentLine, string comment) |
bool | AddAttributeDecorator (notnull ScriptEditor scriptEditor, string indentation, string currentLine) |
string | AddIndentation (string input, string indentation) |
Add indentation to the provided text, keeping empty lines empty. | |
bool | AddConstructorDestructor (notnull ScriptEditor scriptEditor, bool isConstructor, string indentation, string comment) |
void | CheckToolKeywords () |
void | FillKeywordsMap () |
void | CheckToolAttributeDecorators () |
void | FillAttributeDecoratorMap () |
override void | Configure () |
int | ButtonOK () |
Protected Attributes | |
bool | m_bAddConstructor |
bool | m_bAddDestructor |
bool | m_bAddCastNullcheck |
bool | m_bAddOrFixResourceLoadValidityCheck |
LogLevel | m_eAddPrintLogLevel |
bool | m_bKeepCommentIndentation = true |
bool | m_bUseToolKeywords |
ref array< ref SCR_AutocompletePlugin_KeywordData > | m_aToolKeywords |
bool | m_bUseUserKeywords |
ref array< ref SCR_AutocompletePlugin_KeywordData > | m_aUserKeywords |
bool | m_bUseToolAttributeDecorators |
ref array< ref SCR_AutocompletePlugin_AttributeData > | m_aToolAttributeDecorators |
bool | m_bUseUserAttributeDecorators |
ref array< ref SCR_AutocompletePlugin_AttributeData > | m_aUserAttributeDecorators |
ref map< string, SCR_AutocompletePlugin_KeywordData > | m_mKeywords = new map<string, SCR_AutocompletePlugin_KeywordData>() |
ref map< string, SCR_AutocompletePlugin_AttributeData > | m_mAttributeDecorators = new map<string, SCR_AutocompletePlugin_AttributeData>() |
Static Protected Attributes | |
static const string | SEP_NL = SCR_StringHelper.DOUBLE_SLASH + "------------------------------------------------------------------------------------------------\n" |
static const string | CONSTRUCTOR_KEYWORD = "ctor" |
static const string | DESTRUCTOR_KEYWORD = "dtor" |
This plugin allows for autocompletion for common structure / code excerpts and boilerplate code.
Features: if → adds an if structure ife → adds an if-else structure for → adds a for loop forr → adds a for loop, reversed (i–) foreach → adds a foreach loop foreachi → adds a foreach loop with i index switch → adds a switch case with one case and default while → adds a while loop class → adds a class with its constructor structure method/func → adds a method with separator and Doxygen doc skeleton
ctor → adds a constructor dtor → adds a destructor findcomp → adds SCR_ComponentClass component = SCR_ComponentClass.Cast(entity.FindComponent(SCR_ComponentClass)); print → adds a Print with normal LogLevel
nullcheck on cast (e.g "Class a = Class.Cast(b)") → adds an "if (!a) return;" check below if not present validity check on Resource.Load → adds an "if (!resource.IsValid())" check below (or fixes, in case of "if (!resource)") if not present potential attribute (e.g "ResourceName m_sResourceName;") → adds an [Attribute()] if not present adds missing or incorrect LogLevel to Print/PrintFormat
|
protected |
[in] | scriptEditor | |
[in] | indentation | |
[in] | currentLine |
|
protected |
[in] | scriptEditor | |
[in] | indentation | |
[in] | currentLine |
|
protected |
[in] | scriptEditor | |
[in] | isConstructor | true for constructor, false for destructor |
[in] | indentation | |
[in] | comment |
|
protected |
Add indentation to the provided text, keeping empty lines empty.
[in] | input | |
[in] | indentation |
|
protected |
[in] | scriptEditor | |
[in] | indentation | |
[in] | currentLine | |
[in] | comment |
|
protected |
[in] | scriptEditor | |
[in] | indentation | |
[in] | currentLine |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
override void SCR_AutocompletePlugin.Run | ( | ) |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |