eclipse-corrosion / corrosion

Eclipse Corrosion - Rust edition in Eclipse IDE
Eclipse Public License 2.0
223 stars 31 forks source link

add support for run/debug action #390

Open mickaelistria opened 3 years ago

mickaelistria commented 3 years ago

Rust-Analyzer adds some Run/Debug codemining. Currently, they don't do anything. Either they should be removed (there might be some rust-analyzer setting for that), or Corrosion should support them. Here is the codelens declaration from the log

[t=1632988394892] org.eclipse.corrosion.rls to LSP4E:
{"jsonrpc":"2.0","id":"8","result":[{"range":{"start":{"line":0,"character":3},"end":{"line":0,"character":7}},"command":{"title":"▶︎ Run ","command":"rust-analyzer.runSingle","arguments":[{"label":"run new_rust_project","location":{"targetUri":"file:///home/mistria/runtime-m2e-Eclipse-IDE/new_rust_project/src/main.rs","targetRange":{"start":{"line":0,"character":0},"end":{"line":3,"character":1}},"targetSelectionRange":{"start":{"line":0,"character":3},"end":{"line":0,"character":7}}},"kind":"cargo","args":{"overrideCargo":null,"workspaceRoot":"/home/mistria/runtime-m2e-Eclipse-IDE/new_rust_project","cargoArgs":["run","--package","new_rust_project","--bin","new_rust_project"],"cargoExtraArgs":[],"executableArgs":[]}}]}},{"range":{"start":{"line":0,"character":3},"end":{"line":0,"character":7}},"command":{"title":"Debug","command":"rust-analyzer.debugSingle","arguments":[{"label":"run new_rust_project","location":{"targetUri":"file:///home/mistria/runtime-m2e-Eclipse-IDE/new_rust_project/src/main.rs","targetRange":{"start":{"line":0,"character":0},"end":{"line":3,"character":1}},"targetSelectionRange":{"start":{"line":0,"character":3},"end":{"line":0,"character":7}}},"kind":"cargo","args":{"overrideCargo":null,"workspaceRoot":"/home/mistria/runtime-m2e-Eclipse-IDE/new_rust_project","cargoArgs":["run","--package","new_rust_project","--bin","new_rust_project"],"cargoExtraArgs":[],"executableArgs":[]}}]}}]}

The command is rust-analyzer.runSingle.