As we are releasing Beta2 today, here is an overview of new features you can already take advantage of:
1. Context actions
These are useful actions in the code editor which SharpDevelop offers based on context.
Let's say I want my class to implement an interface. A pencil icon appears telling me that there is some action available:
Let's click the pencil icon, or simply press Ctrl+T:
Let's just click it or press Enter:
And we get the expected result.
Another example of context action is introduce new method. When I type a name of unknown method:
Context action is offered (press Ctrl+T):
Selecting it produces the expected result:
These features were previously available in editor context menu. They are being moved from context menu to context popup. The reason is that it is much faster to access them this way.
The Context Actions offered in the popup are extensible, so you can write addins to add your own. I wil write a blogpost about this.
2. Menu restructuring and shorcuts
The context menus in code editor had unnecessary submenus. They now look like this:
The actions for the clicked symbol are on the top level. Also many items got keyboard shortcuts (these shortcuts are still subject to change), so that you can trigger e.g. Find References by one key press. Other useful new shortuts are F5 to Run/Continue debugging and Shift+F5 to End debugging.
3. Find overrides
Many times, you have code working with interfaces. The IInvestor in the previous screenshot might have only 1 or 2 implementations and you know which one is going to be returned from Service.GetInvestor(). If you want to see the implementation of the DecideWhatToBuy method, just press F6 for Find overrides.
That's it, just press Enter. Note that before this feature it was quite annoying as Go to definition would just take you to the empty definition of the method in the interface.
4. New code completion
In short, the CodeCompletion is now searched by substring and CamelCase:
The most exciting feature is automatic insertion of using. Notice that in the previous screenshot, we are not importing System.IO. Look what happens when we select FileStream:
I am using this feature for a month now and it proved so much useful.
I already blogged about this, check out this blog post.
5. Highlight symbol
All occurences to the symbol under caret are highlighted. This greatly improves code readability.
I already blogged about this, check out this blog post - it also has a video.
6. Switch on enum
This is a small but useful feature. When typing a "switch" statement where the condition is an Enum the cases are automatically prefilled.