Find MMT Unicode abbreviations for given symbol (e.g. given ☞, find "juri") - intellij-idea

The usual IDEs/editors for MMT (e.g. IntelliJ + MMT plugin or jEdit) feature an autocompletion feature for certain useful Unicode characters. For instance, I can type jle and immediately get suggested jleftrightarrow that, upon autocompletion, is replaced by ↔.
Is there a way to find out the reverse association? E.g. I have the symbol ☞ at hand and would like to know the autocompletion abbreviation starting with j — if it exists. For that hand, I would get juri.

The MMT OnlineTools I developed allow this: https://comfreek.github.io/mmteditor.
See screenshot below: if you already have a string full of Unicode symbols that you don't know how to type, just paste it under "how do I type X?". And if you are looking for a specific abbreviation — by Unicode character or by (parts of its) name — use the "abbreviation search" feature.
Internally, my tools pulls from (a copy of) the same resource file that Dennis linked in his answer.

As far as I know, there currently isn't a good way to look up or search for the ASCII abbreviations, except to go straight for the source — which at least has the advantage that it's guaranteed to be up-to-date.
The IDE plugins all have access to an mmt.jar and load their abbreviations from a specific resource file embedded therein. You can find it here on GitHub: https://github.com/UniFormal/MMT/blob/master/src/mmt-api/resources/unicode/unicode-latex-map.
In the long term, we should consider extending that file with a third "field" that gives a short description, and e.g. have a text field in IntelliJ to search for a specific abbreviation.

Related

Search all programs within a package for a MODIFY statement

I want to search all programs - within a package - that use the statement:
modify itab_xyz from wa_itab_xyz
Preferably, the string should be searched with wild cards like itab*
for a range of itab_(values) like itab_abc, itab_def, itab_ghi
etc..
How do i do this in SAP ABAP?
Below is a screenshot of all programs within a package one can search from.
One possibility would be to use program RS_ABAP_SOURCE_SCAN.
You can restrict the selection by package and you can also enter a specific string to search for in the code.
I use the transaction code_scanner (program is afx_code_scanner).
The biggest problem with this program and the RS_ABAP_SOURCE_SCAN provided above is that they won’t find everything. IMO the most important missing component to them is implicit enhancements. They can be very impactful to system functions, and if you are searching for an error message or hard coded value skipping them could mean not finding something critical.
At the time I looked (about 7 years ago), I was unable to find a delivered tool that would actually scan all the code in the system. I ended up enhancing the code_scanner to look for enhancements, WDA components, BSP code, and forms code.
I don’t know if the open source component above includes those. At first glance it doesn’t seem to, but I don’t have time to really dig into it.
You could use a tool from the Galileo-Open Source library. This program searches ABAP Source, OTR-Texts, Message and Textpools for static Text, wildcard patterns or regex patterns.
ABAP-Coding:
https://github.com/galileo-group/galileo-abap-lib/blob/master/%23gal%23devtools_find_text.prog.abap
Textpool:
https://github.com/galileo-group/galileo-abap-lib/blob/master/%23gal%23devtools_find_text.prog.xml
It refers to some additional classes from the library, so you either need to copy these as well or just use ABAPgit to get the whole library. You can also contact me, so I can send you a transport containing the library.
Additional information (October 1, 2020):
I created a version of the report that you can copy/paste to the ABAP editor. It is too long to include it in the response, but you can find it here.
Do not forget to copy the text elements / selection texts.
Required Text Elements:
-----------------------
B00 Scope
B01 Search pattern
H01 Type
H02 Name
H03 Key
H04 Match
Required Selection Texts:
-------------------------
P_CASE Case-sensitive
P_DEVC Package
P_LANGU Language
P_MESS Messages
P_OTR OTR Texts
P_PATT Pattern
P_REGEX Regular expression
P_SOURCE ABAP sources
P_TPOOL Textpools
P_WILDC Wildcard pattern

Where can I find a complete list of keywords (of the form ${ ... } ) that can be used in netbeans "code template"

