Skip to content

Commit d5d8cae

Browse files
committed
Add refresh icons to treeview. fix linting
1 parent f86102c commit d5d8cae

File tree

11 files changed

+15
-38
lines changed

11 files changed

+15
-38
lines changed

package.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,15 @@
264264
"when": "viewItem =~ /^migration-.*\\|?can-undo\\|?.*$/",
265265
"group": "context@1"
266266
},
267+
{
268+
"command": "entityframework.refreshDbContextTree",
269+
"when": "viewItem == dbContext",
270+
"group": "inline@1"
271+
},
267272
{
268273
"command": "entityframework.addMigration",
269274
"when": "viewItem == dbContext",
270-
"group": "inline@4"
275+
"group": "inline@2"
271276
},
272277
{
273278
"command": "entityframework.addMigration",
@@ -293,6 +298,11 @@
293298
{
294299
"command": "entityframework.scaffold",
295300
"when": "viewItem == project",
301+
"group": "inline@2"
302+
},
303+
{
304+
"command": "entityframework.refreshProjectTree",
305+
"when": "viewItem == project",
296306
"group": "inline@1"
297307
},
298308
{
0 Bytes
Binary file not shown.

src/actions/AddMigrationAction.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import * as vscode from 'vscode';
22
import { EFOutputParser } from '../cli/EFOutputParser';
3-
import { CommandProvider } from '../commands/CommandProvider';
4-
import { RefreshTreeCommand } from '../commands/RefreshTreeCommand';
53
import { getCommandsConfig } from '../config/config';
64
import { TREE_VIEW_ID } from '../constants/constants';
75

src/actions/RunMigrationAction.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
import * as vscode from 'vscode';
2-
import { CommandProvider } from '../commands/CommandProvider';
3-
import { RefreshTreeCommand } from '../commands/RefreshTreeCommand';
42
import { getCommandsConfig } from '../config/config';
53
import { TREE_VIEW_ID } from '../constants/constants';
64
import type { TerminalProvider } from '../terminal/TerminalProvider';
7-
import {
8-
dbContextsCache,
9-
DbContextTreeItem,
10-
} from '../treeView/DbContextTreeItem';
115
import { TerminalAction } from './TerminalAction';
126

137
export class RunMigrationAction extends TerminalAction {

src/actions/ScaffoldAction.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
import type { Project } from 'nuget-deps-tree';
22
import * as vscode from 'vscode';
33
import { EFOutputParser } from '../cli/EFOutputParser';
4-
import { CommandProvider } from '../commands/CommandProvider';
5-
import { RefreshTreeCommand } from '../commands/RefreshTreeCommand';
64
import { getCommandsConfig } from '../config/config';
75
import { DEFAULT_EFCORE_PROVIDERS, TREE_VIEW_ID } from '../constants/constants';
86
import { ProjectFilesProvider } from '../solution/ProjectFilesProvider';
97

108
import type { TerminalProvider } from '../terminal/TerminalProvider';
11-
import { projectsCache, ProjectTreeItem } from '../treeView/ProjectTreeItem';
129
import type { ProjectFile } from '../types/ProjectFile';
1310
import { InputWizard } from '../util/InputWizard';
1411

src/commands/UndoMigrationCommand.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
DbContextTreeItem,
77
} from '../treeView/DbContextTreeItem';
88
import type { MigrationTreeItem } from '../treeView/MigrationTreeItem';
9-
import { ProjectTreeItem, projectsCache } from '../treeView/ProjectTreeItem';
109
import { Command } from './Command';
1110
import { CommandProvider } from './CommandProvider';
1211
import { RefreshTreeCommand } from './RefreshTreeCommand';

src/treeView/TreeDataProvider.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export class TreeDataProvider
3737
this.cacheId = 'TreeDataProvider';
3838
const view = vscode.window.createTreeView(`${EXTENSION_NAMESPACE}Tree`, {
3939
treeDataProvider: this,
40+
showCollapseAll: true,
4041
});
4142
view.onDidChangeSelection(this.handleTreeItemSelection.bind(this));
4243
this.subscriptions.push(view);

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"exclude": ["dist", "out", "*.js"],
3-
"include": ["wdio.conf.ts", "src"],
3+
"include": ["src"],
44
"compilerOptions": {
55
"module": "commonjs",
66
"target": "ES2020",

webview-ui/index.html

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,6 @@
2828
window['erDiagramTitle'] = 'Example Title';
2929
</script>
3030
<div id="root"></div>
31-
<!-- <pre class="mermaid" id="mermaid">
32-
erDiagram
33-
CUSTOMER ||--o{ ORDER : places
34-
CUSTOMER {
35-
string name
36-
string custNumber
37-
string sector
38-
}
39-
ORDER ||--|{ LINE-ITEM : contains
40-
ORDER {
41-
int orderNumber
42-
string deliveryAddress
43-
}
44-
LINE-ITEM {
45-
string productCode
46-
int quantity
47-
float pricePerUnit
48-
}
49-
</pre> -->
50-
5131
<script type="module" src="/src/main.tsx"></script>
5232
</body>
5333
</html>

webview-ui/src/components/Mermaid/Mermaid.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ export function Mermaid({
8686
},
8787
}));
8888

89-
console.log('chart');
90-
9189
return (
9290
<>
9391
<div className="no-entities">

0 commit comments

Comments
 (0)