A VS Code extension which was created for the course "Programming Tools For Data Science" at Heidelberg University.
This VS Code extension can be used to create, edit and manage code snippets from any language. For the python language, placeholders in code snippets can be calculated alongside with their datatype. A placeholder is considered to be a variable which is used but not declared inside a code snippet.
When the Extension is installed, a new Tree View Container should appear on the left side of the editor. This container contains the Fragment Editor Tree View. This Tree View will be populated by created Fragments. To create an empty Frgment, click on the box to the top right of the Tree View. Enter the name of the Fragment, then press enter. The name of the Fragment should now appear in the Tree View on the left. If you click on the name a editor should open. With this editor almost avery property of the Fragment can be edited and saved with the button 'save' on the top right.
In order to structure the Fragments in folders the tag property of Fragments can be edited. A tag, when created in the tag property of a Fragment, will appear as a folder in the Tree View and contains all Fragments which have this tag added to their tag property.
In order to create Fragments out of an existing document select the text you want to add as a snippet then press the right mouse button. In the appearing menue press 'Add Fragment' and give it a name. If the document has a '.py' ending the extension will try to determine placeholders and their datatypes. Corresponding information and warning visualisations will appear. It is important that in order to determine datatypes the extension will try to execute the document which contains the selected code snippet. If the doument can not be executed or the (configrable) timeout is reached no datatypes will be computed.
To execute the python code the extension uses the (configurable) call statement 'python3' by default.
Following properties of the extension are configurable