SimonSlater
13-07-2019, 22:08
Hallo zusammen,
ich habe mir eben für Notepad++ ein simples Syntax Highlighting erstellt, für die STNE Script Engine.
Es sind alle Klassen drin und eine Hand voll von Funktionen. Werde es auch noch erweitern.
Anleitung:
- Den Code unten als xml File abspeichern
- In Notepad++ zu "Sprachen"-"Eigene Sprache definieren"
- Importieren und das xml auswählen
- Dialog schließen und "STNE" als Sprache auswählen
<NotepadPlus>
<UserLang name="STNE" ext="cs" udlVersion="2.1">
<Settings>
<Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="2" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00// 01 02 03/* 04*/</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
<Keywords name="Numbers, extras1"></Keywords>
<Keywords name="Numbers, extras2"></Keywords>
<Keywords name="Numbers, suffix1">.</Keywords>
<Keywords name="Numbers, suffix2">.</Keywords>
<Keywords name="Numbers, range"></Keywords>
<Keywords name="Operators1">( ) , ; . =</Keywords>
<Keywords name="Operators2">- + * / #</Keywords>
<Keywords name="Folders in code1, open">{</Keywords>
<Keywords name="Folders in code1, middle"></Keywords>
<Keywords name="Folders in code1, close">}</Keywords>
<Keywords name="Folders in code2, open"></Keywords>
<Keywords name="Folders in code2, middle"></Keywords>
<Keywords name="Folders in code2, close"></Keywords>
<Keywords name="Folders in comment, open"></Keywords>
<Keywords name="Folders in comment, middle"></Keywords>
<Keywords name="Folders in comment, close"></Keywords>
<Keywords name="Keywords1">Var
If
Else
For
Class
Structure
Interface
E num
As
OR
AND
NOT
Function
New
Return
Whil e
Do
Switch
ElseIf
</Keywords>
<Keywords name="Keywords2">Log
PageLog
ScriptBase
Array
Boolean
Byte
Ch ar
DictionaryEntry
ICollection
IComparer
IDict ionary
IEnumerable
IEnumerator
IList
Date
Dou ble
Enum
Short
Integer
Long
Math
Object
Ran dom
String
CStr
CInt
bold
println</Keywords>
<Keywords name="Keywords3">EHtmlInputType
IGuiControl
IGuiControlCollection 
CommandLineArgumentEntry
CommandLineArguments
 CCollectionBase
CDefaultValueHashTable
CDelegate 
CDictionaryBase
CEntryList
CIntegerComparer
C IntegerHashTable
CIntegerList
CKeyMustExistsHash Table
CObject
CObjectHashTable
CObjectList
CSc riptGlobal
CSortedIntegerObjectList
CSortedListB ase
CSortedObjectList
CSortedStringList
CSorted StringObjectList
CStringHashTable
CStringList
C StringObjectHashTable
ScriptStart
SPoint
CGuiCo ntrolHelper
CGuiEvent
CGuiEventFilter
CGuiEvent FilterBase
CGuiEventFilterControl
CGuiEventFilte rPage
CGuiEventFilterPageAction
CGuiEventFilterS ubPage
CGuiEventOnGalaxyMapBeforeRender
CGuiEven tOnInfoBarAfterCreate
CGuiEventOnPageBeforeCreate Controls
CGuiEventOnPageBeforeExecuteAction
CGui EventOnPageBeforeRender
CGuiEventOnTableAfterCrea te
CGuiEventOnTableAfterHeadAdded
CGuiEventOnTab leAfterRowAdded
CGuiEventOnTableBeforeCreate
CGu iPage
CGuiTableEvent
CImpersonationDelegate
CSc riptContext
EAlertLevel
EAutoPilotType
EBeamRes ource
EGoodsType
EGuiControl 
EGuiEventType
ELRSNumericType
EShipDirection
 EShipLogType
