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

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 (??)

Related

Tabulator - formatting print and PDF output

I am a relatively new user of Tabulator so please forgive me if I am asking anything that, perhaps, should be obvious.
I have a Tabulator report that I am able to print and create as a PDF, but the report's formatting (as shown on the screen) is not used in either output.
For printing I have used printAsHtml and printStyled=true, but this doesn't produce a printout that matches what is on the screen. I have formatted number fields (with comma separators) and these are showing correctly, but the number columns should be right-aligned but all of the columns appear as left-aligned.
I am also using Tree View where the tree rows are coloured differently to the main table, but when I print the report with a tree open it colours the whole table with the tree colours and not just the tree.
For the PDF none of the Tabulator formatting is being used. I've looked for anything similar to the printStyled option, but I can't see anything. I've also looked at the autoTable option, but I am struggling to find what to use.
I want to format the print and PDF outputs so that they look as close to the screen representation as possible.
Is there anywhere I could look that would provide examples of how to achieve the above? The Tabulator documentation is very good, but the provided examples don't appear to explain what I am trying to do.
Perhaps there are there CSS classes that I am missing or even mis-using? I have tried including .tabulator-print-table in my CSS, but I am probably not using it correctly. I also couldn't find anything equivalent for producing PDFs. Some examples would help immensely.
Thank you in advance for any advice or assistance.
Formatting is deliberately not included in these, below i will outline why:
Downloaders
Downloaded files do not contain formatted data, only the raw data, this is because a lot of the formatters create visual elements (progress bar, star formatter etc) that cannot be replicated sensibly in downloaded files.
If you want to change the format of data in the download you will need to use an accessor, the accessorDownload option is the one you want to use in this case. The accessors transform the data as it is leaving the table.
For instance we could create an accessor that prepended "Mr " to the front of every name in a column:
var mrAccessor= function(value, data, type, params, column, row){
return "Mr " + value;
}
Assign it to a columns definition:
{title:"Name", field:"name", accessorDownload:mrAccessor}
Printing
Printing also does not include the formatters, this is because when you print a Tabulator table, the whole table is actually rebuilt as a standard HTML table, which allows the printer to work out how to layout everything across multiple pages with column headers etc. The downside of this is that it is only loosely styled like a Tabulator and so formatted contents generated inside Tabulator cells will likely break when added to a normal td element.
For this reason there is also a accessorPrint option that works in the same way as the download accessor but for printing.
If you want to use the same accessor for both occasions, you can assign the function once to the accessor option and it will be applied in both instances.
Checkout the Accessor Documentation for full details.

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

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.

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

"base" Keyword in LibreOffice Basic

I'm writing a macro for LibreOffice Calc in Basic in VBA compatibility mode. It complains when I use this line:
Const BASE = 3
BASIC syntax error.
Symbol expected.
and the syntax coloring seems to indicate that "BASE" is a keyword or reserved word. Other consts in the macro are accepted without issue. Also, this line is accepted in VBA in Excel.
I will change the name in order to avoid this problem, however I am unable to locate any documentation that references this as being any kind of reserved word. I assume it either has something to do with number bases or with the name of LO's database. However, words like "WRITER" and "CALC" don't act the same way - they seem to be accepted as names for constants. Note that my use of this word is not related to the database anyway.
Also, unfortunately, LO Basic doesn't seem to have an immediate mode (REPL) so I am unable to easily play with this word to determine what it's used for.
Can you point me toward some documentation for the keyword BASE?
Those are some good guesses, but incorrect as it turns out. The word is used as follows:
Option Base 1
It can be either 0 or 1 to denote which index refers to the first element of an array, as documented at https://wiki.openoffice.org/wiki/G11ntest/Documentation/BASIC_Guide/Arrays.
To discover this, I looked through the LibreOffice source code. The file /basic/source/inc/parser.hxx was helpful. This is the closest approximation of a list of keywords available, judging from this post.
Apparently, this statement was adopted from VBA: https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/option-base-statement

Controlling Doxygen's LaTeX output for making PDF documentation

I'm using Doxygen to generate documentation for my code. I need to make a PDF version of this and using Doxygen's LaTeX output appears to be the way to do it.
However I've run into a number of annoying problems, and not knowing anything about LaTeX previously haven't really got much of an idea on how to approach them, and the countless references for LaTeX related things are not much help...
I worked out how to create a custom style thing in a sty file and how to get Doxygen to use it. After a lot of searching I found out how to set the page margins etc. through this, and I'm guessing the perhaps this is the file I want for doing the other things I want, but I cant seem to find any commands for doign what I want :(
The table of contents at the start of the document contains a lot of items Id rather it didn't as it makes the contents very long. Is there some way to limit this contents to just say the first two levels, rather than having entries for every single individual function, variable, etc.? Id quite like to keep all the bookmarks however. I did try the "COMPACT_LATEX" option but as well as removing items on the contents pages, it removed the bookmarks and the member lists at the start of each section, which I do really want to keep.
Is there a way to change the order of things, like putting the full class description at the start of the section, rather than after all the members and attributes?
Wow, that's kind of evil of Doxygen.
Okay, to get around the tocdepth counter problem, add the following line to your .sty file:
\AtBeginDocument{\setcounter{tocdepth}{2}}% or whatever level you want
You can set the PDF bookmarks depth to a separate value:
% requires you \usepackage{hyperref} first
\hypersetup{
bookmarksdepth = section, % of whatever level you want
}
Also note that if you have a list of figures/tables, the tocdepth must be at least 2 for them to show up.
I don't see any way of rearranging those items within the LaTeX files---Doxygen just barfs them out there, so we can't do much. You'll have to poke around the Doxygen documentation to see if there's any way to specify the order I guess. (Here's hoping!)
You're so close.
Googling on "latex contents level" brought me to LaTeX - customizing the depth of the table of contents for different parts of the thesis which suggests
\setcounter{tocdepth}{n}
where n starts at zero for only the highest level division. This is presumable defined in all the default styles, but is worth a try in doxygen.
You could write a Perl/Awk script to simply delete the unwanted lines from the table of contents. For the file burble.tex, Latex will generate the file burble.toc, which will contain lines such as:
\contentsline {subsection}{Class F rewrites}{38}
\contentsline {subsection}{Class M rewrites}{39}
\contentsline {section}{\numberline {7}Definition and properties of the translation}{44}
\contentsline {paragraph}{Well-formedness}{54}
Simple regexes will identify which levels each line belongs to, and you can filter the file based on that. Once you have the table of contents the way you want it, insert \nofiles in the appropriate place (the style sheet?), which means that Latex will read the auxiliary files but not overwrite them.