Skip to content

Commit

Permalink
fix push import order (#32)
Browse files Browse the repository at this point in the history
* Update webviewCommunicator.ts and main.css

* Update main.css
  • Loading branch information
RamiBerm authored Jan 13, 2022
1 parent 0e8b88d commit d687deb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions src/providers/webviewCommunicator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,15 @@ export class UP9WebviewCommunicator {
const currentEditorContents = editor.document.getText();
if (currentEditorContents) {
//insert missing imports at the top
const missingImports = this.getMissingImportsInCode(currentEditorContents);
editor.edit(editBuilder => {
editBuilder.insert(new vscode.Position(0, 0), this.getMissingImportsInCode(currentEditorContents));
editBuilder.insert(new vscode.Position(0, 0), missingImports);
if (currentEditorContents.indexOf("class ") == -1) {
editBuilder.insert(editor.selection.active, `${microTestsClassDef}\n${code}`);
} else {
editBuilder.insert(editor.selection.active, `\n\n${code.replace(' ', '')}`);
}
});

if (currentEditorContents.indexOf("class ") == -1) {
editor.insertSnippet(new vscode.SnippetString(`${microTestsClassDef}\n${code}`));
} else {
editor.insertSnippet(new vscode.SnippetString(`\n\n${code.replace(' ', '')}`));
}
} else {
editor.insertSnippet(new vscode.SnippetString(`${microTestsHeader}\n${code}`));
}
Expand Down
6 changes: 3 additions & 3 deletions src/webview/src/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ table {
.anchor-tab {
text-decoration: none;
color: var(--vscode-editor-foreground);
opacity: 0.8;
opacity: 0.6;
text-transform: capitalize;
margin-right: 24px;
user-select: none;
Expand All @@ -128,12 +128,12 @@ table {

.anchor-tab.active {
border-bottom: 1px solid var(--vscode-editor-foreground) !important;
font-weight: bold;
opacity: 1 !important;
}

.anchor-tab:active, .anchor-tab:hover {
color: var(--vscode-editor-foreground);
opacity: 1;
opacity: 0.8;
border-bottom: 1px solid var(--vscode-input-background);
}

Expand Down

0 comments on commit d687deb

Please sign in to comment.