Eclipse Corrosion - Rust edition in Eclipse IDE

Overview

logo

Eclipse Corrosion

Rust edition and debug in Eclipse IDE

Corrosion is a Rust development plugin for the Eclipse IDE, providing a rich edition experience through integration with the Rust Language Server and Cargo. Available for download as a complete Eclipse package (See above), full Rust development support is just one click away.

Download/Install

Corrosion

Download a fully-fledged Eclipse IDE for Rust development from Corrosion download area.

OR

With Eclipse IDE properly installed on your machine, just click Here

OR

From a working Eclipse IDE, find Eclipse Corrosion on the Eclipse Marketplace (how to install from marketplace)

OR

From a working Eclipse IDE, install from p2 repository http://download.eclipse.org/releases/latest/ (or http://download.eclipse.org/corrosion/snapshots/ for development builds).

Rust Toolchain

To install the Rust toolchain, consider visiting https://rustup.rs/ and install Rustup.
On Linux and MacOS, the toolchain can also be installed via Corrosion in the Rust preference page (Window > Preferences).

When installing Rustup yourself, call the following command before using Corrosion:

rustup component add rls

Features

Corrosion brings together multiple different sources of features to make an enjoyable developing environment. Here are just a few of the most common features. Download today to discover all Corrosion has to offer.

Rust Language Server

The RLS supplies Corrosion with the majority of the edition abilities. More information can be found at the RLS GitHub Repository.

  • Completion Assist
  • Documentation Hover
  • Diagnostics
  • Formatting

RLS features

Debug

Using the rust-gdb, Corrosion enables users to debug their Rust programs with intelligent supports.

  • Variables View
  • GDB Console
  • Breakpoints
  • Expression Execution

Debug features

Cargo Test monitoring

logo

See also ▶️ video demo.

Cargo and Rustup Integration

Corrosion is built for all Rust developers, newcomers to experts, bringing a GUI to common Cargo features.

  • New Project Wizard
  • Toolchain Management
  • TOML file editing support
  • Export Crate Wizard
  • Rust Language Server Preferences

Cargo and Rustup features

in the powerful in versatile Eclipse IDE

Corrosion fits right into the standard Eclipse IDE workflows that boost productivity:

  • Project Outline
  • Dark Theme
  • Problems View
  • Git integration (Only available in Corrosion Package)
  • Embedded Terminal (Only available in Corrosion Package)
  • ...all Eclipse Marketplace extensions you like, including support for any other language!

Eclipse features

Contributing

Clone to Eclipse IDE

Corrosion is always open to new features and pull requests. If you have a feature or bug you wish to work on, file an issue and other Corrosion developers will be able to help you get started.

Refer to our Contributing Guide for more instructions.

Project Overview

For the edition, Corrosion uses the lsp4e project to integrate with the Rust Language Server and TM4E project to provide syntax highlighting in order to provide a rich Rust editor in the Eclipse IDE.

rustup is used to easily provisin the various necessary Rust tools.

Initialization, import and export of projects and execution are provided by integration with cargo command.

Debugging is provided by integration with rust-gdb and Eclipse CDT GDB support.

