Skip to content

Commit

Permalink
ac 22
Browse files Browse the repository at this point in the history
  • Loading branch information
runxel committed May 25, 2018
1 parent 3d6f412 commit ef862ea
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 9 deletions.
13 changes: 13 additions & 0 deletions GDL-dark.tmTheme
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,19 @@
<string>#34495e</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Autotext</string>
<key>scope</key>
<string>constant.other.autotext</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#93BD50</string>
<key>background</key>
<string>#243341</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Operators</string>
Expand Down
13 changes: 13 additions & 0 deletions GDL-light.tmTheme
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,19 @@
<string>#d6dade</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Autotext</string>
<key>scope</key>
<string>constant.other.autotext</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#84aa48</string>
<key>background</key>
<string>#d6dade</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Operators</string>
Expand Down
28 changes: 24 additions & 4 deletions GDL.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ scope: source.gdl

variables:
escaped_byte: '\\(n|t|\\)?'
units: '(e|mm?|cm|f(f|d)?i|d(f|i)|pt|sq(mm?|cm|f|i)|d(d|ms)|gr|rad|surv|(ga)?l|cu((c|m)?m|f|i|y))'
units: '(e|(m|c|d)?m|f(f|d)?i|d(f|i)|pt|sq(mm?|cm|f|i)|d(d|ms)|gr|rad|surv|(ga)?l|cu((c|m)?m|f|i|y))'
subroutine_name: ([0-9]+|(")[a-z_0-9]+("))
function_names: |-
(NOT|ABS|CEIL|INT|FRA|ROUND_INT|SGN|ACS|ASN|ATN|COS|SIN|TAN|EXP|LGT|LOG|SQR|MAX|MIN|RND
Expand Down Expand Up @@ -98,6 +98,7 @@ contexts:
- include: escaped-byte
- include: string_placeholder
- include: request-param
- include: autotext
- include: optional
- match: "'|`"
scope: punctuation.definition.string.begin.localized.gdl
Expand All @@ -110,6 +111,7 @@ contexts:
- include: escaped-byte
- include: string_placeholder
- include: request-param
- include: autotext
- include: optional

string_placeholder:
Expand All @@ -124,6 +126,23 @@ contexts:
|(~|\.|n|s))? # possible without number and unit
scope: constant.other.placeholder.gdl
autotext:
- match: |-
(?ix)(<(
project(name|number|status)|dateOfIssue|
site(fullAddress|address[1-3]|city|state|postcode|country)|
keywords|notes|
(architect(name|position|company|fullAddress|address[1-3]|city|state|postcode|country|email|phone|fax|web)|
cadTechnician|
(client(name|company|fullAddress|address[1-3]|city|state|postcode|country|email|phone|fax))|
(short|long)date)|time|lastSaved(at|by)|
(file(name|path)|layout(name|ID|number)|subset(name|ID)|drawing(name|ID|scale)|originalScale|magnification|renovationFilter|
marker(sheet|drawing)number(90|110)?|backRefSheetNumber)(_R)?|
numOfLayouts|change(ID|description)|
revisionID|(current)?issue(ID|description|date|dby)|currentRevisionID
)>)
scope: constant.other.autotext.gdl
line-continuation:
- match: (?<=\s)(:)
scope: punctuation.separator.continuation.inline.gdl
Expand Down Expand Up @@ -253,7 +272,7 @@ contexts:
- match: (?i)(?<=^|\s)(CUT(PLANE(\{[2-4]\})?|POLY[A]?|FORM(\{2\})?|SHAPE|END)|WALL(HOLE|NICHE))(?=$|\s)
scope: keyword.gdl.shape.3D.cut