EShipType
ETorpedoType
EWarpcoreFi llType
EGuiPage
CAccount
CAlliance
CBaseColony Manager
CBaseShip
CBaseShipManager
CBuilding
C BuildingList
CColony
CColonyEnumerator
CColonyF ield
CColonyFieldList
CColonyManager
CColonyMap 
CControlBuilder
CCoordinateList
CDataNode
CDa taNodeList
CDataNodeStorage
CEvent
CEventOnCrea teControls
CEventOnCreateOptions
CEventOnCreateP age
CEventOnDoAction
CEventOnInit
CEventOnRegis terEvents
CFleetEnumerator
CGalaxyMap
CGalaxyMa pItem
CGameUrl
CGlobalFunctions
CGoodsInfo
CGo odsInfoEnumerator
CGuiEvents
CHandle
CHtmlLager Liste
CHtmlStneButtonContainer
CJsAction
CMyCol ony
CMyFleet
CMyScript
CMyShip
CMyShipDefiniti on
CMyShipTick
CMyUser
CRandomNameGenerator
CR andomNumberGeneratorBase
CScript
CScriptEnumerat or
CScriptUrl
CSector
CShip
CShipDefinition
C ShipEnumerator
CShipList
CShipManager
CStockRoo m
CStringBuilder
CTrueRandomNumberGenerator
CUr l
CUrlBuilder
CUser
CUserEnumerator
CUserList
 
CWebContext
CWebRequest
CWebResponse
CWebUrl
 CWELL512RandomNumberGenerator
CXorShift128RandomN umberGenerator
EGalaxyMapItemType
EReplicatorGoo ds
Global
CControlTableCell
CHtmlAttributeColle ction
CHtmlBig
CHtmlBreak
CHtmlCheckBox
CHtmlC ontrol
CHtmlControlList
CHtmlControlWrapper
CHt mlDictionary
CHtmlDiv
CHtmlEventList
CHtmlFlash 
CHtmlForm
CHtmlGalaxyMap
CHtmlGalaxyMapItem
C HtmlHelper
CHtmlHorizontalLine
CHtmlHyperLink
C HtmlImage
CHtmlInput
CHtmlLi
CHtmlLinkButton
C HtmlListBox
Class CHtmlListBoxItem
CHtmlListBoxItemCollection
CHtm lLiteral
CHtmlNewLine
CHtmlOl
CHtmlParagraph
C HtmlResetButton
CHtmlSeperator
CHtmlSmall
CHtml Space
CHtmlSpan
CHtmlStyleCollection
CHtmlSubmi tButton
CHtmlTextArea
CHtmlTextBox
CHtmlUl
CTa ble
CTableCell
CTableCellCollection
CTableCellL ist
CTableRow
CTableRowCollection
CVirtualArray 
Log
PageLog
ScriptBase
Server
SMap
SMapPosi tion
Response
DateTime
GuestShip
GuestUser
My Ship
Main
ScriptContext</Keywords>
<Keywords name="Keywords4">True
False</Keywords>
<Keywords name="Keywords5">Items
Item
Value
Add
table
AddRow
Request
C ontainsKey
Form
Style
Cells
MyShip
MapPositio n
CurrentColony
InOrbit
Coordinates
Coords
Bu ildings
Count
TypeName
Active
StockRoom
FreeS torage
Sum
Amount
DockedToShipID
ShipID
GetNa me
GetImage
GoodsType
CssClass
Type
Definitio n
IsSpaceStation
Detach
AllianceID
UserID
Ite mByIndex
KeyByIndex
IsEmpty
Exists
HasChildren 
Energy
Name
Abs
Height
GetHtmlName
Floor
R ename
FirstNode
Now
ToShortDateString
CurrentF leet
Next
Width
RowCount
Multiple
Hull
Alert Level
Shields
Larne
ToShortTimeString
LastNode 
Clear
Text
Action
TransferToShip
RegisterEve nt
TableBeforeCreate
TableAfterRowAdded
LoadFro mUser
Current
WriteAppLog
JsToggleElement
Brac ketLink
GuiControl
Page
Body
Controls
Insert
 
