├── .python-version
├── .gitattributes
├── templates
├── testbox
│ ├── compacttext
│ │ ├── logo.txt
│ │ ├── legend.txt
│ │ ├── bundle.txt
│ │ ├── global_exception.txt
│ │ └── results.txt
│ └── text
│ │ ├── logo.txt
│ │ ├── legend.txt
│ │ ├── bundle.txt
│ │ ├── results.txt
│ │ └── global_exception.txt
├── pagination.html
├── method_preview.html
├── completion_doc.html
└── inline_documentation.html
├── src
├── formatting
│ ├── __init__.py
│ ├── method_chains.py
│ └── misc.py
├── component_parser
│ ├── __init__.py
│ ├── cfml_properties.py
│ ├── regex.py
│ └── cfml_components.py
├── custom_tag_index
│ ├── __init__.py
│ └── custom_tag_index.py
├── events.py
├── plugins_
│ ├── plugin.py
│ ├── custom_tags
│ │ ├── __init__.py
│ │ ├── documentation.py
│ │ └── completions.py
│ ├── cfdocs
│ │ └── __init__.py
│ ├── fw1
│ │ ├── __init__.py
│ │ └── json
│ │ │ ├── settings.json
│ │ │ └── methods.json
│ ├── applicationcfc
│ │ ├── __init__.py
│ │ ├── json
│ │ │ ├── methods.json
│ │ │ └── settings.json
│ │ └── appcfc.py
│ ├── testbox
│ │ ├── __init__.py
│ │ └── testbox_spec_outline.py
│ ├── basecompletions
│ │ └── __init__.py
│ ├── cfcs
│ │ ├── completions.py
│ │ ├── __init__.py
│ │ ├── di.py
│ │ └── cfcs.py
│ ├── in_file_completions
│ │ ├── __init__.py
│ │ └── in_file_completions.py
│ ├── entities
│ │ ├── __init__.py
│ │ ├── completions.py
│ │ └── documentation.py
│ └── dotpaths
│ │ └── __init__.py
├── __init__.py
├── cfml_plugins.py
├── component_index
│ ├── __init__.py
│ ├── navigate_to_method.py
│ └── completions.py
├── documentation_helpers.py
├── goto_cfml_file.py
├── completions.py
├── commands
│ ├── cfc_dotted_path.py
│ ├── color_scheme_styles.py
│ └── __init__.py
├── cfdocs.py
├── buffer_metadata.py
└── method_preview.py
├── messages
├── 0.4.1.txt
├── 0.30.0.txt
├── 0.9.3.txt
├── 0.12.1.txt
├── 0.2.1.txt
├── 0.9.2.txt
├── 0.10.1.txt
├── 0.8.1.txt
├── 0.3.1.txt
├── 0.10.2.txt
├── 0.29.0.txt
├── 0.9.0.txt
├── 0.4.0.txt
├── 0.12.2.txt
├── 0.12.3.txt
├── 0.9.1.txt
├── install.txt
├── 0.12.0.txt
├── 0.23.0.txt
├── 0.14.0.txt
├── 0.2.0.txt
├── 0.11.0.txt
├── 0.3.0.txt
├── 0.5.1.txt
├── 0.31.0.txt
├── 0.17.0.txt
├── 0.4.2.txt
├── 0.6.0.txt
├── 0.25.0.txt
├── 0.28.0.txt
├── 0.8.0.txt
├── 0.19.0.txt
├── 0.22.0.txt
├── 0.5.0.txt
├── 0.10.0.txt
├── 0.27.0.txt
├── 0.7.0.txt
├── 0.15.0.txt
├── 0.18.0.txt
├── 0.24.0.txt
├── 0.26.0.txt
├── 0.16.0.txt
├── 0.20.0.txt
├── 0.13.0.txt
└── 0.21.0.txt
├── menus
├── Context.sublime-menu
├── Side Bar.sublime-menu
└── Main.sublime-menu
├── inputmaps
├── Default (OSX).sublime-mousemap
├── Default (Linux).sublime-mousemap
└── Default (Windows).sublime-mousemap
├── metadata
├── symbols.tmPreferences
├── symbols-indexed.tmPreferences
├── symbols-banned.tmPreferences
├── cfscript-indent.tmPreferences
├── cfml.tmPreferences
├── cfscript.tmPreferences
└── cfml-indent.tmPreferences
├── syntaxes
├── tests
│ ├── syntax_test_rest_spread.cfm
│ ├── syntax_test_lucee6.cfc
│ ├── syntax_test_java.cfm
│ ├── syntax_test_destructure.cfm
│ ├── syntax_test_javadoc.cfc
│ ├── syntax_test_lucee5.cfc
│ ├── syntax_test_tag_attributes_cfml.cfm
│ ├── syntax_test_sql_strings.cfm
│ └── syntax_test_cfml_component.cfc
├── JavaScript (CFML).sublime-syntax
├── CFScript (CFML) Tags.sublime-syntax
├── testbox.sublime-syntax
├── HTML (CFML).sublime-syntax
└── build_base_cfscript_syntax.py
├── settings
└── CFML.sublime-settings
├── LICENSE.md
├── commands
└── Default.sublime-commands
├── messages.json
├── color-schemes
└── testbox.hidden-tmTheme
└── cfml_plugin.py
/.python-version:
--------------------------------------------------------------------------------
1 | 3.8
2 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 |
--------------------------------------------------------------------------------
/templates/testbox/compacttext/logo.txt:
--------------------------------------------------------------------------------
1 | Testbox
2 |
--------------------------------------------------------------------------------
/src/formatting/__init__.py:
--------------------------------------------------------------------------------
1 | from .cfml_format import CfmlFormatCommand
2 |
--------------------------------------------------------------------------------
/messages/0.4.1.txt:
--------------------------------------------------------------------------------
1 | CFML v0.4.1 Changelog:
2 |
3 | - fix for invalid JSON in OSX keymap file
4 | Sorry!
5 |
--------------------------------------------------------------------------------
/menus/Context.sublime-menu:
--------------------------------------------------------------------------------
1 | [
2 | { "caption": "Copy CFC Dotted Path", "command": "cfml_cfc_dotted_path" }
3 | ]
4 |
--------------------------------------------------------------------------------
/menus/Side Bar.sublime-menu:
--------------------------------------------------------------------------------
1 | [
2 | { "caption": "Copy CFC Dotted Path", "command": "cfml_sidebar_cfc_dotted_path", "args": {"files": []} }
3 | ]
4 |
--------------------------------------------------------------------------------
/inputmaps/Default (OSX).sublime-mousemap:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "button": "button1", "modifiers": ["ctrl", "alt"],
4 | "command": "cfml_goto_file"
5 | }
6 | ]
--------------------------------------------------------------------------------
/inputmaps/Default (Linux).sublime-mousemap:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "button": "button1", "modifiers": ["ctrl", "alt"],
4 | "command": "cfml_goto_file"
5 | }
6 | ]
--------------------------------------------------------------------------------
/inputmaps/Default (Windows).sublime-mousemap:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "button": "button1", "modifiers": ["ctrl", "alt"],
4 | "command": "cfml_goto_file"
5 | }
6 | ]
7 |
--------------------------------------------------------------------------------
/messages/0.30.0.txt:
--------------------------------------------------------------------------------
1 | CFML v0.30.0 Changelog:
2 |
3 | - ST4 support
4 |
5 | PLEASE RESTART SUBLIME TEXT TO ENSURE THESE CHANGES ARE LOADED CORRECTLY, THANKS!
6 |
--------------------------------------------------------------------------------
/templates/pagination.html:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/messages/0.9.3.txt:
--------------------------------------------------------------------------------
1 | CFML v0.9.3 Changelog:
2 |
3 | - Adds SQL string highlighting in `queryExecute()`
4 | https://github.com/jcberquist/sublimetext-cfml/issues/24
5 |
--------------------------------------------------------------------------------
/src/component_parser/__init__.py:
--------------------------------------------------------------------------------
1 | from .parser import Parser
2 | from .cfml_components import parse_cfc_file_string
3 |
4 | __all__ = ["Parser", "parse_cfc_file_string"]
5 |
--------------------------------------------------------------------------------
/messages/0.12.1.txt:
--------------------------------------------------------------------------------
1 | CFML v0.12.1 Changelog:
2 |
3 | - Fixed inconsistent docblock parsing function return type
4 | https://github.com/jcberquist/sublimetext-cfml/issues/30
5 |
--------------------------------------------------------------------------------
/messages/0.2.1.txt:
--------------------------------------------------------------------------------
1 | CFML v0.2.1 Changelog:
2 |
3 | - No changes, just a reminder that after the v0.2.0 update a restart
4 | of Sublime Text is needed for the new features to function properly
--------------------------------------------------------------------------------
/messages/0.9.2.txt:
--------------------------------------------------------------------------------
1 | CFML v0.9.2 Changelog:
2 |
3 | - Added basic syntax highlighting for JavaDoc style comments
4 |
5 | - Standardized syntax highlighting meta scope order for function calls
6 |
--------------------------------------------------------------------------------
/src/custom_tag_index/__init__.py:
--------------------------------------------------------------------------------
1 | from .custom_tags import CustomTags
2 |
3 |
4 | custom_tag_index = CustomTags()
5 |
6 |
7 | def _plugin_loaded():
8 | custom_tag_index.sync_projects()
9 |
--------------------------------------------------------------------------------
/messages/0.10.1.txt:
--------------------------------------------------------------------------------
1 | CFML v0.10.1 Changelog:
2 |
3 | - Match `void` correctly in a function declaration that has no storage modifier
4 | https://github.com/jcberquist/sublimetext-cfml/issues/27
5 |
--------------------------------------------------------------------------------
/templates/testbox/compacttext/legend.txt:
--------------------------------------------------------------------------------
1 | ---------------------------------------------------------------------------------
2 | Legend: (P) = Passed, (-) = Skipped, (X) = Exception/Error, (!) = Failure
3 |
--------------------------------------------------------------------------------
/messages/0.8.1.txt:
--------------------------------------------------------------------------------
1 | CFML v0.8.1 Changelog:
2 |
3 | - Updated function and tag completions to use latest cfdocs.org data
4 |
5 | - Minor syntax file updates (tag and function lists, typo fixes, tweaked a regex)
6 |
--------------------------------------------------------------------------------
/templates/testbox/text/logo.txt:
--------------------------------------------------------------------------------
1 | _____ _ ____
2 | |_ _|__ ___| |_| __ ) _____ __
3 | | |/ _ \/ __| __| _ \ / _ \ \/ /
4 | | | __/\__ \ |_| |_) | (_) > <
5 | |_|\___||___/\__|____/ \___/_/\_\
6 |
--------------------------------------------------------------------------------
/templates/testbox/text/legend.txt:
--------------------------------------------------------------------------------
1 | =============================================================
2 | Legend:
3 | =============================================================
4 | (P) = Passed
5 | (-) = Skipped
6 | (X) = Exception/Error
7 | (!) = Failure
8 |
--------------------------------------------------------------------------------
/messages/0.3.1.txt:
--------------------------------------------------------------------------------
1 | CFML v0.3.1 Changelog:
2 |
3 | - Added `cfargument` to the list of tags that do not need a closing tag
4 |
5 | - Syntax now correctly allows for a function return type of an object array
6 | (e.g. public User[] function getUser(){})
7 |
--------------------------------------------------------------------------------
/messages/0.10.2.txt:
--------------------------------------------------------------------------------
1 | CFML v0.10.2 Changelog:
2 |
3 | - When indexing files, the plugin now specifies utf-8 encoding for file reads
4 | rather than relying on the system default. See the discussion as to why at
5 | https://github.com/jcberquist/sublimetext-cfml/issues/26
6 |
--------------------------------------------------------------------------------
/messages/0.29.0.txt:
--------------------------------------------------------------------------------
1 | CFML v0.29.0 Changelog:
2 |
3 | - Various syntax highlighting fixes and updates. Tag island syntax highlighting is now supported
4 |
5 | - bug fix for HTML completions being duplicated
6 |
7 | PLEASE RESTART SUBLIME TEXT TO ENSURE THESE CHANGES ARE LOADED CORRECTLY, THANKS!
8 |
--------------------------------------------------------------------------------
/messages/0.9.0.txt:
--------------------------------------------------------------------------------
1 | CFML v0.9.0 Changelog:
2 |
3 | - Lucee 5 syntax highlighting:
4 | abstract/final modifiers
5 | lambda functions
6 | static constructor
7 | static methods and properties
8 |
9 | - Syntax scope updates to stay in sync with official Sublime Text packages
10 |
11 | - Small bug fixes
12 |
--------------------------------------------------------------------------------
/metadata/symbols.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | scope
5 | source.cfml meta.function.cfml entity.name.function
6 | settings
7 |
8 | showInSymbolList
9 | 1
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/templates/testbox/text/bundle.txt:
--------------------------------------------------------------------------------
1 | =============================================================
2 | ${path} (${totalduration})
3 | =============================================================
4 | ->[Suites/Specs: ${totalsuites}/${totalspecs}]
5 | ->[Pass: ${totalpass}]
6 | ->[Failures: ${totalfail}]
7 | ->[Errors: ${totalerror}]
8 | ->[Skipped: ${totalskipped}]
9 |
10 |
--------------------------------------------------------------------------------
/templates/testbox/compacttext/bundle.txt:
--------------------------------------------------------------------------------
1 | =================================================================================
2 | ${path} (${totalduration}) [Suites/Specs: ${totalsuites}/${totalspecs}]
3 | [Passed: ${totalpass}] [Failed: ${totalfail}] [Errors: ${totalerror}] [Skipped: ${totalskipped}]
4 | ---------------------------------------------------------------------------------
5 |
--------------------------------------------------------------------------------
/metadata/symbols-indexed.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | scope
5 | source.cfml meta.function.cfml entity.name.function
6 | settings
7 |
8 | showInIndexedSymbolList
9 | 1
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/syntaxes/tests/syntax_test_rest_spread.cfm:
--------------------------------------------------------------------------------
1 |
2 |
3 | a = {...b};
4 |
5 | a = [...b];
6 |
7 |
8 | function test(a, ...rest) {
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/messages/0.4.0.txt:
--------------------------------------------------------------------------------
1 | CFML v0.4.0 Changelog:
2 |
3 | - Added support for ColdFusion style tags in cfscript
4 | e.g. 'cfcontent( type="text/html" );'
5 |
6 | - Added menu items for key binding files to the package settings menu
7 |
8 | - bug fixes for incorrect syntax highlighting, for more see
9 | https://github.com/jcberquist/sublimetext-cfml/commit/3f73f74c2ce7dd8b3d04fbf000a3c3e66fec108f
10 |
--------------------------------------------------------------------------------
/templates/testbox/text/results.txt:
--------------------------------------------------------------------------------
1 | =============================================================
2 | Global Stats (${totalduration})
3 | =============================================================
4 | ->[Bundles/Suites/Specs: ${totalbundles}/${totalsuites}/${totalspecs}]
5 | ->[Pass: ${totalpass}]
6 | ->[Failures: ${totalfail}]
7 | ->[Errors: ${totalerror}]
8 | ->[Skipped: ${totalskipped}]
9 |
10 |
--------------------------------------------------------------------------------
/messages/0.12.2.txt:
--------------------------------------------------------------------------------
1 | CFML v0.12.2 Changelog:
2 |
3 | - Better error handling when indexing components
4 | The file path of a component that causes an indexing error
5 | is printed to the console along with the error traceback.
6 |
7 | - Added a command to the command palette that can be used to
8 | trigger a re-indexing of the project in the active window:
9 | `CFML: Index Active Project`
10 |
--------------------------------------------------------------------------------
/messages/0.12.3.txt:
--------------------------------------------------------------------------------
1 | CFML v0.12.3 Changelog:
2 |
3 | - Updated attribute regex to correctly handle attributes
4 | having value strings that extend over multiple lines.
5 | https://github.com/jcberquist/sublimetext-cfml/issues/32
6 |
7 | - Indexed components that have `persistent` set to true now
8 | have accessors generated for their properties.
9 | https://github.com/jcberquist/sublimetext-cfml/issues/33
10 |
--------------------------------------------------------------------------------
/templates/testbox/text/global_exception.txt:
--------------------------------------------------------------------------------
1 | GLOBAL BUNDLE EXCEPTION
2 | -> ${type}:${message}:${detail}
3 | =============================================================
4 | STACKTRACE
5 | =============================================================
6 | ${stacktrace}
7 | =============================================================
8 | END STACKTRACE
9 | =============================================================
10 |
--------------------------------------------------------------------------------
/src/events.py:
--------------------------------------------------------------------------------
1 | event_listeners = {}
2 |
3 |
4 | def subscribe(event_name, callback):
5 | if event_name not in event_listeners:
6 | event_listeners[event_name] = []
7 | event_listeners[event_name].append(callback)
8 |
9 |
10 | def trigger(event_name, *event_args):
11 | if event_name in event_listeners:
12 | for callback in event_listeners[event_name]:
13 | callback(*event_args)
14 |
--------------------------------------------------------------------------------
/messages/0.9.1.txt:
--------------------------------------------------------------------------------
1 | CFML v0.9.1 Changelog:
2 |
3 | - Fixed a bug that caused the plugin to incorrectly determine the name of the
4 | folder that it was installed in. This came about due to recent changes in
5 | how plugins are loaded by ST (in build 3112, I think). Thanks to @mjhagen
6 | for reporting the issue to me.
7 |
8 | - various syntax highlighting updates, see the recent commits on GitHub for
9 | more details
10 |
--------------------------------------------------------------------------------
/messages/install.txt:
--------------------------------------------------------------------------------
1 | CFML (ColdFusion/Lucee) package for Sublime Text 3
2 | https://github.com/jcberquist/sublimetext-cfml
3 |
4 | Thank you for installing this package. Please see the readme at the GitHub
5 | repository for more information about the features of this package.
6 |
7 | The GitHub repository is also the place to raise any issues you encounter.
8 |
9 | *IMPORTANT: Sublime Text 3 must be restarted for this package to function properly.*
--------------------------------------------------------------------------------
/messages/0.12.0.txt:
--------------------------------------------------------------------------------
1 | CFML v0.12.0 Changelog:
2 |
3 | - Added `argumentCollection` completion when entering function call parameters
4 | https://github.com/jcberquist/sublimetext-cfml/issues/29
5 |
6 | - Component indexing has been updated to try and capture docblocks as well as
7 | inline hints. Hints, if present, will be displayed in the inline documentation
8 | for indexed components and methods.
9 |
10 | - Syntax highlighting bug fix
11 |
--------------------------------------------------------------------------------
/messages/0.23.0.txt:
--------------------------------------------------------------------------------
1 | CFML v0.23.0 Changelog:
2 |
3 | - Updated some syntax highlighting scope names to match preferred scope names
4 | in default syntaxes. This will require a RESTART of Sublime Text to load
5 | properly, sorry!
6 |
7 | - Updated cfdocs.org popup styling
8 |
9 | - Added `DROP` to the list of strings that trigger SQL string highlighting
10 | https://github.com/jcberquist/sublimetext-cfml/issues/35#issuecomment-308840280
11 |
--------------------------------------------------------------------------------
/src/plugins_/plugin.py:
--------------------------------------------------------------------------------
1 | class CFMLPlugin:
2 | def get_completion_docs(self, cfml_view):
3 | return None
4 |
5 | def get_completions(self, cfml_view):
6 | return None
7 |
8 | def get_goto_cfml_file(self, cfml_view):
9 | return None
10 |
11 | def get_inline_documentation(self, cfml_view, doc_type):
12 | return None
13 |
14 | def get_method_preview(self, cfml_view):
15 | return None
16 |
--------------------------------------------------------------------------------
/metadata/symbols-banned.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | scope
5 | source.cfml meta.function-call, source.cfml meta.instance.constructor
6 | settings
7 |
8 | showInIndexedSymbolList
9 | 0
10 | showInSymbolList
11 | 0
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/messages/0.14.0.txt:
--------------------------------------------------------------------------------
1 | CFML v0.14.0 Changelog:
2 |
3 | - after typing `arguments.` in a function body you will now be offered
4 | available function arguments as completions
5 | https://github.com/jcberquist/sublimetext-cfml/issues/37
6 |
7 | - CFScript formatting bug fixes
8 | https://github.com/jcberquist/sublimetext-cfml/issues/40
9 |
10 | - Tag completions were updated to match latest cfdocs.org tag data
11 | https://github.com/jcberquist/sublimetext-cfml/pull/41
12 |
--------------------------------------------------------------------------------
/messages/0.2.0.txt:
--------------------------------------------------------------------------------
1 | CFML v0.2.0 Changelog:
2 |
3 | - Added auto insert of closing tag when `>` is pressed
4 | This can be enabled via the `cfml_auto_insert_closing_tag` setting
5 | See the readme for more detail - https://github.com/jcberquist/sublimetext-cfml
6 |
7 | - Added ability to insert an extra newline + indent when `ENTER` is pressed between a CFML tag pair
8 | This can be enabled via the `cfml_between_tag_pair` setting
9 | See the readme for more detail - https://github.com/jcberquist/sublimetext-cfml
--------------------------------------------------------------------------------
/templates/testbox/compacttext/global_exception.txt:
--------------------------------------------------------------------------------
1 | GLOBAL BUNDLE EXCEPTION
2 | -> ${type}:${message}:${detail}
3 | ---------------------------------------------------------------------------------
4 | STACKTRACE
5 | ---------------------------------------------------------------------------------
6 | ${stacktrace}
7 | ---------------------------------------------------------------------------------
8 | END STACKTRACE
9 | ---------------------------------------------------------------------------------
10 |
--------------------------------------------------------------------------------
/templates/testbox/compacttext/results.txt:
--------------------------------------------------------------------------------
1 | ---------------------------------------------------------------------------------
2 | | Passed | Failed | Errored | Skipped | Time | Bundles | Suites | Specs |
3 | ---------------------------------------------------------------------------------
4 | | ${totalpass} | ${totalfail} | ${totalerror} | ${totalskipped} | ${totalduration} | ${totalbundles} | ${totalsuites} | ${totalspecs} |
5 | ---------------------------------------------------------------------------------
6 |
--------------------------------------------------------------------------------
/messages/0.11.0.txt:
--------------------------------------------------------------------------------
1 | CFML v0.11.0 Changelog:
2 |
3 | - Allow cfc folder variable names in .sublime-project files to contain periods
4 | https://github.com/jcberquist/sublimetext-cfml/issues/28
5 |
6 | - `testbox_tests_root` .sublime-project setting now supports relative paths just
7 | as the various `path` settings in a sublime project file do (relative to the
8 | location of the sublime project file).
9 |
10 | - Updates to work with changes introduced in the latest ST dev builds
11 |
12 | - Various bug fixes, see the recent commits on GitHub for more details
13 |
--------------------------------------------------------------------------------
/src/plugins_/custom_tags/__init__.py:
--------------------------------------------------------------------------------
1 | from .completions import get_completions, get_goto_cfml_file
2 | from .documentation import get_inline_documentation
3 |
4 | from .. import plugin
5 |
6 |
7 | class CFMLPlugin(plugin.CFMLPlugin):
8 | def get_completions(self, cfml_view):
9 | return get_completions(cfml_view)
10 |
11 | def get_goto_cfml_file(self, cfml_view):
12 | return get_goto_cfml_file(cfml_view)
13 |
14 | def get_inline_documentation(self, cfml_view, doc_type):
15 | return get_inline_documentation(cfml_view, doc_type)
16 |
--------------------------------------------------------------------------------
/src/plugins_/cfdocs/__init__.py:
--------------------------------------------------------------------------------
1 | from .. import plugin
2 |
3 | from .cfdocs import (
4 | get_inline_documentation,
5 | get_completion_docs,
6 | get_goto_cfml_file
7 | )
8 |
9 |
10 | class CFMLPlugin(plugin.CFMLPlugin):
11 | def get_completion_docs(self, cfml_view):
12 | return get_completion_docs(cfml_view)
13 |
14 | def get_inline_documentation(self, cfml_view, doc_type):
15 | return get_inline_documentation(cfml_view, doc_type)
16 |
17 | def get_goto_cfml_file(self, cfml_view):
18 | return get_goto_cfml_file(cfml_view)
19 |
--------------------------------------------------------------------------------
/syntaxes/tests/syntax_test_lucee6.cfc:
--------------------------------------------------------------------------------
1 | // SYNTAX TEST "Packages/CFML/syntaxes/CFML.sublime-syntax"
2 | component {
3 | // <- source.cfml.script meta.class.declaration.cfml storage.type.class.cfml
4 | }
5 |
6 | component name="Sub" {
7 | // <- source.cfml.script meta.class.declaration.cfml storage.type.class.cfml
8 | function t() {
9 | var inline=new component {
10 | // ^^^ meta.instance.constructor.cfml keyword.operator.word.new.cfml
11 | // ^^^^^^^^^ meta.instance.constructor.cfml storage.type.class.cfml
12 | };
13 | }
14 | }
--------------------------------------------------------------------------------
/syntaxes/JavaScript (CFML).sublime-syntax:
--------------------------------------------------------------------------------
1 | %YAML 1.2
2 | ---
3 | name: JavaScript (CFML)
4 | scope: source.js.cfml
5 | version: 2
6 | hidden: true
7 |
8 | extends: Packages/JavaScript/JavaScript.sublime-syntax
9 |
10 | contexts:
11 | literal-string-template-begin:
12 | - meta_include_prototype: false
13 | - match: (?:({{identifier_name}})\s*)?(\`)
14 | captures:
15 | 1: variable.function.tagged-template.js
16 | 2: meta.string.template.js string.quoted.other.js punctuation.definition.string.begin.js
17 | set: literal-string-template-content
18 | - include: immediately-pop
19 |
--------------------------------------------------------------------------------
/src/plugins_/fw1/__init__.py:
--------------------------------------------------------------------------------
1 | import sublime
2 | from . import fw1
3 | from .. import plugin
4 |
5 |
6 | class CFMLPlugin(plugin.CFMLPlugin):
7 | def get_completions(self, cfml_view):
8 | if cfml_view.type == "script":
9 | return fw1.get_script_completions(cfml_view)
10 | elif cfml_view.type == "dot":
11 | return fw1.get_dot_completions(cfml_view)
12 | return None
13 |
14 | def get_inline_documentation(self, cfml_view, doc_type):
15 | return fw1.get_inline_documentation(cfml_view, doc_type)
16 |
17 |
18 | def _plugin_loaded():
19 | sublime.set_timeout_async(fw1.load)
20 |
--------------------------------------------------------------------------------
/messages/0.3.0.txt:
--------------------------------------------------------------------------------
1 | CFML v0.3.0 Changelog:
2 |
3 | - Added tmPreferences file that marks CFML files as source files for sidebar icons
4 | This ensures that the file_type_source icon in themes is applied to CFML files
5 |
6 | See https://github.com/jcberquist/sublimetext-cfml/blob/master/metadata/cfml-icon.tmPreferences
7 | If a copy of this file is placed in your User package folder, you can override
8 | `file_type_source` with another icon type, depending on what your active theme supports.
9 | For example, Material Theme (https://github.com/equinusocio/material-theme) has two
10 | icon types for CFML files: `file_type_cfc` and `file_type_cfm`.
--------------------------------------------------------------------------------
/messages/0.5.1.txt:
--------------------------------------------------------------------------------
1 | CFML v0.5.1 Changelog:
2 |
3 | - Added 'cfdump', 'cfinclude', and 'cfprocessingdirective' to the default list
4 | of tags that do not receive a closing tag
5 |
6 | - The default mouse binding on the Mac for opening component files has been
7 | changed from CMD+ALT+Click to CTRL+ALT+Click. This was done because
8 | CMD+ALT+Click is the default mouse binding for selecting text by column
9 | on the Mac.
10 |
11 | - The click to open component file and F1 documentation commands should now work
12 | on any quoted string containing a dot path to a component. (Assuming the correct
13 | mapping has been set up in a project file.)
14 |
--------------------------------------------------------------------------------
/settings/CFML.sublime-settings:
--------------------------------------------------------------------------------
1 | {
2 | "auto_complete_triggers": [
3 | {"selector": "source.cfml.script - string", "characters": "."},
4 | {"selector": "source.cfml.script meta.function-call.support.createcomponent.cfml string.quoted", "characters": "."},
5 | {"selector": "meta.class.inheritance.cfml", "characters": "."},
6 | {"selector": "meta.tag.cfml - string - source.cfml.script", "characters": " "},
7 | {"selector": "meta.tag.custom.cfml - string - source.cfml.script", "characters": ": "},
8 | {"selector": "meta.tag.script.cfml - string, meta.tag.script.cf.cfml - string, meta.class.declaration.cfml - string", "characters": " "}
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/src/plugins_/applicationcfc/__init__.py:
--------------------------------------------------------------------------------
1 | import sublime
2 | from . import appcfc
3 | from .. import plugin
4 |
5 |
6 | def _plugin_loaded():
7 | sublime.set_timeout_async(appcfc.load)
8 |
9 |
10 | class CFMLPlugin(plugin.CFMLPlugin):
11 | def get_completions(self, cfml_view):
12 | if cfml_view.type == 'script':
13 | return appcfc.get_script_completions(cfml_view)
14 | elif cfml_view.type == 'dot':
15 | return appcfc.get_dot_completions(cfml_view)
16 | return None
17 |
18 | def get_inline_documentation(self, cfml_view, doc_type):
19 | return appcfc.get_inline_documentation(cfml_view, doc_type)
20 |
--------------------------------------------------------------------------------
/syntaxes/tests/syntax_test_java.cfm:
--------------------------------------------------------------------------------
1 |
2 |
3 | classInstance = java { public class class1 { } }
4 |
5 |
6 | function test(int i) a="b" type="java" { return i*2; }
7 |
8 |
9 |
10 |
11 |
12 | import java.io.*;
13 | public class Harmless { }
14 |
--------------------------------------------------------------------------------
/src/plugins_/applicationcfc/json/methods.json:
--------------------------------------------------------------------------------
1 | {
2 | "onAbort": "(string targetPage) {$0}",
3 | "onApplicationEnd": "(struct applicationScope) {$0}",
4 | "onApplicationStart": "() {$0}",
5 | "onCFCRequest": "(string cfcName, string methodName, struct args) {$0}",
6 | "onDebug": "(struct debuggingData) {$0}",
7 | "onError": "(struct exception, string eventName) {$0}",
8 | "onMissingTemplate": "(string targetPage) {$0}",
9 | "onRequest": "(string targetPage) {$0}",
10 | "onRequestEnd": "(string targetPage) {$0}",
11 | "onRequestStart": "(string targetPage) {$0}",
12 | "onSessionEnd": "(struct applicationScope, struct sessionScope) {$0}",
13 | "onSessionStart": "() {$0}"
14 | }
--------------------------------------------------------------------------------
/messages/0.31.0.txt:
--------------------------------------------------------------------------------
1 | CFML v0.31.0 Changelog:
2 |
3 | - Updated syntax highlighting to work with the updated features in the Sublime
4 | Text 4 syntax highlighting engine, as well as the latest default syntax
5 | highlighting files released in stable build 4186
6 |
7 | Please note: these changes are significant and thus might introduce syntax
8 | highlighting errors, but the latest JavaScript syntax file bundled with
9 | Sublime Text causes the CFML syntax to break completely, so I decided to
10 | release this now to allow CFML syntax highlighting to continue to
11 | function.
12 |
13 | PLEASE RESTART SUBLIME TEXT TO ENSURE THESE CHANGES ARE LOADED CORRECTLY, THANKS!
14 |
--------------------------------------------------------------------------------
/metadata/cfscript-indent.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | name
5 | CFScript Indent
6 | scope
7 | source.cfml.script
8 | settings
9 |
10 | decreaseIndentPattern
11 | ^(.*\*/)?\s*\}.*$
12 | increaseIndentPattern
13 | ^.*\{[^}"']*$
14 |
15 | bracketIndentNextLinePattern
16 | (?x)
17 | ^ \s* \b(if|while|else)\b [^;]* $
18 | | ^ \s* \b(for)\b .* $
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/messages/0.17.0.txt:
--------------------------------------------------------------------------------
1 | CFML v0.17.0 Changelog:
2 |
3 | - Added completions for built-in function parameters where there is list of
4 | possible values available in cfdocs.org data. For example, when entering an
5 | algorithm for the `hmac()` function, a list of possible algorithms will be
6 | offered.
7 |
8 | - This release will be the last release that supports Sublime Text build 3083. At
9 | this point there have been a number of beta releases beyond 3083, so everyone
10 | has access to a ST version that supports the newer `.sublime-syntax` format for
11 | syntax highlighting. It is time consuming to support the `.tmLanguage` variant of
12 | the CFML syntax, and it no longer seems necessary.
13 |
--------------------------------------------------------------------------------
/messages/0.4.2.txt:
--------------------------------------------------------------------------------
1 | CFML v0.4.2 Changelog:
2 |
3 | - Fixed some bugs in the Testbox test runner code
4 |
5 | - After a tag attribute value completion has been inserted (between ""),
6 | the cursor is now automatically advanced past the second double quote
7 |
8 | - Added a package setting, "cfdocs_path", which is for use when you have a
9 | copy of the cfdocs.org GitHub repository on your file system (or at least
10 | its data directory). It should be set to the local file system path to the
11 | data directory of the cfdocs.org git repository. For example:
12 |
13 | "cfdocs_path": "C:/github/cfdocs/data/en/"
14 |
15 | When this is set, the F1 documentation command will load cfdocs.org data from
16 | the file system instead of fetching it via http request.
17 |
--------------------------------------------------------------------------------
/src/plugins_/testbox/__init__.py:
--------------------------------------------------------------------------------
1 | from . import test_runner
2 | from . import testbox
3 | from .test_runner import TestboxCommand
4 | from .testbox_spec_outline import TestboxSpecOutlineCommand
5 | from .. import plugin
6 |
7 |
8 | class CFMLPlugin(plugin.CFMLPlugin):
9 | def get_completions(self, cfml_view):
10 | if cfml_view.type == "script":
11 | return testbox.get_script_completions(cfml_view)
12 | elif cfml_view.type == "dot":
13 | return testbox.get_dot_completions(cfml_view)
14 | return None
15 |
16 | def get_inline_documentation(self, cfml_view, doc_type):
17 | return testbox.get_inline_documentation(cfml_view, doc_type)
18 |
19 |
20 | def _plugin_loaded():
21 | test_runner._plugin_loaded()
22 | testbox._plugin_loaded()
23 |
--------------------------------------------------------------------------------
/messages/0.6.0.txt:
--------------------------------------------------------------------------------
1 | CFML v0.6.0 Changelog:
2 |
3 | - The CFScript syntax has been overhauled.
4 | It is now a mod on top of Will Bond's amazing JavaScript syntax rewrite at
5 | https://github.com/sublimehq/Packages/blob/master/JavaScript/JavaScript.sublime-syntax
6 |
7 | The new syntax is more accurate, and file parsing is significantly faster. The
8 | previous version of the CFScript syntax took ~150ms to parse FW/1's `one.cfc`
9 | (at 2883 lines) on my desktop and ~210ms on my laptop. The new version takes
10 | ~45ms on my desktop and ~70ms on my laptop.
11 |
12 | - Unquoted tag attribute values should now correctly highlight CFScript contained
13 | between `#` characters
14 |
15 | - The matching of ColdFusion style tags in script has been restricted to match only
16 | actual tag names
17 |
--------------------------------------------------------------------------------
/syntaxes/tests/syntax_test_destructure.cfm:
--------------------------------------------------------------------------------
1 |
2 |
3 | var [ a, b ] = [ 1, 2 ];
4 |
5 | [ a, b ] = [ 1, 2 ];
6 |
7 |
8 | var { a, b } = { a: 1, b: 2 };
9 |
10 |
11 | ({ a, b } = { a: 1, b: 2 });
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/__init__.py:
--------------------------------------------------------------------------------
1 | from . import cfml_plugins
2 | from . import completions
3 | from . import component_index
4 | from . import custom_tag_index
5 | from . import events
6 | from . import goto_cfml_file
7 | from . import inline_documentation
8 | from . import method_preview
9 | from . import utils
10 | from . import commands
11 | from . import formatting
12 |
13 | command_list = []
14 |
15 |
16 | def _plugin_loaded():
17 | for k, v in globals().items():
18 | try:
19 | if "_plugin_loaded" in v.__dict__:
20 | v._plugin_loaded()
21 | except Exception:
22 | pass
23 |
24 |
25 | # load commands
26 | for k in dir():
27 | try:
28 | v = globals()[k]
29 | for a in dir(v):
30 | if a.endswith("Command"):
31 | command_list.append(v.__dict__[a])
32 | except Exception:
33 | pass
34 |
--------------------------------------------------------------------------------
/src/plugins_/basecompletions/__init__.py:
--------------------------------------------------------------------------------
1 | from .. import plugin
2 | from . import basecompletions
3 |
4 |
5 | class CFMLPlugin(plugin.CFMLPlugin):
6 | def get_completions(self, cfml_view):
7 | if cfml_view.type == "script":
8 | return basecompletions.get_script_completions(cfml_view)
9 | elif cfml_view.type == "dot":
10 | return basecompletions.get_dot_completions(cfml_view)
11 | elif cfml_view.type == "tag_attributes":
12 | return basecompletions.get_tag_attributes(cfml_view)
13 | elif cfml_view.type == "tag":
14 | return basecompletions.get_tags(cfml_view)
15 | return None
16 |
17 | def get_inline_documentation(self, cfml_view, doc_type):
18 | return basecompletions.get_inline_documentation(cfml_view, doc_type)
19 |
20 |
21 | def _plugin_loaded():
22 | basecompletions.load_completions()
23 |
--------------------------------------------------------------------------------
/messages/0.25.0.txt:
--------------------------------------------------------------------------------
1 | CFML v0.25.0 Changelog:
2 |
3 | - Added a TestBox Spec component outline command. Similar to the symbol list,
4 | this command collects all the title param strings in a spec component and
5 | displays them in an indented list for easy navigation and search. My thanks
6 | to Eric Peterson (@elpete) for suggesting and testing this.
7 |
8 | In order to use this you need to run the `testbox_spec_outline` command when
9 | a TestBox Spec component is open. I have not added a default key binding for
10 | this command, but an example binding you can add to your user key binding
11 | file is given here:
12 |
13 | {
14 | "keys": ["ctrl+alt+t"],
15 | "command": "testbox_spec_outline",
16 | "context": [
17 | {"key": "selector", "operand": "source.cfml", "operator": "equal"}
18 | ]
19 | }
20 |
21 | - Syntax highlighting fixes, see the recent commits on GitHub for more details
22 |
--------------------------------------------------------------------------------
/syntaxes/CFScript (CFML) Tags.sublime-syntax:
--------------------------------------------------------------------------------
1 | %YAML 1.2
2 | ---
3 | name: CFScript (CFML) Tags
4 | scope: source.cfml.script.tags
5 | version: 2
6 | hidden: true
7 |
8 | extends: CFScript (CFML).sublime-syntax
9 |
10 | contexts:
11 | angle-bracket-pop:
12 | - match: (?=/?>)
13 | pop: 1
14 |
15 | expression-break:
16 | - meta_prepend: true
17 | - include: angle-bracket-pop
18 |
19 | expressions:
20 | - meta_prepend: true
21 | - include: angle-bracket-pop
22 |
23 | expressions-no-comma:
24 | - meta_prepend: true
25 | - include: angle-bracket-pop
26 |
27 | parenthesized-expression:
28 | - match: \(
29 | scope: punctuation.section.group.begin.cfml
30 | set:
31 | - meta_scope: meta.group.cfml
32 | - match: \)
33 | scope: punctuation.section.group.end.cfml
34 | pop: 1
35 | - include: angle-bracket-pop
36 | - match: (?=\S)
37 | push: expression
38 |
--------------------------------------------------------------------------------
/messages/0.28.0.txt:
--------------------------------------------------------------------------------
1 | CFML v0.28.0 Changelog:
2 |
3 | - Updated the "CFML: Toggle Color Scheme Styles" command to use of the new
4 | `.sublime-color-scheme` format and customizations. See the readme for more
5 | information as well as the official documentation:
6 | https://www.sublimetext.com/docs/3/color_schemes.html#customization
7 |
8 | - Hovering over a CFML tag attribute or using F1 on it will now show specifically
9 | the documentation for that tag attribute instead of for the tag in general.
10 |
11 | - When completion docs are enabled, tag attribute documentation will now be shown
12 | while entering in tag attribute values.
13 |
14 | - Syntax highlighting support has been added for ordered structs and ACF2018
15 | typed arrays.
16 |
17 | - Basic function completions have been updated to be based on a more recent version
18 | of cfdocs.org function data.
19 |
20 | PLEASE RESTART SUBLIME TEXT TO ENSURE THESE CHANGES ARE LOADED CORRECTLY, THANKS!
21 |
--------------------------------------------------------------------------------
/src/plugins_/cfcs/completions.py:
--------------------------------------------------------------------------------
1 | from . import cfcs
2 |
3 |
4 | def get_dot_completions(cfml_view):
5 | if not cfml_view.project_name or len(cfml_view.dot_context) == 0:
6 | return None
7 | # check for known cfc name
8 | cfc_name, cfc_name_region = cfcs.search_dot_context_for_cfc(
9 | cfml_view.project_name, cfml_view.dot_context
10 | )
11 | if cfc_name:
12 | return cfml_view.CompletionList(
13 | cfcs.get_cfc_completions(cfml_view.project_name, cfc_name), 1, True
14 | )
15 |
16 | # also check for getter being used to access property
17 | symbol = cfml_view.dot_context[-1]
18 | if symbol.is_function and symbol.name.startswith("get"):
19 | if cfcs.has_cfc(cfml_view.project_name, symbol.name[3:]):
20 | return cfml_view.CompletionList(
21 | cfcs.get_cfc_completions(cfml_view.project_name, symbol.name[3:]),
22 | 1,
23 | True,
24 | )
25 |
26 | return None
27 |
--------------------------------------------------------------------------------
/src/cfml_plugins.py:
--------------------------------------------------------------------------------
1 | import importlib
2 | from .plugins_.plugin import CFMLPlugin
3 |
4 | directory = [
5 | "applicationcfc",
6 | "basecompletions",
7 | "cfcs",
8 | "cfdocs",
9 | "custom_tags",
10 | "dotpaths",
11 | "entities",
12 | "fw1",
13 | "in_file_completions",
14 | "testbox",
15 | ]
16 |
17 | plugins = []
18 |
19 |
20 | for p in directory:
21 | m = importlib.import_module(".plugins_." + p, __package__)
22 | globals()[p] = m
23 | for a in dir(m):
24 | v = m.__dict__[a]
25 | if a.endswith("Command"):
26 | globals()[a] = v
27 | elif a == "CFMLPlugin":
28 | try:
29 | if v.__bases__ and issubclass(v, CFMLPlugin):
30 | plugins.append(v())
31 | except AttributeError:
32 | pass
33 |
34 |
35 | def _plugin_loaded():
36 | for p in directory:
37 | m = globals()[p]
38 | if "_plugin_loaded" in m.__dict__:
39 | m._plugin_loaded()
40 |
--------------------------------------------------------------------------------
/src/plugins_/in_file_completions/__init__.py:
--------------------------------------------------------------------------------
1 | from .. import plugin
2 | from . import in_file_completions
3 | from .documentation import (
4 | get_inline_documentation,
5 | get_goto_cfml_file,
6 | get_completion_docs,
7 | get_method_preview,
8 | )
9 |
10 |
11 | class CFMLPlugin(plugin.CFMLPlugin):
12 | def get_completion_docs(self, cfml_view):
13 | return get_completion_docs(cfml_view)
14 |
15 | def get_completions(self, cfml_view):
16 | if cfml_view.type == "script":
17 | return in_file_completions.get_script_completions(cfml_view)
18 | elif cfml_view.type == "dot":
19 | return in_file_completions.get_dot_completions(cfml_view)
20 | return None
21 |
22 | def get_goto_cfml_file(self, cfml_view):
23 | return get_goto_cfml_file(cfml_view)
24 |
25 | def get_inline_documentation(self, cfml_view, doc_type):
26 | return get_inline_documentation(cfml_view, doc_type)
27 |
28 | def get_method_preview(self, cfml_view):
29 | return get_method_preview(cfml_view)
30 |
--------------------------------------------------------------------------------
/metadata/cfml.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | name
5 | cfml
6 | scope
7 | embedding.cfml -source.cfml.script, embedding.cfml text.html.cfml
8 | settings
9 |
10 | shellVariables
11 |
12 |
13 | name
14 | TM_COMMENT_START
15 | value
16 | <!---
17 |
18 |
19 | name
20 | TM_COMMENT_END
21 | value
22 | --->
23 |
24 |
25 | name
26 | TM_LINE_TERMINATOR
27 | value
28 | >
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/src/plugins_/cfcs/__init__.py:
--------------------------------------------------------------------------------
1 | from .cfcs import build_project_cfcs
2 | from .completions import get_dot_completions
3 | from .documentation import (
4 | get_inline_documentation,
5 | get_goto_cfml_file,
6 | get_completions_doc,
7 | get_method_preview,
8 | )
9 | from .di import CfmlDiPropertyCommand
10 | from ...component_index import component_index
11 | from .. import plugin
12 |
13 |
14 | class CFMLPlugin(plugin.CFMLPlugin):
15 | def get_completion_docs(self, cfml_view):
16 | return get_completions_doc(cfml_view)
17 |
18 | def get_completions(self, cfml_view):
19 | if cfml_view.type == "dot":
20 | return get_dot_completions(cfml_view)
21 | return None
22 |
23 | def get_goto_cfml_file(self, cfml_view):
24 | return get_goto_cfml_file(cfml_view)
25 |
26 | def get_inline_documentation(self, cfml_view, doc_type):
27 | return get_inline_documentation(cfml_view, doc_type)
28 |
29 | def get_method_preview(self, cfml_view):
30 | return get_method_preview(cfml_view)
31 |
32 |
33 | component_index.subscribe(build_project_cfcs)
34 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/messages/0.8.0.txt:
--------------------------------------------------------------------------------
1 | CFML v0.8.0 Changelog:
2 |
3 | - Support for completions and documentation in the active CFC file
4 |
5 | When editing a CFC, completions for the methods of that component are
6 | now offered; this includes offering completions after typing `this.`.
7 | If the component extends another component and that parent component is
8 | contained in a project index, then you will also be offered completions
9 | from the parent component, as well as completions after typing `super.`.
10 |
11 | The F1 documentation command and CTRL-ALT-Click can be used on component
12 | method calls, as well as on the `this` and `super` keywords.
13 |
14 | - Source code preview when using the F1 documentation command on CFC methods has
15 | been added. This is somewhat experimental, and feedback is welcome. Please note
16 | that it will currently truncate longer functions in order to avoid crashing
17 | Sublime Text.
18 |
19 | - Fixed several issues reported on GitHub
20 |
21 | - Updated regex patterns used in syntax to remove those not compatible with Sublime
22 | Text's new regex engine
23 |
24 | - Bug fix for default custom tag project data
25 |
--------------------------------------------------------------------------------
/syntaxes/tests/syntax_test_javadoc.cfc:
--------------------------------------------------------------------------------
1 | // SYNTAX TEST "Packages/CFML/syntaxes/CFML.sublime-syntax"
2 | /**
3 | This is a description of the component
4 | // <- embedding.cfml source.cfml.script comment.block.documentation.cfml text.html
5 | // ^ -text.html
6 | * @attribute and some hint text
7 | // <- embedding.cfml source.cfml.script comment.block.documentation.cfml
8 | // <- keyword.other.documentation.cfml punctuation.definition.keyword.cfml
9 | // ^ -punctuation.definition.keyword.cfml
10 | // ^ -keyword.other.documentation.cfml
11 | // ^ text.html
12 | // ^ -text.html
13 | @another.attribute and some hint text
14 | // <- embedding.cfml source.cfml.script comment.block.documentation.cfml keyword.other.documentation.cfml punctuation.definition.keyword.cfml
15 | // <- -punctuation.definition.keyword.cfml
16 | // ^ -keyword.other.documentation.cfml
17 | // ^ text.html
18 | // ^ -text.html
19 | */
20 | component {
21 |
22 | /**/ a;
23 | // ^ source.cfml.script variable.other.readwrite.cfml - comment
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/templates/method_preview.html:
--------------------------------------------------------------------------------
1 |
2 |
46 |
53 | ${pagination}
54 |
55 |
--------------------------------------------------------------------------------
/messages/0.19.0.txt:
--------------------------------------------------------------------------------
1 | CFML v0.19.0 Changelog:
2 |
3 | - Removed `cfml-icon.tmPreferences` which set a default sidebar icon for
4 | CFML files. This package is now supported by the "zz File Icons" package
5 | (https://packagecontrol.io/packages/zz%20File%20Icons) and specifying an
6 | icon in the package conflicted with it.
7 |
8 | - When running TestBox tests via the build menu, the root folder(s) of your
9 | project will be searched for a `box.json` file containing a testbox runner
10 | setting, if you do not specify a testbox runner in your project file.
11 | Please see https://github.com/jcberquist/sublimetext-cfml#testbox for more
12 | details. IMPORTANT, if you have been using the TestBox runner, this update
13 | includes a BREAKING CHANGE with regard to the structure of the TestBox
14 | settings. See also:
15 | https://github.com/jcberquist/sublimetext-cfml/issues/54
16 |
17 | - Custom tag indexing support has been updated to allow the omission of the
18 | `prefix` key when specifying custom tag folders in your project file. When
19 | this is done, custom tags in that folder will be offered as ``
20 | style completions.
21 | https://github.com/jcberquist/sublimetext-cfml/issues/55
22 |
--------------------------------------------------------------------------------
/src/plugins_/entities/__init__.py:
--------------------------------------------------------------------------------
1 | from .completions import (
2 | build_project_entities,
3 | get_script_completions,
4 | get_dot_completions,
5 | )
6 | from .documentation import (
7 | get_inline_documentation,
8 | get_goto_cfml_file,
9 | get_completions_doc,
10 | get_method_preview,
11 | )
12 | from ...component_index import component_index
13 | from .. import plugin
14 |
15 |
16 | class CFMLPlugin(plugin.CFMLPlugin):
17 | def get_completion_docs(self, cfml_view):
18 | return get_completions_doc(cfml_view)
19 |
20 | def get_completions(self, cfml_view):
21 | if cfml_view.type == "script":
22 | return get_script_completions(cfml_view)
23 | elif cfml_view.type == "dot":
24 | return get_dot_completions(cfml_view)
25 | return None
26 |
27 | def get_goto_cfml_file(self, cfml_view):
28 | return get_goto_cfml_file(cfml_view)
29 |
30 | def get_inline_documentation(self, cfml_view, doc_type):
31 | return get_inline_documentation(cfml_view, doc_type)
32 |
33 | def get_method_preview(self, cfml_view):
34 | return get_method_preview(cfml_view)
35 |
36 |
37 | component_index.subscribe(build_project_entities)
38 |
--------------------------------------------------------------------------------
/src/component_index/__init__.py:
--------------------------------------------------------------------------------
1 | from collections import namedtuple
2 | from .component_index import ComponentIndex
3 | from .documentation import (
4 | build_documentation,
5 | build_method_documentation,
6 | build_method_preview,
7 | build_method_preview_doc,
8 | build_function_call_params_doc,
9 | )
10 | from .completions import build_file_completions
11 | from .navigate_to_method import CfmlNavigateToMethodCommand
12 |
13 |
14 | __all__ = ["CfmlNavigateToMethodCommand", "builders", "component_index"]
15 |
16 |
17 | build_functions = [
18 | "build_documentation",
19 | "build_method_documentation",
20 | "build_method_preview",
21 | "build_method_preview_doc",
22 | "build_function_call_params_doc",
23 | "build_file_completions",
24 | ]
25 |
26 |
27 | Builders = namedtuple("Builders", build_functions)
28 |
29 |
30 | component_index = ComponentIndex()
31 | builders = Builders(
32 | build_documentation,
33 | build_method_documentation,
34 | build_method_preview,
35 | build_method_preview_doc,
36 | build_function_call_params_doc,
37 | build_file_completions,
38 | )
39 |
40 |
41 | def _plugin_loaded():
42 | component_index.init_parser()
43 | component_index.sync_projects()
44 |
--------------------------------------------------------------------------------
/metadata/cfscript.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | name
5 | cfscript
6 | scope
7 | source.cfml.script
8 | settings
9 |
10 | shellVariables
11 |
12 |
13 | name
14 | TM_COMMENT_START
15 | value
16 | //
17 |
18 |
19 | name
20 | TM_COMMENT_START_2
21 | value
22 | /*
23 |
24 |
25 | name
26 | TM_COMMENT_END_2
27 | value
28 | */
29 |
30 |
31 | name
32 | TM_LINE_TERMINATOR
33 | value
34 | ;
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/messages/0.22.0.txt:
--------------------------------------------------------------------------------
1 | CFML v0.22.0 Changelog:
2 |
3 | - Moved from separate menu entries for opening default package setting files and
4 | user package setting files to one entry for each that opens the default and
5 | user files side by side (as Sublime Text itself now does for its settings
6 | files).
7 |
8 | - Inline documentation popups now make use of styling that adapts to the current
9 | color scheme. (e.g. Color schemes with a dark background will now get popups
10 | with a dark background as well.) You can disable this behavior by setting the
11 | package setting `adaptive_doc_styles` to false in your user package settings.
12 |
13 | - Added a new testbox reporter: "compacttext". There are now two options for the
14 | text output when tests are run, "text" and "compacttext". This is controlled
15 | by the setting `testbox.reporter` and can be set in your package settings, project
16 | settings, or in a box.json file at the root of your project. The "compacttext"
17 | style output is courtesy of work done by John Whish (@aliaspooryorik).
18 |
19 | - Added `TRUNCATE TABLE` and `BULK INSERT` to the list of strings that trigger
20 | SQL string highlighting
21 | https://github.com/jcberquist/sublimetext-cfml/issues/35#issuecomment-294524021
22 |
--------------------------------------------------------------------------------
/messages/0.5.0.txt:
--------------------------------------------------------------------------------
1 | CFML v0.5.0 Changelog:
2 |
3 | - Breaking change:
4 | The per project "model_completion_folders" setting has been replaced with a "cfc_folders" setting.
5 | This update includes improvements to how CFCs are indexed, and allows for greater customization of
6 | the variable names for which it will provide CFC method completions. For complete information on
7 | this update please see:
8 | https://github.com/jcberquist/sublimetext-cfml#cfc-indexing-and-dot-paths
9 |
10 | The short version:
11 | If you were using "model_completion_folders", to restore the current behavior you will need to make
12 | the following change:
13 |
14 | from
15 | "model_completion_folders": [ "C:/full/path/to/model" ]
16 |
17 | to
18 | "cfc_folders": [{"path": "C:/full/path/to/model", "variable_names": ["{cfc}","{cfc}{cfc_folder_singularized}"], "accessors": false}]
19 |
20 | - Added support for per project mappings
21 | These are used to convert file system paths to CFC dot paths and the reverse. They are also used
22 | in conjunction with CFC folder indexing to resolve dot paths in the extends attribute of indexed
23 | CFCs. For complete information on this feature please see:
24 | https://github.com/jcberquist/sublimetext-cfml#cfc-indexing-and-dot-paths
25 |
--------------------------------------------------------------------------------
/messages/0.10.0.txt:
--------------------------------------------------------------------------------
1 | CFML v0.10.0 Changelog:
2 |
3 | - Added `cflocation` to the default list of tags that do not need a closing tag
4 | https://github.com/jcberquist/sublimetext-cfml/issues/25
5 |
6 | - Relative paths are now supported in `.sublime-project` files for paths specified
7 | for mappings, cfc folders, and custom tags. When a relative path is used, it is
8 | understood to be relative to the location of the `.sublime-project` file.
9 | (Just as Sublime Text itself resolves relative folder paths in project files.)
10 | https://github.com/jcberquist/sublimetext-cfml/issues/26
11 |
12 | - Added syntax highlighting support for function parameter hints and metadata
13 | specified inline with the parameter (e.g. `required string varName hint="hint"`)
14 |
15 | - Added a new command (bound by default to SHIFT+ALT+d), that when run will insert a
16 | property into a component based on a project's indexed component variable names.
17 | If the cursor's current position can be resolved to a component name, that name will
18 | be set in the property, otherwise, a list of the project's indexed component names will
19 | be offered from which a component name can be chosen. See `Inject Property Command` in
20 | https://github.com/jcberquist/sublimetext-cfml#cfc-indexing-and-dot-paths
21 |
--------------------------------------------------------------------------------
/messages/0.27.0.txt:
--------------------------------------------------------------------------------
1 | CFML v0.27.0 Changelog:
2 |
3 | - Using `CTRL+ALT+Left Click` on builtin functions and tags will now open the
4 | cfdocs.org page for that function or tag in your default browser.
5 |
6 | BREAKING CHANGE
7 |
8 | - The CFScript formatting feature has been substantially overhauled.
9 |
10 | The format settings file structure has been flattened so that it no longer
11 | contains any nested objects. Instead those settings are now contained in top
12 | level keys that use periods to denote namespaces. (So, for example, you will
13 | see keys such as "array.padding_inside".) This change allows for more
14 | granular overriding of the default settings.
15 |
16 | In addition, this change will make the format settings compatible with
17 | "PackageDev" (https://packagecontrol.io/packages/PackageDev). PackageDev
18 | provides completions and popup docs for settings files, as well as more
19 | targeted syntax highlighting. (For this reason I highly recommend it, even if
20 | you don't intend to develop any ST packages.)
21 |
22 | However, this means that if you are currently formatting CFScript with
23 | this package, your current user defined settings WILL NOT WORK until you
24 | update them to this new structure.
25 |
26 | Please read through the default settings file to see the updated formatting
27 | options.
28 |
--------------------------------------------------------------------------------
/src/plugins_/dotpaths/__init__.py:
--------------------------------------------------------------------------------
1 | from .completions import (
2 | build_project_map,
3 | get_script_completions,
4 | get_dot_completions,
5 | get_tag_attributes,
6 | )
7 | from .documentation import (
8 | get_inline_documentation,
9 | get_goto_cfml_file,
10 | get_completions_doc,
11 | get_method_preview,
12 | )
13 | from ...component_index import component_index
14 |
15 | from .. import plugin
16 |
17 |
18 | class CFMLPlugin(plugin.CFMLPlugin):
19 | def get_completion_docs(self, cfml_view):
20 | return get_completions_doc(cfml_view)
21 |
22 | def get_completions(self, cfml_view):
23 | if cfml_view.type == "script":
24 | return get_script_completions(cfml_view)
25 | elif cfml_view.type == "dot":
26 | return get_dot_completions(cfml_view)
27 | elif cfml_view.type == "tag_attributes":
28 | return get_tag_attributes(cfml_view)
29 | return None
30 |
31 | def get_goto_cfml_file(self, cfml_view):
32 | return get_goto_cfml_file(cfml_view)
33 |
34 | def get_inline_documentation(self, cfml_view, doc_type):
35 | return get_inline_documentation(cfml_view, doc_type)
36 |
37 | def get_method_preview(self, cfml_view):
38 | return get_method_preview(cfml_view)
39 |
40 |
41 | component_index.subscribe(build_project_map)
42 |
--------------------------------------------------------------------------------
/syntaxes/testbox.sublime-syntax:
--------------------------------------------------------------------------------
1 | %YAML 1.2
2 | ---
3 | name: TestBox
4 | scope: testbox
5 | hidden: true
6 | contexts:
7 | main:
8 | - match: '^\|(?=\s\d+\s+\|)'
9 | push: [skipped, error, failure, success]
10 | - match: 'Pass:|\[Passed:'
11 | push: success
12 | - match: 'Failures:|\[Failed:'
13 | push: failure
14 | - match: 'Errors:|\[Errors:'
15 | push: error
16 | - match: 'Skipped:|\[Skipped:'
17 | push: skipped
18 | - match: \(([+P])\)
19 | captures:
20 | 1: testbox.success
21 | - match: \((!)\)
22 | captures:
23 | 1: testbox.failure
24 | - match: \((X)\)
25 | captures:
26 | 1: testbox.error
27 | - match: \((-)\)
28 | captures:
29 | 1: testbox.skipped
30 | - match: \S.*testbox[\\/]system.*:\d+$
31 | scope: testbox.stack.testbox
32 | - match: \S.*:\d+$
33 | scope: testbox.stack
34 | success:
35 | - match: '[1-9]\d*'
36 | scope: testbox.success
37 | - match: \S
38 | pop: true
39 | failure:
40 | - match: '[1-9]\d*'
41 | scope: testbox.failure
42 | - match: \S
43 | pop: true
44 | error:
45 | - match: '[1-9]\d*'
46 | scope: testbox.error
47 | - match: \S
48 | pop: true
49 | skipped:
50 | - match: '[1-9]\d*'
51 | scope: testbox.skipped
52 | - match: \S
53 | pop: true
54 |
--------------------------------------------------------------------------------
/messages/0.7.0.txt:
--------------------------------------------------------------------------------
1 | CFML v0.7.0 Changelog:
2 |
3 | - adds basic support for custom tags as used with a cfimport tag and a custom tag prefix
4 |
5 | The completions are offered on a per project basis. To set them up add a "custom_tag_folders"
6 | setting to your `.sublime-project` file. It should be an array of JSON objects where each object
7 | has two required keys: "path" and "prefix". "path" should be a full file path to a folder
8 | containing custom tags, and "prefix" should be the prefix you intend to import them with.
9 |
10 | For example:
11 |
12 | "custom_tag_folders": [
13 | {"path": "/path/to/tag/folder", "prefix": "page"}
14 | ]
15 |
16 | Once this is done, "page" will be offered as a custom tag prefix completion, and then after
17 | entering `` (case insensitive) in custom tag files in order to determine whether or not
26 | to auto close the custom tag.
27 |
--------------------------------------------------------------------------------
/src/component_index/navigate_to_method.py:
--------------------------------------------------------------------------------
1 | import sublime
2 | import sublime_plugin
3 | from .. import utils
4 |
5 |
6 | class CfmlNavigateToMethodCommand(sublime_plugin.WindowCommand):
7 |
8 | def run(self, file_path, href):
9 |
10 | if len(file_path) > 0:
11 | index_locations = self.window.lookup_symbol_in_index(href)
12 |
13 | for full_path, project_path, rowcol in index_locations:
14 | if utils.format_lookup_file_path(full_path) == file_path:
15 | row, col = rowcol
16 | self.window.open_file(full_path + ":" + str(row) + ":" + str(col), sublime.ENCODED_POSITION | sublime.FORCE_GROUP)
17 | break
18 | else:
19 | # might be a setter, so for now just open the file
20 | self.window.open_file(file_path)
21 | else:
22 | # this symbol should be in active view
23 | view = self.window.active_view()
24 | functions = view.find_by_selector("meta.function.declaration.cfml entity.name.function.cfml")
25 | for funct_region in functions:
26 | if view.substr(funct_region).lower() == href.lower():
27 | view.sel().clear()
28 | r = sublime.Region(funct_region.begin())
29 | view.sel().add(r)
30 | view.show(r)
31 | break
32 |
--------------------------------------------------------------------------------
/messages/0.15.0.txt:
--------------------------------------------------------------------------------
1 | CFML v0.15.0 Changelog:
2 |
3 | - `writeOutput` key binding now outputs a semicolon after the parentheses
4 | matching the `writeDump` key binding
5 | https://github.com/jcberquist/sublimetext-cfml/pull/44
6 |
7 | - Fixed syntax highlighting and cfc completions for function parameter types
8 | containing component dot paths
9 | https://github.com/jcberquist/sublimetext-cfml/issues/45
10 |
11 | - Component completions no longer include private methods in contexts where
12 | those methods are not callable
13 | https://github.com/jcberquist/sublimetext-cfml/issues/43
14 |
15 | - Added basic method completion support for variables referencing instantiated
16 | components.
17 |
18 | For example, given `myVar = new path.to.component()`, after typing `mycfc.`,
19 | completions will be offered for `path/to/component.cfc`.
20 |
21 | This support is somewhat limited, and it may collide with the completions
22 | offered by the already extant cfc completions using `cfc_folders`. If you wish
23 | to disable it you can set the package setting `instantiated_component_completions`
24 | to `false` in your user package settings.
25 |
26 | In order for these completions to work, the component in question must be
27 | indexed in a project `cfc_folders` array and there must be a mapping specified in
28 | the project `mappings` array such that the path to the component can be deciphered.
29 | (If pressing F1 on `new path.to.component()` brings up the component documentation,
30 | then things are setup properly.)
31 |
--------------------------------------------------------------------------------
/messages/0.18.0.txt:
--------------------------------------------------------------------------------
1 | CFML v0.18.0 Changelog:
2 |
3 | - Removed `.tmLanguage` support from the package. The previous tagged release
4 | (v0.17.0) will be the last release containing `.tmLanguage` syntax files.
5 |
6 | - Fixed an issue where, when indexing custom tag files, a file read failure on
7 | an individual file was preventing the custom tag index from being generated.
8 | https://github.com/jcberquist/sublimetext-cfml/issues/53
9 |
10 | - Persistent components are now indexed via their entity names when they are
11 | contained in a project `cfc_folders` array. This index is used to offer
12 | entity name completions when using the ORM functions `entityNew()`,
13 | `entityLoad()`, and `entityLoadByPK()`.
14 | https://github.com/jcberquist/sublimetext-cfml/issues/51
15 |
16 | Also, using that same index, method completion support for variables
17 | referencing persistent components has been added. For example, given
18 | `myVar = entityLoadByPK("myentity", 1)`, after typing `myVar.`, completions
19 | will be offered for the `myentity.cfc` component. (If the `entityname`
20 | attribute is specified, it does takes precedence over the file name in
21 | determining the component entity name.) This support also extends to the F1
22 | documentation command, as well as the CTRL+ALT+click go to source command.
23 | https://github.com/jcberquist/sublimetext-cfml/issues/50
24 |
25 | If you wish to disable this behavior you can set the package setting
26 | `instantiated_component_completions` to `false` in your user package settings.
27 |
--------------------------------------------------------------------------------
/src/documentation_helpers.py:
--------------------------------------------------------------------------------
1 | CARD_TEMPLATE = """
2 |
6 | """
7 |
8 | HEADER_TEMPLATE = """
9 | {key}{value}
10 | """
11 |
12 |
13 | def header(key, value="", scope=""):
14 | args = {"key": key, "value": ""}
15 | if len(value):
16 | args["value"] = ": " + span_wrap(value, scope)
17 | return HEADER_TEMPLATE.format(**args)
18 |
19 |
20 | def param_header(param):
21 | key = param["name"]
22 | value = param["type"] if "type" in param and param["type"] else ""
23 | html = header(key, value, "storage.type")
24 |
25 | if "required" in param and param["required"]:
26 | html += ' Required '
27 | return html
28 |
29 |
30 | def card(header="", body=""):
31 | html = CARD_TEMPLATE.format(header.strip(), body.strip())
32 | html = html.replace('\n', "")
33 | if '' in html:
34 | html = html.replace(
35 | '