- match: (?i)(?<=^|\s)((PLACE|KILL)GROUP|(ADD|ISECT|SUB)GROUP(\{[23]\})?|SWEEPGROUP(\{[2-4]\})?|ISECTLINES|CREATEGROUPWITHMATERIAL)(?=$|\s|\()
- match: (?i)(?<=^|\s)((place|kill)group|(add|isect|sub)group(\{[23]\})?|sweepgroup(\{[2-5]\})?|isectlines|creategroupwithmaterial)(?=$|\s|\()
scope: keyword.gdl.shape.3D.seo

- match: (?i)(?<=^|\s)(TEXT|RICHTEXT)(?=$|\s)
Expand Down Expand Up @@ -327,8 +346,9 @@ contexts:
scope: keyword.gdl.nongeo.properties

- match: |-
(?ix)\b(UI_(DIALOG|(CURRENT_)?PAGE|BUTTON|SEPARATOR|GROUPBOX|PICT(_BUTTON)?|STYLE|OUTFIELD|INFIELD(\{[2-4]\})?
|RADIOBUTTON(\{[2]\})?|TOOLTIP|LISTFIELD|LISTITEM(\{2\})?|COLORPICKER(\{2\})?|SLIDER(\{2\})?|CUSTOM_POPUP_(INFIELD|LISTITEM)(\{2\})?))
(?ix)\b(UI_(dialog|(current_)?page|button|pict(_button)?|separator|groupbox|style|outfield|tooltip|listfield|
infield(\{[2-4]\})?|
((pict_)?radiobutton|pict_pushcheckbutton|listitem|colorpicker|slider|textstyle_infield|custom_popup_(infield|listitem))(\{[2]\})?))
(?=$|\s)
scope: keyword.gdl.nongeo.ui
Expand Down
20 changes: 20 additions & 0 deletions Messages/v2.2.0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

██████╗ ██████╗ ██╗
██╔════╝ ██╔══██╗██║
██║ ███╗██║ ██║██║
██║ ██║██║ ██║██║
╚██████╔╝██████╔╝███████╗
╚═════╝ ╚═════╝ ╚══════╝

GDL Sublime Text package
has successfully updated

*************************

VERSION 2.2.0

*************************

• compatibility with
upcoming Archicad 22

17 changes: 13 additions & 4 deletions Preferences/GDL.sublime-completions
Original file line number Diff line number Diff line change
Expand Up @@ -376,11 +376,15 @@
"tube{2}",

/* U U U U U U U U U U U U U U U U U U U U U U U U U U U */
{ "trigger": "ui_button", "contents": "ui_button ${1:type}, ${2:text}, ${3:x}, ${4:y}, ${5:width}, ${6:height}" },
{ "trigger": "ui_button", "contents": "ui_button ${1:type}, ${2:text}, ${3:x}, ${4:y}, ${5:width}, ${6:height}, ${7:id}" },
"ui_cancel",
{ "trigger": "ui_colorpicker", "contents": "ui_colorpicker \"${1:redParamName}\", \"${2:greenParamName}\", \"${3:blueParamName}\", ${4:x0}, ${5:y9}, ${6:width}, ${6:height}" },
{ "trigger": "ui_colorpicker{2}", "contents": "ui_colorpicker{2} ${1:redParamName}, ${2:greenParamName}, ${3:blueParamName}, ${4:x0}, ${5:y9}, ${6:width}, ${6:height}" },
{ "trigger": "ui_colorpicker", "contents": "ui_colorpicker \"${1:redParamName}\", \"${2:greenParamName}\", \"${3:blueParamName}\", ${4:x}, ${5:y}, ${6:width}, ${6:height}" },
{ "trigger": "ui_colorpicker{2}", "contents": "ui_colorpicker{2} ${1:redParamName}, ${2:greenParamName}, ${3:blueParamName}, ${4:x}, ${5:y}, ${6:width}, ${6:height}" },
{ "trigger": "ui_current_page", "contents": "ui_current_page ${1:index}" },
{ "trigger": "ui_custom_popup_infield", "contents": "ui_custom_popup_infield \"${1:name}\", ${2:x}, ${3:y}, ${4:width}, ${5:height}" },
{ "trigger": "ui_custom_popup_infield{2}", "contents": "ui_custom_popup_infield{2} ${1:name}, ${2:x}, ${3:y}, ${4:width}, ${5:height}" },
{ "trigger": "ui_custom_popup_listitem", "contents": "ui_custom_popup_listitem ${1:itemID}, ${2:fieldID}, \"${3:name}\", ${4:childFlag}, ${5:image}, ${6:paramDesc}" },
{ "trigger": "ui_custom_popup_listitem{2}", "contents": "ui_custom_popup_listitem{2} ${1:itemID}, ${2:fieldID}, ${3:name}, ${4:childFlag}, ${5:image}, ${6:paramDesc}" },
{ "trigger": "ui_dialog", "contents": "ui_dialog ${1:title}" },
"ui_function",
{ "trigger": "ui_groupbox", "contents": "ui_groupbox ${1:text}, ${2:x}, ${3:y}, ${4:width}, ${5:height}" },
Expand All @@ -394,16 +398,21 @@
{ "trigger": "ui_listitem{2}", "contents": "ui_listitem{2} ${1:itemdID}, ${2:fieldID}, \"${3:name}\"" },
"ui_next",
"ui_ok",
{ "trigger": "ui_outfield", "contents": "ui_outfield ${1:expression}, ${2:x}, ${3:y}, ${4:width}, ${5:height}" },
{ "trigger": "ui_outfield", "contents": "ui_outfield ${1:expression}, ${2:x}, ${3:y}, ${4:width}, ${5:height}, ${6:flags}" },
{ "trigger": "ui_page", "contents": "ui_page ${1:page_number}" },
{ "trigger": "ui_pict", "contents": "ui_pict ${1:expression}, ${2:x}, ${3:y}, ${4:width}, ${5:height}" },
{ "trigger": "ui_pict_button", "contents": "ui_pict_button ${1:type}, ${2:text}, ${3:picture_reference}, ${4:x}, ${5:y}, ${6:width}, ${7:height}" },
{ "trigger": "ui_pict_pushcheckbutton", "contents": "ui_pict_pushcheckbutton ${1:name}, ${2:text}, ${3:picture_reference}, ${4:frame_flag}, ${5:x}, ${6:y}, ${7:width}, ${8:height}" },
{ "trigger": "ui_pict_pushcheckbutton{2}", "contents": "ui_pict_pushcheckbutton{2} \"${1:name}\", ${2:text}, ${3:picture_reference}, ${4:frame_flag}, ${5:x}, ${6:y}, ${7:width}, ${8:height}" },
{ "trigger": "ui_radiobutton", "contents": "ui_radiobutton ${1:name}, ${2:value}, ${3:text}, ${4:x}, ${5:y}, ${6:width}, ${7:height}" },
{ "trigger": "ui_radiobutton{2}", "contents": "ui_radiobutton{2} \"${1:name}\", ${2:value}, ${3:text}, ${4:x}, ${5:y}, ${6:width}, ${7:height}" },
"ui_prev",
{ "trigger": "ui_separator", "contents": "ui_separator ${1:x1}, ${2:y1}, ${3:x2}, ${4:y2}" },
{ "trigger": "ui_slider", "contents": "ui_slider \"${1:name}\", ${2:x0}, ${3:y0}, ${4:width}, ${5:height}" },
{ "trigger": "ui_slider{2}", "contents": "ui_slider{2} ${1:name}, ${2:x0}, ${3:y0}, ${4:width}, ${5:height}" },
{ "trigger": "ui_style", "contents": "ui_style ${1:fontsize}, ${2:face_code}" },
{ "trigger": "ui_textstyle_infield", "contents": "ui_textstyle_infield ${1:name}, ${2:faceCodeMask}, ${3:x}, ${4:y}, ${5:button width}, ${6:button height}" },
{ "trigger": "ui_textstyle_infield{2}", "contents": "ui_textstyle_infield{2} \"${1:name}\", ${2:faceCodeMask}, ${3:x}, ${4:y}, ${5:button width}, ${6:button height}" },
{ "trigger": "ui_tooltip", "contents": "ui_tooltip ${1:tooltiptext}" },
"until",
"use",
Expand Down
3 changes: 2 additions & 1 deletion messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"v2.0.0": "Messages/v2.0.0.txt",
"v2.0.1": "Messages/v2.0.1.txt",
"v2.0.2": "Messages/v2.0.2.txt",
"v2.1.0": "Messages/v2.1.0.txt"
"v2.1.0": "Messages/v2.1.0.txt",
"v2.2.0": "Messages/v2.2.0.txt"
}

0 comments on commit ef862ea

Please sign in to comment.