The complete list of keywords that are legal in creating code templates in Netbeans would be accompanied by some documentation, making the "list" a reference. A line from the reference might look like:
${cursor} says to put the cursor at this point in the generated line
Working examples might be included in the reference, such as:
User-defined word to invoke the template: edfold
The template as it would appear in the Netbeans 8.2 RC > Tools > Options > Editor > Code templates tab:
${no-indent}//
// <editor-fold desc="***** ${cursor} *****" >
//
How it works: When I type edfold and hit the Tab key, the template is pasted into my document at the cursor position and looks like the following:
//
// <editor-fold desc="***** # *****" >
//
The cursor is positioned between the 5th and 6th asterisks that follow desc, so that I can then type whatever brief documentation that I wish, if any.
So where is the list of such keywords and their syntax and meaning? Such as:
${cursor}
${selection}
${no-indent}
${arg}
${Type}
and who knows how many more
It just hit me that there are OTHER keywords, two of which I unwittingly used above (I noticed them in someone else's code template and figured out how to use them):
desc
editor-fold
Surely there are other such identifiers to include in the reference.
By the way, the code template above is cute (or not) but is useless without a companion code template:
keypress:
endfold
Code template in editor:
// </editor-fold> ---------------- ${cursor} -------------------
Wherever the first inserted code template is located in your code, the second template must be below it. There is a "collapse" symbol "-" at the left of the first template. Clicking it collapses the code between the two templates. The symbol then changes to "+" and will expand the collapsed code when clicked.
EDIT
I just found this equivalent code template to the edfold and endfold pair just completed. Easier to code, up to a point, and harder to learn to use, but worth it, in the long run. Just highlight text to "hide" by folding, look for the line with the "Light Bulb", click Alt+Enter, and click "Code Folding". (Ctrl+Z to undo!)
But please see my (much better) Answer than this (was a) Question below.
Egg on my face... Googled topic, scanned all hits WAY too fast. In particular, "netbeans 8.2 code templates" pointed to this page involving PHP (think Java), which contained a lot of invaluable info about PHP that applies directly to Code Templates in Netbeans 8.2.
So, that link is part of a manual of sorts for learning how to create Code Templates for Netbeans 8.2 (in particular, and PHP in general).
The reference that I asked for--complete list of keywords (of the form ${ … } )--implies a list of all keywords or reserved words, like ${cursor} and ${selection} that permeate the list of provided Code Templates. But in a sense, that is the list. It is exactly those two Reserved Names. There are no others. Short list.
In the list of provided Netbeans Code Templates, there are a LOT of words that share the same $(...) syntax, but most are placeholder names or parameters that you decide the name and (probably-simple) meaning of.
If a code template contains, for example, class ${className}, the word class is Java code and ${className} is a parameter or placeholder. When the IDE expands the template, class is entered and ${className} turns into class_name, which the IDE automatically selects for editing, suggesting for you to enter the name of the new Java class being defined.
This non-trivial, but understandable, code template and much of what follows it explains much of the process for creating Code Templates. The heading Inserting the code template with code completion ends the explanation, but here is a sort of note of summary from further down:
The syntax of a "code template parameter" is a dollar sign, $, followed by the
parameter's definition between curly brackets {...}. Within this syntax, template
parameters have one of four forms:
* A reserved name that gives processing instructions to IDE (cursor or selection, only)
* An arbitrary placeholder name, such as ${SomeName}
* A descriptive parameter name [that hints at its meaning]
* Pre-defined parameters (??)

Are the following BCP47 codes equally valid: art-x-isv-Latn or art-Latn-x-isv?

The question arises from my doubt whether everything that follows x- in BCP47 code is a private extension as well. Will Latn be considered as a private extension too in art-x-isv-Latn? On the other hand, the latter looks more reasonable than art-Latn-x-isv, because if you read it:
art-x-isv-Latn: a private extension of the artificial languages group under name "isv" (Interslavic), in Latin script
art-Latn-x-isv: the artificial language in Latin script with the extension "isv" (Interslavic)
Could you help me with figuring out if my interpretation of art-x-isv-Latn and art-Latn-x-isv is correct in terms of BCP47?
I’m the editor of RFC 4645 and 5645 and the main clerical contributor to the BCP 47 Language Subtag Registry.
It is true that in BCP 47, everything following the x singleton is considered a private extension. Therefore, the correct way to write your tag is art-Latn-x-isv.
Variant subtags and especially private extensions can mean almost anything, so there is no one “right” place to put them within a tag that will always make the most sense from a grouping standpoint. Interpreting your tag as “the artificial language in Latin script with the extension ‘isv’ (Interslavic)” is not wrong. The extension refers to the entire preceding tag (“art-Latn”), not just the immediately preceding subtag (“Latn”).

List of common Gherkin step starting keywords

I want to compile a list of of keywords in use by my project (but also in the gherkin world). I am calling these words 'step starting keywords' (aka dark blue words in Rubymine) to clarify exactly what I am looking for.
Below is my current list, but I would like to expand this list, but I have yet to find an index of these words (or even know if there is a word that these words are known as in talking about Gherkin usage.
Examples
Given
And
Then
When
Maybe also include the structure keywords
Examples:
Scenario Outline:
Feature:
Note: My ultimate goal would be to have a 'dictionary' of ALL of the words that I have in use in my Gherkins.
You can add 'But' and '*' with step starters list.

Find All in a Textbox

I am working on an application to search for and build a list of all the times a string (or variable of) is in a text file. Kind of like a Find All function in a text editor that I can build a list with the info that is found, such as
S350
S250
S270
S5000
What can I use to do this search? It will have one value that does not change (The S in this case) followed by up to 4 digits
RegEx seems like a good choice.
Something like.. S(\d{1,4})? might work for you.
Expresso is my preferred regular expression composer.