Among the rather simple use-cases, like having detailed syntax checks for all kinds of "micro-languages" that are used e.g. in
XPath.compile() and so on, here are some less obvious, yet very useful examples how IntelliLang can leverage PyCharm's support for a much better coding assistance.
The new scripting support in the upcoming Java 1.6 is another case where it will be important to get as much as possible edit-time assistance when script-code is constructed from Java code.
Support for JSP custom tags
One thing that's important to know is that the taglib's URI which supplies a custom tag should be used as the namespace URI of the XML tag to inject a language into. The namespace-textfields contain a list of all known taglib URIs in the project.
Here's an obvious example right from PyCharm's OpenAPI:
The contract of the method
getID() is that it should only return strings that match the pattern "[a-zA-Z_0-9]+". The short note in the JavaDoc can be easily overlooked though because the contract isn't specified in an automatically verifiable way.
However, if this method were annotated as
@Pattern("[a-zA-Z_0-9]+"), any attempt to return a string that doesn't match that pattern would be flagged in the editor:
If a regular expression pattern represents an enumeration of different literal values, the plugin offers completion for those values:
Editing regular expressions
Here are some examples of the enhanced coding support for regular expression patterns:
Character category validation
Character category completion