Corrosion was formerly called RedOx, but required a name change due to naming overlap with another project (See issue #24)

License

Corrosion is an open-source project licensed under The Eclipse Public License - v 2.0

The Rust and Cargo logos are owned by Mozilla and distributed under the terms of the Creative Commons Attribution license (CC-BY) (More Info).

More Licensing Information

Comments
  • Syntax coloring lost after load or reformat

    Syntax coloring lost after load or reformat

    I have observed Rust source syntax coloring loss occasionally, usually after:

    • first opening of a file
    • Ctrl+Shift+F formatting
    • copy/paste code from another source file

    Closing and reopening the affected file is an effective, albeit annoying, workaround.

    upstream-eclipse 
    opened by norru 52
  • could not find `Cargo.toml` in `/` or any parent directory

    could not find `Cargo.toml` in `/` or any parent directory

    This error is popping up randomly when ctrl+clicking on symbols resolving to a .cargo lib

    selection_155

    • I do have .cargo imported as a project in the workspaces.
    • Most of the time, the operation correctly loads the source file in .cargo and does not produce an error
    opened by norru 44
  • [new feature] add a `Cargo test` debug configuration

    [new feature] add a `Cargo test` debug configuration

    While it's somehow possible to work this around, there should be a simple option to run cargo test in a debugging session.

    The way I currently do it is:

    • run cargo test in a shell
    • take note of the (random) executable name generated by cargo in the target directory
    • create a new debug profile using the executable above rather than the default executable name

    This is error prone as you have to remember to change the debug profile when the test executable name changes (otherwise gdb will load a binary which is out of sync with the source code)

    The way it should be is:

    • create a new cargo test profile
    • choose the project in the created profile
    • profit!

    This may actually require changes in Cargo to set/get the temp il

    enhancement upstream-cargo 
    opened by norru 42
  • Rust editor doesn't show errors

    Rust editor doesn't show errors

    I have the following rust code in the editor:

    fn main() {
        let a = "Foo";
        println!("Hello, world!" + a);
    }
    

    However, trying to run this from the IDE I do get:

       Compiling new_rust_project v0.1.0 (/home/jreimann/Development/workspace-rust/new_rust_project)
    error: format argument must be a string literal
     --> src/main.rs:3:14
      |
    3 |     println!("Hello, world!" + a);
      |              ^^^^^^^^^^^^^^^^^^^
    help: you might be missing a string literal to format with
      |
    3 |     println!("{}", "Hello, world!" + a);
      |              ^^^^^
    
    error: aborting due to previous error
    
    error: Could not compile `new_rust_project`.
    
    To learn more, run the command again with --verbose.
    

    Also see:

    image

    My expectations would be:

    • The editor shows the same errors, at least when I save the file, or after it got compiled
    • Locations (file + line number) in the log output can be clicked in, to open the file in the IDE
    • I see some error markers in the project explorer
    opened by ctron 42
  • Windows Debug hello World -> Unable to launch Rust Project from selection

    Windows Debug hello World -> Unable to launch Rust Project from selection

    I installed rust, eclipse, created a new cargo project and tried to launch it.

    Eclipse opened the settings panel complaining: "install missing rls component in rustup" I installed rustup component add rls-preview rust-analysis rust-src and the message was gone. It would have been nice to get a better help than "install missing rls component in rustup"

    Running the application worked fine now, but debugging gave me:

    image image

    I should mention, that I'm a rust newcomer without hardly any C/C++ background, but I suppose this actually should run "out of the box"?

    opened by Coalado 30
  • Align target-platform.target with current lsp4e target

    Align target-platform.target with current lsp4e target

    I have changed the target-platform so it is possible to edit and debug Corrosion together with LSP4E in the same workspace.

    I don't know of a better way. Suggestions welcome.

    Signed-off-by: Nico Orru [email protected]

    opened by norru 25
  • Support rust-analyzer as Language Server

    Support rust-analyzer as Language Server

    rust-analyzer is the evolution of RLS and has support for non-Cargo based projects.

    Currently, corrosion requires to have RLS. RLS and rust-analyzer should be interoperable but corrosion relies on some static output of RLS (namely, rls --version).

    opened by tweksteen 24
  • Content assist, Outline view and hovering doesn't work. Wrong settings or bug?

    Content assist, Outline view and hovering doesn't work. Wrong settings or bug?

    Content assist works only once on every Eclipse restart. Outline view and hovering never work. Is it possible to use Eclipse IDE for Rust with Debian version of rust?

    I start Eclipse, write io:: <Ctrl+Space> => io::stdin() <.> => io::stdin().read_line(); Completion works. If I try to do it once again on the next line after io:: It doesn't work and shows only unimplemented, println, for and some other global common variants. Also hovering on foo doesn't mark occurences.

    Here is the test code I found somewhere here on issues.

    use std::io;
    
    fn main() {
        io::stdin().read_line(buf); // Content assist worked well here.
        io::stdin(). // Here didn't.
        let foo = 1; // Howering here does nothing.
        {
            let foo = 2;
            println!("{}", foo);
        }
        println!("{}", foo);
    }
    

    Commands outputs below rustc --version rustc 1.24.1

    rustup toolchain list

    stable-x86_64-unknown-linux-gnu
    1.24.1-x86_64-unknown-linux-gnu (default)
    

    pgrep -l rls

    13743 rls
    

    cat /proc/13743/cmdline /home/***/.rustup/toolchains/1.24.1-x86_64-unknown-linux-gnu/bin/rls

    IDE Settings: rust_prefs

    IDE Error log: errorlog

    RLS Log

    IDE download from official website with built-in Corrosion, EGit, etc... default eclipse.ini wasn't changed.

    ** Info** Eclipse IDE for Rust Developers Version: 2018-12 (4.10.0) Build id: 20181214-0600 Corrosion: Rust edition in Eclipse IDE 0.3.0.201812040953 OS: Debian 9.6 rustup installed via Eclipse but I want to use 1.24.1 toolchain installed from Debian repo. Installed packages: rustc, rust-src, rust-gdb

    question 
    opened by IMMZ 24
  • Ctrl+click to navigate not working reliably

    Ctrl+click to navigate not working reliably

    In very many cases, hovering on a Trait or package symbol brings up the symbol's documentation pop up, but Ctrl+click doesn't navigate to source. In these case the underline "link" decoration also doesn't appear if hovering while holding Ctrl.

    This is different from another bug report in which the Ctrl+click and the hover weren't resolving on non-tail symbols in a path, because 1) hover works on the path components and 2) Ctrl+click doesn't work on any of the symbols in a path.

    upstream-rls 
    opened by norru 24
  • Clippy RLS support

    Clippy RLS support

    Hello,

    In VSC the RLS allows transparent linting via native RLS Clippy integration.

    https://github.com/rust-lang-nursery/rls/issues/149

    It would be a great addition to have this in Corrosion.

    opened by norru 24
  • "Rename" refactoring is very unreliable

    EDIT: the "first time" is a red herring. "Rename" is generally flaky.

    rename_error_stack_trace.txt The first time I attempt to rename a local symbol it works fine. If I try then to change another local symbol, I get errors of various sorts:

    • "no information for symbol"/"nothing to rename"
    LSP4E to org.eclipse.corrosion.rls:{"jsonrpc":"2.0","id":"4047","method":"textDocument/rename","params":{"textDocument":{"uri":"file://<snip>.rs"},"position":{"line":993,"character":9},"newName":"view_data"}}
    org.eclipse.corrosion.rls to LSP4E:
    [...]
    org.eclipse.corrosion.rls to LSP4E:{"jsonrpc":"2.0","method":"window/progress","params":{"done":true,"id":"progress_5532","title":"Indexing"}}
    org.eclipse.corrosion.rls to LSP4E:{"jsonrpc":"2.0","method":"window/showMessage","params":{"message":"Rename failed: no information for symbol","type":2}}
    

    Clue: the position reported in the log doesn't match the position of the symbol (off by one line)

    • Internal error
    	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5797)
    	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1374)
    	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:5051)
    	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4583)
    	at org.eclipse.jface.window.Window.runEventLoop(Window.java:821)
    	at org.eclipse.jface.window.Window.open(Window.java:797)
    	at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation$1.run(RefactoringWizardOpenOperation.java:192)
    	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72)
    	at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:212)
    	at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:126)
    	at org.eclipse.lsp4e.operations.rename.LSPRenameHandler.execute(LSPRenameHandler.java:66)
    	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:294)
    	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:96)
    	at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
    	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:320)
    	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:254)
    	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:164)
    	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156)
    	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:497)
    	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:490)
    	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:207)
    	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:436)
    	at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.handleWidgetSelection(AbstractContributionItem.java:449)
    	at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.lambda$2(AbstractContributionItem.java:475)
    	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
    	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5797)
    	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1374)
    	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:5051)
    	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4583)
    	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
    	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
    	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
    	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
    	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:628)
    	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
    	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:563)
    	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:151)
    	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)
    	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:199)
    	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
    	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
    	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:391)
    	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:246)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
    	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:595)
    	at org.eclipse.equinox.launcher.Main.run(Main.java:1501)
    Caused by: org.eclipse.core.runtime.AssertionFailedException: null argument:
    	at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:88)
    	at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:76)
    	at org.eclipse.ltk.core.refactoring.RefactoringStatusEntry.<init>(RefactoringStatusEntry.java:119)
    	at org.eclipse.ltk.core.refactoring.RefactoringStatusEntry.<init>(RefactoringStatusEntry.java:87)
    	at org.eclipse.ltk.core.refactoring.RefactoringStatus.addFatalError(RefactoringStatus.java:557)
    	at org.eclipse.ltk.core.refactoring.RefactoringStatus.addFatalError(RefactoringStatus.java:544)
    	at org.eclipse.lsp4e.operations.rename.LSPRenameProcessor.handleError(LSPRenameProcessor.java:118)
    	at org.eclipse.lsp4e.operations.rename.LSPRenameProcessor.checkFinalConditions(LSPRenameProcessor.java:106)
    	at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.checkFinalConditions(ProcessorBasedRefactoring.java:225)
    	at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:86)
    	at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:122)
    	at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:210)
    	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
    	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2319)
    	at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:89)
    	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
    Root exception:
    org.eclipse.core.runtime.AssertionFailedException: null argument:
    	at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:88)
    	at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:76)
    	at org.eclipse.ltk.core.refactoring.RefactoringStatusEntry.<init>(RefactoringStatusEntry.java:119)
    	at org.eclipse.ltk.core.refactoring.RefactoringStatusEntry.<init>(RefactoringStatusEntry.java:87)
    	at org.eclipse.ltk.core.refactoring.RefactoringStatus.addFatalError(RefactoringStatus.java:557)
    	at org.eclipse.ltk.core.refactoring.RefactoringStatus.addFatalError(RefactoringStatus.java:544)
    	at org.eclipse.lsp4e.operations.rename.LSPRenameProcessor.handleError(LSPRenameProcessor.java:118)
    	at org.eclipse.lsp4e.operations.rename.LSPRenameProcessor.checkFinalConditions(LSPRenameProcessor.java:106)
    	at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.checkFinalConditions(ProcessorBasedRefactoring.java:225)
    	at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:86)
    	at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:122)
    	at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:210)
    	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
    	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2319)
    	at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:89)
    	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
    
    upstream-eclipse 
    opened by norru 23
  • Emacs keybindings stop working soon after started editing a file

    Emacs keybindings stop working soon after started editing a file

    Description of problem

    I have a fresh Eclipse installation to which I added the Corrosion plugin from https://download.eclipse.org/corrosion/releases/latest/. Soon after I start editing a Rust file and it starts to autocomplete and assist me while editing, common keybindings stop working, such as Ctrl + A (go to beginning of line), Ctrl + N (go to next line) etc. I use the Emacs keybindings scheme that I chose in the drop-down menu under Window -> Preferences -> General -> Keys.

    How to reproduce

    1. I installed rust using rustup.
    2. I use Ubuntu 22.04
    3. I downloaded and unpacked Eclipse IDE for Java developers and unpacked it under ~/uppackat/eclipse-rust.
    4. I launched it and chose to use ~/eclipse-rust-workspace as my workspace.
    5. I added the Corrosion plugin from the url https://download.eclipse.org/corrosion/releases/latest/.
    6. I chose the Emacs keybindings scheme at Window -> Preferences -> General -> Keys
    7. I started a new cargo project under ~/prog/rust/blueprint.
    8. I started editing the file ~/src/main.rs by adding a function fn gcd(mut n: u64, mut m: u64) -> u64 {let a = 4;} but very soon as I was typing and the Corrosion plugin started assisting me, the Emacs bindings such as those to move the cursor (Ctrl + n, Ctrl + p, Ctrl + f and Ctrl + b) stopped working.
    9. I observed that whenever I typed an Emacs binding that wasn't working, an error appeared in the Error Log (open it from Window -> Show view -> Error Log). See below for details about the error.

    Details from Error Log

    Here are details from the error that appears in the Error Log when I type an Emacs key command that isn't working.

    Details:

    Plugin: org.eclipse.ui
    Severity: Error
    Message: Unhandled event loop exception
    

    Exception Stack Trace:

    java.lang.NullPointerException: Cannot invoke "org.eclipse.swt.widgets.Table.isDisposed()" because "this.this$0.fProposalTable" is null
    	at org.eclipse.jface.text.contentassist.CompletionProposalPopup$ProposalSelectionHandler.execute(CompletionProposalPopup.java:146)
    	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488)
    	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:485)
    	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
    	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:308)
    	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:580)
    	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:647)
    	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:439)
    	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:96)
    	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
    	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1953)
    	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1528)
    	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1555)
    	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1538)
    	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1577)
    	at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:937)
    	at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:4013)
    	at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:921)
    	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2507)
    	at org.eclipse.swt.widgets.Control.windowProc(Control.java:6834)
    	at org.eclipse.swt.widgets.Display.windowProc(Display.java:6163)
    	at org.eclipse.swt.internal.gtk3.GTK3.gtk_main_do_event(Native Method)
    	at org.eclipse.swt.widgets.Display.eventProc(Display.java:1597)
    	at org.eclipse.swt.internal.gtk3.GTK3.gtk_main_iteration_do(Native Method)
    	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4514)
    	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
    	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
    	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
    	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
    	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:643)
    	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
    	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:550)
    	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:171)
    	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
    	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
    	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
    	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
    	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
    	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
    	at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
    	at org.eclipse.equinox.launcher.Main.main(Main.java:1440)
    

    Session data:

    eclipse.buildId=4.26.0.20221201-1200
    java.version=17.0.5
    java.vendor=Eclipse Adoptium
    BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
    Framework arguments:  -product org.eclipse.epp.package.java.product
    Command-line arguments:  -data file:/home/jonas/eclipse-rust-workspace/ -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product
    
    opened by jonasseglare 3
  • Outline view 'waiting for cargo metadata' not functioning due to rust-analyzer packaging issue.

    Outline view 'waiting for cargo metadata' not functioning due to rust-analyzer packaging issue.

    TL:DR

    The 'download rust analyzer' button in the 'Rust' preferences page downloads an artifact 'rust-analyzer-x86_64-pc-windows-msvc.gz' that contains an executable file, 'rust-analyzer' which does not have the '.exe' extension on it and Eclipse seems unable to run it, thus the outline view does not work for rust files.

    Full details of the issue are here, including a temporary workaround:

    https://github.com/rust-lang/rust-analyzer/issues/10910#issuecomment-1225823218

    I'm creating this issue so that if changes need to be made in Eclipse Corrosion for windows users so that it correctly uses the .exe extension for the rust-analyzer executable then the changes can be tracked here.

      Corrosion: Rust edition in Eclipse IDE	1.2.4.202206282034	org.eclipse.corrosion.feature.feature.group	Eclipse Corrosion
    
    opened by hydra 1
  • add support for run/debug action

    add support for run/debug action

    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.

    opened by mickaelistria 0
  • First vertical split since launch loses syntax coloring

    First vertical split since launch loses syntax coloring

    On the new june build of corrosion (1.2.1.202106081156) and eclipse 2020-12 doing Window -> Editor -> Split Editor (Vertical) for the first time since eclipse launch on a 200 line rust file results in the second pane consistently being uncolored. It also happens when I leave the vertical split open and restart eclipse.

    Originally posted by @cplir-c in https://github.com/eclipse/corrosion/issues/243#issuecomment-873763215

    opened by cplir-c 7
  • Download Rust into $XDG_CACHE_HOME

    Download Rust into $XDG_CACHE_HOME

    $HOME is not writable in flatpak and other app containers, because allowing arbitrary writes under $HOME would allow easy container escape by adding binaries in ~/.local/bin/ for example (which Corrosion happens to be doing with rust-analyzer, BTW). You should instead use variables defined in XDG Base Directory Specification just like the rest of Eclipse does. The most suitable location for Rust downloads would be probably $XDG_CACHE_HOME.

    This would also prevent polluting user's home directory with more application-specific data directories as $XDG_CACHE_HOME defaults to $HOME/.cache.

    BTW, I did not find a way to point Corrosion to my own installation of Rust. Normal installation includes rustc and cargo binaries and it can include rust-analyzer, but Corrosion for some reason requires rustup (the installer).

    opened by robertvazan 16