ID</Keywords>
<Keywords name="Keywords6"></Keywords>
<Keywords name="Keywords7"></Keywords>
<Keywords name="Keywords8"></Keywords>
<Keywords name="Delimiters">00 01 02 03" 04\ 05" 06' 07\ 08' 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" fgColor="333333" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="COMMENTS" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="2" nesting="0" />
<WordsStyle name="LINE COMMENTS" fgColor="FF8000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="NUMBERS" fgColor="800000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS1" fgColor="8000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS2" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS3" fgColor="FF0080" bgColor="FFFFFF" fontName="" fontStyle="3" nesting="0" />
<WordsStyle name="KEYWORDS4" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS5" fgColor="FF8080" bgColor="FFFFFF" fontName="" fontStyle="2" nesting="0" />
<WordsStyle name="KEYWORDS6" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="3" nesting="0" />
<WordsStyle name="KEYWORDS7" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="3" nesting="0" />
<WordsStyle name="KEYWORDS8" fgColor="333333" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="OPERATORS" fgColor="8080FF" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="FOLDER IN CODE1" fgColor="333333" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE2" fgColor="333333" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN COMMENT" fgColor="333333" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS1" fgColor="8000FF" bgColor="FFFFFF" fontName="" fontStyle="2" nesting="0" />
<WordsStyle name="DELIMITERS2" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS3" fgColor="804000" bgColor="FFFFFF" fontName="" fontStyle="2" nesting="0" />
<WordsStyle name="DELIMITERS4" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="65600" />
<WordsStyle name="DELIMITERS5" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="2" nesting="32800" />
<WordsStyle name="DELIMITERS6" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="3" nesting="0" />
<WordsStyle name="DELIMITERS7" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="3" nesting="0" />
<WordsStyle name="DELIMITERS8" fgColor="333333" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
</Styles>
</UserLang>
</NotepadPlus>
Viel Spaß damit!
ich habe mir eben für Notepad++ ein simples Syntax Highlighting erstellt, für die STNE Script Engine.
Es sind alle Klassen drin und eine Hand voll von Funktionen. Werde es auch noch erweitern.
Anleitung:
- Den Code unten als xml File abspeichern
- In Notepad++ zu "Sprachen"-"Eigene Sprache definieren"
- Importieren und das xml auswählen
- Dialog schließen und "STNE" als Sprache auswählen
<NotepadPlus>
<UserLang name="STNE" ext="cs" udlVersion="2.1">
<Settings>
<Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="2" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00// 01 02 03/* 04*/</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
<Keywords name="Numbers, extras1"></Keywords>
<Keywords name="Numbers, extras2"></Keywords>
<Keywords name="Numbers, suffix1">.</Keywords>
<Keywords name="Numbers, suffix2">.</Keywords>
<Keywords name="Numbers, range"></Keywords>
<Keywords name="Operators1">( ) , ; . =</Keywords>
<Keywords name="Operators2">- + * / #</Keywords>
<Keywords name="Folders in code1, open">{</Keywords>
<Keywords name="Folders in code1, middle"></Keywords>
<Keywords name="Folders in code1, close">}</Keywords>
<Keywords name="Folders in code2, open"></Keywords>
<Keywords name="Folders in code2, middle"></Keywords>
<Keywords name="Folders in code2, close"></Keywords>
<Keywords name="Folders in comment, open"></Keywords>
<Keywords name="Folders in comment, middle"></Keywords>
<Keywords name="Folders in comment, close"></Keywords>
<Keywords name="Keywords1">Var
If
Else
For
Class
Structure
Interface
E num
As
OR
AND
NOT
Function
New
Return
Whil e
Do
Switch
ElseIf
</Keywords>
<Keywords name="Keywords2">Log
PageLog
ScriptBase
Array
Boolean
Byte
Ch ar
DictionaryEntry
ICollection
IComparer
IDict ionary
IEnumerable
IEnumerator
IList
Date
Dou ble
Enum
Short
Integer
Long
Math
Object
Ran dom
String
CStr
CInt
bold
println</Keywords>
<Keywords name="Keywords3">EHtmlInputType
IGuiControl
IGuiControlCollection 
CommandLineArgumentEntry
CommandLineArguments
 CCollectionBase
