add directive builder function and modify newFile handler #266
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's this PR do?
Adds functionality to automatically add directives into new files.
What are the important parts of the code?
Adds a directive builder function that takes a board type and language. When a newFIle is created the directive builder sets the contents of the temp file and the value in the document to the directive. Once the directive is inserted and the editor is focused, there is a call to move the cursor to the end of the document.
How should this be tested by the reviewer?
Download branch, launch editor and create new files. Notice that the cursor position is placed below the directive to begin coding immediately. Notice that on navigating away you are prompted to save.
What are the relevant tickets? (Please add
closes
,refs
, etc)closes #253
Screenshots (if appropriate)