Releases(1.2.4)
  • 1.2.4(Jul 5, 2022)

    What's Changed

    • Open 1.2.4 stream by @akurtakov in https://github.com/eclipse/corrosion/pull/398
    • Reduce priority for snippets by @mickaelistria in https://github.com/eclipse/corrosion/pull/402
    • Various updates and fixes by @akurtakov in https://github.com/eclipse/corrosion/pull/400
    • Move to Java 17 as BREE by @mickaelistria in https://github.com/eclipse/corrosion/pull/404
    • Fix compilation by @akurtakov in https://github.com/eclipse/corrosion/pull/405
    • Various improvements by @akurtakov in https://github.com/eclipse/corrosion/pull/406
    • Simplify Status creation by @akurtakov in https://github.com/eclipse/corrosion/pull/407

    Full Changelog: https://github.com/eclipse/corrosion/compare/1.2.3...1.2.4

    Source code(tar.gz)
    Source code(zip)
  • 1.2.3(Jan 26, 2022)

  • 1.2.2(Oct 28, 2021)

    Do not associate LS with Cargo.toml

    Rust-Analyzer doesn't support Cargo.toml files editing smartness and just generated errors.

    Fix compatibility with Eclipse 2021-09 release

    LSP4J 0.12 contains API changes that require adjustments to Corrosion internals to properly work with it.

    MacOS X AArch64 product added

    The standalone Rust IDE product is generated for that CPU architecture too.

    Standalone downloads builtin JVM updated to Java 17

    Source code(tar.gz)
    Source code(zip)