CDefaultValueHashTable
CDelegate 
CDictionaryBase
CEntryList
CIntegerComparer
C IntegerHashTable
CIntegerList
CKeyMustExistsHash Table
CObject
CObjectHashTable
CObjectList
CSc riptGlobal
CSortedIntegerObjectList
CSortedListB ase
CSortedObjectList
CSortedStringList
CSorted StringObjectList
CStringHashTable
CStringList
C StringObjectHashTable
ScriptStart
SPoint
CGuiCo ntrolHelper
CGuiEvent
CGuiEventFilter
CGuiEvent FilterBase
CGuiEventFilterControl
CGuiEventFilte rPage
CGuiEventFilterPageAction
CGuiEventFilterS ubPage
CGuiEventOnGalaxyMapBeforeRender
CGuiEven tOnInfoBarAfterCreate
CGuiEventOnPageBeforeCreate Controls
CGuiEventOnPageBeforeExecuteAction
CGui EventOnPageBeforeRender
CGuiEventOnTableAfterCrea te
CGuiEventOnTableAfterHeadAdded
CGuiEventOnTab leAfterRowAdded
CGuiEventOnTableBeforeCreate
CGu iPage
CGuiTableEvent
CImpersonationDelegate
CSc riptContext
EAlertLevel
EAutoPilotType
EBeamRes ource
EGoodsType
EGuiControl 
EGuiEventType
ELRSNumericType
EShipDirection
 EShipLogType
EShipType
ETorpedoType
EWarpcoreFi llType
EGuiPage
CAccount
CAlliance
CBaseColony Manager
CBaseShip
CBaseShipManager
CBuilding
C BuildingList
CColony
CColonyEnumerator
CColonyF ield
CColonyFieldList
CColonyManager
CColonyMap 
CControlBuilder
CCoordinateList
CDataNode
CDa taNodeList
CDataNodeStorage
CEvent
CEventOnCrea teControls
CEventOnCreateOptions
CEventOnCreateP age
CEventOnDoAction
CEventOnInit
CEventOnRegis terEvents
CFleetEnumerator
CGalaxyMap
CGalaxyMa pItem
CGameUrl
CGlobalFunctions
CGoodsInfo
CGo odsInfoEnumerator
CGuiEvents
CHandle
CHtmlLager Liste
CHtmlStneButtonContainer
CJsAction
CMyCol ony
CMyFleet
CMyScript
CMyShip
CMyShipDefiniti on
CMyShipTick
CMyUser
CRandomNameGenerator
CR andomNumberGeneratorBase
CScript
CScriptEnumerat or
CScriptUrl
CSector
CShip
CShipDefinition
C ShipEnumerator
CShipList
CShipManager
CStockRoo m
CStringBuilder
CTrueRandomNumberGenerator
CUr l
CUrlBuilder
CUser
CUserEnumerator
CUserList
 
CWebContext
CWebRequest
CWebResponse
CWebUrl
 CWELL512RandomNumberGenerator
