Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-LIFE-177

Open as Text replaces a Studio tab by the text editor of the same file

When the reader runs Open as Text on a Studio tab, the extension SHALL open the text editor of the same file in the same group, at the line shown at the top of the Studio page when it is known, close the Studio tab, and never replace that text editor by Studio, with or without the editor association of Markdown files.

Step 1 of path 1 in StRS-MDOKFSTUDIO-LIFE-023: from “A Markdown file shows in a Studio tab” to “The reader reads and edits the raw text”.

Scenarios 2

The situations the tests check; open one to read it.

nominalOpen as Text on a Studio tab
Givena Studio tab of a Markdown file whose page shows source line 12 at the top
Whenthe reader runs Open as Text
Thenthe text editor of the same file opens in the same group at line 12, it is not a preview tab, the side preview marks no line for that opening, the Studio tab is closed, and the text editor stays the active tab
boundaryNo Studio tab, and a text editor that stays
InputOutcome
the active tab is not a Studio taban information message asks to open a Markdown file in Studio first; nothing opens or closes
the line is not knownthe text editor opens at line 1
the text editor cannot be openedan error message names the file and the cause, and the Studio tab stays
a Markdown text editor opened by any other way, "Open With... > Text Editor" or "Reopen Editor With... > Text Editor" included, with the Studio association set or notthe extension closes no tab and opens no other editor in its place
the command in the menusin the Command Palette and the editor title overflow of a Studio tab only, never as a toolbar button

Implemented in 1

Tested by 3