Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions release/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,16 @@
"mac": "alt\u002Bshift\u002BEnter",
"when": "editorFocus \u0026\u0026 !findWidgetVisible \u0026\u0026 editorLangId == \u0027fsharp\u0027"
},
{
"command": "fsharp.explorer.moveUp",
"key": "alt\u002Bup",
"when": "focusedView == 'ionide.projectExplorerInActivity' \u007C\u007C focusedView == 'ionide.projectExplorer'"
},
{
"command": "fsharp.explorer.moveDown",
"key": "alt\u002Bdown",
"when": "focusedView == 'ionide.projectExplorerInActivity' \u007C\u007C focusedView == 'ionide.projectExplorer'"
},
{
"command": "fsharp.generateDoc",
"key": "alt\u002Bshift\u002Bj",
Expand Down
40 changes: 21 additions & 19 deletions src/Components/SolutionExplorer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,11 @@ module SolutionExplorer =
None)
|> context.Subscribe

let treeOptions = createEmpty<TreeViewOptions<Model>>
treeOptions.treeDataProvider <- provider
let treeView = window.createTreeView (treeViewId, treeOptions)
context.subscriptions.Add(unbox (box treeView))

commands.registerCommand ("fsharp.NewProject", newProject |> objfy2)
|> context.Subscribe

Expand All @@ -957,25 +962,27 @@ module SolutionExplorer =

commands.registerCommand (
"fsharp.explorer.moveUp",
objfy2 (fun m ->
match unbox m with
| File(_, _, name, Some virtPath, proj) -> FsProjEdit.moveFileUpPath proj virtPath
| _ -> undefined
|> ignore

None)
objfy2 (
Option.ofObj
>> Option.map unbox
>> Option.orElseWith (fun () -> treeView.selection |> Seq.tryHead)
>> Option.iter (function
| File(_, _, _, Some virtPath, proj) -> FsProjEdit.moveFileUpPath proj virtPath |> ignore
| _ -> ())
)
)
|> context.Subscribe

commands.registerCommand (
"fsharp.explorer.moveDown",
objfy2 (fun m ->
match unbox m with
| File(_, _, name, Some virtPath, proj) -> FsProjEdit.moveFileDownPath proj virtPath
| _ -> undefined
|> ignore

None)
objfy2 (
Option.ofObj
>> Option.map unbox
>> Option.orElseWith (fun () -> treeView.selection |> Seq.tryHead)
>> Option.iter (function
| File(_, _, _, Some virtPath, proj) -> FsProjEdit.moveFileDownPath proj virtPath |> ignore
| _ -> ())
)
)
|> context.Subscribe

Expand Down Expand Up @@ -1154,11 +1161,6 @@ module SolutionExplorer =
)
|> context.Subscribe

let treeOptions = createEmpty<TreeViewOptions<Model>>
treeOptions.treeDataProvider <- provider
let treeView = window.createTreeView (treeViewId, treeOptions)
context.subscriptions.Add(unbox (box treeView))

NodeReveal.activate context rootChanged.event treeView

let wsProvider =
Expand Down
Loading