CXorShift128RandomN umberGenerator
EGalaxyMapItemType
EReplicatorGoo ds
Global
CControlTableCell
CHtmlAttributeColle ction
CHtmlBig
CHtmlBreak
CHtmlCheckBox
CHtmlC ontrol
CHtmlControlList
CHtmlControlWrapper
CHt mlDictionary
CHtmlDiv
CHtmlEventList
CHtmlFlash 
CHtmlForm
CHtmlGalaxyMap
CHtmlGalaxyMapItem
C HtmlHelper
CHtmlHorizontalLine
CHtmlHyperLink
C HtmlImage
CHtmlInput
CHtmlLi
CHtmlLinkButton
C HtmlListBox
Class CHtmlListBoxItem
CHtmlListBoxItemCollection
CHtm lLiteral
CHtmlNewLine
CHtmlOl
CHtmlParagraph
C HtmlResetButton
CHtmlSeperator
CHtmlSmall
CHtml Space
CHtmlSpan
CHtmlStyleCollection
CHtmlSubmi tButton
CHtmlTextArea
CHtmlTextBox
CHtmlUl
CTa ble
CTableCell
CTableCellCollection
CTableCellL ist
CTableRow
CTableRowCollection
CVirtualArray 
Log
PageLog
ScriptBase
Server
SMap
SMapPosi tion
Response
DateTime
GuestShip
GuestUser
My Ship
Main
ScriptContext</Keywords>
<Keywords name="Keywords4">True
False</Keywords>
<Keywords name="Keywords5">Items
Item
Value
Add
table
AddRow
Request
C ontainsKey
Form
Style
Cells
MyShip
MapPositio n
CurrentColony
InOrbit
Coordinates
Coords
Bu ildings
Count
TypeName
Active
StockRoom
FreeS torage
Sum
Amount
DockedToShipID
ShipID
GetNa me
GetImage
GoodsType
CssClass
Type
Definitio n
IsSpaceStation
Detach
AllianceID
UserID
Ite mByIndex
KeyByIndex
IsEmpty
Exists
HasChildren 
Energy
Name
Abs
Height
GetHtmlName
Floor
R ename
FirstNode
Now
ToShortDateString
CurrentF leet
Next
Width
RowCount
Multiple
Hull
Alert Level
Shields
Larne
ToShortTimeString
LastNode 
Clear
Text
Action
TransferToShip
RegisterEve nt
TableBeforeCreate
TableAfterRowAdded
LoadFro mUser
Current
WriteAppLog
JsToggleElement
Brac ketLink
GuiControl
Page
Body
Controls
Insert
 
ID</Keywords>
<Keywords name="Keywords6"></Keywords>
<Keywords name="Keywords7"></Keywords>
<Keywords name="Keywords8"></Keywords>
<Keywords name="Delimiters">00 01 02 03" 04\ 05" 06' 07\ 08' 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" fgColor="333333" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="COMMENTS" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="2" nesting="0" />
<WordsStyle name="LINE COMMENTS" fgColor="FF8000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="NUMBERS" fgColor="800000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS1" fgColor="8000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS2" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS3" fgColor="FF0080" bgColor="FFFFFF" fontName="" fontStyle="3" nesting="0" />
<WordsStyle name="KEYWORDS4" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS5" fgColor="FF8080" bgColor="FFFFFF" fontName="" fontStyle="2" nesting="0" />
<WordsStyle name="KEYWORDS6" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="3" nesting="0" />
<WordsStyle name="KEYWORDS7" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="3" nesting="0" />
<WordsStyle name="KEYWORDS8" fgColor="333333" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="OPERATORS" fgColor="8080FF" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="FOLDER IN CODE1" fgColor="333333" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE2" fgColor="333333" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN COMMENT" fgColor="333333" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS1" fgColor="8000FF" bgColor="FFFFFF" fontName="" fontStyle="2" nesting="0" />
<WordsStyle name="DELIMITERS2" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS3" fgColor="804000" bgColor="FFFFFF" fontName="" fontStyle="2" nesting="0" />
<WordsStyle name="DELIMITERS4" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="65600" />
<WordsStyle name="DELIMITERS5" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="2" nesting="32800" />
<WordsStyle name="DELIMITERS6" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="3" nesting="0" />
<WordsStyle name="DELIMITERS7" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="3" nesting="0" />
<WordsStyle name="DELIMITERS8" fgColor="333333" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
</Styles>
</UserLang>
</NotepadPlus>
Viel Spaß damit!