word-database integration in Rational RequistePro - ibm-rational

How to integrate word document with Rational RequistePro.
If i have document with 50 requirements and i want to put that word document in reqpro, will it generate those 50 requirements.If it does, how can i do that.
Thanks.

It's quite easy to d it using the "import document" feature of RequisitePro. It allows you to import your requirements using a mix of three kinds of parsing:
Delimiters: Your requirements are delimited by two strings in your document, for example: [[This is a requirement]]. "[[" and "]]" would be your delimiters.
Keywords: All your requirements have a keyword that identifies them as requirements. It is a common practice to use keywords as "shall" (The system shall...) in the requirements definition. This option allows you to find your requirement by providing the keywords to use.
Word styles: If your document uses a specific style to identify the requirements you can tell ReqisitePro to use that style to find your requirements.
To import a document go to File > Import.. choose Word document and follow the wizard. You will be able to either import the requirements AND the document or just the requirements (or just the document, but I'm clear that's not something yo want.)

Related

How to sort sections of markdown by heading?

Given a large markdown file with a structure like:
# Main
## Sub main Z
### Title Z
Content Z
### Title B
Content B
## Sub main A
### Title A
Content A
How would one sort its sections so that they are in alphabetical order by heading?
# Main
## Sub main A
### Title A
Content A
## Sub main Z
### Title B
Content B
### Title Z
Content Z
I don't think there is any solution that does not require you to write some code.
But the programmatic solution is pretty easy if you can code:
Parse the Markdown into an AST (abstract syntax tree).
Manipulate the AST, reordering nodes as you want.
Write the modified AST back to Markdown.
The trick is choosing a Markdown parser that supports the above steps, that lets you do it in the language of your choice, and that lets you do it most easily.
Here are the ones that I personally know that meet these requirements:
Pandoc
Probably the number one Markdown toolkit in the world. Pandoc's native language is Haskell, but it supports many languages. If you're going to do a lot of Markdown stuff down the road, it probably makes sense to become knowledgable in Pandoc anyway.
It has an option, --section-divs, that converts the document into a section hierarchy based on headings, which will make resorting sections at every nesting level almost trivial (if you can code).
It has (support for filters](https://pandoc.org/filters.html#), which are exactly the solution I am describing.
It has special support for Lua and Lua filters, which might be the easiest to code.
You can also write filters in other languages: Python, PHP, Perl, Javascript/Typescript, Groovy, Ruby.
A quick web search shows many example filters. With some more searching you might get lucky and find one that does what you want already written, though I doubt it as sorting sections alphabetically seems an uncommon thing to do.
CMark
The C reference implementation of CommonMark. Languages other than C are supported:
It provides a shared library (libcmark) with functions for parsing CommonMark documents to an abstract syntax tree (AST), manipulating the AST, and rendering the document to HTML, groff man, LaTeX, CommonMark, or an XML representation of the AST. It also provides a command-line program (cmark) for parsing and rendering CommonMark documents.
Flexible. CommonMark input is parsed to an AST which can be manipulated programmatically prior to rendering.
Multiple renderers. Output in HTML, groff man, LaTeX, CommonMark, and a custom XML format is supported. And it is easy to write new renderers to support other formats.
It is easy to use libcmark in python, lua, ruby, and other dynamic languages: see the wrappers/ subdirectory for some simple examples.
remark
A Javascript-based framework specifically designed around AST manipulation. I've never used it, but it possibly has tools to make AST manipulation easier, though I'm only guessing.
πŸ€πŸ€πŸ€πŸ€
Good luck!
I tried to use pandoc, but in step from AST to markdown was lost many formatting like new line and etc.
I found another way to do that. We need only MS Word.
Open markdown file thought Word
Create new macro with the next code. We find all headers (#) and apply style Title 1, Title 2 and so on. Change the name of style for you.
Sub insertStyleHeaders()
Dim hashCount As Integer
Dim styleStr As String
Set oRng = ActiveDocument.Range
With oRng.Find
.text = "#"
While .Execute
oRng.MoveEnd wdParagraph
If InStr(oRng.text, "# ") Then
hashCount = Len(oRng.text) - Len(Replace(oRng.text, "#", ""))
styleStr = "Title " + CStr(hashCount)
oRng.Select
oRng.Style = ActiveDocument.Styles(styleStr)
End If
oRng.Collapse wdCollapseEnd
Wend
End With
End Sub
After run macros, right mouse click to: Expand/Collapse -> Collapse All Headings
Now we have next doc. You need to select by mouse group of items and call sort by headings.
After end of sort, select all doc (Ctrl + A) and apply plain text/default style in order to remove header styles.
And last, use ruler to shift indents and save file.

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

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.

Searching for a sql server database reference string pattern [Database].[Schema].[Object]

I need to search through various large T-SQL scripts and find all references to database objects which has [Database].[SchemaName].[Table|View|StoredProcedure] pattern.
I'm using notepad++ to search folders containing the target scripts. Could someone help me out with a regular expression to identify references to database objects that use the pattern described above. For example:
[MyDB].[MySchema].Employee
MyDb.MySchema.Employee
MyDb.[MySchema].uspGetEmployee
[MyDb].MySchema.vwEmployee
are all candidates to be found because they have the three layers.
[MySchema].Employee is not a candidate because it doesn't follow the pattern of [Db].[Schema].[Object].
Thank you.
This regex:
(\w+|\[\w+\])\.(\w+|\[\w+\])\.\w+
Is as simple as it gets. It means:
A word, or a word in between [] ((\w+|\[\w+\]));
Followed by a dot (\.);
Followed by a word, or a word in between [] ((\w+|\[\w+\]));
Followed by a dot (\.);
Followed by a word (\w+).
Check out this demo and see (and test) what it matches.
Naturally, just place it in the Find what: text field of notepad++ search box.