Owner
Eclipse Foundation
Eclipse Foundation
Rust IDE support for Atom, powered by the Rust Language Server (RLS)

IDE-Rust Rust language support for Atom-IDE, powered by rust-analyzer. Features Auto-completion Diagnostics (errors and warnings from rustc) Document

The Rust Programming Language 239 Dec 14, 2022
Rust IDE

This branch contains the development of a "new ride" that maintain a small impact on the ui library. This is for a few reasons. Can customize the colo

Gustav Jansson 171 Dec 24, 2022
An IDE for Rust

Introduction SolidOak is a simple IDE for Rust. See the website for binary releases. It has the following features: An embedded copy of Neovim as its

Zach Oakes 907 Dec 29, 2022
Flowistry: Powerful IDE Tools for Rust

Flowistry - a VSCode extension that helps you understand Rust programs with program analysis.

Will Crichton 1.4k Dec 29, 2022
IDE tools for writing pest grammars, using the Language Server Protocol for Visual Studio Code, Vim and other editors

Pest IDE Tools IDE support for Pest, via the LSP. This repository contains an implementation of the Language Server Protocol in Rust, for the Pest par

pest 20 Apr 8, 2023
rust-analyzer is a modular compiler frontend for the Rust language

rust-analyzer is a modular compiler frontend for the Rust language. It is a part of a larger rls-2.0 effort to create excellent IDE support for Rust.

null 11.2k Jan 8, 2023
Rust language support in Atom - LOOKING FOR MAINTAINER, see #144

Rust language support in Atom Adds syntax highlighting and snippets to Rust files in Atom. Install Install the package language-rust in Atom (Preferen

Andreas Neuhaus 118 Oct 11, 2022
Emacs configuration for Rust

Table of Contents Introduction Installation Melpa Manual installation Feature guide Indentation Code formatting Running / testing / compiling code Cli

The Rust Programming Language 919 Jan 4, 2023
Rust development environment for Emacs

Rustic Table of Contents Rustic Intro Installation straight Compilation Faces rustc errors Rustfmt edition 2018 LSP Server Client eglot lsp-mode lsp-e

null 612 Dec 30, 2022
Better Rust/Cargo support for Flycheck

flycheck-rust — Flycheck for Rust This Flycheck extension configures Flycheck automatically for the current Cargo project. Setup Install from MELPA or

Flycheck 112 Sep 21, 2022
NetBeans Rust plugin

Rust NetBeans Plugin A NetBeans plugin for Rust. Linux / OSX Windows Requirements NetBeans 8.2.x Java 8+ Rust Cargo Rustup Features So far, it include

drrb 52 Oct 10, 2022
Rust plugin for the IntelliJ Platform

Rust plugin for the IntelliJ Platform Build Status Check Stable Beta Nightly Installation & Usage Available installation options and features are desc

IntelliJ Rust 4.2k Jan 2, 2023
The official Sublime Text 3 package for the Rust Programming Language

Rust Enhanced About This is a Sublime Text 3 package which supports Rust starting with version 1.0, it makes no attempt at supporting earlier incompat

The Rust Programming Language 704 Jan 7, 2023
Vim configuration for Rust.

rust.vim Description This is a Vim plugin that provides Rust file detection, syntax highlighting, formatting, Syntastic integration, and more. It requ

The Rust Programming Language 3.4k Jan 8, 2023
Rust Cargo command bindings

Vim Cargo Simple vim command bindings to quickly run cargo stuff from vim. Commands Available, mapping with their Cargo equivalant: CargoBench CargoBu

Timon Vonk 52 Dec 24, 2022
Visual Studio extension for Rust

Visual Studio extension for Rust Currently in development, and not feature complete. Stable versions are available on the Visual Studio extension gall

PistonDevelopers 697 Dec 18, 2022
Rust extension for Visual Studio 2017 with RLS support

Rust support for Visual Studio 2017 Preview Adds language support for Rust to Visual Studio 2017. Supports: code completion goto definition find all r

Zoey Riordan 111 Aug 4, 2022
crates is an extension aims to help people to manage their dependencies for rust (crates.io & TOML).

crates Hello Rust & VSCode lovers, This is crates, an extension for crates.io dependencies. Aims helping developers to manage dependencies while using

Seray Uzgur 164 Jan 4, 2023
Rust On the FLY completion for neovim

rofl.nvim Rust On the FLy completion engine for Neovim. Why Rust? It's 2021. I think the question you should be asking yourself is "Why NOT Rust?!?? (

TJ DeVries 63 Sep 25, 2022